/* ------------------------------------------- */
/* 0. CSS Variables & Base Styles              */
/* ------------------------------------------- */
:root {
    /* Colors */
    --primary: #ff3c3c; /* New Primary Color */
    --secondary: #ffffff;
    --text: #333;
    --dark-bg: #1f1f1f;
    --light-bg: #f7f7f7;
    --accent-dark: #cc3030; /* Darker primary for hover */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;

    /* Border Radius */
    --radius: 10px;

    /* Transitions */
    --transition-speed: 0.3s;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text);
    background-color: var(--secondary);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover, a:focus {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Typography using clamp() */
h1 { font-size: clamp(2.2rem, 6vw + 1rem, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw + 1rem, 3rem); margin-bottom: var(--spacing-lg); }
h3 { font-size: clamp(1.4rem, 3vw + 1rem, 2.2rem); }
h4 { font-size: 1.2rem; }

.section-heading {
    text-align: center;
    padding: var(--spacing-lg) 0;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background-color var(--transition-speed), transform 0.1s, box-shadow var(--transition-speed);
    text-transform: uppercase;
    flex-grow: 1;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--text);
    border: 1px solid var(--primary);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--primary);
    color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ------------------------------------------- */
/* 1. HEADER (Sticky and Responsive)           */
/* ------------------------------------------- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--secondary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo img {
    height: 35px; /* Mobile size */
    width: auto;
}

/* Mobile Navigation (Default) */
.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--secondary);
    border-top: 1px solid var(--light-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-in-out;
}

.main-nav.open {
    max-height: 500px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md) 0;
}

.nav-list li a {
    display: block;
    padding: 0.75rem var(--spacing-lg);
    border-bottom: 1px solid var(--light-bg);
    color: var(--text);
    font-weight: 500;
}

.nav-list li a:hover, .nav-list li a:focus {
    background-color: var(--light-bg);
    color: var(--primary);
}

.hamburger {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem;
    transition: transform var(--transition-speed);
}
.hamburger[aria-expanded="true"] {
    transform: rotate(90deg);
}

/* ------------------------------------------- */
/* 2. HERO / IMAGE SLIDER                      */
/* ------------------------------------------- */
.hero-slider {
    max-height: 60vh; /* Limits height, allowing responsiveness on large screens */
}

.slider-wrapper {
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
}

.slide img {
    width: 100%; /* Ensures the image takes the full width of its container (the slide) */
    height: 100%; /* Ensures height fills the slide container */
    object-fit: cover; /* KEY: Scales the image to cover the entire container while preserving aspect ratio and preventing distortion. */
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--secondary);
    border: none;
    padding: var(--spacing-md);
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background var(--transition-speed);
}

.slider-nav:hover, .slider-nav:focus {
    background: var(--primary);
}

.prev-btn { left: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.next-btn { right: 0; border-radius: var(--radius) 0 0 var(--radius); }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform 0.2s;
}

.dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* ------------------------------------------- */
/* 3. SERVICES SECTION (Dynamic Dropdowns & Cards) */
/* ------------------------------------------- */
.services-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--light-bg);
}

.service-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.service-controls select {
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid #ccc;
    font-size: 1rem;
    width: 100%;
    appearance: none; /* Hide default arrow */
    background: var(--secondary) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23ff3c3c' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3e%3c/svg%3e") no-repeat right 0.75rem center / 12px;
}

.service-cards-grid {
    display: grid;
    /* Mobile: 1 per row */
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.service-card {
    background-color: var(--secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
    color: var(--primary);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.features-list {
    list-style: none;
    padding-left: 0;
    margin: var(--spacing-sm) 0 var(--spacing-md);
    line-height: 1.8;
}

.features-list li::before {
    content: "✔️";
    margin-right: 0.5rem;
    color: var(--primary);
}

.service-pricing {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    margin: var(--spacing-md) 0;
    flex-grow: 1; /* Pushes footer to the bottom */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.card-footer {
    text-align: right;
    font-size: 0.75rem;
    color: #888;
    margin-top: var(--spacing-md);
    border-top: 1px dashed var(--light-bg);
    padding-top: var(--spacing-sm);
}

/* ------------------------------------------- */
/* 4. TESTIMONIALS SECTION                     */
/* ------------------------------------------- */
.testimonials-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--secondary);
    overflow: hidden;
    position: relative;
}

.testimonial-slider-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.testimonial-slider {
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    min-width: 100%; /* Mobile: 1 visible (100% width) */
    padding: var(--spacing-lg);
    text-align: center;
    flex-shrink: 0;
}

.quote-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.review-text {
    font-style: italic;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    color: var(--text);
}

.customer-name {
    font-weight: bold;
    color: var(--accent-dark);
}

/* ------------------------------------------- */
/* 5. OUR WORK SECTION                         */
/* ------------------------------------------- */
.work-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--light-bg);
}

