/* ========================================
   SURAT CHESS CLUB — SHARED STYLES
   Used across all pages for consistency
   ======================================== */

:root {
  /* Brand colors — single source of truth (do NOT redefine in other files) */
  --cream: #FAF6EE;
  --cream-soft: #F4EEDF;
  --warm: #FFFCF6;
  --ink: #2A2520;
  --ink-soft: #5A4F45;
  --muted: #998E7F;
  --gold: #C29A4A;
  --gold-soft: #E5C97F;
  --sage: #8B9D7E;
  --rose: #D4A5A0;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --line: rgba(42,37,32,0.1);

  /* Design system tokens */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(42,37,32,0.06);
  --shadow:    0 8px 20px -8px rgba(42,37,32,0.18);
  --shadow-lg: 0 26px 54px -28px rgba(42,37,32,0.4);
  --trans-fast: 0.18s ease;
  --trans:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --hover-lift: -6px;

  /* Z-index scale */
  --z-sticky:   100;
  --z-dropdown: 200;
  --z-nav:      1000;
  --z-modal:    1500;
  --z-toast:    2000;
}

/* Accessible focus ring + skip-link (used site-wide) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 5000;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  background-image: radial-gradient(ellipse 1200px 800px at 50% 0%, rgba(229,201,127,0.08), transparent 60%),
                    radial-gradient(ellipse 900px 600px at 50% 100%, rgba(194,154,74,0.05), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Fraunces', serif; }

/* ========================================
   NAVIGATION
   ======================================== */
/* ========================================
   NAVIGATION (SEMANTIC & STABLE)
   ======================================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(250, 246, 238, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-mark {
  width: 42px; height: 42px;
  background: var(--warm);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(42,37,32,0.08);
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover, 
.nav-links a.active,
.nav-links .nav-trigger.active { 
  color: var(--gold); 
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-cta {
  background: var(--ink); color: var(--cream);
  padding: 11px 22px; border-radius: 100px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-cta:hover { background: var(--gold); transform: translateY(-1px); }

/* Breadcrumb nav — reset sticky-header/nav styles inherited */
nav.breadcrumb {
  position: static;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  padding: 0;
  display: block;
  z-index: auto;
  box-shadow: none;
  width: auto;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 36px; height: 36px;
  border: none; background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu {
  display: none;
  position: fixed; top: 74px; left: 12px; right: 12px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  z-index: 1002;
  box-shadow: 0 16px 40px rgba(42,37,32,0.15);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.mobile-menu a:hover { background: var(--cream-soft); color: var(--gold); }
.mobile-menu .mobile-cta {
  background: var(--ink); color: var(--cream);
  text-align: center;
  margin-top: 6px;
}

/* ========================================
   WHATSAPP STICKY (floating green icon)
   ======================================== */
.whatsapp-sticky {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 999;
  background: var(--whatsapp);
  color: white;
  width: 51px; height: 51px;
  border-radius: 50%;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35), 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s;
  animation: pulseGlow 2.5s ease-in-out infinite;
}
.whatsapp-sticky:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-2px) scale(1.05);
}
.whatsapp-sticky svg { width: 25px; height: 25px; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,211,102,0.35), 0 2px 6px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 8px 28px rgba(37,211,102,0.6), 0 0 0 8px rgba(37,211,102,0.12); }
}

/* ========================================
   MOBILE STICKY BOTTOM BAR (hidden on desktop)
   ======================================== */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 998;
  background: rgba(250,246,238,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  box-shadow: 0 -6px 24px rgba(42,37,32,0.1);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  padding: 14px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.mobile-bar a svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ========================================
   BUTTONS — Base + variants (used everywhere)
   ======================================== */
.btn,
.btn-primary,
.btn-whatsapp,
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink); color: var(--cream);
  padding: 14px 28px;
  box-shadow: 0 8px 20px -8px rgba(42,37,32,0.4);
}
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); }

.btn-whatsapp {
  background: var(--whatsapp); color: white;
  box-shadow: 0 8px 20px -8px rgba(37,211,102,0.6);
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); transform: translateY(-2px); }
.btn-whatsapp svg { width: 18px; height: 18px; }

.btn-outline {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

/* ========================================
   PAGE HEADER (small heading area for subpages)
   ======================================== */
.page-header {
  padding: 60px 60px 30px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.page-header .eyebrow {
  font-size: 11.5px; letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  font-weight: 700;
}
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-header h1 em { font-style: italic; color: var(--gold); font-weight: 600; }
.page-header .sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ========================================
   GENERIC SECTION
   ======================================== */
section.block { padding: 70px 60px; }
.container { max-width: 1200px; margin: 0 auto; }

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--ink);
  color: rgba(250,246,238,0.7);
  padding: 60px 60px 24px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 16px;
}
.footer-col .footer-logo {
  font-family: 'Fraunces', serif;
  color: var(--cream);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.footer-col .footer-logo .logo-mark {
  width: 36px; height: 36px;
  background: var(--cream);
  padding: 4px;
}
.footer-col p, .footer-col a {
  display: block;
  color: rgba(250,246,238,0.65);
  font-size: 13.5px;
  text-decoration: none;
  margin-bottom: 6px;
  line-height: 1.7;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold-soft); }
