/* ============================================
   KARVY ICE MANUFACTURING - RESPONSIVE CSS
   responsive.css
   Breakpoints:
   xl:  1200px and below
   lg:  1024px and below
   md:  768px and below
   sm:  480px and below
   xs:  360px and below
   ============================================ */

/* ============================================
   1. XL — 1200px and below
   ============================================ */
   @media (max-width: 1200px) {

    :root {
        --section-padding: 64px;
    }

    .container {
        padding: 0 24px;
    }

    /* Hero */
    .hero-title {
        font-size: var(--font-size-4xl);
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    .product-detail-card {
        grid-template-columns: 340px 1fr;
        gap: var(--spacing-2xl);
    }

    .product-detail-card--reverse {
        grid-template-columns: 1fr 340px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: var(--spacing-2xl);
    }

    /* Contact */
    .contact-layout {
        grid-template-columns: 1fr 340px;
        gap: var(--spacing-2xl);
    }

    /* Industries */
    .industry-intro-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-lg);
    }

    /* About */
    .about-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Thank You */
    .explore-links {
        grid-template-columns: repeat(4, 1fr);
    }

}

/* ============================================
   2. LG — 1024px and below
   ============================================ */
@media (max-width: 1024px) {

    :root {
        --section-padding: 56px;
        --container-padding: 24px;
    }

    /* Typography scale down */
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }

    .hero-title { font-size: var(--font-size-3xl); }

    .page-hero-content h1 {
        font-size: var(--font-size-3xl);
    }

    /* ---- NAVIGATION ---- */
    .nav-menu {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-lg) var(--spacing-xl);
        gap: var(--spacing-xs);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        border-top: 1px solid var(--color-light-border);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 16px;
        font-size: var(--font-size-base);
        border-radius: var(--radius-md);
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    .nav-actions .btn {
        display: none;
    }

    /* ---- HERO ---- */
    .hero {
        min-height: 80vh;
        padding: 60px 0;
    }

    .hero-stats {
        gap: var(--spacing-xl);
    }

    /* ---- TWO COLUMN ---- */
    .two-column {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    /* ---- PRODUCTS ---- */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail-card {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .product-detail-card--reverse {
        grid-template-columns: 1fr;
    }

    .product-detail-card--reverse .product-detail-image { order: 1; }
    .product-detail-card--reverse .product-detail-content { order: 2; }

    .product-detail-image img {
        height: 260px;
    }

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

    /* ---- INDUSTRIES ---- */
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .industry-intro-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .industry-detail-card {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

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

    .industry-detail-card--reverse .industry-detail-icon { order: 1; }
    .industry-detail-card--reverse .industry-detail-content { order: 2; }

    .industry-detail-icon {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }

    /* ---- ABOUT ---- */
    .about-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* ---- FEATURES ---- */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ---- FOOTER ---- */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

    .footer-content .footer-section:first-child {
        grid-column: 1 / -1;
    }

    /* ---- CONTACT ---- */
    .quick-contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .contact-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .contact-info-card {
        grid-column: 1 / -1;
    }

    /* ---- DOWNLOADS ---- */
    .downloads-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* ---- FAQ ---- */
    .faq-categories {
        gap: var(--spacing-sm);
    }

    /* ---- THANK YOU ---- */
    .next-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

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

    /* ---- CTA SECTION ---- */
    .stats-row {
        gap: var(--spacing-2xl);
    }

    /* ---- TIMELINE ---- */
    .timeline::before {
        left: 80px;
    }

    .timeline-year {
        width: 60px;
        font-size: var(--font-size-base);
    }

}

/* ============================================
   3. MD — 768px and below
   ============================================ */
@media (max-width: 768px) {

    :root {
        --section-padding: 48px;
        --container-padding: 16px;
        --header-height: 64px;
    }

    /* ---- TYPOGRAPHY ---- */
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    h3 { font-size: var(--font-size-lg); }

    /* ---- HEADER ---- */
    .logo img { height: 36px; }

    .lang-toggle {
        padding: 5px 10px;
        font-size: var(--font-size-xs);
    }

    /* ---- HERO ---- */
    .hero {
        min-height: 70vh;
        padding: 48px 0;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-md);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-xl);
    }

    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-2xl);
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero-stats {
        gap: var(--spacing-lg);
    }

    .stat-number { font-size: var(--font-size-2xl); }

    /* ---- PAGE HERO ---- */
    .page-hero {
        padding: 48px 0 40px;
    }

    .page-hero-content h1 {
        font-size: var(--font-size-2xl);
    }

    .page-hero-content p {
        font-size: var(--font-size-base);
    }

    /* ---- SECTION HEADER ---- */
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    .section-header h2 {
        font-size: var(--font-size-xl);
    }

    /* ---- PRODUCTS ---- */
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-filter-bar {
        position: static;
    }

    .filter-nav {
        padding: var(--spacing-sm) 0;
    }

    .product-detail-image img {
        height: 220px;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .product-cta {
        flex-direction: column;
    }

    .product-cta .btn {
        width: 100%;
    }

    /* ---- INDUSTRIES ---- */
    .industries-grid {
        grid-template-columns: 1fr;
    }

    .industry-intro-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* ---- FEATURES ---- */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }

    /* ---- ABOUT ---- */
    .about-products-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before { display: none; }

    .timeline-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .timeline-year {
        width: auto;
        text-align: left;
        padding-top: 0;
    }

    .timeline-content {
        margin-left: 0;
    }

    .timeline-content::before { display: none; }

    /* ---- DOWNLOADS ---- */
    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .download-card-action {
        width: 100%;
    }

    .download-card-action .btn {
        width: 100%;
    }

    /* ---- CONTACT ---- */
    .quick-contact-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .contact-sidebar {
        grid-template-columns: 1fr;
    }

    .contact-info-card {
        grid-column: auto;
    }

    /* ---- FAQ ---- */
    .faq-categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--spacing-sm);
        -webkit-overflow-scrolling: touch;
    }

    .faq-cat-btn {
        flex-shrink: 0;
    }

    .faq-question {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }

    .faq-answer {
        padding: 0 var(--spacing-lg);
    }

    /* ---- CTA BUTTONS ---- */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 360px;
    }

    /* ---- STILL QUESTIONS ---- */
    .still-questions .cta-buttons {
        flex-direction: column;
    }

    /* ---- THANK YOU ---- */
    .next-steps-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

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

    .urgent-buttons {
        flex-direction: column;
    }

    .urgent-buttons .btn {
        width: 100%;
    }

    /* ---- FOOTER ---- */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .footer-content .footer-section:first-child {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    /* ---- STATS ---- */
    .stats-row {
        gap: var(--spacing-xl);
    }

    /* ---- MAP ---- */
    .map-wrapper iframe {
        height: 320px;
    }

    /* ---- SCROLL TOP ---- */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

}
/* ============================================
   4. SM — 480px and below
   ============================================ */
   @media (max-width: 480px) {

    :root {
        --section-padding: 40px;
        --container-padding: 16px;
    }

    /* ---- TYPOGRAPHY ---- */
    h1 { font-size: var(--font-size-xl); }
    h2 { font-size: var(--font-size-lg); }

    /* ---- HERO ---- */
    .hero {
        min-height: 60vh;
        padding: 40px 0;
    }

    .hero-title {
        font-size: var(--font-size-xl);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .hero-cta .btn {
        max-width: 100%;
    }

    /* ---- PAGE HERO ---- */
    .page-hero {
        padding: 40px 0 32px;
    }

    .page-hero-content h1 {
        font-size: var(--font-size-xl);
    }

    /* ---- NAVIGATION ---- */
    .nav-actions .lang-toggle {
        display: none;
    }

    .hamburger {
        margin-left: auto;
    }

    /* ---- QUICK CONTACT STRIP ---- */
    .quick-contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .quick-contact-item {
        padding: var(--spacing-sm);
    }

    /* ---- PRODUCTS ---- */
    .product-tag { font-size: 10px; }

    .product-detail-image img { height: 200px; }

    /* ---- INDUSTRIES ---- */
    .industry-intro-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .intro-stat .stat-number {
        font-size: var(--font-size-2xl);
    }

    /* ---- DOWNLOADS ---- */
    .downloads-notice {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* ---- CONTACT FORM ---- */
    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* ---- FAQ ---- */
    .faq-category-title {
        font-size: var(--font-size-lg);
    }

    .faq-question {
        font-size: var(--font-size-sm);
        padding: var(--spacing-md);
    }

    .faq-answer {
        padding: 0 var(--spacing-md);
    }

    .faq-answer p,
    .faq-answer li {
        font-size: var(--font-size-sm);
    }

    /* ---- THANK YOU ---- */
    .thank-you-content h1 {
        font-size: var(--font-size-xl);
    }

    .next-steps-grid {
        grid-template-columns: 1fr;
    }

    .explore-links {
        grid-template-columns: 1fr 1fr;
    }

    .next-steps {
        padding: var(--spacing-xl);
    }

    .urgent-contact {
        padding: var(--spacing-xl);
    }

    /* ---- ABOUT TIMELINE ---- */
    .timeline-content {
        padding: var(--spacing-md);
    }

    /* ---- FOOTER ---- */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-content .footer-section:first-child {
        grid-column: auto;
    }

    .footer {
        padding-top: var(--spacing-3xl);
    }

    /* ---- STATS ROW ---- */
    .stats-row {
        flex-direction: column;
        gap: var(--spacing-lg);
        align-items: center;
    }

    /* ---- CTA BUTTONS ---- */
    .cta-buttons .btn,
    .still-questions .cta-buttons .btn {
        max-width: 100%;
        width: 100%;
    }

    /* ---- FORM ---- */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    /* ---- BUTTON SIZES ---- */
    .btn-lg {
        padding: 14px 24px;
        font-size: var(--font-size-base);
    }

    /* ---- SECTION HEADER ---- */
    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    /* ---- MAP ---- */
    .map-wrapper iframe {
        height: 260px;
    }

    /* ---- DOWNLOAD CARD ---- */
    .download-card {
        padding: var(--spacing-md);
    }

}

/* ============================================
   5. XS — 360px and below
   ============================================ */
@media (max-width: 360px) {

    :root {
        --container-padding: 12px;
    }

    .hero-title { font-size: var(--font-size-lg); }

    .btn {
        padding: 10px 18px;
        font-size: var(--font-size-sm);
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: var(--font-size-sm);
    }

    .explore-links {
        grid-template-columns: 1fr;
    }

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

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

    .logo img { height: 32px; }

    .faq-intro h2 { font-size: var(--font-size-lg); }

    .page-hero-content h1 { font-size: var(--font-size-lg); }

    .thank-you-icon {
        width: 64px;
        height: 64px;
    }

    .thank-you-icon svg {
        width: 36px;
        height: 36px;
    }

    .next-step-item .step-icon {
        width: 40px;
        height: 40px;
    }

}

/* ============================================
   6. PRINT STYLES
   ============================================ */
@media print {

    .header,
    .hamburger,
    .scroll-top,
    .quick-contact-strip,
    .hero-cta,
    .hero-stats,
    .faq-categories,
    .cta-buttons,
    .sidebar-cta-buttons,
    .contact-sidebar,
    .map-section,
    .footer {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .page-hero {
        background-image: none !important;
        background-color: var(--color-primary) !important;
        padding: 20pt 0;
        margin-top: 0;
    }

    .page-hero-content h1 { font-size: 24pt; }

    .section-padding { padding: 20pt 0; }

    a { color: #000; text-decoration: none; }

    .product-detail-card {
        grid-template-columns: 1fr;
        page-break-inside: avoid;
    }

    .faq-item {
        page-break-inside: avoid;
    }

    .faq-answer {
        max-height: none !important;
        padding-top: 10pt !important;
        padding-bottom: 10pt !important;
    }

    .download-card {
        page-break-inside: avoid;
    }

}

/* ============================================
   7. LANDSCAPE PHONE ADJUSTMENTS
   ============================================ */
@media (max-height: 480px) and (orientation: landscape) {

    .hero {
        min-height: 100vh;
        padding: 32px 0;
    }

    .hero-title { font-size: var(--font-size-xl); }

    .hero-stats { display: none; }

    .page-hero { padding: 32px 0 24px; }

}

/* ============================================
   8. TOUCH DEVICE HOVER OVERRIDES
   ============================================ */
@media (hover: none) {

    .product-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    .industry-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .download-card:hover {
        box-shadow: var(--shadow-sm);
        border-color: var(--color-light-border);
    }

    .explore-card:hover {
        transform: none;
    }

}

/* ============================================
   9. HIGH CONTRAST / ACCESSIBILITY
   ============================================ */
@media (prefers-contrast: high) {

    :root {
        --color-primary:      #005A8E;
        --color-primary-dark: #003F63;
        --color-text:         #000000;
        --color-text-light:   #333333;
        --color-light-border: #666666;
    }

    .faq-item {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }

}

/* ============================================
   10. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}
