/* General Styles */
:root {
    --primary-color: #00bfca; /* Blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #02859a; /* Green */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #fff;
    --black: #000;
    --body-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --heading-font: 'Merriweather', serif; /* Example, you might want to import this */
}

body {
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
    color: var(--dark-gray);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    margin-bottom: 20px;
    color: var(--dark-gray);
}

h1 { font-size: 3em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.2em; }

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #00bfca;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--light-gray);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #00bfca;
    transform: translateY(-2px);
    color: var(--white);
}

.cta-button.secondary {
    background-color: var(--accent-color);
}

.cta-button.secondary:hover {
    background-color: #02859a;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #5a6268;
    color: var(--white);
}

/* Header */
header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px; /* Adjust as needed */
}
.logo h3 {
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), url('../img/hero.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
}

#hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    text-align: left;
    padding-right: 40px;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    max-width: 50%;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* About Section */
#about .container {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    max-width: 45%;
}

.about-image img {
    border-radius: 10px;
}

.about-text {
    flex: 1;
    max-width: 50%;
}

.about-text h2 {
    font-size: 2.2em;
}

.about-text p {
    font-size: 1.1em;
}

/* Services Section */
#services {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.service-item i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-item h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

.service-item p {
    font-size: 1em;
    color: #555;
}

/* Why Choose Us Section */
#why-choose-us {
    text-align: center;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.why-item {
    text-align: center;
    padding: 20px;
}

.why-item i {
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.why-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.why-item p {
    font-size: 1.05em;
    color: #555;
}

/* Home Warranty Section */
#home-warranty .container {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.warranty-content {
    flex: 1;
    max-width: 55%;
}

.warranty-content h2 {
    font-size: 2.2em;
}

.warranty-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-top: 15px;
}

.warranty-content li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.warranty-image {
    flex: 1;
    max-width: 40%;
}

.warranty-image img {
    border-radius: 10px;
}

/* Contact and Form Section */
#contact {
    text-align: center;
}

#contact p {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
}

#quote-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-gray);
}

.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 #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    font-size: 1em;
    font-family: var(--body-font);
}

.form-group textarea {
    resize: vertical; /* Allows vertical resizing */
}

.form-group.checkbox-group {
    display: flex;
    align-items: center;
}

.form-group.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* Override default width */
}

/* Testimonials Section */
#testimonials {
    text-align: center;
    background-image: url('../img/test.jpg'); /* Optional background image */
    background-size: cover;
    background-position: center;
    color: var(--white); /* Text color for better contrast if background is dark */
    position: relative;
}

#testimonials::before { /* Overlay for darker backgrounds */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
    z-index: 1;
}

#testimonials .container {
    position: relative; /* To bring content above overlay */
    z-index: 2;
    
}

.testimonial-slider {
    display: flex;
    overflow-x: auto; /* Horizontal scrolling for testimonials */
    scroll-snap-type: x mandatory;
    margin-top: 50px;
    padding-bottom: 20px; /* Space for scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    
}

.testimonial-slider::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

.testimonial-item {
    flex: 0 0 70%; /* Each item takes up 70% of the viewport width */
    min-width: 300px; /* Minimum width for smaller screens */
    max-width: 800px; /* Max width for larger screens */
    margin: 0 15px; /* Spacing between items */
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent background */
    border-radius: 10px;
    text-align: center;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.testimonial-item p {
    font-size: 1.2em;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--white); /* Explicitly white for readability */
    opacity: 0.9;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-author img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-author h4 {
    color: var(--white);
    margin-bottom: 5px;
    font-size: 1.3em;
}

.testimonial-author p {
    font-size: 1em;
    color: #ccc;
    font-style: normal;
    margin-bottom: 0;
}

.testimonial-nav {
    margin-top: 30px;
}

.testimonial-nav button {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.testimonial-nav button:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 60px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #555;
}

.footer-logo,
.footer-links,
.footer-contact,
.footer-social {
    flex: 1;
    min-width: 200px;
}

.footer-logo img {
    height: 45px;
    margin-bottom: 20px;
}
.footer-logo h3 {
   color: #fff; 
}
.footer-logo p {
    color: #ccc;
}

.footer-links h3,
.footer-contact h3,
.footer-social h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: #ccc;
    margin-bottom: 15px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-social a {
    display: inline-block;
    margin-right: 15px;
    font-size: 1.5em;
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    color: #aaa;
    font-size: 0.9em;
}

/* Modals */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    backdrop-filter: blur(5px); /* Optional: blur background */
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto; /* 10% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px; /* Max width for larger screens */
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin-bottom: 0;
    font-size: 1.8em;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--black);
    text-decoration: none;
}

.modal-body {
    padding-bottom: 20px;
}

.modal-body h3 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-body p,
.modal-body ul {
    font-size: 1em;
    color: #555;
}

.modal-body ul {
    margin-left: 20px;
}

.modal-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Confirmation Message */
.confirmation-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 5px;
    z-index: 1002;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease;
}

.confirmation-message.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.6em; }

    header .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul {
        margin-top: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    nav ul li {
        margin: 5px 15px;
    }
    .cta-button {
        margin-top: 15px;
    }

    #hero .container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-content, .hero-image {
        max-width: 100%;
        padding-right: 0;
    }
    .hero-content {
        margin-bottom: 30px;
    }

    #about .container,
    #home-warranty .container {
        flex-direction: column;
    }
    .about-image, .about-text,
    .warranty-content, .warranty-image {
        max-width: 100%;
    }
    .about-text, .warranty-content {
        margin-top: 30px;
    }

    .testimonial-item {
        flex: 0 0 90%; /* Each item takes up 90% */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-logo, .footer-links, .footer-contact, .footer-social {
        min-width: unset;
        width: 100%;
    }
    .footer-social a {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }

    section {
        padding: 60px 0;
    }

    .services-grid, .why-choose-grid {
        grid-template-columns: 1fr;
    }

    #quote-form {
        padding: 30px 20px;
    }

    .modal-content {
        width: 90%;
        margin: 15% auto;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    nav ul li {
        margin: 5px 8px;
        font-size: 0.9em;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content p, .about-text p, .warranty-content p {
        font-size: 1em;
    }
    .testimonial-item {
        padding: 30px 20px;
    }
    .testimonial-item p {
        font-size: 1.1em;
    }
    .testimonial-author img {
        width: 70px;
        height: 70px;
    }
}