/* --- Variables & Reset --- */
:root {
    --primary-color: #2c3e50; /* Dark Blue/Grey */
    --accent-color: #e67e22;  /* Orange Accent */
    --secondary-color: #34495e;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--dark-bg); color: var(--white); }
.bg-accent { background-color: var(--primary-color); color: var(--white); }
.text-center { text-align: center; }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover { background-color: #d35400; }

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-secondary:hover { background-color: var(--white); color: var(--primary-color); }

.btn-dark {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-block { width: 100%; }

.hidden { display: none; }

/* --- Header --- */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span { color: var(--accent-color); }

nav ul { display: flex; gap: 25px; }
nav a { font-weight: 500; color: var(--secondary-color); transition: var(--transition); }
nav a:hover { color: var(--accent-color); }

.mobile-toggle { display: none; font-size: 1.5rem; background: none; border: none; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background-image: url('../img/hero.avif');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 70px; /* Header height */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.hero-btns { display: flex; gap: 15px; justify-content: center; }

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 { margin-bottom: 20px; color: var(--primary-color); }
.about-text p { margin-bottom: 20px; color: #555; }

.stats { display: flex; gap: 30px; margin-top: 30px; }
.stat-item h3 { font-size: 2rem; color: var(--accent-color); }
.stat-item i { font-size: 1.5rem; margin-bottom: 10px; color: var(--primary-color); }

.about-image img { border-radius: 10px; box-shadow: var(--shadow); }

/* --- Services Section --- */
.section-header { margin-bottom: 50px; text-align: center; }
.section-header h2 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 { margin-bottom: 15px; color: var(--primary-color); }

/* --- Why Choose Us --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- Warranty --- */
.warranty-content ul {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.warranty-content li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.warranty-content i { color: var(--accent-color); }

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.client-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.client-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.stars { color: #f1c40f; font-size: 0.9rem; }

/* --- Contact Form --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-info {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px;
}

.contact-info h2 { margin-bottom: 20px; }
.info-details { margin-top: 30px; }
.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}
.info-item i { margin-right: 15px; color: var(--accent-color); margin-top: 5px; }

.contact-form { padding: 40px; }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.success-msg {
    margin-top: 15px;
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 5px;
    text-align: center;
}

/* --- Newsletter --- */
.newsletter-form { margin-top: 20px; }
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.form-row input {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    border: none;
}
.checkbox-row label { font-size: 0.9rem; cursor: pointer; }
.checkbox-row input { margin-right: 5px; }

/* --- Footer --- */
footer {
    background-color: #111;
    color: #ccc;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3, .footer-col h4 { color: var(--white); margin-bottom: 20px; }
.footer-col p { font-size: 0.9rem; margin-bottom: 15px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent-color); }
.social-links a {
    display: inline-block;
    width: 35px; height: 35px;
    background: #333;
    color: var(--white);
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}
.social-links a:hover { background: var(--accent-color); }

.contact-list li { display: flex; gap: 10px; }
.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
}

/* --- Modal --- */
.modal {
    position: fixed;
    inset: 0; /* shorthand for top, right, bottom, left */
    background: rgba(0, 0, 0, 0.7);
    
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 2000;

    /* Fix: smooth appearance */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Hidden state */
.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: var(--white, #fff); /* fallback added */
    padding: 40px;
    border-radius: 10px;

    max-width: 500px;
    width: 90%;

    position: relative;

    /* Fix: prevent overflow on small screens */
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;

    font-size: 1.5rem;
    cursor: pointer;

    /* Optional improvement */
    line-height: 1;
}

/* --- Mobile Sticky CTA --- */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: var(--accent-color);
    color: var(--white);
    text-align: center;
    padding: 15px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; }
    
    nav ul {
        position: fixed;
        top: 70px; right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        transition: var(--transition);
    }
    nav.active ul { right: 0; }
    .mobile-toggle { display: block; }
    
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .stats { justify-content: center; }
    
    .mobile-sticky-cta { display: block; }
    body { padding-bottom: 50px; } /* Space for sticky CTA */
    
    .desktop-cta { display: none; }
}
