/* --- Variables & Reset --- */
:root {
    --primary: #f7eb1c; /* Yellow */
    --dark: #242122;    /* Charcoal/Black */
    --light: #ffffff;   /* White */
    --light-grey: #e8e8e8; /* Light grey for navbar */
    --font: Arial, Helvetica, sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Extra safety net against horizontal scrolling */
}

body {
    font-family: var(--font);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden; 
}

/* Fixes the issue where the fixed navbar covers section headings */
section {
    scroll-margin-top: 90px; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 4rem 0;
}

.bg-dark {
    background-color: var(--dark);
    color: var(--light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    border-bottom: 4px solid var(--primary);
    display: inline-block;
    padding-bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
    max-width: 100%; /* Ensures title never breaches container bounds */
    word-break: break-word; /* Allows long words to break instead of overflowing */
}
.light-text { color: var(--light); border-bottom: 4px solid var(--primary); }

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 60px; height: 60px;
    border: 6px solid var(--light);
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Floating WhatsApp --- */
.float-wa {
    position: fixed;
    bottom: 35px;
    right: 35px;
    background-color: #25D366; 
    color: white;
    width: 65px; height: 65px;
    border-radius: 50%;
    text-align: center;
    font-size: 38px;
    line-height: 65px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.float-wa:hover { transform: scale(1.1) rotate(5deg); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }

/* --- Header & Nav --- */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: var(--light-grey);
    padding: 0.8rem 7%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15); 
}
.logo img {
    height: 55px;
    transition: var(--transition);
}
.logo img:hover { transform: scale(1.05); }

/* STRICT TARGETING: Only targets the main menu links, ignoring the dropdown */
nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
}
nav > ul > li { margin-left: 25px; }
nav > ul > li > a {
    color: var(--dark); 
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.95rem; 
    transition: var(--transition);
    letter-spacing: 1px;
}
nav > ul > li > a:hover { color: #000; border-bottom: 2px solid var(--primary); padding-bottom: 5px; }

/* --- Dropdown Setup --- */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; 
    list-style: none;
}

/* --- DESKTOP ONLY DROPDOWN (999px and above) --- */
@media screen and (min-width: 999px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--light-grey);
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-radius: 0 0 5px 5px;
        flex-direction: column;
        min-width: 280px;
        padding: 10px 0;
        z-index: 1000;
        border-top: 3px solid var(--primary);
    }
    .dropdown:hover .dropdown-menu {
        display: flex; 
    }
    .dropdown-menu li { margin: 0; padding: 0; width: 100%; }
    .dropdown-menu li a {
        padding: 12px 20px;
        display: block;
        text-transform: capitalize;
        font-size: 0.9rem;
        font-weight: normal;
        color: var(--dark);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        text-decoration: none;
        transition: var(--transition);
    }
    .dropdown-menu li:last-child a { border-bottom: none; }
    .dropdown-menu li a:hover {
        background-color: #fff;
        color: var(--primary);
        padding-left: 25px; 
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
}

/* Burger Menu */
.burger { display: none; cursor: pointer; }
.burger div {
    width: 28px; height: 3px;
    background-color: var(--dark); 
    margin: 6px;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    height: 80vh; 
    background-image: url('images/hero.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    text-align: center;
    color: var(--light);
    position: relative; 
    margin-top: 70px;
    padding-bottom: 2rem; 
}

.hero-content { z-index: 2; max-width: 1200px; padding: 0 5%; width: 100%; margin-bottom: 0; }

.hero h1 { 
    font-size: 3.2rem; 
    color: var(--primary); 
    margin-bottom: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9); 
    white-space: nowrap; /* Forces text to stay on one line ONLY on huge screens */
    max-width: 100%;
}
.hero p { 
    font-size: 1.1rem; 
    margin-bottom: 2.5rem; 
    color: #f0f0f0; 
    line-height: 1.5; 
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9); 
}
.hero-btns { display: flex; justify-content: center; gap: 15px; }
.btn {
    padding: 12px 35px; 
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px; 
    transition: var(--transition);
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); 
}
.btn-primary { background: var(--primary); color: var(--dark); border: 2px solid var(--primary); }
.btn-primary:hover { background: transparent; color: var(--primary); transform: translateY(-3px); }
.btn-secondary { background: transparent; color: var(--light); border: 2px solid var(--light); }
.btn-secondary:hover { background: var(--light); color: var(--dark); transform: translateY(-3px); }

