/* --- Global Styles --- */
:root {
    --primary-color: #b70e8d;
    --secondary-color: #6c757d;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #ffffff;
    --black: #000000;
    --font-family-primary: 'Montserrat', sans-serif;
    --font-family-secondary: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-secondary);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-gray);
}

.section {
    padding: 80px 0;
}

.section.gray-bg {
    background-color: var(--light-gray);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-family: var(--font-family-primary);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--dark-gray);
    color: var(--white);
    border-color: var(--dark-gray);
}

.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);
}

/* --- Header --- */
#header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-family-primary);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-gray);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: var(--dark-gray);
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-gray);
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
#hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    min-height: 80vh;
    background-color: var(--dark-gray); /* Dark background for contrast */
    color: var(--white);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://via.placeholder.com/1920x1000/333333/ffffff?text=Hero+Background+Overlay') no-repeat center center/cover; /* Placeholder for a background image */
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
    padding-left: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    text-align: center;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- About Section --- */
#about .container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    color: var(--primary-color);
}

/* --- Services Section --- */
#services h2 {
    text-align: center;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.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(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.service-item p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* --- Why Choose Us Section --- */
#why-choose-us h2 {
    text-align: center;
    color: var(--primary-color);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.choose-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-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.choose-item h3 {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.choose-item p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* --- Home Warranty Section --- */
#home-warranty h2 {
    text-align: center;
    color: var(--primary-color);
}

.warranty-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.warranty-text {
    flex: 1;
}

.warranty-image {
    flex: 1;
    text-align: center;
}

.warranty-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- Contact Section --- */
#contact h2 {
    text-align: center;
    color: var(--primary-color);
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    color: var(--dark-gray);
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    color: var(--dark-gray);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.contact-form {
    flex: 1.5;
    min-width: 300px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 15px 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family-secondary);
    background-color: var(--white);
    color: var(--dark-gray);
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    pointer-events: none;
    color: #999;
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.75rem;
    background-color: var(--white);
    padding: 0 5px;
    color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* --- Testimonials Section --- */
#testimonials h2 {
    text-align: center;
    color: var(--primary-color);
}

.testimonials-carousel {
    position: relative;
    max-width: 700px;
    margin: 40px auto;
    text-align: center;
    overflow: hidden; /* Hide overflow from carousel items */
    padding: 20px 60px; /* Add padding for navigation buttons */
}

.testimonial-item {
    display: none; /* Hidden by default, shown by JS */
    animation: fadeIn 0.8s ease-in-out;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.testimonial-item.active {
    display: block;
}

.testimonial-item p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.testimonial-author h4 {
    font-family: var(--font-family-primary);
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.testimonial-author p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0;
}

.carousel-nav {
    text-align: center;
    margin-top: 20px;
}

.carousel-nav button {
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    padding: 10px 15px;
    margin: 0 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.carousel-nav button:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Newsletter Trigger --- */
.newsletter-trigger {
    text-align: center;
    margin: 50px 0;
}

/* --- Modals --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* 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.5); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 1200px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
     height: 100%;
}

.modal-content h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-content p {
    color: var(--secondary-color);
    font-size: 1rem;
}

.modal-content .form-group {
    margin-bottom: 15px;
}

.modal-content .form-group input[type="date"] {
    padding: 12px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family-secondary);
    color: var(--dark-gray);
}

.modal-content input[type="checkbox"] {
    margin-right: 10px;
    height: 18px;
    width: 18px;
    cursor: pointer;
}

.modal-content .checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.modal-content .checkbox-group label {
    position: static;
    color: var(--secondary-color);
    font-size: 0.95rem;
    cursor: pointer;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--dark-gray);
    text-decoration: none;
}

/* --- Confirmation Message --- */
.confirmation-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.confirmation-content {
    background-color: var(--white);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
}

.confirmation-content p {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin: 0;
}

.close-confirmation {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-confirmation:hover {
    color: var(--dark-gray);
}


/* --- Footer --- */
#footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 60px 0 30px 0;
    font-family: var(--font-family-primary);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo,
.footer-links,
.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-logo h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }

    #hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 30px;
        padding-left: 0;
    }

    .hero-image img {
        max-width: 80%;
    }

    #about .container,
    .warranty-content {
        flex-direction: column;
    }

    .about-image, .about-content,
    .warranty-text, .warranty-image {
        flex: none;
        width: 100%;
    }

    .contact-wrapper {
        flex-direction: column;
    }

    .contact-info, .contact-form {
        flex: none;
        width: 100%;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 10px 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.open span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* Show nav when toggle is active */
    nav.active {
        display: block;
    }

    #hero {
        min-height: 60vh;
    }

    .service-item, .choose-item {
        padding: 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-logo, .footer-links, .footer-contact {
        min-width: unset;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }

    .section {
        padding: 50px 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }

    .hero-image img {
        max-width: 95%;
    }

    .services-grid, .why-choose-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-item {
        padding: 20px;
    }

    .carousel-nav button {
        padding: 8px 12px;
        margin: 0 5px;
    }

    .confirmation-content {
        width: 90%;
        padding: 20px;
    }
}