/* General Styling */
:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #e67e22; /* Orange */
    --accent-color: #f1c40f; /* Yellow */
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --dark-grey: #555;
    --border-color: #ddd;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 1em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #d35400; /* Darker orange */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #1a242f; /* Darker blue */
    transform: translateY(-2px);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-light:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
header {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: url('../img/hero.jpg') no-repeat center center/cover; /* Placeholder for hero image */
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--white);
    opacity: 0.9;
}

/* Common Section Styling */
.common-section {
    padding: 80px 0;
}

.common-section h2 {
    margin-bottom: 40px;
}

.common-section.bg-light {
    background-color: var(--light-bg);
}

/* About Section */
.about-section p {
    max-width: 800px;
    margin: 0 auto 1em auto;
    text-align: center;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-item i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-item p {
    font-size: 0.95em;
    color: var(--dark-grey);
}

/* Why Choose Us Section */
.choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.reason-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-bottom: 5px solid var(--accent-color);
}

.reason-item i {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.reason-item h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.reason-item p {
    font-size: 0.95em;
    color: var(--dark-grey);
}

/* Home Warranty Section */
.warranty-section ul {
    max-width: 800px;
    margin: 20px auto 30px auto;
    text-align: left;
    list-style: disc;
    padding-left: 20px;
    font-size: 1.1em;
}

.warranty-section ul li {
    margin-bottom: 10px;
}

.warranty-section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1em auto;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--dark-grey);
}

.testimonial-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.testimonial-item span {
    font-size: 0.9em;
    color: var(--secondary-color);
}

/* Contact Section */
.contact-section .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.contact-info .info-item {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.contact-info .info-item i {
    font-size: 2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.contact-info .info-item p {
    margin: 0;
}

.contact-section .btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px 0;
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-col {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: left;
}

.footer-col p {
    margin-bottom: 15px;
}

.footer-col ul {
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--white);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.social-links a {
    color: var(--white);
    font-size: 1.2em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    opacity: 0.8;
}

/* 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;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    max-width: 700px;
    width: 90%;
    max-height: 90vh; /* Max height for scrollable content */
    overflow-y: auto; /* Enable scroll for modal content */
}

.modal-content h2 {
    text-align: left;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    color: var(--primary-color);
}

.modal-content p, .modal-content ul {
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 15px;
}

.modal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.modal-content ul li {
    margin-bottom: 8px;
}

.modal-content strong {
    color: var(--primary-color);
}

.modal .close-button {
    color: var(--dark-grey);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal .close-button:hover,
.modal .close-button:focus {
    color: var(--secondary-color);
}

/* Form Styles within Modals */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-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-size: 1em;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(var(--secondary-color), 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px; /* Align with text */
    min-width: 16px; /* Ensure checkbox is visible */
    min-height: 16px;
}

.checkbox-group label {
    display: inline;
    font-weight: normal;
    font-size: 0.9em;
    color: var(--dark-grey);
}

.form-confirmation {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-weight: bold;
    text-align: center;
}

/* Utility Classes */
.mt-4 {
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        padding: 20px 0;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    .nav-links li .btn {
        width: 80%;
        margin: 0 auto;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.8em;
    }

    .hero p {
        font-size: 1.1em;
    }

    .services-grid,
    .choose-us-grid,
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
        max-width: 500px;
    }
    .footer-col h3 {
        text-align: center;
    }
    .footer-col ul {
        padding: 0;
    }
    .footer-col ul li {
        display: inline-block;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2em;
    }
    .hero p {
        font-size: 1em;
    }
    .common-section {
        padding: 60px 0;
    }
    h2 {
        font-size: 2em;
    }
    .contact-info .info-item {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }
    .hero h1 {
        font-size: 1.8em;
    }
    .hero p {
        font-size: 0.9em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    h2 {
        font-size: 1.8em;
    }
    .modal-content {
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 1.5em;
    }
}