/* ============================================================
   GOLDEN SAFFRON — RESPONSIVE STYLESHEET
   Loaded after style.css. Desktop-first, cascading max-width
   breakpoints for: Large Screens, Laptop, Tablet, Mobile.
   Breakpoints: 1440px / 1200px / 1024px / 768px / 480px
   ============================================================ */

/* ============================================================
   LARGE SCREENS (1440px+) — comfortable max width, larger hero
   ============================================================ */
@media (min-width: 1440px) {
  .container {
    max-width: 1360px;
  }

  .hero-title {
    font-size: clamp(3.2rem, 5.2vw, 5.2rem);
  }

  .stats-grid {
    gap: 60px;
  }
}

/* ============================================================
   LAPTOP / SMALL DESKTOP (max-width: 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  .container {
    padding: 0 26px;
  }

  .main-nav ul {
    gap: 26px;
  }

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

  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .why-intro {
    grid-column: span 2;
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    row-gap: 50px;
  }

  .footer-brand {
    grid-column: span 3;
    max-width: 480px;
  }

  .footer-brand p {
    max-width: 100%;
  }
}

/* ============================================================
   TABLET LANDSCAPE (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --header-height: 84px;
    --header-height-shrink: 64px;
  }

  /* Navigation switches to off-canvas mobile menu */
  .main-nav {
    display: none;
  }

  .lang-switch {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2.4rem, 5.4vw, 3.4rem);
    max-width: 640px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .stat-item:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }

  .assay-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 34px 28px;
  }

  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .export-grid,
  .faq-grid,
  .inquiry-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .export-intro,
  .faq-intro,
  .inquiry-intro {
    position: static;
  }

  .map-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .country-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

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

  .testimonial-card:last-child {
    grid-column: span 2;
  }

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

  .footer-brand {
    grid-column: span 2;
  }
}

/* ============================================================
   TABLET PORTRAIT (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .hero-content {
    padding: 40px 20px 100px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 8vw, 2.8rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 34px;
    gap: 24px;
  }

  .stat-number {
    font-size: 1.9rem;
  }

  .products-section,
  .why-section,
  .certificates-section,
  .quality-section,
  .export-section,
  .map-section,
  .gallery-section,
  .testimonials-section,
  .faq-section,
  .inquiry-section {
    padding: 80px 0;
  }

  .section-title {
    font-size: clamp(1.7rem, 6vw, 2.2rem);
  }

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

  .why-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .why-intro {
    grid-column: span 1;
  }

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

  .timeline {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .gallery-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }

  .testimonial-track {
    grid-template-columns: 1fr;
  }

  .testimonial-card:last-child {
    grid-column: span 1;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .inquiry-form {
    padding: 30px 22px;
  }

  .final-cta {
    padding: 80px 0;
  }

  .final-cta .hero-actions {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
    padding-bottom: 40px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-col.footer-newsletter {
    grid-column: span 2;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --header-height: 76px;
    --header-height-shrink: 60px;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .header-actions {
    gap: 12px;
  }

  .btn-small {
    padding: 9px 16px;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-sub {
    font-size: 0.98rem;
  }

  .hero-scroll {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .stat-item {
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid rgba(233, 227, 214, 0.12);
    padding-bottom: 22px;
  }

  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .assay-image-placeholder {
    height: 160px;
  }

  .assay-body {
    padding: 22px 20px 24px;
  }

  .cert-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .cert-card {
    padding: 24px 14px;
  }

  .export-step {
    gap: 16px;
  }

  .export-num {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .map-placeholder {
    aspect-ratio: 4 / 3;
  }

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

  .gallery-grid {
    grid-auto-rows: 200px;
  }

  .testimonial-card {
    padding: 28px 22px;
    min-height: unset;
  }

  .faq-question {
    padding: 18px 18px;
    font-size: 0.92rem;
  }

  .faq-answer p {
    padding: 0 18px 18px;
  }

  .inquiry-form {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

  .final-cta h2 {
    font-size: 1.6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-brand,
  .footer-col.footer-newsletter {
    grid-column: span 1;
  }

  .footer-bottom-inner ul {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .mobile-nav {
    width: 100vw;
    padding: 110px 24px 32px;
  }
}

/* ============================================================
   INNER PAGES — STORY / TEAM / PAGE HERO (about, products, export,
   gallery, contact). Appended to keep prior breakpoint blocks intact.
   ============================================================ */
