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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    position: relative;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #2e2e2e;
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav .logo {
    font-size: 1.8em;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #4caf50;
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 80px; /* Increased to avoid overlap with fixed nav */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 15px;
    color: white;
    max-width: 800px;
}

.hero-overlay h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 20px;
}

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

.hero-overlay button {
    padding: 15px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hero-overlay button:hover {
    background-color: #0056b3;
}

main {
    flex: 1 0 auto;
    padding: 60px 20px;
    text-align: center;
}

main h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2e2e2e;
}

main p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
    color: #555555;
}

.services {
    margin-top: 50px;
}

.service-item {
    margin: 30px 0;
}

.service-item h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2e2e2e;
}

.contact form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

.contact label {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2e2e2e;
}

.contact input,
.contact textarea {
    margin-top: 5px;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #cccccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.contact textarea {
    height: 150px;
}

.contact button {
    margin-top: 25px;
    padding: 15px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact button:hover {
    background-color: #388e3c;
}

body:has(h1:contains("Contact Insulation Experts")) .contact button {
    background-color: #007bff;
}

body:has(h1:contains("Contact Insulation Experts")) .contact button:hover {
    background-color: #0056b3;
}

.thankyou {
    text-align: center;
    padding: 60px 20px;
}

.thankyou h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2e2e2e;
}

.thankyou p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555555;
}

.thankyou a {
    display: inline-block;
    padding: 15px 30px;
    background-color: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.thankyou a:hover {
    background-color: #388e3c;
}

footer {
    background-color: #2e2e2e;
    color: white;
    text-align: center;
    padding: 30px;
    flex-shrink: 0;
    width: 100%;
    margin-top: 40px;
}

footer p {
    font-size: 1em;
}

/* Calculator Styles */
.calculator {
    padding: 50px 20px;
    text-align: center;
    background-color: #ffffff;
    margin-top: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.calculator h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2e2e2e;
}

.calculator form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

.calculator label {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2e2e2e;
}

.calculator input,
.calculator select {
    margin-top: 5px;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #cccccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.calculator button {
    margin-top: 25px;
    padding: 15px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calculator button:hover {
    background-color: #388e3c;
}

.calculator #result {
    margin-top: 25px;
    font-size: 1.3em;
    font-weight: 600;
    color: #4caf50;
}

.calculator .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}

/* Benefits Section */
.benefits {
    padding: 50px 20px;
    text-align: center;
    background-color: #ffffff;
    margin-top: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-item {
    padding: 20px;
    text-align: center;
}

.benefit-item h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2e2e2e;
}

.benefit-item p {
    font-size: 1.1em;
    color: #555555;
}

/* CTA Section */
.cta {
    padding: 50px 20px;
    text-align: center;
    background-color: #f9f9f9;
    margin-top: 30px;
    border-radius: 8px;
}

.cta button {
    margin-top: 25px;
    padding: 15px 40px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta button:hover {
    background-color: #388e3c;
}

/* Education Section with Insulation Benefits */
.education {
    padding: 50px 20px;
    text-align: center;
    background-color: #ffffff;
    margin-top: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.education p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #555555;
}

.insulation-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.insulation-item {
    padding: 20px;
    text-align: center;
}

.insulation-item h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2e2e2e;
}

.insulation-item h4 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #4caf50;
}

.insulation-item p {
    font-size: 1.1em;
    color: #555555;
}

/* Responsive navigation */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 15px 20px;
    }

    nav .logo {
        margin-bottom: 15px;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    nav ul li {
        text-align: center;
    }

    .hero-overlay h1 {
        font-size: 2.5em;
    }

    .hero-overlay p {
        font-size: 1.1em;
    }
}