/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --accent-dark: #F57C00;
    --text-dark: #212121;
    --text-light: #616161;
    --bg-light: #FFFFFF;
    --bg-gray: #F9FAFB;
    --border-color: #E5E7EB;
    --success-color: #4CAF50;
    --error-color: #EF4444;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --container-width: 1200px;
    --header-height: 80px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    padding-top: var(--header-height);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* =========================================
   2. UTILITIES & TYPOGRAPHY
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* =========================================
   3. BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}
.btn-primary:hover { background-color: var(--accent-dark); }

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}
.btn-secondary:hover { background-color: var(--primary-dark); }

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-full { width: 100%; }

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-light);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-list {
    display: none; /* Mobile first: hidden by default */
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Menu Active State */
.nav.active .nav-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-light);
    padding: 20px;
    box-shadow: var(--shadow);
    gap: 15px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
}
.nav-link:hover, .nav-link.active { color: var(--primary-color); }

.header .btn { display: none; } /* Hide CTA in header on mobile to save space */

/* =========================================
   5. HERO SECTIONS
   ========================================= */
.hero, .page-hero {
    position: relative;
    color: white;
    text-align: center;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero-bg, .page-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img, .page-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before, .page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for readability */
    z-index: 0;
}

.hero-content, .page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1, .page-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
}

/* =========================================
   6. SECTIONS (Services, Features, etc.)
   ========================================= */
section { padding: 60px 0; }

.services-grid, .features-grid, .values-grid, .guarantees-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.service-card, .feature, .value-card, .guarantee-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.service-card:hover, .feature:hover { transform: translateY(-5px); }

.service-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.service-icon, .feature-icon, .value-icon, .guarantee-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-features {
    text-align: left;
    margin: 1.5rem 0;
}

.service-features li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.service-features li i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* =========================================
   7. TESTIMONIALS & FAQ
   ========================================= */
.testimonials { background-color: var(--bg-gray); }

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
}

.stars { color: var(--accent-color); margin-bottom: 1rem; }

.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i { transition: transform 0.3s ease; }
.faq-question[aria-expanded="true"] i { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-light);
}

.faq-answer.active {
    max-height: 500px;
    padding-bottom: 20px;
}

/* =========================================
   8. FORMS
   ========================================= */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.required { color: var(--error-color); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
}

.form-group.error .error-message { display: block; }

.form-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    display: none;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer {
    background-color: #1a1a1a;
    color: #f0f0f0;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-contact li, .footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover { color: var(--primary-color); }

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.875rem;
}

/* =========================================
   10. MEDIA QUERIES (Tablet & Desktop)
   ========================================= */
@media (min-width: 768px) {
    .mobile-menu-toggle { display: none; }
    
    .nav-list {
        display: flex;
        gap: 30px;
    }
    
    .header .btn { display: inline-block; }
    
    .services-grid, .features-grid, .values-grid, .guarantees-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 { font-size: 3rem; }
    .hero h1, .page-hero h1 { font-size: 3.5rem; }
}

@media (min-width: 1024px) {
    .services-grid, .features-grid, .values-grid, .guarantees-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 50px;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}