/* ========================================
   RESPONSIVE BREAKPOINTS - COMPLETE FIXED
   ======================================== */

/* ===== DESKTOP - GRID SOLUTION FOR 8 BOXES (ALWAYS ONE ROW) ===== */
@media screen and (min-width: 1025px) {
    .info-strip {
        position: absolute !important;
        top: 470px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: grid !important;
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 20px !important;
        width: 90% !important;
        max-width: 1400px !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
        height: auto !important;
        min-height: auto !important;
        z-index: 2 !important;
    }
    
    .info-tile {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        margin: 0 !important;
    }
    
    .tile-box {
        width: 100% !important;
        padding: 0.5rem !important;
    }
    
    .tile-box img {
        width: 100% !important;
        height: 80px !important;
        object-fit: cover !important;
    }
    
    .tile-box h3 {
        font-size: 0.8rem !important;
        margin-top: 7px !important;
        margin-bottom: 7px !important;
        white-space: nowrap !important;
    }
}

@media screen and (min-width: 1600px) {
    .info-strip {
        gap: 25px !important;
        max-width: 1600px !important;
        top: 500px !important;
    }
    .tile-box img { height: 90px !important; }
    .tile-box h3 { font-size: 0.9rem !important; }
}

@media screen and (min-width: 1400px) and (max-width: 1599px) {
    .info-strip { gap: 20px !important; max-width: 1500px !important; }
}

@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .info-strip { gap: 15px !important; max-width: 1300px !important; }
    .tile-box img { height: 75px !important; }
    .tile-box h3 { font-size: 0.75rem !important; }
}

@media screen and (min-width: 1025px) and (max-width: 1199px) {
    .info-strip { gap: 12px !important; max-width: 1100px !important; top: 450px !important; }
    .tile-box img { height: 70px !important; }
    .tile-box h3 { font-size: 0.7rem !important; }
}

