/* ================================================================
   shared.css: Shared styles for Indonesian NAATI marketing pages
   ================================================================ */

/* ===== THEME TRANSITION ===== */
body, .site-nav, .page-hero, .offer-card, .mission-card, .story-aside {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #1a4f7a;
  --primary-light: #2471a3;
  --primary-dark:  #0f2d45;
  --accent:        #e8830a;
  --bg:            #F7F5F1;
  --card:          #ffffff;
  --text:          #1a202c;
  --muted:         #6b7280;
  --border:        #e2e8f0;
  --radius:        14px;
  --shadow:        0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg:     0 8px 30px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
  --primary: #7eb8d4;
  --primary-light: #a8d4e8;
  --primary-dark: #0d1820;
  --accent: #e8830a;
  --bg: #0d1820;
  --card: #141e26;
  --text: #e8f2f8;
  --muted: #7eb8d4;
  --border: #1e3448;
}

[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .site-nav.scrolled {
  background: rgba(13,24,32,0.97);
  border-color: #1e3448;
}
[data-theme="dark"] .nav-mobile-menu {
  background: #141e26;
  border-color: #1e3448;
}
[data-theme="dark"] .nav-mobile-menu a {
  color: #e8f2f8;
  border-color: #1e3448;
}
[data-theme="dark"] .logo-main { color: #e8f2f8; }
[data-theme="dark"] .logo-sub { color: #5a7d96; }
[data-theme="dark"] .nav-links a { color: #7eb8d4; }
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active { color: #a8d4e8; }
[data-theme="dark"] .nav-login { color: #7eb8d4; }

/* Page hero dark mode */
[data-theme="dark"] .page-hero { background: #0d1820; border-bottom: 1px solid #1e3448; }

/* Cards */
[data-theme="dark"] .card {
  background: #141e26;
  border-color: #1e3448;
}

/* Nav */
[data-theme="dark"] .site-nav { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .nav-mobile { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .nav-mobile a { color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .nav-mobile a:hover,
[data-theme="dark"] .nav-mobile a.active { color: #a8d4e8; }
[data-theme="dark"] .nav-btn-ghost { color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .nav-btn-ghost:hover { border-color: #7eb8d4; background: rgba(126,184,212,0.1); }
[data-theme="dark"] .nav-btn-primary { background: #e8830a; color: #ffffff; }
[data-theme="dark"] .nav-btn-primary:hover { background: #d4720a; box-shadow: 0 4px 12px rgba(232,131,10,0.35); }
[data-theme="dark"] .nav-hamburger span { background: #e8f2f8; }

/* Footer */
[data-theme="dark"] .site-footer { background: #060d13; }
[data-theme="dark"] .site-footer,
[data-theme="dark"] .site-footer p,
[data-theme="dark"] .site-footer a { color: #5a7d96; }
[data-theme="dark"] .site-footer a:hover { color: #7eb8d4; }

/* Global text */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: #e8f2f8; }
[data-theme="dark"] p { color: #a8c4d4; }
[data-theme="dark"] a { color: #7eb8d4; }

/* Page backgrounds */
[data-theme="dark"] .page-content { background: var(--bg); }
[data-theme="dark"] main { background: var(--bg); }

/* Section titles */
[data-theme="dark"] .section-title { color: #e8f2f8; }
[data-theme="dark"] .section-sub { color: #5a7d96; }

/* Page hero text */
[data-theme="dark"] .page-hero h1 { color: #e8f2f8; }
[data-theme="dark"] .page-hero p { color: #7eb8d4; }

/* Cards */
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4 { color: #e8f2f8; }
[data-theme="dark"] .card p { color: #a8c4d4; }

/* About page */
[data-theme="dark"] .offer-card { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .offer-card h3 { color: #e8f2f8; }
[data-theme="dark"] .offer-card p { color: #a8c4d4; }
[data-theme="dark"] .story-section { background: var(--bg); }
[data-theme="dark"] .story-aside { background: #141e26; border-color: #1e3448; color: #e8f2f8; }
[data-theme="dark"] .mission-card { background: #141e26; border-color: #1e3448; }

/* FAQ page */
[data-theme="dark"] .faq-group-title { color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .faq-item { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .faq-question { color: #e8f2f8; background: #141e26; }
[data-theme="dark"] .faq-question:hover { background: #1a2d3d; }
[data-theme="dark"] .faq-answer { background: #141e26; color: #a8c4d4; border-top-color: #1e3448; }
[data-theme="dark"] .faq-chevron { color: #7eb8d4; }
[data-theme="dark"] .faq-cta { background: #141e26; border-color: #1e3448; }

/* Resources page */
[data-theme="dark"] .exam-overview-grid { background: var(--bg); }
[data-theme="dark"] .overview-card { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .overview-card h3 { color: #e8f2f8; }
[data-theme="dark"] .overview-table th { background: #1a2d3d; color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .overview-table td { color: #a8c4d4; border-color: #1e3448; }
[data-theme="dark"] .overview-table tr:nth-child(even) td { background: #141e26; }
[data-theme="dark"] .tip-item { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .tip-body h4 { color: #e8f2f8; }
[data-theme="dark"] .tip-body p { color: #a8c4d4; }
[data-theme="dark"] .tip-num { background: #1e3448; color: #7eb8d4; }
[data-theme="dark"] .official-links-card { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .official-link-item { border-color: #1e3448; }
[data-theme="dark"] .official-link-item span { color: #a8c4d4; }

/* Login page */
[data-theme="dark"] .auth-page { background: var(--bg); }
[data-theme="dark"] .auth-card { background: #141e26; border-color: #1e3448; }
[data-theme="dark"] .auth-title { color: #e8f2f8; }
[data-theme="dark"] .auth-sub { color: #5a7d96; }
[data-theme="dark"] .auth-input { background: #1a2d3d; border-color: #1e3448; color: #e8f2f8; }
[data-theme="dark"] .auth-input::placeholder { color: #5a7d96; }
[data-theme="dark"] .auth-label { color: #a8c4d4; }
[data-theme="dark"] .auth-divider span { background: #141e26; color: #5a7d96; }
[data-theme="dark"] .auth-divider::before { background: #1e3448; }
[data-theme="dark"] .btn-google { background: #1a2d3d; border-color: #1e3448; color: #e8f2f8; }
[data-theme="dark"] .auth-toggle { color: #5a7d96; }
[data-theme="dark"] .auth-toggle button { color: #7eb8d4; }

/* Theme toggle button */
.theme-switcher {
  position: relative;
}
.theme-switcher-btn {
  display: flex; align-items: center; gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--textMuted, #5a7d96);
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.theme-switcher-btn:hover {
  background: rgba(126,184,212,0.08);
  border-color: #7eb8d4;
}
.theme-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 120px;
  z-index: 200;
}
.theme-switcher.open .theme-dropdown-menu { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: none; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem; font-weight: 500;
  color: #1a2e3d;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.theme-option:hover { background: #f0f5f8; }
.theme-option.active { color: #2D4F6B; font-weight: 700; background: #e8f2f8; }

[data-theme="dark"] .theme-switcher-btn { color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .theme-dropdown-menu { background: #141e26; border-color: #1e3448; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .theme-option { color: #e8f2f8; }
[data-theme="dark"] .theme-option:hover { background: #1a2d3d; }
[data-theme="dark"] .theme-option.active { background: #1a2d3d; color: #7eb8d4; }

/* Language switcher: mirrors theme-switcher styles */
.lang-switcher {
  position: relative;
}
.lang-switcher-btn {
  display: flex; align-items: center; gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.lang-switcher-btn:hover {
  background: rgba(126,184,212,0.08);
  border-color: #7eb8d4;
}
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 150px;
  z-index: 200;
}
.lang-switcher.open .lang-dropdown-menu { display: block; }
.lang-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: none; border: none;
  font-size: 0.875rem; color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  font-family: inherit;
}
.lang-option:hover { background: #f0f5f8; }
.lang-option.active { color: #2D4F6B; font-weight: 700; background: #e8f2f8; }

[data-theme="dark"] .lang-switcher-btn { color: #7eb8d4; border-color: #1e3448; }
[data-theme="dark"] .lang-dropdown-menu { background: #141e26; border-color: #1e3448; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .lang-option { color: #e8f2f8; }
[data-theme="dark"] .lang-option:hover { background: #1a2d3d; }
[data-theme="dark"] .lang-option.active { background: #1a2d3d; color: #7eb8d4; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.hidden { display: none !important; }

/* ================================================================
   NAVIGATION
   ================================================================ */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
  transition: box-shadow 0.3s ease;
}
.site-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  gap: 3px;
  flex-shrink: 0;
}
.logo-main {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a2e3d;
  letter-spacing: -0.3px;
  font-style: normal;
}
.logo-main em {
  font-style: normal;
  color: var(--accent);
}
.logo-sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #5a7d96;
}

/* Centre links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

/* Right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  border: none;
  white-space: nowrap;
}

.nav-btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.nav-btn-ghost:hover {
  border-color: var(--primary);
  background: rgba(26,79,122,0.04);
}

.nav-btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.nav-btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,79,122,0.3);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile nav dropdown */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.nav-mobile a:last-of-type {
  border-bottom: none;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--primary);
}

.nav-mobile .nav-mobile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.nav-mobile .nav-mobile-actions .nav-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
}

.nav-mobile .nav-mobile-actions .nav-btn-ghost {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ================================================================
   PAGE HERO
   ================================================================ */

.page-hero {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 72px 48px;
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 560px;
  margin-top: 16px;
  line-height: 1.65;
}

/* ================================================================
   PAGE CONTENT
   ================================================================ */

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 48px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ================================================================
   CARD
   ================================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ================================================================
   GRID HELPERS
   ================================================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 36px 48px;
  margin-top: 80px;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer p {
  font-size: 0.9rem;
}

.site-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.site-footer-links a:hover {
  color: #ffffff;
}

/* ================================================================
   SHARED BUTTONS (marketing pages)
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,79,122,0.3);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #d1d9e6;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* ================================================================
   SECTION SPACING
   ================================================================ */

.section {
  margin-bottom: 72px;
}

.section:last-child {
  margin-bottom: 0;
}

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 0 16px;
  }

  .nav-logo {
    max-width: calc(100vw - 100px);
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .page-hero {
    padding: 40px 16px;
  }

  .page-hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  .page-content {
    padding: 32px 16px;
  }

  .section {
    margin-bottom: 40px;
  }

  .card {
    padding: 20px 16px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 28px 16px;
    margin-top: 40px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-footer-links {
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .nav-logo .logo-sub {
    display: none;
  }

  .page-hero h1 {
    font-size: 1.5rem;
  }

  .page-hero p {
    font-size: 0.9rem;
  }
}
