/* ========================================= */
/* 1. CSS Variables & Basic Reset            */
/* ========================================= */
:root {
    --primary-blue: #1c3b7a; 
    --secondary-dark: #111827;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --accent-gold: #d4af37; 
    --light-blue: #2574b5; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--secondary-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================= */
/* 2. Top Action Bar & Main Navigation       */
/* ========================================= */
.top-bar {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.top-bar-links { display: flex; gap: 20px; }
.top-bar-links a:hover { color: var(--accent-gold); }

.logo-link { display: flex; align-items: center; }
.logo-img {
    max-width: 180px;
    height: auto;
    padding: 5px;
    border-radius: 4px;
}

.main-nav {
    background-color: var(--white);
    padding: 0 5%;
    height: 60px;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-links > li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links > li > a {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links > li > a:hover { color: var(--primary-blue); }

/* ========================================= */
/* 3. Mega Menu Styles                       */
/* ========================================= */
.has-dropdown:hover > a {
    color: var(--primary-blue);
    border-bottom: 4px solid var(--primary-blue);
}

.has-dropdown > a::after { content: ' ⌵'; font-size: 0.8em; margin-left: 5px; }

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-blue);
    padding: 40px 5%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    cursor: default;
}

.has-dropdown:hover .mega-menu { opacity: 1; visibility: visible; }

.menu-col-windows { grid-column: span 2; }
.menu-col-doors { grid-column: span 1; }
.menu-col-composite { grid-column: span 1; }

.windows-inner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.menu-header {
    background-color: var(--light-blue);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.menu-box {
    background-color: var(--white);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.menu-box-title {
    color: var(--light-blue);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.menu-box-title:hover { text-decoration: underline; }
.menu-box ul { list-style: none; padding: 0; }
.menu-box li { font-size: 0.85rem; margin-bottom: 8px; color: var(--secondary-dark); }
.menu-box li:last-child { margin-bottom: 0; }
.menu-box li a:hover { color: var(--light-blue); text-decoration: underline; }

.icon-circle-header {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; background: rgba(255,255,255,0.3);
    border-radius: 50%; font-size: 0.7rem;
}

.icon-circle-box {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; background: #eef3f8;
    color: var(--light-blue); border-radius: 50%; font-size: 0.7rem;
}

/* ========================================= */
/* 4. Homepage specific styles               */
/* ========================================= */
.hero {
    position: relative;
    background-image: url('images/hero-trucks.png');
    background-size: cover;
    background-position: center;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(28, 59, 122, 0.9) 0%, rgba(28, 59, 122, 0.4) 100%);
}

.hero-content { position: relative; z-index: 10; color: var(--white); max-width: 600px; }
.hero-content h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }

.btn {
    display: inline-block; background-color: var(--accent-gold); color: var(--secondary-dark);
    padding: 12px 24px; font-weight: bold; border-radius: 4px; transition: background-color 0.3s ease;
}
.btn:hover { background-color: #fceea7; }

.products-section { padding: 60px 5%; background-color: var(--white); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

.product-card {
    background-color: var(--light-gray); padding: 30px; border-radius: 8px;
    border-top: 4px solid var(--primary-blue); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.product-card h3 { color: var(--primary-blue); margin-bottom: 15px; font-size: 1.4rem; }
.product-card p { margin-bottom: 20px; font-size: 0.95rem; }

.product-link { font-weight: bold; color: var(--primary-blue); display: flex; align-items: center; gap: 5px; }
.product-link:hover { text-decoration: underline; }

/* ========================================= */
/* 5. Generic Inner Page Styles              */
/* ========================================= */
.inner-main { padding: 60px 5%; min-height: 50vh; background-color: var(--white); }
.content-container { max-width: 1200px; margin: 0 auto; }
.inner-page-title { color: var(--primary-blue); font-size: 2.5rem; margin-bottom: 20px; }
.inner-page-text { font-size: 1.1rem; line-height: 1.8; }

/* ========================================= */
/* 6. Product Page Specific Styles           */
/* ========================================= */
.product-hero {
    position: relative; background-size: cover; background-position: center;
    height: 60vh; min-height: 450px; display: flex; align-items: center; padding: 0 5%;
}

.product-hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0.2) 100%);
}

.product-hero-content { position: relative; z-index: 10; color: var(--white); max-width: 800px; }
.product-hero-content h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1.2; }
.product-hero-content p { font-size: 1.1rem; margin-bottom: 25px; }

.breadcrumb-bar {
    position: absolute; bottom: 0; left: 5%; background-color: #333333; color: var(--white);
    padding: 12px 25px; font-size: 0.85rem; border-top-left-radius: 4px; border-top-right-radius: 4px; z-index: 10;
}
.breadcrumb-bar a:hover { color: var(--accent-gold); text-decoration: underline; }

.product-intro {
    padding: 80px 5%; background-color: var(--white); display: grid;
    grid-template-columns: 2fr 1fr; gap: 60px; align-items: center; max-width: 1400px; margin: 0 auto;
}
.product-intro h2 { color: var(--secondary-dark); font-size: 2.2rem; margin-bottom: 25px; }
.product-intro p { margin-bottom: 20px; font-size: 1.05rem; color: #4b5563; }
.product-intro-logo img { max-width: 200px; width: 100%; }

.product-options { background-color: var(--light-blue); color: var(--white); padding: 80px 5%; text-align: center; }
.product-options h2 { font-size: 2.2rem; margin-bottom: 15px; }
.product-options > p { font-size: 1.1rem; margin-bottom: 40px; }

.options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1400px; margin: 0 auto; }
.option-item { padding: 20px; }
.option-item h3 { font-size: 1.5rem; margin-bottom: 15px; }
.option-item p { font-size: 0.95rem; line-height: 1.5; }

.product-features {
    position: relative; background-size: cover; background-position: center; padding: 100px 5%; color: var(--white);
}
.product-features-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.4) 100%);
}
.product-features-content { position: relative; z-index: 10; max-width: 1000px; }
.product-features-content h2 { font-size: 2.5rem; margin-bottom: 40px; }