.footer-col .btn-whatsapp {
  display: inline-flex;
  padding: 10px 18px;
  font-size: 13px;
  margin-bottom: 8px;
  margin-top: 4px;
}
.footer-col .btn-outline-light {
  display: inline-block;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
}
.footer-col .btn-outline-light:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
  color: rgba(250,246,238,0.5);
}
.footer-bottom .links { display: flex; gap: 18px; }
.footer-bottom .links a { color: rgba(250,246,238,0.5); text-decoration: none; }
.footer-bottom .links a:hover { color: var(--gold-soft); }

/* ========================================
   NAV DROPDOWN — Chess Programs submenu (desktop)
   ======================================== */
/* ========================================
   NAV DROPDOWN — Chess Programs submenu (desktop)
   ======================================== */
.has-dropdown { position: relative; }
.has-dropdown > .nav-trigger {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.has-dropdown .dd-caret {
  display: inline-block;
  font-size: 9px;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s ease;
}
.has-dropdown:hover > .nav-trigger .dd-caret,
.has-dropdown:focus-within > .nav-trigger .dd-caret,
.has-dropdown[data-open="true"] > .nav-trigger .dd-caret { color: var(--gold); transform: rotate(180deg); }

.nav-links .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 14px;
  transform: translateX(-50%) translateY(-10px);
  width: 340px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 45px -15px rgba(42,37,32,0.16), 0 4px 12px rgba(42,37,32,0.04);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.25s;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Invisible hover bridge so the dropdown doesn't snap shut when the cursor crosses the gap */
.nav-links .dropdown-menu::before {
  content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px;
}
.has-dropdown:hover > .dropdown-menu,
.has-dropdown:focus-within > .dropdown-menu,
.has-dropdown[data-open="true"] > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}
.nav-links .dropdown-menu a {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 11px 16px !important;
  border-radius: 10px !important;
  color: var(--ink-soft) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  line-height: 1.35 !important;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.22s cubic-bezier(0.4,0,0.2,1) !important;
  white-space: normal !important;
  width: 100% !important;
  text-align: left !important;
  position: relative !important;
}
.nav-links .dropdown-menu a strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  transition: color 0.2s ease;
}
.nav-links .dropdown-menu a .dd-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.nav-links .dropdown-menu a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 3px;
  background: var(--gold);
  transform: translateY(-50%);
  transition: height 0.22s cubic-bezier(0.4,0,0.2,1);
}
.nav-links .dropdown-menu a:hover,
.nav-links .dropdown-menu a:focus-visible {
  background: var(--cream-soft) !important;
  color: var(--gold) !important;
  outline: none;
  padding-left: 20px !important;
}
.nav-links .dropdown-menu a:hover::before,
.nav-links .dropdown-menu a:focus-visible::before {
  height: 60%;
}
.nav-links .dropdown-menu a:focus-visible { box-shadow: inset 0 0 0 2px var(--gold-soft); }
.nav-links .dropdown-menu a:hover strong {
  color: var(--gold) !important;
}

/* ========================================
   NAV DROPDOWN — Chess Programs submenu (mobile)
   ======================================== */
.mobile-menu .has-dropdown-mobile { display: block; }
.mobile-menu .mobile-dd-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  transition: background 0.18s, color 0.18s;
}
.mobile-menu .mobile-dd-trigger:hover,
.mobile-menu .mobile-dd-trigger[aria-expanded="true"] {
  background: var(--cream-soft);
  color: var(--gold);
}
.mobile-menu .mobile-dd-trigger .dd-caret {
  display: inline-block;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s ease;
}
.mobile-menu .mobile-dd-trigger[aria-expanded="true"] .dd-caret {
  transform: rotate(180deg);
  color: var(--gold);
}
.mobile-menu .mobile-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.mobile-menu .mobile-submenu > .ms-inner {
  overflow: hidden;
  min-height: 0;
}
.mobile-menu .mobile-submenu[data-open="true"] { grid-template-rows: 1fr; }
.mobile-menu .mobile-submenu a {
  padding: 10px 14px 10px 32px;
  font-size: 14px;
  border-radius: 10px;
}
.mobile-menu .mobile-submenu a.mobile-submenu-all {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .dropdown-menu,
  .has-dropdown .dd-caret,
  .mobile-menu .mobile-submenu,
  .mobile-menu .mobile-dd-trigger .dd-caret { transition: none; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  nav { padding: 14px 18px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  .mobile-bar { display: block; }
  body { padding-bottom: 74px; }
  section.block { padding: 50px 20px; }
  .page-header { padding: 40px 20px 24px; }
  /* Lift WhatsApp floater above the mobile sticky bottom bar (C-08) */
  .whatsapp-sticky { bottom: 92px; right: 16px; width: 48px; height: 48px; }
  .whatsapp-sticky .wa-tooltip { display: none; }
  footer { padding: 40px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========================================
   GLOBAL FAQ ACCORDION TRANSITIONS
   ======================================== */
.faq-wrap details .faq-a,
.pg-faq details .pgf-body {
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, margin-top 0.35s cubic-bezier(0.25, 1, 0.5, 1), padding-top 0.35s cubic-bezier(0.25, 1, 0.5, 1), padding-bottom 0.35s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.35s ease;
}

details:not([open]) .faq-a {
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-color: transparent !important;
  height: 0 !important;
  opacity: 0 !important;
}

details:not([open]) .pgf-body {
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* ========================================
   ACCESSIBILITY — reduced motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .whatsapp-sticky { animation: none !important; }
  .hero-photo-badge .hpb-dot { animation: none !important; }
}

