/* General Body & Typography */
:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #f39c12; /* Orange */
    --accent-color: #3498db; /* Blue */
    --light-gray: #f8f8f8;
    --dark-gray: #333;
    --text-color: #444;
    --white: #ffffff;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

p {
    margin-bottom: 1em;
}

a {
    text-decoration: none;
    color: var(--accent-color);
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.btn-primary:hover {
    background-color: #e08e0b; /* Slightly darker orange */
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-large {
    padding: 15px 35px;
    font-size: 1.1em;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    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;
}

.header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
}

.header .nav ul {
    display: flex;
}

.header .nav ul li {
    margin-left: 25px;
}

.header .nav ul li a {
    color: var(--dark-gray);
    font-weight: 600;
    transition: color 0.3s ease;
}

.header .nav ul li a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: url('../img/hero.jpg') no-repeat center center/cover; /* Placeholder background image */
    color: var(--white);
    text-align: center;
    padding: 150px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
}
/* Overlay for hero image for better text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-content .btn {
    margin: 0 10px;
}

.hero-content .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}
.hero-content .btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

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

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.2em;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}

/* About Us Section */
.about-content {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

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

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

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.service-item i {
    font-size: 3.5em;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

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

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

.choose-us-item i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.choose-us-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Home Warranty Section */
.warranty-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1em;
    line-height: 1.8;
    text-align: center;
}

.warranty-content ul {
    margin: 20px 0 30px;
    text-align: left;
    display: inline-block; /* For centering the list itself */
}

.warranty-content ul li {
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.warranty-content ul li i {
    color: var(--success-color);
    margin-right: 10px;
}

/* 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: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 20px;
    min-height: 100px; /* Ensure consistent height for quotes */
}

.testimonial-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.testimonial-item .rating i {
    color: var(--secondary-color);
    font-size: 1.1em;
}

/* Contact Section */
.contact-section .contact-info {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2em;
    color: var(--dark-gray);
}

.contact-section .contact-info p {
    margin-bottom: 10px;
}

.contact-section .contact-info i {
    color: var(--accent-color);
    margin-right: 10px;
}

.contact-section .btn-large {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
    font-size: 0.95em;
}

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

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-col p, .footer-col ul li {
    color: var(--white);
    opacity: 0.8;
}

.footer-col ul li a {
    color: var(--white);
    transition: color 0.3s ease;
    padding: 5px 0;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
}

.footer-col .social-icons a {
    color: var(--white);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-col .social-icons a:hover {
    color: var(--secondary-color);
}

.footer .newsletter-btn {
    margin-top: 20px;
    border-color: var(--white);
    color: var(--white);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    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 */
    backdrop-filter: blur(5px); /* Blurred background */
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border-radius: 10px;
    width: 90%; /* Could be more responsive */
    max-width: 600px; /* Max width */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Scroll if content overflows */
}

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

.close-button {
    color: var(--dark-gray);
    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(--error-color);
}

/* Modal form styling */
.form-group {
    margin-bottom: 20px;
}

.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-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: var(--dark-gray);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 5px;
    margin-right: 10px;
    width: 20px;
    height: 20px;
    accent-color: var(--secondary-color); /* For checkbox color */
}

.checkbox-group label {
    font-weight: normal;
    color: var(--text-color);
    flex: 1;
    margin-bottom: 0;
}

.modal-content .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* Confirmation Messages */
.confirmation-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    display: none; /* Hidden by default */
}

.confirmation-message.success {
    background-color: #d4edda;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}
.confirmation-message.error {
    background-color: #f8d7da;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

/* Modal Body for Privacy/Terms */
.modal-body h3 {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.modal-body ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

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

.modal-body p {
    font-size: 0.95em;
    line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 992px) {
    .header .nav {
        display: none; /* Hide navigation on smaller screens for simplicity. A hamburger menu would be ideal here. */
    }
    .header .container {
        justify-content: center;
        flex-wrap: wrap;
    }
    .header .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .hero-content h1 {
        font-size: 2.8em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .common-section {
        padding: 60px 0;
    }
    .section-header h2 {
        font-size: 2em;
    }
    .section-header p {
        font-size: 1em;
    }
    .services-grid, .choose-us-grid, .testimonials-grid, .footer-columns {
        grid-template-columns: 1fr;
    }
    .service-item, .choose-us-item, .testimonial-item {
        margin-bottom: 20px;
    }
    .hero-content .btn {
        margin-bottom: 15px;
        display: block;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }
    .hero-section {
        padding: 100px 0;
        min-height: 450px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .footer-col {
        margin-bottom: 30px;
        text-align: center;
    }
    .footer-col ul {
        padding: 0;
    }
    .footer-col ul li {
        display: inline-block;
        margin: 0 8px;
    }
    .social-icons {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .header .logo {
        font-size: 1.4em;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content .btn {
        width: 90%;
    }
    .section-header h2 {
        font-size: 1.6em;
    }
    .service-item i {
        font-size: 3em;
    }
    .choose-us-item i {
        font-size: 2.5em;
    }
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 1.8em;
    }
    .close-button {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
}