/* ==========================================================================
   AARAMBH — FLOATING CAPSULE HEADER STYLESHEET
   Brand Font & Color: Cormorant Garamond + Montserrat + Primary Red (#D62828) + Burnt Orange (#E86F30)
   ========================================================================== */

/* Outer Floating Header Wrapper */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 20px 24px 10px;
  pointer-events: none;
  transition: all var(--transition-smooth, 0.35s cubic-bezier(0.16, 1, 0.3, 1));
}

.site-header.scrolled {
  padding-top: 12px;
}

/* Floating Capsule Container (Apple-Style Navigation Pill) */
.nav-capsule {
  position: relative;
  pointer-events: auto;
  width: auto;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 6px 8px 6px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
  box-shadow:
    0 10px 30px -6px rgba(26, 26, 26, 0.06),
    0 2px 8px rgba(26, 26, 26, 0.02);
  transition: all var(--transition-smooth, 0.35s cubic-bezier(0.16, 1, 0.3, 1));
}

.site-header.scrolled .nav-capsule {
  background: #FFFFFF;
  border-color: rgba(214, 40, 40, 0.3);
  box-shadow:
    0 14px 34px -8px rgba(26, 26, 26, 0.1),
    0 0 20px rgba(214, 40, 40, 0.08);
  transform: translateY(-2px);
}

/* Header Brand Logo Icon (Left Side) */
.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 3px 6px 3px 4px;
  margin-right: 6px;
  border-radius: 9999px;
  flex-shrink: 0;
  transition: transform var(--transition-fast, 0.2s ease), opacity var(--transition-fast, 0.2s ease);
}

.header-logo:hover {
  transform: scale(1.08);
}

.header-logo:active {
  transform: scale(0.95);
}

.header-logo-img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(214, 40, 40, 0.18));
  transition: filter var(--transition-fast, 0.2s ease);
}

.header-logo:hover .header-logo-img {
  filter: drop-shadow(0 3px 10px rgba(214, 40, 40, 0.35));
}

/* Brand Logo (Left Side) */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 800;
  font-size: 1.42rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast, 0.2s ease);
}

.logo:hover {
  transform: scale(1.02);
}

.logo-symbol {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-red, #D62828);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(214, 40, 40, 0.35);
}

.logo-symbol svg {
  width: 19px;
  height: 19px;
}

.logo-text {
  text-transform: lowercase;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

/* Page Navigation Buttons (Right Side) */
.nav-pill-group {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 6px;
  isolation: isolate;
  flex-shrink: 0;
}

/* Responsive button text adaptation helpers */
.btn-text-short {
  display: none;
}
.btn-text-full {
  display: inline;
}

/* Apple-Style Shared Sliding Capsule Indicator */
.nav-sliding-capsule {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 9999px;
  background: var(--bg-subtle-red);
  border: 1px solid rgba(214, 40, 40, 0.28);
  box-shadow: 0 2px 8px rgba(214, 40, 40, 0.08);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: 
    transform 0.35s cubic-bezier(0.25, 1, 0.35, 1),
    width 0.35s cubic-bezier(0.25, 1, 0.35, 1),
    height 0.2s ease,
    opacity 0.15s ease;
  will-change: transform, width, height;
}

.nav-sliding-capsule.ready {
  opacity: 1;
}

/* Navigation Link Buttons */
.nav-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: var(--font-functional, 'Montserrat', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--transition-fast, 0.2s ease);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-btn:hover {
  color: var(--red-hover);
}

.nav-btn.active {
  color: var(--red-dark);
  font-weight: 700;
}

/* Fallback if capsule is not active */
.nav-pill-group:not(.has-capsule) .nav-btn.active {
  background: var(--bg-subtle-red);
  color: var(--red-dark);
  font-weight: 700;
  border-color: rgba(214, 40, 40, 0.3);
  box-shadow: 0 2px 8px rgba(214, 40, 40, 0.1);
}

.nav-pill-group:not(.has-capsule) .nav-btn:hover {
  background: var(--bg-subtle-red);
  border-color: rgba(214, 40, 40, 0.2);
}

/* Mobile Hamburger Toggle Button (Right Side) */
.mobile-toggle {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  outline: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition-fast, 0.2s ease), transform var(--transition-fast, 0.2s ease);
}

.mobile-toggle:hover {
  background: rgba(26, 26, 26, 0.05);
}

.mobile-toggle:active {
  transform: scale(0.92);
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2.8px;
  background-color: var(--text-primary, #1A1A1A);
  border-radius: 3px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              background-color 0.2s ease;
  transform-origin: center;
}

/* Morph to sleek 'X' when menu is open */
.mobile-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7.8px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7.8px) rotate(-45deg);
}

/* ==========================================================================
   RESPONSIVE DESIGN — MOBILE & TABLET INDIVIDUAL CAPSULE HEADER
   Supports Small, Medium, Big Mobile Screens & All Tablet Screen Sizes
   ========================================================================== */