/* ===== TABLET (768px - 1024px) ===== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .header-area { padding: 20px 0; }
    .button-container {
        left: 0 !important;
        top: 0 !important;
        position: static !important;
        margin-left: 20px;
    }
    .main-nav { flex-wrap: wrap; }
    
    .info-strip {
        position: static !important;
        transform: none !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 20px !important;
        margin: 40px auto !important;
        width: 90% !important;
        max-width: 900px !important;
    }
    .info-tile { width: calc(25% - 20px) !important; min-width: 150px !important; max-width: 180px !important; }
    .tile-box img { height: 70px !important; }
    .panel-content { margin-top: 20px !important; min-width: 90%; }
    
    .links-column ul {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px 30px !important;
        max-width: 550px !important;
        margin: 0 auto !important;
    }
    .links-column ul li {
        text-align: left !important;
        white-space: nowrap !important;
    }
    .links-column ul li a {
        font-size: 13px !important;
        white-space: nowrap !important;
    }
    .links-column ul::before { display: none; }
}

/* ===== MOBILE (up to 767px) ===== */
@media screen and (max-width: 767px) {
    
    body {
        padding-top: 70px !important;
    }

    .header-area {
        padding: 35px 0 !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .button-container { display: none !important; }
    
    .mobile-menu-btn {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: 2px solid white;
        color: white;
        padding: 8px 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
        z-index: 10001;
    }
    .header-area.header-scrolled .mobile-menu-btn { border-color: #00698A; color: #00698A; }
    
    .mobile-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 70% !important;
        height: 100vh;
        background: #00698A;
        z-index: 10000;
        padding: 80px 0 30px 0 !important;
        margin: 0 !important;
        left: auto !important;
        right: 0 !important;
        box-sizing: border-box !important;
        animation: slideInRight 0.3s ease forwards;
    }
    
    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
    .mobile-nav.active { display: block !important; }
    
    .mobile-nav-close {
        position: absolute;
        top: 20px;
        left: 15px;
        width: 40px;
        height: 40px;
        background: #005676;
        border: 2px solid white;
        border-radius: 50%;
        color: white;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10002;
    }
    .mobile-nav-close:hover { background: white; color: #00698A; transform: rotate(90deg); }
    
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9999;
    }
    .mobile-nav-overlay.active { display: block !important; }
    
    .mobile-nav .button-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 40px 0 0 0 !important;
        padding: 0 !important;
    }
    
    .mobile-nav .element--hover,
    .mobile-nav .main-white-button a,
    .mobile-nav .dropdown > a {
        font-size: 16px !important;
        padding: 14px 0 !important;
        width: 100% !important;
        text-align: center !important;
        color: white !important;
        background: #0077A8 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-bottom: 1px solid #005676 !important;
        display: block !important;
        text-decoration: none;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .mobile-nav .dropdown {
        width: 100% !important;
        margin: 0 !important;
        position: relative;
    }
    
    .mobile-nav .dropdown > a::after {
        content: '▼';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        color: white;
    }
    .mobile-nav .dropdown.active > a::after { transform: translateY(-50%) rotate(180deg); }
    
    .mobile-nav .dropdown-content {
        display: none !important;
        width: 100% !important;
        background: #005676 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .mobile-nav .dropdown.active .dropdown-content { display: block !important; }
    
    .mobile-nav .dropdown-content a {
        color: white !important;
        padding: 12px 0 !important;
        text-align: center !important;
        border-bottom: 1px solid #0077A8 !important;
        font-size: 14px !important;
        display: block !important;
        width: 100% !important;
        background: #005676 !important;
        margin: 0 !important;
    }
    .mobile-nav .dropdown-content a:last-child { border-bottom: none !important; }
    
    .mobile-nav .main-white-button { width: 100% !important; margin: 0 !important; }
    .mobile-nav .main-white-button a { background: #0077A8 !important; font-weight: normal !important; }
    .mobile-nav .dropdown.active > a { background: #005676 !important; border-bottom-color: #004560 !important; }
    
    .mobile-nav * {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .mobile-nav .main-nav,
    .mobile-nav .col-12,
    .mobile-nav .row,
    .mobile-nav .container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }
    
    .mobile-nav .button-container {
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
        top: auto !important;
    }
    
    /* Info Strip - 2 Cards Per Row */
    .info-strip {
        position: static !important;
        transform: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin: 30px auto !important;
        width: 95% !important;
        max-width: 500px !important;
        padding: 0 !important;
    }
    .info-tile { width: 100% !important; margin: 0 !important; }
    .tile-box { padding: 12px !important; }
    .tile-box img { height: 70px !important; }
    .tile-box h3 { font-size: 13px !important; text-align: center !important; }
    
    .panel-content { margin-top: 20px !important; width: 95% !important; padding: 15px !important; }
    .intro-image { max-height: 45px !important; }
    
    #company-intro-box { padding: 20px 15px; }
    #company-intro-box h2 { padding-left: 40px; font-size: 20px; }
    #company-intro-box p { font-size: 13px; }
    
    .form-table td { display: block; width: 100%; }
    
    .modal-content { width: 90% !important; max-width: 400px !important; padding: 20px 15px !important; }
    #sampleForm { display: flex !important; flex-direction: column !important; gap: 15px !important; }
    #sampleForm input, #sampleForm textarea { width: 100% !important; padding: 12px 15px !important; font-size: 16px !important; }
    .form-submit { width: 100% !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
    .g-recaptcha { transform: scale(0.9) !important; }
    #sampleForm button { width: 100% !important; max-width: 250px !important; padding: 14px 20px !important; }
    
    .contact-table { flex-direction: column; }
    .contact-column { 
        border-left: none; 
        border-bottom: 1px solid #ccc; 
        padding: 15px; 
        text-align: center !important; 
    }
    .contact-column:last-child { border-bottom: none; }
    
    .address-column p,
    .contact-column h3,
    .contact-column ul {
        text-align: center !important;
    }
    
    .links-column ul {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px 25px !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        max-width: 480px !important;
    }
    
    .links-column ul li {
        text-align: center !important;
        padding: 5px 0 !important;
        white-space: nowrap !important;
    }
    
    .links-column ul li a {
        font-size: 13px !important;
        color: #ffffff !important;
        text-decoration: none !important;
        transition: color 0.2s ease !important;
        display: inline-block !important;
        white-space: nowrap !important;
    }
    
    .links-column ul li a:hover {
        color: #00365A !important;
        text-decoration: underline !important;
    }
    
    .links-column ul::before {
        display: none;
    }
    
    .logo-column {
        align-items: center;
    }
}

/* ===== SMALL MOBILE (up to 480px) ===== */
@media screen and (max-width: 480px) {
    .info-strip { gap: 10px !important; width: 98% !important; }
    .tile-box { padding: 10px !important; }
    .tile-box img { height: 60px !important; }
    .tile-box h3 { font-size: 12px !important; }
    .intro-image { max-height: 35px !important; }
    #company-intro-box { background-image: none; }
    #company-intro-box h2 { padding-left: 0; text-align: center; }
    .modal-content { width: 95% !important; padding: 15px 12px !important; }
    #sampleForm input, #sampleForm textarea { padding: 10px 12px !important; font-size: 14px !important; }
    .g-recaptcha { transform: scale(0.8) !important; }
    #sampleForm button { max-width: 200px !important; padding: 12px 15px !important; }
    
    .links-column ul {
        gap: 6px 15px !important;
        max-width: 380px !important;
    }
    .links-column ul li a {
        font-size: 12px !important;
        white-space: nowrap !important;
    }
}

/* ===== VERY LARGE SCREENS ===== */
@media screen and (min-width: 1920px) {
    .container { max-width: 1600px; }
    .info-strip { gap: 30px !important; max-width: 1800px !important; top: 550px !important; }
    .tile-box img { height: 100px !important; }
    .tile-box h3 { font-size: 1rem !important; }
}

/* ===== GLOBAL UTILITIES ===== */
.mobile-menu-btn { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.header-area { z-index: 1000; }
#intro-image-box { display: inline-block; max-width: 100%; text-align: center; }
.intro-image { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* ========================================
   HERO SECTION RESPONSIVE - FOR ALL PAGES
   ======================================== */

/* Customization Page Hero (right-aligned on desktop, centered on mobile) */
@media screen and (max-width: 767px) {
    .hero {
        height: 180px !important;
        margin-top: -80px !important;
    }
    .hero-bg {
        background-size: cover !important;
        background-position: 25% center !important;
    }
    .hero-title-wrap {
        top: 110px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        justify-content: center !important;
    }
    .hero-title {
        font-size: 1.3rem !important;
        white-space: normal !important;
        text-align: center !important;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        height: 150px !important;
    }
    .hero-title-wrap {
        top: 90px !important;
    }
    .hero-title {
        font-size: 1.1rem !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .hero {
        height: 220px !important;
    }
    .hero-title-wrap {
        top: 150px !important;
        right: 80px !important;
        left: auto !important;
        transform: none !important;
    }
    .hero-title {
        font-size: 1.4rem !important;
    }
}

/* Index Page Hero Section - Keep original positioning */
@media screen and (max-width: 767px) {
    .hero-section .hero-title-wrap {
        top: 120px !important;
        right: 15px !important;
        left: auto !important;
        transform: none !important;
    }
    .hero-section .hero-title {
        font-size: 1.3rem !important;
        text-align: right !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-section .hero-title-wrap {
        top: 100px !important;
        right: 10px !important;
    }
    .hero-section .hero-title {
        font-size: 1.1rem !important;
    }
}

/* ========================================
   PRODUCT PAGES - DO NOT OVERRIDE
   ======================================== */

/* Prevent responsive.css from affecting product page hero */
.product-layout ~ .hero .hero-title-wrap,
.product-layout + .hero .hero-title-wrap,
.hero.product-hero .hero-title-wrap,
.product-layout .hero-title-wrap,
body.product-page .hero .hero-title-wrap {
    all: revert !important;
    position: absolute !important;
    top: 230px !important;
    right: 280px !important;
    left: auto !important;
    transform: none !important;
}

/* For mobile - only apply if product page has specific class */
@media screen and (max-width: 767px) {
    /* Ensure product page hero styles are not overridden */
    .product-layout ~ .hero .hero-title-wrap,
    .product-layout + .hero .hero-title-wrap {
        all: revert !important;
        top: 110px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        justify-content: center !important;
    }
    
    .product-layout ~ .hero .hero-title,
    .product-layout + .hero .hero-title {
        text-align: center !important;
        font-size: 1.2rem !important;
    }
}

/* ===== FORCE PRODUCT IMAGE SIZE ON MOBILE ===== */
@media screen and (max-width: 767px) {
    /* Target the image specifically */
    .product-layout .menu-image .intro-image {
        width: 80% !important;
        max-width: 400px !important;
        min-width: 350px !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
        object-fit: contain !important;
    }
    
    /* Make sure parent containers allow the image to be large */
    .product-layout .left-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        overflow: visible !important;
    }
    
    .product-layout .menu-image {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        overflow: visible !important;
    }
    
    /* Remove any potential constraints from global styles */
    .intro-image {
        max-width: none !important;
        max-height: none !important;
    }
}