/* General Body & HTML Styles */
:root {
    --primary-color: #4CAF50; /* Eco Green */
    --secondary-color: #8BC34A; /* Lighter Green */
    --accent-color: #FFC107; /* Golden Yellow for highlights */
    --text-color: #333333;
    --light-text-color: #666666;
    --bg-light: #F8F8F8;
    --bg-dark: #2C3E50; /* Dark blue-grey */
    --white: #ffffff;
    --border-color: #e0e0e0;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #388E3C; /* Darker primary */
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: #FFB300; /* Darker accent */
    color: var(--text-color);
}

/* Section Styling */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: var(--light-text-color);
}

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

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

.text-light {
    color: var(--white) !important;
}


/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: var(--secondary-color);
}

nav .nav-links {
    display: flex;
    gap: 30px;
}

nav .nav-links a {
    color: var(--text-color);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav .nav-links a:hover::after,
nav .nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    background: url('../images/hero.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 150px 20px;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay */
    z-index: 1;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-family: var(--font-heading);
    font-size: 3.8em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

#hero p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.hero-actions .btn {
    margin: 10px;
    min-width: 200px;
}

/* About Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1em;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-card p {
    color: var(--light-text-color);
    font-size: 0.95em;
}

/* Why Choose Us Section */
.choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.reason-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
}

.reason-card i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.reason-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.reason-card p {
    color: var(--light-text-color);
}

/* Home Warranty Section */
.warranty-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.warranty-text {
    flex: 1;
    min-width: 300px;
}

.warranty-text p {
    margin-bottom: 15px;
    font-size: 1.1em;
    line-height: 1.8;
}

.warranty-text ul {
    margin-top: 20px;
    margin-left: 20px;
}

.warranty-text ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 1em;
}

.warranty-text ul li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2em;
}

.warranty-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.warranty-image img {
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--light-text-color);
    font-size: 1.05em;
}

.testimonial-card h4 {
    font-family: var(--font-heading);
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.testimonial-card span {
    font-size: 0.9em;
    color: #999;
}

/* Forms (Get Quotes and Newsletter) */
.form-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* Override default input width */
}

/* Confirmation Message */
.confirmation-message {
    margin-top: 25px;
    padding: 15px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    background-color: #e8f5e9; /* Light green background */
    color: #2e7d32; /* Dark green text */
    border: 1px solid #a5d6a7;
    transition: all 0.5s ease-in-out;
}

.confirmation-message.error {
    background-color: #ffebee; /* Light red background */
    color: #c62828; /* Dark red text */
    border: 1px solid #ef9a9a;
}

.confirmation-message.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0 20px; /* Adjust padding for collapse */
    overflow: hidden;
    margin-top: 0;
    transform: translateY(-10px);
}

.confirmation-message:not(.hidden) {
    opacity: 1;
    max-height: 100px; /* A reasonable max height for the message */
    transform: translateY(0);
}


/* Contact Section */
#contact .section-title {
    color: var(--white);
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.contact-info, .contact-map {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--white);
}

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.85);
}

.contact-info p i {
    margin-right: 15px;
    color: var(--secondary-color);
    font-size: 1.3em;
}

.contact-info a {
    color: var(--secondary-color);
}

.contact-info a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.2em;
    margin-right: 15px;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark); /* Dark text on hover */
}

.contact-map iframe {
    border-radius: 8px;
    filter: grayscale(80%) invert(0%); /* Eco-friendly map look */
}

/* Footer */
footer {
    background-color: #222;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px 0;
    font-size: 0.95em;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-grid h3 {
    font-family: var(--font-heading);
    font-size: 1.4em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-grid ul li {
    margin-bottom: 10px;
}

.footer-grid a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-grid a:hover {
    color: var(--primary-color);
}

.footer-about p,
.footer-newsletter p {
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modals */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Scrollable content */
}

.modal-content h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 2em;
    text-align: center;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: var(--light-text-color);
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style-type: disc;
    color: var(--light-text-color);
}

.modal-content ul li {
    margin-bottom: 5px;
}

.modal-content strong {
    color: var(--text-color);
}

.modal-content .form-card {
    box-shadow: none; /* Remove extra shadow for form within modal */
    border: 1px solid var(--border-color);
    padding: 30px;
}

.modal-content .checkbox-group label {
    display: inline; /* Keep label inline with checkbox */
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


/* Responsive Design */
@media (max-width: 992px) {
    nav .nav-links {
        gap: 20px;
    }

    #hero h1 {
        font-size: 3em;
    }

    .section-title {
        font-size: 2em;
    }

    .about-content, .warranty-content, .contact-grid {
        flex-direction: column;
        text-align: center;
    }

    .about-image img, .warranty-image img {
        margin: 0 auto;
    }

    .warranty-text ul {
        text-align: left; /* Align list items to left */
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    nav {
        flex-basis: 100%;
        order: 3; /* Move nav below logo and hamburger */
    }

    nav .nav-links {
        display: none; /* Hide nav links by default for mobile */
        flex-direction: column;
        align-items: center;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    nav .nav-links li {
        margin-bottom: 15px;
    }

    nav .nav-links a {
        padding: 10px 0;
        font-size: 1.1em;
    }

    nav .nav-links.active {
        display: flex; /* Show nav links when active */
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 25px;
    }

    #get-quote-nav-btn {
        display: none; /* Hide nav quote button on smaller screens */
    }

    #hero {
        padding: 100px 20px;
    }

    #hero h1 {
        font-size: 2.5em;
    }

    #hero p {
        font-size: 1.1em;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8em;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-grid ul {
        padding: 0;
    }
    .footer-grid ul li {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }
    #hero h1 {
        font-size: 2em;
    }
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 1.5em;
    }
    .close-button {
        font-size: 30px;
        right: 15px;
        top: 10px;
    }
}