/* --- About Section --- */
.about-grid, .contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.about-text p { font-size: 1rem; margin-bottom: 1.5rem; }
.about-image-placeholder { width: 100%; margin-top: 2rem; border-radius: 8px; overflow: hidden; border: none; background-color: transparent; }
.about-img { width: 100%; height: auto; display: block; transition: var(--transition); }
.about-image-placeholder:hover .about-img { transform: scale(1.05); }

.about-stats { display: flex; flex-direction: column; gap: 1.5rem; justify-content: center; }
.stat-box { background: var(--dark); color: var(--primary); padding: 2rem; text-align: center; border-radius: 8px; transition: var(--transition); }
.stat-box:hover { transform: scale(1.03); }
.stat-box h3 { font-size: 3rem; }

/* --- Mission Section --- */
#mission { background-color: #fcfcfc; padding: 4rem 0; }
.mission-text { font-size: 1.25rem; line-height: 1.8; max-width: 900px; margin: 0 auto; text-align: center; color: var(--dark); }

/* --- Product Grid --- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.product-card {
    background: var(--light);
    color: var(--dark);
    padding: 1.5rem; 
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    scroll-margin-top: 100px; 
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.card-image-placeholder {
    width: 100%; height: 280px; border-radius: 6px; border: 2px solid var(--primary); 
    display: flex; justify-content: center; align-items: center; margin-bottom: 1.5rem; overflow: hidden; background-color: #eee;
}
.product-img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.product-card:hover .product-img { transform: scale(1.05); }
.product-card h3 { margin-bottom: 0.8rem; font-size: 1.4rem; text-transform: uppercase; }
.product-card p { font-size: 0.95rem; color: #444; }

/* --- Executive Facts Section --- */
#facts { padding-bottom: 0; }
.facts-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 4rem; }
.fact-item { padding-bottom: 1rem; }
.fact-item h3 { font-size: 1.3rem; color: var(--dark); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; border-left: 4px solid var(--primary); padding-left: 15px; }
.fact-item p { font-size: 1.05rem; color: #444; line-height: 1.7; }
.facts-bottom-image { width: 90%; max-width: 1200px; height: auto; aspect-ratio: 1200 / 500; object-fit: cover; object-position: center bottom; display: block; margin: 2rem auto 0.5rem auto; }

/* --- Certifications Section --- */
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1000px; margin: 0 auto; }
.cert-col { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.cert-img { width: 100%; max-width: 400px; height: auto; box-shadow: 0 6px 15px rgba(0,0,0,0.15); border: 1px solid #ddd; border-radius: 4px; transition: var(--transition); }
.cert-img:hover { transform: scale(1.03); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.cert-logos { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; margin-top: 5rem; gap: 2rem; }
.cert-logo-img { width: 100%; max-width: 320px; height: auto; aspect-ratio: 400 / 235; object-fit: contain; }

/* --- Service Box --- */
.service-box { background: var(--light); padding: 3rem; border-left: 6px solid var(--primary); display: flex; flex-direction: column; align-items: center; gap: 2rem; border-radius: 8px; overflow: hidden; scroll-margin-top: 100px; }
.service-text { width: 100%; }
.service-text h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.service-bottom-image { width: 100%; max-width: 1000px; height: auto; display: block; margin: 0 auto; transform: translateX(150px); opacity: 0; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease-out; transition-delay: 0.3s; }
.section-animate.visible .service-bottom-image { transform: translateX(0); opacity: 1; }

/* --- Gallery --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.gallery-item { background: var(--dark); height: 250px; border-radius: 8px; overflow: hidden; border: 3px solid transparent; transition: var(--transition); }
.gallery-item:hover { border-color: var(--primary); }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); display: block; }
.gallery-item:hover .gallery-img { transform: scale(1.1); }

/* --- Contact & Map --- */
.info-item { display: flex; align-items: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.info-item i { font-size: 1.5rem; color: var(--primary); width: 40px; }
.form-message { padding: 15px; margin-bottom: 20px; border-radius: 5px; font-weight: bold; text-align: center; font-size: 0.95rem; }
.form-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.contact-form form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form select, .contact-form textarea { padding: 15px; border: 1px solid #ccc; border-radius: 5px; font-family: var(--font); transition: var(--transition); width: 100%; background-color: var(--light); color: var(--dark); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.contact-form .btn { align-self: flex-start; }
.map-container { margin-top: 3rem; border-radius: 10px; overflow: hidden; }

/* --- Light Grey Footer --- */
footer { background: var(--light-grey); color: var(--dark); border-top: 4px solid var(--primary); padding-bottom: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-col h3 { color: var(--dark); margin-bottom: 1.5rem; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p { font-size: 0.95rem; color: #444; margin-bottom: 0.8rem; line-height: 1.6; }
.footer-col p i { color: var(--dark); width: 25px; }
.footer-logo { height: 90px; margin-bottom: 1rem; display: block; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a { color: #444; text-decoration: none; transition: var(--transition); font-weight: bold; }
.footer-col ul li a:hover { color: #000; padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(0, 0, 0, 0.1); padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #555; }
.web-dreams-link { color: var(--dark); text-decoration: none; font-weight: bold; transition: var(--transition); border-bottom: 1px solid transparent;}
.web-dreams-link:hover { color: #000; border-bottom: 1px solid #000;}

/* --- Scroll Animations --- */
.section-animate { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.section-animate.visible { opacity: 1; transform: translateY(0); }

/* ================================================== */
/* --- CASCADING MEDIA QUERIES FOR TYPOGRAPHY ---     */
/* ================================================== */

/* 1. Laptops and Small Desktops */
@media screen and (max-width: 1200px) {
    .hero h1 { 
        font-size: 2.8rem; 
        white-space: normal; /* Removes the nowrap restriction so it doesn't shoot off the edge */
    }
    .section-title { 
        font-size: 2.2rem; 
    }
}

/* 2. Tablets & Mobile Navigation Menu */
@media screen and (max-width: 998px) {
    header { padding: 0.6rem 5%; }
    .burger { display: block; }
    
    /* Strict targeting for mobile main menu */
    nav > ul {
        position: fixed; right: 0px; top: 65px; height: calc(100vh - 65px);
        background-color: var(--dark); display: block; width: 100%;
        transform: translateX(100%); transition: transform 0.3s ease-in-out;
        overflow-y: auto; padding-top: 1rem; padding-bottom: 3rem; 
    }
    nav > ul.nav-active { transform: translateX(0%); }
    nav > ul > li { opacity: 1; margin: 0; width: 100%; text-align: center; } 
    nav > ul > li > a { color: var(--light); display: block; padding: 18px 0; font-size: 1.1rem; }
    nav > ul > li > a:hover { color: var(--primary); border-bottom: none; }

    .dropdown-menu { display: none !important; }
    .dropdown a .fa-caret-down { display: none; }

    .hero { height: 85vh; margin-top: 60px; padding-bottom: 1.5rem; }
    .hero h1 { font-size: 2.2rem; margin-bottom: 0.8rem; }
    .hero p { font-size: 0.9rem; margin-bottom: 1.5rem; }
    .hero-content { padding: 0 1rem; }
    .hero-btns { flex-direction: column; align-items: center; gap: 10px; }
    .btn { width: 100%; max-width: 220px; text-align: center; padding: 10px 20px; font-size: 0.85rem; }

    .section-title { font-size: 2rem; margin-bottom: 2.5rem; }

    .about-grid, .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    .mission-text { font-size: 1.1rem; }
    .product-grid { grid-template-columns: 1fr; }
    .card-image-placeholder { height: 220px; }
    .facts-list { grid-template-columns: 1fr; gap: 2rem; }
    
    .facts-bottom-image { height: auto; margin-top: 1.5rem; } 

    .cert-grid { gap: 1.5rem; }
    .cert-img { max-width: 100%; }
    .cert-logos { flex-direction: column; gap: 3rem; }
    
    .service-box { text-align: center; align-items: center; padding: 2rem; }
    .service-bottom-image { transform: translateX(75px); } 
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-logo { margin: 0 auto 1rem auto; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* 3. Small Mobile Phones */
@media screen and (max-width: 480px) {
    .hero h1 { 
        font-size: 1.6rem; 
        letter-spacing: 1px;
    }
    .section-title { 
        font-size: 1.4rem; 
        letter-spacing: 1px; 
        padding-bottom: 5px;
    }
    .hero-btns { gap: 8px; }
    .btn { font-size: 0.8rem; padding: 10px 15px; }
}