/* Hampshire Resin Driveways - Main Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 0; /* Remove body padding */
}

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

/* Navigation Styles */
.navbar {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    /* Fallback for older browsers */
    gap: 8px;
}

/* Fallback for browsers without gap support */
.logo > * + * {
    margin-left: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    /* Fallback for older browsers */
    gap: 2rem;
}

/* Fallback for browsers without gap support */
.nav-menu > * + * {
    margin-left: 2rem;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: #1f2937;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 500px; /* Increased height */
    background-image: url('../../images/home-banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 0; /* Start from top */
    padding-top: 90px; /* Add padding to push content below navigation */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 600px;
}

/* Hero heading styles - using class instead of qualified heading */
.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 100%;
    text-wrap: balance;
    /* Fallback for older browsers */
    overflow-wrap: break-word;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 24px;
    opacity: 0.95;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Guarantee Banner */
.guarantee {
    background: #fbbf24;
    padding: 16px 0;
    text-align: center;
}

.guarantee-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.guarantee-text {
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Phone info in guarantee section */
.guarantee .phone-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 8px;
    /* Fallback for older browsers */
    gap: 8px;
}

/* Fallback for browsers without gap support */
.guarantee .phone-info > * + * {
    margin-left: 8px;
}

.guarantee .phone-info a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guarantee .phone-info a:hover {
    color: #374151;
}

/* Services Section */
.services {
    padding: 48px 0;
    background: white;
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.section-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    /* Fallback for older browsers */
    grid-gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .services-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -8px;
    }
    
    .service-card {
        flex: 1 1 300px;
        margin: 8px;
    }
}

.service-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-header {
    padding: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.service-header.blue {
    background: #2563eb;
}

.service-header.green {
    background: #059669;
}

.service-content {
    padding: 16px;
}

.service-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #374151;
    /* Fallback for older browsers */
    gap: 8px;
}

/* Fallback for browsers without gap support */
.service-features li > * + * {
    margin-left: 8px;
}

.checkmark {
    color: #059669;
    font-weight: bold;
}

/* Benefits Section */
.benefits {
    padding: 60px 0;
    background: #f8fafc;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    /* Fallback for older browsers */
    grid-gap: 48px;
    align-items: center;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .benefits-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -24px;
    }
    
    .benefits-content,
    .benefits-gallery {
        flex: 1 1 400px;
        margin: 24px;
    }
}

.benefits-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 24px;
    line-height: 1.2;
}

.benefits-list {
    list-style: none;
    margin-bottom: 32px;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    padding: 8px 0;
    /* Fallback for older browsers */
    gap: 12px;
}

/* Fallback for browsers without gap support */
.benefits-list li > * + * {
    margin-left: 12px;
}

.check-icon {
    color: #22c55e;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.benefits-image {
    position: relative;
}

.benefits-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefits-image:hover img {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.benefits-image::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.1;
}

/* Benefits Gallery */
.benefits-gallery {
    position: relative;
}

.gallery-grid-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    /* Fallback for older browsers */
    grid-gap: 12px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .gallery-grid-home {
        display: flex;
        flex-wrap: wrap;
        margin: -6px;
    }
    
    .gallery-item-home {
        flex: 1 1 45%;
        margin: 6px;
    }
}

.gallery-item-home {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.8);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item-home:hover .gallery-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 2rem;
    color: white;
}

.gallery-caption {
    text-align: center;
    margin-top: 16px;
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

/* Process Section */
.process {
    padding: 60px 0;
    background: white;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    /* Fallback for older browsers */
    grid-gap: 32px;
    margin-top: 40px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .process-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 40px -16px 0;
    }
    
    .process-step {
        flex: 1 1 300px;
        margin: 0 16px 32px;
    }
}

.process-step {
    text-align: center;
    padding: 24px;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.process-step-title {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 12px;
    font-weight: 600;
}

.process-step-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Environmental Section */
.environmental {
    padding: 60px 0;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.environmental-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    /* Fallback for older browsers */
    grid-gap: 32px;
    margin-top: 40px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .environmental-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 40px -16px 0;
    }
    
    .env-benefit {
        flex: 1 1 250px;
        margin: 0 16px 32px;
    }
}

.env-benefit {
    text-align: center;
    padding: 32px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.env-benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.env-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.env-benefit-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 12px;
    font-weight: 600;
}

.env-benefit-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 60px 0;
    background: #f8fafc;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    /* Fallback for older browsers */
    grid-gap: 32px;
    margin-top: 40px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .testimonials-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 40px -16px 0;
    }
    
    .testimonial {
        flex: 1 1 400px;
        margin: 0 16px 32px;
    }
}