@media (max-width: 1024px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-image-placeholder {
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 768px) {
  .page-hero {
    padding: calc(var(--header-height) + 60px) 0 60px;
  }

  .page-hero-title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
  }

  .story-section,
  .team-section {
    padding: 80px 0;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.7rem;
  }

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

/* ============================================================
   PRODUCT DETAIL + PACKAGING (products.html)
   ============================================================ */
@media (max-width: 1024px) {
  .product-detail-grid,
  .product-detail.reverse .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .product-detail.reverse .product-media {
    order: 0;
  }

  .product-image-placeholder {
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 768px) {
  .product-detail {
    padding: 70px 0;
  }

  .product-meta-grid {
    grid-template-columns: 1fr;
  }

  .packaging-section {
    padding: 80px 0;
  }

  .packaging-card {
    padding: 28px 24px;
  }
}

/* ============================================================
   INCOTERMS + QUICK FACTS (export.html)
   ============================================================ */
@media (max-width: 1024px) {
  .quick-facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .incoterms-section,
  .quick-facts {
    padding: 70px 0;
  }
}

@media (max-width: 480px) {
  .quick-facts-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FULL GALLERY + LIGHTBOX (gallery.html)
   ============================================================ */
@media (max-width: 1024px) {
  .full-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: -48px;
    right: 8px;
  }
}

@media (max-width: 768px) {
  .full-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
  }

  .gallery-filter-bar {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.78rem;
  }

  .lightbox {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .full-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CONTACT PAGE (contact.html)
   ============================================================ */
@media (max-width: 1024px) {
  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .contact-info-section {
    margin-top: -30px;
    padding-bottom: 70px;
  }

  .gmap-placeholder {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .contact-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FINE POINTER / HOVER-CAPABLE DEVICES ONLY
   Prevents sticky hover states lingering on touch devices
   ============================================================ */
@media (hover: none) {
  .assay-card:hover,
  .why-item:hover,
  .cert-card:hover,
  .gallery-item:hover,
  .btn-gold:hover,
  .btn-outline:hover,
  .btn-outline-light:hover,
  .btn-dark:hover {
    transform: none;
  }
}

/* ============================================================
   REAL IMAGERY RESPONSIVE RULES
   ============================================================ */
@media (max-width: 1200px) {
  .cert-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .product-image-frame,
  .story-image-frame {
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 768px) {
  .hero-img {
    object-position: 78% center;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(11, 9, 8, 0.55) 0%, rgba(11, 9, 8, 0.7) 60%, rgba(11, 9, 8, 0.9) 100%);
  }

  .assay-image {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .cert-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   MOBILE HERO: image on top, text below on solid dark
   ============================================================ */
@media (max-width: 768px) {
  .hero {
    align-items: flex-end;
    min-height: 100svh;
  }

  .hero-media {
    inset: 0 0 auto 0;
    height: 56vh;
  }

  .hero-img {
    object-position: 82% center;
  }

  .hero-overlay {
    inset: 0 0 auto 0;
    height: 56vh;
    background: linear-gradient(180deg, rgba(11, 9, 8, 0.25) 0%, rgba(11, 9, 8, 0.1) 40%, var(--color-charcoal-dark) 100%);
  }

  .hero-content {
    padding: 40px 20px 56px;
  }
}

/* LOGO IMAGE */
@media (max-width: 480px) {
  .logo-img {
    height: 42px;
  }

  .site-header.is-scrolled .logo-img {
    height: 36px;
  }
}

/* ============================================================
   LOGO LOCKUP, FINDER, FLOATING ACTIONS
   ============================================================ */
@media (max-width: 1024px) {
  .finder-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .finder-section {
    padding: 80px 0;
  }

  .finder-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .logo-emblem {
    height: 42px;
  }

  .site-header.is-scrolled .logo-emblem {
    height: 36px;
  }

  .logo-wordmark {
    font-size: 0.82rem;
  }

  .logo-divider {
    height: 28px;
  }

  .trust-marquee {
    padding: 14px 0;
  }
}

@media (max-width: 480px) {
  .logo {
    gap: 10px;
  }

  .float-actions {
    right: 14px;
    bottom: 14px;
  }

  .float-btn {
    width: 48px;
    height: 48px;
  }

  .header-actions .btn-small {
    display: none;
  }
}

@media (max-width: 360px) {
  .logo-divider {
    display: none;
  }
}
