/* --------------------------------------------------------------------------
   1. Large Desktop & Ultra-Wide Screens (> 1200px)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* --------------------------------------------------------------------------
   2. Laptops & Laptops Standard (992px to 1199px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .section-padding {
    padding: 90px 0;
  }

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

  .nav-links-wrapper {
    gap: 14px;
  }

  .nav-link-custom {
    font-size: 0.76rem;
    white-space: nowrap;
    padding: 8px 2px;
  }

  .btn-editorial-cta {
    font-size: 0.7rem;
    padding: 8px 14px 8px 16px;
    gap: 8px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .cta-arrow-circle {
    width: 22px;
    height: 22px;
    font-size: 0.85rem;
  }

  .brand-logo-img {
    height: 50px;
    max-width: 180px;
  }

  .floating-navbar {
    padding: 8px 20px;
  }

  .service-row {
    gap: 40px;
  }

  .service-img-frame {
    height: 360px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-span-3 {
    grid-column: span 2;
  }
}

/* --------------------------------------------------------------------------
   3. Tablets (768px to 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .section-padding {
    padding: 70px 0;
  }

  .nav-links-wrapper {
    display: none;
    /* Hide desktop nav menu */
  }

  .btn-mobile-toggle {
    display: flex;
    /* Show mobile drawer button */
  }

  .floating-navbar {
    padding: 10px 20px;
  }

  .hero-section {
    min-height: 640px;
  }

  .hero-title-main,
  .hero-title-italic {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }



  .bento-row-top,
  .bento-row-middle,
  .bento-row-bottom {
    grid-template-columns: 1fr;
  }

  .service-bento-card.card-large,
  .service-bento-cta-card {
    min-height: 320px;
  }

  .why-choose-grid {
    grid-template-columns: 1fr;
  }

  .why-spotlight-card {
    min-height: 480px;
  }

  .why-metrics-bar {
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px;
  }

  .metric-block {
    flex: 1 1 40%;
  }

  .metric-block-line {
    display: none;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-span-2,
  .bento-span-3 {
    grid-column: span 1;
  }

  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item {
    margin-bottom: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

/* --------------------------------------------------------------------------
   4. Mobile Devices (Portrait & Landscape <= 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .header-wrapper {
    top: 10px;
    padding: 0 12px;
  }

  .floating-navbar {
    padding: 8px 16px;
    width: 100%;
  }

  .header-scrolled.header-wrapper {
    top: 0 !important;
    padding: 0 !important;
  }

  .header-scrolled .floating-navbar {
    padding: 10px 16px !important;
    border-radius: 0 !important;
    width: 100% !important;
  }

  .brand-logo-emblem {
    width: 34px;
    height: 34px;
  }

  .brand-subtitle {
    font-size: 0.5rem;
    letter-spacing: 0.15em;
  }

  .brand-title {
    font-size: 1.05rem;
  }

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

  .heading-editorial {
    font-size: 2.1rem;
  }

  .hero-title-main,
  .hero-title-italic {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .btn-editorial {
    width: auto;
    min-width: 190px;
    padding: 13px 22px;
    font-size: 0.78rem;
  }



  .feature-list-editorial {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    grid-template-columns: 1fr;
  }

  .project-img-wrapper {
    height: 280px;
  }

  .project-card-tall .project-img-wrapper {
    height: 320px;
    min-height: auto;
  }

  .why-spotlight-title {
    font-size: 1.8rem;
  }

  .why-mini-stats {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .mini-stat-divider {
    display: none;
  }

  .mini-stat-item {
    flex: 1 1 45%;
    margin-bottom: 12px;
  }

  .why-metrics-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
  }

  .metric-block-line {
    display: none;
  }

  .metric-value {
    font-size: 1.5rem;
  }

  .faq-header {
    padding: 16px 20px;
  }

  .faq-title {
    font-size: 1.05rem;
  }

  .industry-grid {
    grid-template-columns: 1fr;
  }

  .modal-header-custom,
  .modal-body-custom {
    padding: 24px;
  }

  .contact-cta-banner {
    padding: 80px 20px;
  }

  .footer-editorial {
    padding-top: 60px;
  }
}

/* --------------------------------------------------------------------------
   5. Small Mobile Screens (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero-title-main,
  .hero-title-italic {
    font-size: 1.85rem;
  }

  .badge-editorial {
    font-size: 0.75rem;
    padding: 4px 12px;
  }

  .btn-editorial {
    padding: 13px 22px;
    font-size: 0.78rem;
  }
}
/* ==========================================================================
   Header refinements — larger logo + type, consistent CTA, smoother motion.
   (Last in the cascade so it wins over the older header rules.)
   ========================================================================== */
@keyframes header-drop-in {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nav-item-rise {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dropdown-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.floating-navbar { animation: header-drop-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.nav-links-wrapper > * { animation: nav-item-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.nav-links-wrapper > *:nth-child(1) { animation-delay: 0.15s; }
.nav-links-wrapper > *:nth-child(2) { animation-delay: 0.2s; }
.nav-links-wrapper > *:nth-child(3) { animation-delay: 0.25s; }
.nav-links-wrapper > *:nth-child(4) { animation-delay: 0.3s; }
.nav-links-wrapper > *:nth-child(5) { animation-delay: 0.35s; }
.nav-links-wrapper > *:nth-child(6) { animation-delay: 0.4s; }
.nav-links-wrapper > *:nth-child(7) { animation-delay: 0.45s; }

/* CTA: same brand gradient before and after scroll, with a light sweep on hover */
.header-wrapper .btn-editorial-cta {
  background: linear-gradient(135deg, #A8368C 0%, #C05B9E 55%, #108B37 100%);
  background-size: 220% 220%;
  background-position: left center;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 22px rgba(168, 54, 140, 0.4);
  white-space: nowrap;
}

.header-wrapper .btn-editorial-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.header-wrapper .btn-editorial-cta:hover::after { left: 130%; }

/* Services dropdown: invisible bridge so it doesn't close while the pointer crosses the gap */
.professional-services-dropdown::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  height: 28px;
}

.nav-item-dropdown:focus-within .professional-services-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(6px);
  pointer-events: auto;
}

.nav-item-dropdown:focus-within .nav-arrow-icon { transform: rotate(180deg); }

.nav-item-dropdown:hover .dropdown-card,
.nav-item-dropdown:focus-within .dropdown-card { animation: dropdown-card-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.nav-item-dropdown:hover .col-lg-6:nth-child(2) .dropdown-card { animation-delay: 0.04s; }
.nav-item-dropdown:hover .col-lg-6:nth-child(3) .dropdown-card { animation-delay: 0.08s; }
.nav-item-dropdown:hover .col-lg-6:nth-child(4) .dropdown-card { animation-delay: 0.12s; }
.nav-item-dropdown:hover .col-lg-6:nth-child(5) .dropdown-card { animation-delay: 0.16s; }
.nav-item-dropdown:hover .col-lg-6:nth-child(6) .dropdown-card { animation-delay: 0.2s; }
.nav-item-dropdown:hover .col-lg-12 .dropdown-card { animation-delay: 0.24s; }

.nav-link-custom:focus-visible,
.btn-editorial-cta:focus-visible,
.btn-mobile-toggle:focus-visible {
  outline: 2px solid #C05B9E;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---- Desktop sizing (fluid) ---- */
@media (min-width: 992px) {
  .floating-navbar {
    width: 94%;
    max-width: 1400px;
    padding: 12px clamp(20px, 2.2vw, 36px);
  }

  .brand-logo-img {
    height: clamp(54px, 4vw, 78px);
    max-width: 320px;
  }

  .nav-links-wrapper { gap: clamp(14px, 1.9vw, 38px); }

  .nav-link-custom {
    font-size: clamp(0.84rem, 0.5rem + 0.38vw, 1rem);
    font-weight: 600;
    padding: 10px 4px;
  }

  .nav-link-custom::after { bottom: 4px; }

  .header-wrapper .btn-editorial-cta {
    font-size: clamp(0.72rem, 0.5rem + 0.25vw, 0.84rem);
    padding: 11px 14px 11px 22px;
    gap: 12px;
    letter-spacing: 0.08em;
  }

  .header-wrapper .cta-arrow-circle {
    width: 28px;
    height: 28px;
    font-size: 1.05rem;
  }

  .header-scrolled .floating-navbar { padding: 10px 4%; }
  .header-scrolled .brand-logo-img { height: clamp(50px, 3.4vw, 66px); }
}

/* ---- Tablet / mobile sizing ---- */
@media (max-width: 991px) {
  .brand-logo-img { height: 58px; max-width: 220px; }
}

@media (max-width: 480px) {
  .brand-logo-img { height: 50px; max-width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-navbar,
  .nav-links-wrapper > *,
  .nav-item-dropdown .dropdown-card { animation: none !important; }
}

/* Narrow desktops / landscape tablets (992 to 1149 px): the full menu plus the "Let's talk" button don't fit in the floating bar,
   so the button steps aside here (it is still in the menu drawer and on the Contact page). */
@media (min-width: 992px) and (max-width: 1149px) {
  .header-wrapper .btn-editorial-cta { display: none !important; }
  .nav-links-wrapper { gap: 18px; }
  .nav-link-custom { font-size: 0.86rem; }
}
