/* ===================================================
   SHARED STYLES — drnadirbilici.com WordPress Theme
   Used by: homepage + all blog/insight pages
   =================================================== */

:root {
  --navy: #0c1322;
  --navy-mid: #16213e;
  --navy-light: #1e2f52;
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --cream: #f5f0e8;
  --cream-dark: #ede7d9;
  --white: #fdfaf5;
  --text-muted: #9aabc2;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Restore focus outlines for keyboard users */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

/* Skip to content */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--gold); color: var(--navy);
  padding: 0.8rem 1.5rem; z-index: 10000;
  font-size: 0.85rem; text-decoration: none;
  font-family: var(--sans);
}
.skip-link:focus { top: 1rem; }

body {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Grain Overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4; pointer-events: none; z-index: 1;
}

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 1.5rem 5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(12,19,34,0.95) 0%, transparent 100%);
  backdrop-filter: blur(2px);
  border-bottom: 1px solid rgba(201,169,110,0.08);
  transition: all 0.4s ease;
  max-width: 100%;
}
.nav-inner {
  width: 100%; max-width: 1380px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
nav.scrolled {
  background: rgba(12,19,34,0.97);
  border-bottom-color: rgba(201,169,110,0.15);
  padding: 1rem 5rem;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 400;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--cream); }
.nav-sep {
  width: 1px; height: 1.1rem;
  background: rgba(201,169,110,0.25);
  flex-shrink: 0;
}
.nav-cta,
.nav-links .nav-menu > li.nav-cta > a {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  padding: 0.55rem 1.4rem;
  font-size: 0.72rem !important;
  letter-spacing: 0.16em;
  transition: all 0.3s ease !important;
}
/* li.nav-cta wraps the <a> in WordPress nav — remove its border to avoid double gold border */
.nav-links .nav-menu > li.nav-cta { border: none; padding: 0; }
.nav-cta:hover,
.nav-links .nav-menu > li.nav-cta > a:hover {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: rgba(12,19,34,0.85); border: none; cursor: pointer;
  width: 40px; height: 40px; position: relative;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; padding: 10px; border-radius: 4px;
  backdrop-filter: blur(8px);
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--gold-light); transition: all 0.3s;
}

/* ─── WordPress nav menu structure normalisation ─────────────────────────────
 * wp_nav_menu() wraps links in <ul class="nav-menu"><li>...</li></ul>.
 * display:contents makes the ul and li "invisible" in the flexbox layout
 * so the <a> tags become direct flex children of .nav-links.
 * The nav-sep li is handled separately so it renders as the gold divider.
 * ────────────────────────────────────────────────────────────────────────── */
.nav-links .nav-menu { list-style: none; padding: 0; margin: 0; display: contents; }
.nav-links .nav-menu > li { display: contents; }

/* Separator menu item: add CSS class "nav-sep" in WP admin Appearance > Menus */
.nav-links .nav-menu > li.nav-sep { display: flex !important; align-items: center; }
.nav-links .nav-menu > li.nav-sep > a {
  display: block !important;
  width: 1px; height: 1.1rem;
  background: rgba(201,169,110,0.25);
  padding: 0; font-size: 0; color: transparent;
  pointer-events: none; flex-shrink: 0;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  padding: 1rem 2.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.35s ease;
  position: relative; overflow: hidden;
  border: none; cursor: pointer;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(201,169,110,0.3); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(201,169,110,0.4);
  color: var(--gold-light);
  text-decoration: none;
  padding: 0.95rem 2rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.35s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,169,110,0.06);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--cream-dark); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.1em;
  transition: all 0.3s;
  padding: 0.5rem;
}
.btn-ghost:hover { color: var(--gold); gap: 0.8rem; }
.btn-ghost svg { transition: transform 0.3s; }
.btn-ghost:hover svg { transform: translateX(4px); }

/* ── SECTION SHARED ── */
section { position: relative; }

.section-inner {
  max-width: 1380px; margin: 0 auto;
  padding: 0 5rem;
}

.section-tag {
  display: inline-flex; align-items: center; gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.section-tag-line { width: 1.8rem; height: 1px; background: var(--gold); }
.section-tag span {
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.section-heading {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 300; line-height: 1.12; color: var(--white);
}
.section-heading em { font-style: italic; color: var(--gold-light); }

/* ── FOOTER ── */
footer {
  background: #080e1a;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(201,169,110,0.1);
}
.footer-inner {
  max-width: 1380px; margin: 0 auto; padding: 0 5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
  font-family: var(--serif); font-size: 1rem;
  color: var(--gold-light); letter-spacing: 0.1em;
}
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.72rem; color: var(--text-muted);
  text-decoration: none; letter-spacing: 0.1em;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--cream); }
.footer-copy {
  font-size: 0.7rem; color: #445066; width: 100%;
  text-align: center; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ── STICKY CTA ── */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(12,19,34,0.97);
  border-top: 1px solid rgba(201,169,110,0.2);
  padding: 0.9rem 4rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 400; backdrop-filter: blur(12px);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-text { font-size: 0.82rem; color: var(--text-muted); }
.sticky-text strong { color: var(--cream-dark); font-weight: 500; }
.sticky-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  padding: 0.7rem 2rem;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; transition: all 0.3s;
  white-space: nowrap;
}
.sticky-btn:hover { background: var(--gold-light); }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── LARGE SCREENS ── */
@media (min-width: 1440px) {
  nav { padding: 1.8rem 6rem; }
  nav.scrolled { padding: 1.1rem 6rem; }
  .section-inner { padding: 0 6rem; }
}
@media (min-width: 1800px) {
  .section-inner { max-width: 1560px; padding: 0 7rem; }
  nav { padding: 1.8rem 7rem; }
  nav.scrolled { padding: 1.1rem 7rem; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 1.5rem; background: #0c1322; }
  nav.scrolled { padding: 1rem 1.5rem; background: #0c1322; }
  #navLinks {
    display: none !important;
    position: fixed; top: 0; left: 0; right: 0;
    width: 100%; height: 100vh;
    background: rgba(12,19,34,0.92);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2rem; z-index: 999;
  }
  #navLinks.open { display: flex !important; }
  /* In mobile overlay, restore normal li layout */
  .nav-links .nav-menu { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
  .nav-links .nav-menu > li { display: flex; }
  .nav-links a { font-size: 1rem; letter-spacing: 0.2em; }
  .nav-toggle { display: flex; z-index: 1000; }
  .nav-sep { display: none; }
  .nav-links .nav-menu > li.nav-sep { display: none !important; }
  .section-inner { padding: 0 1.5rem; }
  .sticky-cta { flex-direction: column; text-align: center; gap: 0.6rem; padding: 0.9rem 1.5rem; }
  .sticky-text { font-size: 0.75rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; padding: 0 1.5rem; }
  .footer-links { justify-content: center; }
}

/* ── TABLET (between desktop and mobile) ── */
@media (max-width: 1080px) and (min-width: 901px) {
  .section-inner { padding: 0 3rem; }
  nav { padding: 1.4rem 3rem; }
  nav.scrolled { padding: 1rem 3rem; }
  .footer-inner { padding: 0 3rem; }
}
