/* Mobile header fixes for ArthVision pages using the "premium-header" template.
   Goal: keep the same design on desktop, but on phones use a hamburger menu that slides open. */

/* Switch to hamburger earlier so the brand never starts wrapping */
@media (max-width: 992px) {
  /* Keep header layout from overflowing */
  .premium-header .header-container {
    /* Smooth, width-aware header sizing */
    padding: clamp(10px, 1.6vw, 14px) clamp(12px, 2vw, 16px) !important;
    min-height: clamp(56px, 6vw, 72px) !important;
    gap: 0.5rem !important;
    /* Override any page-local mobile rules that stack header items */
    flex-direction: row !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important; /* keep hamburger + brand on one line */
    align-items: center !important;
  }

  /* Put hamburger on the left, brand next to it */
  .premium-header .navbar-brand-premium {
    flex: 1 1 auto !important;
    min-width: 0 !important; /* required for ellipsis */
  }

  /* Brand sizing */
  .premium-header .navbar-brand-premium img {
    height: clamp(34px, 5vw, 40px) !important;
    margin-right: 10px !important;
  }

  .premium-header .navbar-brand-premium span {
    font-size: clamp(0.85rem, 2.3vw, 0.98rem) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  /* Mobile burger placement */
  #mobileMenuBtn {
    margin-left: 0 !important;
    order: 0 !important;
  }

  /* Mobile menu panel: opens UNDER the header row (so header height stays compact) */
  .premium-header .mobile-menu-panel {
    width: 100%;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: max-height 260ms ease, opacity 220ms ease;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Compact centered dropdown */
    text-align: center;
     padding-bottom: 1rem;
  }

  .premium-header.mobile-nav-open .mobile-menu-panel {
     max-height: 460px; /* keep it compact; enough for links + button + bottom breathing room */
    opacity: 1;
    pointer-events: auto;
  }

  /* Nav inside the panel */
  .premium-header .mobile-menu-panel .nav-premium {
    width: 100% !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    margin: 0 !important;
    padding: 0.75rem 1rem 0.5rem !important;
    list-style: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  .premium-header .mobile-menu-panel .nav-premium li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .premium-header .mobile-menu-panel .nav-premium a {
    width: auto !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
  }

  /* Contact CTA inside the panel */
  .premium-header .mobile-menu-panel .contact-btn-premium {
    width: min(360px, calc(100% - 2rem)) !important;
     margin: 0.5rem auto 0.25rem !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
  }
}

/* Extra-small phones: tighten brand + burger so they never wrap into two rows */
@media (max-width: 420px) {
  .premium-header .header-container {
    gap: 0.5rem !important;
    padding: 0.75rem 0.75rem !important;
  }

  #mobileMenuBtn {
    padding: 0.35rem !important;
    font-size: 1.35rem !important;
  }

  .navbar-brand-premium img {
    height: 34px !important;
    margin-right: 8px !important;
  }

  .navbar-brand-premium span {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 360px) {
  .navbar-brand-premium span {
    font-size: 0.8rem !important;
  }
}

