/* ==========================================================================
   SIBERIA CLUB - SITE THEME (shared shell)
   Ported from template-8-sibir-club. Used by Views/Shared/_SiteLayout.cshtml on
   every themed page: variables, base type, top bar, dropdowns, footer.
   Home-only sections live in home.css; the skin for the older Bootstrap page
   content (events, points, login, ...) lives in inner.css.
   ========================================================================== */

:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-ink: #17171a;
  --color-muted: #6f6f6f;
  --color-border: #e4e2dc;
  --color-accent: #bc8c4c;
  --color-danger: #c0392b;
  --font-display: 'Cormorant Garamond', 'Cairo', serif;
  --font-body: 'Inter', 'Cairo', sans-serif;
  --container-width: 1180px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --color-bg: #121212;
  --color-surface: #1b1b1b;
  --color-ink: #f3f2ee;
  --color-muted: #a3a19a;
  --color-border: #2c2c2c;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-ink); line-height: 1.65; overflow-x: hidden; transition: background var(--transition), color var(--transition); }
a, a:hover { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
.site-container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Navbar ---------- */
.sitebar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: transparent; transition: var(--transition); padding: 18px 0; }
.sitebar.scrolled { background: var(--color-bg); padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; }
.navbar__logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 3px; color: var(--color-ink); }
.navbar__logo-mark { display: inline-block; width: 46px; height: 46px; flex-shrink: 0; }
.navbar__logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.navbar__logo-mark--sm { width: 56px; height: 56px; }
.sitebar:not(.scrolled) .navbar__logo-mark img { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45)); }
.sitebar:not(.scrolled) { color: #fff; }
.sitebar:not(.scrolled) .navbar__logo,
.sitebar:not(.scrolled) .navbar__links a,
.sitebar:not(.scrolled) .navbar__link-btn { color: #fff; }
.navbar__links { display: flex; align-items: center; gap: 24px; margin-inline-start: auto; margin-inline-end: 26px; }
.navbar__links a, .navbar__link-btn { font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 500; position: relative; white-space: nowrap; }
.navbar__links a::after, .navbar__link-btn::after { content: ''; position: absolute; inset-inline-start: 0; bottom: -6px; width: 0; height: 1px; background: currentColor; transition: var(--transition); }
.navbar__links a:hover::after, .navbar__link-btn:hover::after { width: 100%; }
.navbar__link-btn { background: none; border: none; color: inherit; cursor: pointer; padding: 0; }
.navbar__links form { margin: 0; }
.navbar__user { font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--color-accent) !important; font-weight: 600; }
.navbar__right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; transition: var(--transition); }
.theme-toggle:hover { background: currentColor; }
.theme-toggle:hover .theme-toggle__icon { color: var(--color-bg); }
.navbar__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; z-index: 1100; color: inherit; }
.navbar__toggle span { width: 24px; height: 2px; background: currentColor; transition: var(--transition); }

/* ---------- Dropdowns (Ordering + language) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown__toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: inherit; cursor: pointer; padding: 0; font-size: inherit; }
.nav-dropdown__caret { font-size: 0.7em; transition: transform 0.25s ease; }
.nav-dropdown.open .nav-dropdown__caret { transform: rotate(180deg); }
.nav-dropdown__menu { display: none; position: absolute; top: calc(100% + 16px); inset-inline-start: 0; min-width: 230px; background: var(--color-bg); color: var(--color-ink); border: 1px solid var(--color-border); border-radius: 3px; box-shadow: 0 14px 36px rgba(0,0,0,0.22); padding: 8px 0; z-index: 1200; }
.nav-dropdown.open > .nav-dropdown__menu { display: block; }
.nav-dropdown__menu::before { content: ''; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.sitebar .nav-dropdown__menu a, .sitebar .nav-dropdown__menu .culture-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 20px; color: var(--color-ink); background: none; border: none; cursor: pointer; text-align: start; font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 500; white-space: nowrap; }
.sitebar .nav-dropdown__menu a::after { display: none; }
.sitebar .nav-dropdown__menu a:hover, .sitebar .nav-dropdown__menu .culture-option:hover { background: var(--color-surface); color: var(--color-accent); }
.nav-dropdown__menu form { margin: 0; }
.nav-dropdown--culture .nav-dropdown__menu { inset-inline-start: auto; inset-inline-end: 0; min-width: 170px; }
.culture-toggle { gap: 0; }
.culture-toggle img, .culture-option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.culture-toggle { border-radius: 50%; border: 1px solid transparent; transition: var(--transition); }
.culture-toggle:hover, .nav-dropdown.open > .culture-toggle { border-color: currentColor; }
.culture-option { text-transform: none !important; letter-spacing: 0.3px !important; font-size: 0.9rem !important; }


/* ---------- Footer ---------- */
.footer { padding: 70px 0 0; border-top: 1px solid var(--color-border); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 44px; align-items: start; }
.footer__col p, .footer__col li { color: var(--color-muted); font-size: 0.9rem; margin: 8px 0; }
.footer__col h4 { margin-bottom: 14px; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; }
.footer__col a:hover { color: var(--color-accent); }
.footer__socials { display: flex; gap: 10px; margin-top: 14px; }
.footer__socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer__socials a svg { width: 18px; height: 18px; fill: currentColor; }
.footer__socials a:hover { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
.footer__bottom { border-top: 1px solid var(--color-border); padding: 20px 0; text-align: center; color: var(--color-muted); font-size: 0.8rem; }
.footer__bottom a:hover { color: var(--color-accent); }
.footer__sep { margin: 0 8px; opacity: 0.5; }

.back-to-top { position: fixed; bottom: 26px; right: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--color-ink); border: none; color: var(--color-bg); font-size: 1.1rem; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); z-index: 900; }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Responsive (shell) ---------- */
@media (max-width: 1100px) {
  .navbar__links { position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh; background: var(--color-bg); color: var(--color-ink); flex-direction: column; align-items: flex-start; justify-content: center; gap: 24px; padding: 40px; transition: right 0.4s ease; border-left: 1px solid var(--color-border); margin: 0; }
  [dir="rtl"] .navbar__links { right: auto; left: -100%; border-left: none; border-right: 1px solid var(--color-border); transition: left 0.4s ease; }
  .navbar__links.open { right: 0; }
  [dir="rtl"] .navbar__links.open { right: auto; left: 0; }
  .navbar__links a, .navbar__link-btn { color: var(--color-ink) !important; }
  .navbar__toggle { display: flex; }
  .navbar__links .nav-dropdown__menu { position: static; box-shadow: none; border: none; border-inline-start: 1px solid var(--color-border); border-radius: 0; background: transparent; min-width: 0; padding: 4px 0 0; margin-top: 10px; }
  .navbar__links .nav-dropdown__menu::before { display: none; }
  .navbar__links .nav-dropdown__menu a { padding: 8px 16px; }
}
@media (max-width: 960px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Inner pages: solid top bar + content offset ---------- */
.site-main { min-height: 60vh; padding: 118px 0 70px; }
@media (max-width: 560px) { .site-main { padding-top: 100px; } }