.work-content-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: var(--spacing-lg);
}

.work-image-side img {
    border-radius: var(--radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.work-text-side h3 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

/* ------------------------------------------- */
/* 6. STATS / ACHIEVEMENTS SECTION             */
/* ------------------------------------------- */
.stats-section {
    padding: var(--spacing-lg) 0;
}

.stats-grid {
    display: grid;
    /* Mobile: 2 per row */
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-card {
    background-color: var(--light-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 5px solid var(--primary);
    transition: background-color var(--transition-speed);
}

.stat-card:hover {
    background-color: #ffe0e0; /* Very light primary */
}

.stat-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

/* ------------------------------------------- */
/* 7. FOOTER                                   */
/* ------------------------------------------- */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--secondary);
    padding: var(--spacing-lg) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stacked on mobile */
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.main-footer h4 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.main-footer a {
    color: var(--secondary);
    opacity: 0.8;
}

.main-footer a:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.social-icons {
    display: flex;
    gap: var(--spacing-md);
}

.social-icons .fab {
    font-size: 1.5rem;
    color: var(--secondary);
    transition: color var(--transition-speed);
}

.social-icons a:hover .fab {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ------------------------------------------- */
/* 8. GLOBAL FEATURES: Floating Call Button    */
/* ------------------------------------------- */
.floating-call-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary);
    color: var(--secondary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 999;
    transition: background-color var(--transition-speed), transform 0.2s;
}

.floating-call-btn:hover {
    background-color: var(--accent-dark);
    transform: scale(1.05);
}

/* ------------------------------------------- */
/* 9. MEDIA QUERIES (Breakpoints)              */
/* ------------------------------------------- */

/* Tablet (768px and up) */
@media screen and (min-width: 768px) {
    /* HEADER: Desktop/Tablet Nav */
    .logo img {
        height: 40px;
    }
    .hamburger {
        display: none;
    }
    .main-nav {
        position: static;
        max-height: none;
        overflow: visible;
        border-top: none;
        width: auto;
    }
    .nav-list {
        flex-direction: row;
        gap: var(--spacing-md);
        padding: 0;
    }
    .nav-list li a {
        padding: 0.5rem 0.75rem;
        border-bottom: none;
    }
    .nav-list li a:hover, .nav-list li a:focus {
        background-color: transparent;
        color: var(--primary);
        border-bottom: 2px solid var(--primary);
    }

    /* SERVICES: 2 per row */
    .service-controls {
        flex-direction: row;
        gap: var(--spacing-lg);
    }
    .service-controls select {
        width: 50%; /* Changed from 33.33% to 50% for 2 selectors */
    }
    .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-actions {
        flex-direction: row;
        justify-content: space-between;
    }

    .testimonial-card {
        min-width: calc(100% / 2); /* Tablet: 2 visible (50% width) */
    }

    /* OUR WORK: Two column */
    .work-content-grid {
        flex-direction: row;
        align-items: center;
    }
    .work-image-side, .work-text-side {
        flex: 1;
    }

    /* STATS: 3+ per row */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* FOOTER: Grid layout */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Desktop (1024px and up) */
@media screen and (min-width: 1024px) {
    .logo img {
        height: 50px;
    }
    .hero-slider {
        max-height: 500px;
    }

    /* SERVICES: 3 per row */
    .service-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonial-card {
        min-width: calc(100% / 3); /* Desktop: 3 visible (33.33% width) */
    }

    /* STATS: 5 per row */
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}