.features-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.features-list li { list-style: none; font-size: 1.05rem; display: flex; align-items: flex-start; line-height: 1.5; }
.features-list li::before { content: '❯'; color: var(--accent-gold); margin-right: 15px; font-size: 0.9rem; margin-top: 3px; }

/* ========================================= */
/* 7. Footer Styles                          */
/* ========================================= */
.site-footer { background-color: #164e87; color: var(--white); font-size: 0.9rem; margin-top: 60px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 30px; padding: 60px 5%; }
.footer-logo-img { max-width: 180px; padding: 10px; border-radius: 4px; margin-bottom: 10px; }
.footer-tagline { font-size: 0.85rem; margin-top: 5px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 20px; font-weight: 700; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; display: flex; align-items: center; }
.footer-links li::before { content: '❯'; font-size: 0.7rem; margin-right: 10px; color: var(--white); }
.footer-links a:hover { text-decoration: underline; color: var(--accent-gold); }

.social-icons { display: flex; gap: 15px; margin-bottom: 25px; font-size: 1.2rem; }
.social-icons a { transition: color 0.3s ease; }
.social-icons a:hover { color: var(--accent-gold); }

.company-info p { font-size: 0.8rem; margin-bottom: 15px; line-height: 1.5; }

.footer-bottom { background-color: #0f365e; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-legal-links { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; }
.footer-legal-links a { font-size: 0.85rem; }
.footer-legal-links a:hover { text-decoration: underline; }
.footer-legal-links a:not(:last-child)::after { content: '|'; margin-left: 15px; color: rgba(255,255,255,0.4); display: inline-block; }
.footer-copyright { font-size: 0.85rem; text-align: right; line-height: 1.4; }

/* ========================================= */
/* 8. Mobile & Tablet Optimisation           */
/* ========================================= */
.menu-toggle { display: none; } /* Hidden by default */

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .options-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .product-intro { grid-template-columns: 1fr; gap: 30px; }
    .features-list { grid-template-columns: 1fr; }
    .product-hero-content h1, .hero-content h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    /* Top Bar & Header */
    .top-bar { flex-direction: column; gap: 10px; text-align: center; }
    .logo-img { max-width: 140px; margin-bottom: 10px; }
    .main-nav { height: auto; padding: 10px 5%; }
    
    /* Navigation Overlay */
    .menu-toggle { display: block; background: none; border: none; color: var(--primary-blue); font-size: 1.5rem; cursor: pointer; }
    .nav-links { display: none; }
    .nav-links.mobile-active {
        display: flex !important; flex-direction: column; position: fixed; top: 0; right: 0;
        width: 280px; height: 100vh; background-color: var(--white); z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2); padding: 60px 20px; overflow-y: auto;
    }
    .nav-links.mobile-active li { height: auto; margin-bottom: 20px; }
    
    /* Grids & Layout */
    .product-hero, .hero { height: 50vh; min-height: 350px; text-align: center; }
    .breadcrumb-bar { display: none; }
    .product-intro { text-align: center; }
    .product-intro-logo { order: -1; margin-bottom: 20px; }
    .options-grid { grid-template-columns: 1fr; }
    
    /* Footer */
    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .footer-links li { justify-content: center; }
    .social-icons { justify-content: center; }
    .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
    .footer-copyright { text-align: center; }
    .footer-legal-links { justify-content: center; }
    .footer-legal-links a:not(:last-child)::after { display: none; }
    .footer-legal-links a { width: 100%; margin-bottom: 5px; }

    /* --- NEW MOBILE MENU ACCORDION LOGIC --- */
    .mega-menu { display: none !important; }
    
    .mega-menu.mobile-expanded { 
        display: block !important; 
        opacity: 1 !important; 
        visibility: visible !important; 
        position: static !important;
        padding-top: 20px; 
    }

    /* Fix Mega Menu overflowing the mobile drawer */
    .windows-inner-grid { grid-template-columns: 1fr !important; gap: 5px; }
    .menu-box { padding: 10px 5px !important; margin-bottom: 5px !important; }
    .menu-header { font-size: 1rem; padding: 10px; }

    /* Hide sub-categories by default on mobile */
    .windows-inner-grid,
    .menu-col-doors .menu-box { display: none !important; }

    /* Show sub-categories when tapped */
    .windows-inner-grid.sub-expanded { display: grid !important; }
    .menu-col-doors .menu-box.sub-expanded { display: block !important; }
}

