/* =====================================================
   EASYBOOKZ — SHARED HEADER
   Modern, enterprise-grade, responsive header navigation
===================================================== */

:root {
  --header-bg: rgba(255, 255, 255, 0.85);
  --header-border: #e2e8f0;
  
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  
  --brand-primary: #0f172a;
  --brand-primary-hover: #1e293b;
  
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-light: #eff6ff;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-dropdown: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* =====================================================
   CONTAINER & BACKDROP
===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.header-inner {
  width: min(100% - 48px, 1280px);
  height: 72px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* =====================================================
   BRAND LOGO
===================================================== */

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  outline: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);

  font-family: var(--font-heading, system-ui, -apple-system, sans-serif);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-logo:hover .logo-mark {
  transform: scale(1.04);
}

.logo-name {
  color: var(--text-main);
  font-family: var(--font-heading, system-ui, -apple-system, sans-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* =====================================================
   DESKTOP NAVIGATION
===================================================== */

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 32px);
  flex: 1 1 auto;
  min-width: 0;
}

.main-nav > a,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;

  color: var(--text-sub);
  font-family: var(--font-heading, system-ui, -apple-system, sans-serif);
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.main-nav > a:hover,
.nav-dropdown-toggle:hover {
  color: var(--text-main);
  background-color: rgba(15, 23, 42, 0.04);
}

/* =====================================================
   DROPDOWN MENU
===================================================== */

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  appearance: none;
}

.dropdown-chevron {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-left: 2px;

  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;

  transform: rotate(45deg) translateY(-1px);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 1001;

  width: 260px;
  padding: 6px;

  background: #ffffff;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px) scale(0.98);

  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover bridge */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;

  padding: 10px 14px;
  border-radius: var(--radius-md);

  color: var(--text-sub);
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;

  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
  transform: translateX(2px);
}

/* =====================================================
   ACTIONS & CTA
===================================================== */

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.header-cta {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 18px;
  border-radius: var(--radius-md);

  background: var(--brand-primary);
  color: #ffffff;

  font-family: var(--font-heading, system-ui, -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  box-shadow: var(--shadow-sm);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.header-cta:hover {
  background: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.header-cta span {
  font-size: 15px;
  transition: transform 180ms ease;
}

.header-cta:hover span {
  transform: translate(2px, -2px);
}

/* =====================================================
   ACCESSIBILITY & FOCUS
===================================================== */

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* =====================================================
   MOBILE NAVIGATION MENU
===================================================== */

.mobile-menu-toggle,
.mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  .header-inner {
    width: calc(100% - 32px);
    height: 64px;
  }

  .main-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 0;
    border: 1px solid var(--header-border);
    border-radius: var(--radius-md);
    background: #ffffff;

    cursor: pointer;
    transition: background-color 150ms ease;
  }

  .mobile-menu-toggle:active {
    background-color: var(--accent-blue-light);
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: var(--text-main);
    transition: transform 200ms ease, opacity 200ms ease;
  }

  /* Expanded State Class for Toggle (Optional JS Integration) */
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-nav {
    padding: 12px 16px 24px;
    border-top: 1px solid var(--header-border);
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-nav > a,
  .mobile-nav-dropdown > summary {
    display: block;
    padding: 12px;
    border-radius: var(--radius-md);

    color: var(--text-sub);
    font-family: var(--font-heading, system-ui, -apple-system, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;

    cursor: pointer;
    list-style: none;
    transition: background-color 150ms ease, color 150ms ease;
  }

  .mobile-nav-dropdown > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav-dropdown > summary::after {
    content: "";
    float: right;

    width: 6px;
    height: 6px;
    margin: 6px 4px 0 0;

    border-right: 1.75px solid currentColor;
    border-bottom: 1.75px solid currentColor;

    transform: rotate(45deg);
    transition: transform 200ms ease;
  }

  .mobile-nav-dropdown[open] > summary::after {
    transform: rotate(225deg);
  }

  .mobile-nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 6px 12px;
  }

  .mobile-nav-submenu a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);

    color: var(--text-muted);
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-nav-submenu a:hover,
  .mobile-nav > a:hover,
  .mobile-nav-dropdown > summary:hover {
    background-color: var(--accent-blue-light);
    color: var(--accent-blue);
  }

  .mobile-nav .mobile-nav-cta {
    margin-top: 12px;
    padding: 12px 16px;

    border-radius: var(--radius-md);
    background: var(--brand-primary);
    color: #ffffff;

    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-sm);
  }
}

/* =====================================================
   PREFERENCES & OVERRIDES
===================================================== */

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================
   PRICING NAVIGATION DROPDOWN
   ComplyLite / Full-Stack Finance
===================================================== */

/* Desktop pricing dropdown */
.main-nav .nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
}

/* Plan name */
.main-nav .nav-dropdown-menu a strong {
  display: block;
  color: var(--text-main);
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  transition: color 150ms ease;
}

/* Plan description */
.main-nav .nav-dropdown-menu a small {
  display: block;
  max-width: 230px;
  color: var(--text-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

/* Hover and keyboard focus */
.main-nav .nav-dropdown-menu a:hover strong,
.main-nav .nav-dropdown-menu a:focus-visible strong {
  color: var(--accent-blue);
}

.main-nav .nav-dropdown-menu a:hover small,
.main-nav .nav-dropdown-menu a:focus-visible small {
  color: var(--text-sub);
}

/* Give the pricing dropdown enough room for descriptions */
.main-nav .nav-dropdown:last-of-type .nav-dropdown-menu {
  width: 290px;
}

/* Subtle separation between plan options */
.main-nav .nav-dropdown:last-of-type .nav-dropdown-menu a + a {
  border-top: 1px solid #f1f5f9;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}


/* =====================================================
   MOBILE PRICING SUBMENU
===================================================== */

@media (max-width: 900px) {
  .mobile-nav-submenu a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mobile-nav-submenu a strong {
    color: var(--text-main);
    font-family: var(--font-heading, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
  }

  .mobile-nav-submenu a small {
    display: block;
    max-width: 280px;
    color: var(--text-muted);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
  }

  .mobile-nav-submenu a:hover strong {
    color: var(--accent-blue);
  }

  .mobile-nav-submenu a:hover small {
    color: var(--text-sub);
  }
}

.main-nav > a,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;

  color: var(--text-sub);
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.1px;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}