/* 1. Mobile & Tablet Screen Sizes (below 1024px: max-width: 1023px) */
@media (max-width: 1023px) {
  .site-header {
    padding: 12px 16px 8px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* Full-width floating pill capsule: Logo on left, hamburger on right */
  .nav-capsule {
    width: 100%;
    max-width: 580px;
    padding: 6px 12px 6px 18px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    box-sizing: border-box;
  }

  .header-logo {
    padding: 2px 0;
    margin-right: 0;
  }

  .header-logo-img {
    height: 26px;
    width: auto;
  }

  .mobile-toggle {
    display: flex;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }

  /* NO BOX CONTAINER: completely removed background, border, padding, and box-shadow */
  .nav-pill-group {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    flex-direction: column;
    gap: 10px;
    display: none !important;
    pointer-events: none;
    z-index: 1001;
    box-sizing: border-box;
  }

  .nav-pill-group.open {
    display: flex !important;
    pointer-events: none; /* Allows clicks in gaps to pass through to dismiss menu */
  }

  .nav-sliding-capsule {
    display: none !important;
  }

  /* INDIVIDUAL CAPSULE FOR EACH PAGE BUTTON (MATCHING HEADER SIZE & RADIUS) */
  .nav-pill-group .nav-btn {
    pointer-events: auto;
    width: 100%;
    height: 52px;
    min-height: 48px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color, #E5E5E5);
    box-shadow:
      0 10px 30px -6px rgba(26, 26, 26, 0.06),
      0 2px 8px rgba(26, 26, 26, 0.02);
    font-family: var(--font-functional, 'Montserrat', sans-serif);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary, #1A1A1A);
    text-decoration: none;
    white-space: nowrap;
    transition: 
      transform var(--transition-fast, 0.2s ease),
      background var(--transition-fast, 0.2s ease),
      border-color var(--transition-fast, 0.2s ease),
      box-shadow var(--transition-fast, 0.2s ease),
      color var(--transition-fast, 0.2s ease);
  }

  .nav-pill-group .nav-btn:hover {
    background: #FFFFFF;
    border-color: rgba(214, 40, 40, 0.3);
    color: var(--red-hover, #B91F24);
    transform: translateY(-2px);
    box-shadow:
      0 14px 34px -8px rgba(26, 26, 26, 0.1),
      0 0 16px rgba(214, 40, 40, 0.06);
  }

  .nav-pill-group .nav-btn:active {
    transform: scale(0.98);
  }

  /* Active Page Button Capsule Highlight */
  .nav-pill-group .nav-btn.active {
    background: var(--bg-subtle-red, #FDECEC) !important;
    border: 1px solid rgba(214, 40, 40, 0.35) !important;
    color: var(--red-dark, #B91F24) !important;
    font-weight: 700 !important;
    box-shadow:
      0 10px 28px -6px rgba(214, 40, 40, 0.14),
      0 2px 8px rgba(214, 40, 40, 0.04) !important;
  }

  /* Smooth cascade animation when opening menu */
  .nav-pill-group.open a.nav-btn {
    animation: capsuleEntrance 0.24s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  .nav-pill-group.open a.nav-btn:nth-of-type(1) { animation-delay: 0.02s; }
  .nav-pill-group.open a.nav-btn:nth-of-type(2) { animation-delay: 0.05s; }
  .nav-pill-group.open a.nav-btn:nth-of-type(3) { animation-delay: 0.08s; }
  .nav-pill-group.open a.nav-btn:nth-of-type(4) { animation-delay: 0.11s; }

  @keyframes capsuleEntrance {
    0% {
      opacity: 0;
      transform: translateY(-8px) scale(0.97);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .btn-text-full {
    display: inline !important;
  }

  .btn-text-short {
    display: none !important;
  }
}

/* 2. Tablet Screen Sizes (640px to 1023px: Medium Tablets & iPads) */
@media (min-width: 640px) and (max-width: 1023px) {
  .site-header {
    padding: 14px 20px 8px;
  }

  .nav-capsule {
    max-width: 620px;
    padding: 8px 18px 8px 22px;
  }

  .nav-pill-group {
    top: calc(100% + 12px);
    gap: 12px;
  }

  .nav-pill-group .nav-btn {
    height: 54px;
    min-height: 48px;
    font-size: 1.02rem;
  }
}

/* 3. Small Mobile Screen Sizes (up to 400px: compact smartphones) */
@media (max-width: 400px) {
  .site-header {
    padding: 10px 12px 6px;
  }

  .nav-capsule {
    padding: 4px 8px 4px 14px;
  }

  .header-logo-img {
    height: 23px;
  }

  .mobile-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .hamburger-bar {
    width: 20px;
    height: 2.2px;
  }

  .mobile-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-pill-group {
    top: calc(100% + 8px);
    gap: 8px;
  }

  .nav-pill-group .nav-btn {
    height: 48px;
    min-height: 48px;
    font-size: 0.90rem;
    padding: 0 16px;
  }
}

/* 4. Desktop & Laptop Screens (1024px and above): Floating pill navbar as is */
@media (min-width: 1024px) {
  .mobile-toggle {
    display: none !important;
  }

  .nav-capsule {
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 52px !important;
    padding: 6px 8px 6px 20px !important;
  }

  .nav-pill-group {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    pointer-events: auto !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .nav-btn {
    width: auto !important;
    height: auto !important;
    min-height: 40px !important;
    display: inline-flex !important;
    padding: 8px 18px !important;
    border-radius: 9999px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    font-size: 0.88rem !important;
    animation: none !important;
  }

  .nav-sliding-capsule {
    display: block !important;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  .nav-sliding-capsule {
    transition: none !important;
  }
  .nav-pill-group.open a.nav-btn {
    animation: none !important;
  }
}