/* =========================================
   CLEANUP UTILITY CLASSES
========================================= */

/* Solid Blue Page Headers (Used on About, Sustainability, News, Legal pages) */
.blue-header-banner {
    background-color: var(--primary-blue); 
    height: 30vh; 
    min-height: 250px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    flex-direction: column;
}
.blue-header-banner h1 {
    margin-bottom: 0;
    color: var(--white);
}
.blue-header-banner p {
    color: var(--white); 
    font-size: 1.2rem; 
    margin-top: 10px;
}

/* Card Grids (Used on Sustainability, News, Find an Installer) */
.card-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-bottom: 50px;
}

/* Premium Flat Info Cards (Updated to match Homepage) */
.info-card {
    background: var(--light-gray); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: none; 
    border-left: 4px solid var(--primary-blue);
    display: flex;
    flex-direction: column;
}

.info-card h3 {
    color: var(--primary-blue); 
    margin-bottom: 10px;
}

/* Clean Bulleted Lists inside text areas */
.info-list {
    margin-left: 20px; 
    margin-top: 10px; 
    margin-bottom: 15px; 
    list-style-type: disc;
}

/* Blue Tags / Badges (Used on Sustainability) */
.badge-container {
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    flex-wrap: wrap; 
    margin-bottom: 40px;
}
.blue-badge {
    background: var(--primary-blue); 
    color: var(--white); 
    padding: 10px 20px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 0.95rem;
}

/* Section Dividers (Faint line separating bottom sections) */
.section-divider {
    text-align: center; 
    padding-top: 30px; 
    border-top: 1px solid #ddd;
    margin-top: 30px;
}

/* Large Buttons */
.btn-large {
    padding: 15px 40px; 
    font-size: 1.1rem;
}
/* ========================================= */
/* News Grid Pagination Styles               */
/* ========================================= */
.news-grid-container {
    transition: opacity 0.3s ease;
}
.pagination-container {
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 20px;
}
.page-btn {
    background: var(--white); 
    border: 1px solid #ddd; 
    color: var(--primary-blue); 
    padding: 10px 15px; 
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer;
    transition: all 0.2s ease;
}
.page-btn:hover {
    background: #f0f0f0;
}
.page-btn.active {
    background: var(--primary-blue); 
    color: var(--white); 
    border-color: var(--primary-blue);
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}