/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #004d40;
    --primary-light: #00796b;
    --accent: #ff6f00;
    --dark: #121212;
    --dark-light: #1e1e1e;
    --light: #f4f4f4;
    --white: #ffffff;
    --border: 2px solid var(--dark);
    --border-radius: 0px;
    --shadow: 4px 4px 0px var(--dark);
    --font-head: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: 1200px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; /* Removes blue tap highlight on Android/iOS */
}

html { 
    scroll-behavior: smooth; 
    font-size: 16px; 
}

body { 
    font-family: var(--font-body); 
    background-color: var(--light); 
    color: var(--dark); 
    line-height: 1.6; 
    overflow-x: hidden; /* Prevents horizontal scroll on mobile */
}

/* FLUID TYPOGRAPHY: Scales text automatically from mobile to desktop */
h1, h2, h3, h4, h5 { 
    font-family: var(--font-head); 
    text-transform: uppercase; 
    line-height: 1.2; 
    font-size: clamp(2rem, 4vw, 3.5rem); 
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; height: auto; }

/* --- UTILITIES --- */
.container { 
    max-width: var(--container); 
    margin: 0 auto; 
    padding: 0 20px; 
}

.section-padding { padding: 80px 0; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }

.btn {
    display: inline-block; padding: 14px 28px; font-family: var(--font-head);
    font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    border: var(--border); cursor: pointer; transition: all 0.2s ease;
    background: var(--dark); color: var(--white);
    width: auto;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--dark); transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: var(--white); transform: translate(2px, 2px); box-shadow: none; }

/* --- HEADER --- */
header { background: var(--white); border-bottom: var(--border); position: sticky; top: 0; z-index: 1000; padding: 15px 0; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo span { color: var(--primary); }
.logo-mark { width: 25px; height: 25px; background: var(--accent); display: inline-block; }
nav ul { display: flex; gap: 25px; }
nav a { font-weight: 500; text-transform: uppercase; font-size: 0.9rem; position: relative; }
nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--accent); transition: width 0.3s; }
nav a:hover::after, nav a.active::after { width: 100%; }
nav a.active { color: var(--primary); }

.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; padding: 5px; }

/* --- HERO --- */
.hero { background-color: var(--dark); color: var(--white); padding: 120px 0; border-bottom: var(--border); }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 20px; } /* Specific sizing for hero */
.hero p { font-size: 1.1rem; margin-bottom: 30px; color: #ccc; max-width: 600px; }

.hero-image img { 
    border: var(--border); 
    box-shadow: var(--shadow); 
    width: 100%; 
    /* Animation for slideshow */
    transition: opacity 0.8s ease-in-out; 
}

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

/* --- PAGE HEADERS --- */
.page-header { 
    background: var(--primary); 
    color: var(--white); 
    padding: 60px 0; 
    border-bottom: var(--border); 
    text-align: center; 
}
.page-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; }
.page-header p { font-size: 1.1rem; color: #eee; }

/* --- CARDS & GRIDS --- */
.feature-grid, .branch-grid, .value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card { background: var(--white); border: var(--border); padding: 40px; transition: transform 0.2s; height: 100%; display: flex; flex-direction: column; justify-content: center;}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.icon-box { width: 60px; height: 60px; background: var(--primary); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.5rem; }

/* --- FLEET --- */
.product-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 80px; align-items: center; }
.product-row.reverse { direction: rtl; }
.product-row.reverse .product-info { direction: ltr; }
.product-image img { border: var(--border); box-shadow: var(--shadow); width: 100%; }

/* --- TABLE --- */
.table-wrapper { overflow-x: auto; border: var(--border); background: var(--white); min-width: 600px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #ddd; }
th { background: var(--dark); color: var(--white); font-family: var(--font-head); }
tr:hover td { background: #fff9e6; }

/* --- BRANCHES --- */
.branch-card { padding: 0; overflow: hidden; }
.branch-header { background: var(--primary-light); color: var(--white); padding: 20px; border-bottom: var(--border); }
.branch-body { padding: 30px; background: var(--white); }
.opening-hours { background: #eee; padding: 15px; font-size: 0.85rem; margin-top: 20px; border-left: 4px solid var(--accent); }
.contact-row { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; }

/* --- GALLERY SECTION --- */
.gallery-section {
    background: var(--white);
    padding: 60px 0;
    border-top: var(--border);
}

.gallery-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 200px;
    border: var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

/* Overlay for gallery items */
.gallery-item::after {
    content: '+';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    background: rgba(0,0,0,0.5);
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-item:hover::after { opacity: 1; }

/* --- LIGHTBOX / SLIDESHOW STYLES --- */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid #555;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.6s ease;
    user-select: none;
    background: rgba(0,0,0,0.5);
}
.next { right: 30px; }
.prev { left: 30px; }
.prev:hover, .next:hover { background-color: var(--accent); color: var(--dark); }

/* Close Button */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.close-lightbox:hover { color: var(--accent); }

/* Caption text */
.caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* --- FOOTER --- */
footer { background: #000; color: #888; padding: 60px 0 20px; border-top: 5px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid #222; padding-top: 20px; display: flex; justify-content: space-between; font-size: 0.9rem; }
.whatsapp-float { position: fixed; bottom: 20px; right: 20px; background-color: #25d366; color: white; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); z-index: 1000; border: 2px solid white; }


/* --- RESPONSIVE MEDIA QUERIES (Android/Mobile) --- */

/* Tablets and Small Laptops */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin: 0 auto 30px auto; }
    .hero-image { margin-top: 30px; }
}

/* Android/Mobile Phones */
@media (max-width: 768px) {
    :root { --container: 100%; } /* Full width */
    
    .container { padding: 0 15px; }
    
    .section-padding { padding: 50px 0; } /* Reduce vertical padding */
    .page-header { padding: 40px 0; }
    
    /* Navigation */
    .mobile-toggle { display: block; }
    nav ul { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        padding: 20px; 
        border-bottom: var(--border);
        text-align: center; /* Center menu items */
        gap: 20px; /* Space for touch */
    }
    nav ul.active { display: flex; }
    nav a { display: block; padding: 10px 0; font-size: 1.1rem; } /* Larger touch targets */

    /* Hero */
    .hero { padding: 60px 0; }
    .hero-grid { grid-template-columns: 1fr; }
    
    /* Grids */
    .feature-grid, .branch-grid, .value-grid, .product-row { grid-template-columns: 1fr; } /* Force stack */
    .product-row.reverse { direction: ltr; } /* Fix RTL on mobile */
    .card { padding: 25px 15px; }

    /* Gallery */
    .gallery-grid { 
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid on mobile */
        gap: 10px; 
    }
    .gallery-item { height: 150px; } /* Smaller images on mobile */

    /* Lightbox Buttons */
    .prev, .next { padding: 10px; font-size: 30px; }
    .next { right: 10px; }
    .prev { left: 10px; }

    /* Footer */
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}