/* Basic Reset & Box-Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Root Variables */
:root {
    --primary-color: #169cd0; /* Dark Blue/Charcoal */
    --secondary-color: #1786b2; /* Orange for accents */
    --accent-color: #2dabdb; /* Brighter Orange */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --bg-light: #f9f9f9;
    --bg-dark: #222;
    --border-color: #ddd;

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

    --max-width: 1200px;
}

/* Global Styles */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    scroll-behavior: smooth;
}

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

.section-padding {
    padding: 4rem 0;
}

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

.text-center {
    text-align: center;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: #555;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
}

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

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

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

.btn-secondary:hover {
    background-color: #3f5872; /* Slightly lighter primary */
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px 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 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
}

.main-nav .nav-list li {
    margin-left: 2rem;
}

.main-nav .nav-list a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

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

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

.main-nav .nav-list a:hover,
.main-nav .nav-list a.active {
    color: var(--secondary-color);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: url('../img/hero.avif') no-repeat center center/cover; /* Placeholder, create an 'images' folder */
    color: var(--text-light);
    text-align: center;
    padding: 8rem 0;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: #eee;
}

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

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

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

.service-card .icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.service-card p {
    font-size: 0.95rem;
    color: #666;
}

/* Home Warranty Plan Section */
.warranty-plan {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.warranty-plan .section-title,
.warranty-plan .section-description {
    color: var(--text-light);
}

.warranty-plan .section-title::after {
    background-color: var(--accent-color);
}

.warranty-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.warranty-feature {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.warranty-feature i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.warranty-feature h3 {
    color: var(--text-light);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.warranty-feature p {
    font-size: 0.95rem;
    color: #ccc;
}
.warranty-cta {
    text-align: center;
    margin-top: 3rem;
    font-size: 1rem;
    font-style: italic;
    color: #ddd;
}


/* Get Free Quotes Form Section */
.quote-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.quote-form .btn-primary {
    width: 100%;
    margin-top: 1rem;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    display: none; /* Hidden by default, shown by JS */
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Call to Action Section */
.cta {
    background-color: var(--accent-color);
    color: var(--text-light);
    text-align: center;
}

.cta h2 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* Footer Section */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem 0;
    font-size: 0.95rem;
}

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

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
}

.footer-col p {
    color: #ccc;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-col i {
    margin-right: 0.8rem;
    color: var(--secondary-color);
}

.social-links a {
    display: inline-block;
    color: var(--text-light);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    color: #aaa;
}


/* Responsive Design */
@media (max-width: 992px) {
    .header .container {
        flex-direction: row;
        align-items: center;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav .nav-list {
        flex-direction: column;
        text-align: center;
    }

    .main-nav .nav-list li {
        margin: 1.5rem 0;
    }

    .main-nav .nav-list a {
        color: var(--text-light);
        font-size: 1.5rem;
    }
    .main-nav .nav-list a::after {
        background-color: var(--accent-color);
    }

    .nav-toggle {
        display: block;
        position: relative;
        z-index: 1001; /* Above the nav menu */
    }

    .hamburger {
        position: relative;
        width: 30px;
        height: 3px;
        background-color: var(--primary-color);
        display: block;
        transition: background-color 0.3s ease;
    }

    .nav-toggle.active .hamburger {
        background-color: transparent; /* Hide middle bar when active */
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        left: 0;
        transition: transform 0.3s ease, top 0.3s ease;
    }
    .nav-toggle.active .hamburger::before,
    .nav-toggle.active .hamburger::after {
        background-color: var(--text-light); /* Change color when menu is open */
    }


    .hamburger::before {
        top: -10px;
    }

    .hamburger::after {
        top: 10px;
    }

    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .hero {
        padding: 6rem 0;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    .section-padding {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .services-grid, .warranty-content, .footer-grid {
        grid-template-columns: 1fr;
    }

    .service-card, .warranty-feature {
        padding: 1.5rem;
    }

    .quote-form {
        padding: 2rem;
    }

    .footer-bottom {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header .logo {
        font-size: 1.5rem;
    }
    .hero {
        padding: 4rem 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-description {
        font-size: 0.9rem;
    }
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    .form-group input, .form-group select, .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}