/* ==========================================================================
   MUSEON - Comprehensive Responsive Stylesheet
   Testing across 1920px, 1600px, 1440px, 1200px, 992px, 768px, 576px, 375px, 320px
   ========================================================================== */

/* 1600px to 1920px+ Screens */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
  .hero-title {
    font-size: 5.2rem;
  }
}

/* 1440px to 1599px Screens */
@media (min-width: 1440px) and (max-width: 1599px) {
  .container {
    max-width: 1320px;
  }
  .hero-title {
    font-size: 4.6rem;
  }
}

/* 1200px to 1439px Screens */
@media (max-width: 1439px) {
  .hero-title {
    font-size: 4.2rem;
  }
  .navbar-nav .nav-link {
    padding: 0.5rem 0.65rem !important;
  }
}

/* 992px to 1199px (Desktop & Large Tablets - Precise Fitting) */
@media (max-width: 1199px) and (min-width: 992px) {
  .navbar-nav .nav-link {
    padding: 0.5rem 0.42rem !important;
    font-size: 0.84rem;
  }
  .site-header .btn-museum-primary,
  .site-header .btn-museum-outline-light {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .stat-box {
    padding: 20px 10px;
  }
  .stat-box .count-number {
    font-size: 2.5rem;
  }
  .hero-title {
    font-size: 3.6rem;
  }
}

/* Below 992px (Tablets & Mobile Viewports) */
@media (max-width: 991px) {
  .section-padding {
    padding: 70px 0;
  }

  .section-padding-sm {
    padding: 45px 0;
  }

  /* Utility Ribbon hidden on tablet/mobile for clean compact header */
  .utility-ribbon {
    display: none !important;
  }

  .site-header {
    top: 0 !important;
    padding: 12px 0;
    background-color: rgba(255, 255, 255, 0.99);
  }

  .site-header.header-transparent {
    background-color: rgba(19, 17, 15, 0.98);
  }

  .site-header.header-transparent .brand-logo {
    color: #ffffff;
  }

  .site-header.header-transparent .navbar-toggler {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
  }

  /* Sticky Sidebars Reset on Mobile so they don't obscure content */
  .position-sticky {
    position: static !important;
    top: auto !important;
  }

  /* Mobile Navigation Collapse Drawer */
  .navbar-collapse {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.header-transparent .navbar-collapse {
    background-color: #1a1715;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  }

  .site-header.header-transparent .navbar-collapse .nav-link {
    color: #f7f4ee !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-header.header-transparent .navbar-collapse .nav-link:hover,
  .site-header.header-transparent .navbar-collapse .nav-link.active {
    color: var(--secondary-color) !important;
  }

  .navbar-nav .nav-link {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1rem;
    font-weight: 500;
    white-space: normal;
  }

  /* Mobile Dropdown Menu */
  .navbar-nav .dropdown-menu {
    display: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    padding: 8px 0 8px 16px;
    background-color: rgba(0, 0, 0, 0.03);
    margin: 6px 0 12px;
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--secondary-color);
  }

  .navbar-nav .dropdown-menu.show {
    display: block !important;
  }

  .site-header.header-transparent .navbar-nav .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
  }

  .site-header.header-transparent .navbar-nav .dropdown-item {
    color: #d1cbc2;
  }

  .site-header.header-transparent .navbar-nav .dropdown-item:hover,
  .site-header.header-transparent .navbar-nav .dropdown-item.active {
    color: var(--secondary-color) !important;
    background-color: transparent;
  }

  /* Full Width CTA inside mobile menu */
  .navbar-collapse .btn-museum-primary,
  .navbar-collapse .btn-museum-outline-light {
    width: 100% !important;
    margin-top: 16px;
    display: inline-flex !important;
  }

  .hero-main {
    min-height: auto;
    padding: 130px 0 70px;
  }

  .hero-title {
    font-size: 3.2rem;
  }

  .hero-text {
    max-width: 100%;
    font-size: 1.05rem;
  }

  .page-hero {
    padding: 130px 0 60px;
  }

  .page-hero-title {
    font-size: 2.8rem;
  }

  .stat-box {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
  }

  .stat-box:last-child {
    border-bottom: none;
  }

  .feature-float-badge {
    position: static !important;
    margin-top: 20px !important;
    width: 100% !important;
  }

  .site-footer .footer-top {
    padding: 70px 0 40px;
  }
}

/* 768px (Tablets Portrait & Mobile Landscape) */
@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .section-padding {
    padding: 60px 0;
  }

  .section-padding-sm {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .page-hero-title {
    font-size: 2.3rem;
  }

  .btn-museum-primary,
  .btn-museum-secondary,
  .btn-museum-outline,
  .btn-museum-outline-light {
    width: 100%;
    padding: 13px 20px;
    white-space: normal;
  }

  .hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .gallery-filter-nav {
    gap: 8px;
    margin-bottom: 30px;
  }

  .gallery-filter-btn {
    padding: 7px 16px;
    font-size: 0.8rem;
  }

  .stat-box .count-number {
    font-size: 2.2rem;
  }

  .site-footer .footer-top {
    padding: 55px 0 25px;
  }

  .site-footer .footer-heading {
    margin-bottom: 16px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
  }
}

/* 576px and down (Smartphones Portrait) */
@media (max-width: 575px) {
  .hero-title {
    font-size: 2.3rem;
    line-height: 1.15;
  }

  .page-hero-title {
    font-size: 2.1rem;
    line-height: 1.18;
  }

  .section-subtitle {
    font-size: 0.76rem;
  }

  .card-body,
  .artwork-card-body,
  .event-body,
  .blog-card-body {
    padding: 20px 18px;
  }

  .accession-row {
    flex-direction: column;
    gap: 4px;
  }

  .accession-val {
    text-align: left;
  }

  /* Newsletter stacking on mobile to prevent input text clipping */
  .footer-newsletter-form .form-control {
    padding-right: 18px;
    margin-bottom: 12px;
  }

  .footer-newsletter-form .btn-newsletter {
    position: static;
    width: 100%;
    padding: 12px 18px;
    display: block;
    text-align: center;
  }

  .museum-toast {
    width: 92%;
    font-size: 0.86rem;
    padding: 12px 18px;
  }

  .footer-bottom {
    text-align: center;
  }

  .footer-bottom .d-flex {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px !important;
  }
}

/* 375px and 320px (Ultra-compact Mobile Screens) */
@media (max-width: 375px) {
  .hero-title {
    font-size: 2.05rem;
  }

  .page-hero-title {
    font-size: 1.85rem;
  }

  .brand-logo {
    font-size: 1.6rem;
  }

  .btn-museum-primary,
  .btn-museum-secondary,
  .btn-museum-outline,
  .btn-museum-outline-light {
    font-size: 0.8rem;
    padding: 11px 16px;
    letter-spacing: 0.05em;
  }

  .gallery-filter-btn {
    width: 100%;
    text-align: center;
  }
}