.testimonial {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    position: relative;
}

.testimonial:hover {
    transform: translateY(-3px);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: 16px;
    left: 24px;
    font-size: 4rem;
    color: #e2e8f0;
    font-family: serif;
    line-height: 1;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.testimonial-text {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Service Areas Section */
.service-areas {
    padding: 60px 0;
    background: white;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    /* Fallback for older browsers */
    grid-gap: 32px;
    margin-top: 40px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .areas-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 40px -16px 0;
    }
    
    .area-group {
        flex: 1 1 250px;
        margin: 0 16px 32px;
    }
}

.area-group {
    background: #f8fafc;
    padding: 28px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.area-group-title {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.area-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area-group li {
    color: #64748b;
    font-size: 0.9rem;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}

.area-group li:last-child {
    border-bottom: none;
}

.service-note {
    text-align: center;
    margin-top: 40px;
    padding: 24px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.service-note-text {
    color: #92400e;
    margin: 0;
    font-size: 0.95rem;
}

.service-note a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.service-note a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq {
    padding: 60px 0;
    background: #f8fafc;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    /* Fallback for older browsers */
    grid-gap: 32px;
    margin-top: 40px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .faq-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 40px -16px 0;
    }
    
    .faq-item {
        flex: 1 1 400px;
        margin: 0 16px 32px;
    }
}

.faq-item {
    background: white;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.faq-answer {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Quote Section */
.quote-section {
    padding: 48px 0;
    background: white;
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    /* Fallback for older browsers */
    grid-gap: 24px;
    margin-top: 32px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .quote-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 32px -12px 0;
    }
    
    .quote-method {
        flex: 1 1 300px;
        margin: 0 12px 24px;
    }
}

.quote-method {
    text-align: center;
    padding: 32px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quote-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.quote-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.quote-method-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.quote-method-description {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
    padding: 48px 0;
    background: #1f2937;
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.cta-text {
    font-size: 0.9rem;
    margin-bottom: 24px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Fallback for older browsers */
    gap: 12px;
}

/* Fallback for browsers without gap support */
.cta-buttons > * + * {
    margin-left: 12px;
}

.btn-white {
    background: white;
    color: #1f2937;
}

.btn-white:hover {
    background: #f3f4f6;
}

.btn-outline {
    background: transparent;
    border: 1px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #1f2937;
}

/* Footer Styles */
.main-footer {
    background: #1f2937;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    /* Fallback for older browsers */
    grid-gap: 30px;
    margin-bottom: 30px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .footer-content {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -15px 30px;
    }
    
    .footer-section {
        flex: 1 1 250px;
        margin: 0 15px 30px;
    }
}

.footer-section-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #f9fafb;
}

.footer-section p,
.footer-section li {
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 73px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.15);
        padding: 2rem 0;
        border-top: 1px solid #e5e7eb;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .logo {
        font-size: 1rem;
    }

    .hero {
        height: 420px; /* Increased mobile height */
        padding-top: 85px; /* Adjust for mobile nav height */
    }

    .guarantee {
        padding: 20px 0; /* Increased padding for mobile */
    }

    .guarantee .phone-info {
        flex-direction: column;
        gap: 4px;
        margin-top: 12px;
    }

    .guarantee .phone-info a {
        font-size: 1.1rem;
        font-weight: bold;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
        max-width: 90%;
        text-wrap: balance;
    }

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

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        grid-gap: 24px;
    }

    .environmental-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        grid-gap: 24px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        grid-gap: 24px;
    }

    .areas-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        grid-gap: 24px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        grid-gap: 24px;
    }

    .benefits {
        padding: 40px 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        grid-gap: 32px;
    }

    .benefits-title {
        font-size: 1.8rem;
    }

    .benefits-list li {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .benefits-image img {
        height: 240px;
    }

    .gallery-grid-home {
        grid-template-columns: 1fr;
        gap: 8px;
        grid-gap: 8px;
    }

    .gallery-item-home {
        aspect-ratio: 3/2;
    }

    .quote-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        grid-gap: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .process,
    .environmental,
    .testimonials,
    .service-areas,
    .faq {
        padding: 40px 0;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        grid-gap: 12px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .benefits-title {
        font-size: 2rem;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        grid-gap: 24px;
    }

    .environmental-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        grid-gap: 24px;
    }

    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        grid-gap: 24px;
    }

    .quote-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        grid-gap: 16px;
    }
}