/* Base Styles & Variables */
:root {
    --primary: #000000; /* Black */
    --primary-hover: #333333;
    --secondary: #B41C1C; /* Red from logo */
    --text: #333333;
    --text-light: #555555;
    --background: #FFFFFF;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
             0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --header-height: 100px;
    --banner-height: 44px; /* Increased slightly */
    --total-top: 144px; /* header + banner */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--total-top);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container & Section Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
}

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

/* Typography */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Estimate Banner */
.estimate-banner {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.3rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: var(--banner-height);
    display: flex;
    align-items: center;
}

.estimate-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap; /* Prevent wrapping */
}

.review-link {
    color: #FFD700; /* Gold color */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.review-link:hover {
    opacity: 0.9;
}

.stars {
    color: #FFD700; /* Gold color */
    letter-spacing: -2px;
}

.call-now-btn {
    background-color: var(--secondary);
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.call-now-btn:hover {
    background-color: #930000; /* Darker red */
}

.call-now-btn svg {
    stroke: var(--white);
}

/* Updated mobile styles for banner */
@media (max-width: 640px) {
    .estimate-banner .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 0.5rem;
        height: 100%;
    }

    .estimate-banner {
        height: 40px; /* Reduced height */
    }
    
    :root {
        --banner-height: 40px;
    }

    /* Make the review text smaller on mobile */
    .review-link {
        font-size: 0.75rem;
    }
    
    /* Ensure the call now button fits properly on mobile */
    .call-now-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }

    .call-now-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    right: 0;
    background: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow);
    height: var(--header-height);
}

.navbar-container {
    height: 100%;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1002;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-img {
    width: auto;
    height: 80px;
    object-fit: contain;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--primary);
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 1rem;
}

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

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease-in-out;
}

/* Improved mobile menu styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Adjust logo size for mobile */
    .logo-img {
        height: 50px;
    }

    .navbar-content {
        padding: 0 1rem;
    }
    
    /* Reduce navbar height on tablets */
    .navbar {
        height: 70px;
    }
    
    :root {
        --header-height: 70px;
        --total-top: 114px; /* banner + header */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 400px;
        background: var(--white);
        flex-direction: column;
        padding: calc(var(--total-top) + 1rem) 2rem 2rem;
        transition: right 0.3s ease-in-out;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .logo-img {
        height: 40px; /* Even smaller logo */
    }
    
    .navbar {
        height: 60px; /* Significantly reduced height */
    }
    
    :root {
        --header-height: 60px;
        --total-top: 104px; /* banner + header */
    }
    
    /* Tighten up the navbar content spacing */
    .navbar-content {
        padding: 0 0.75rem;
    }
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--total-top) + 2rem) 1.5rem 6rem;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.service-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--total-top) + 2rem) 1.5rem 6rem;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

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

.hero h1,
.service-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p,
.service-hero p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 640px) {
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .hero,
    .service-hero {
        padding-top: calc(var(--total-top) + 1rem);
        min-height: 70vh;
    }
    
    .hero h1,
    .service-hero h1 {
        margin-bottom: 1rem;
    }
    
    .hero p,
    .service-hero p {
        margin-bottom: 1.5rem;
    }
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 160px;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background-color: #930000; /* Darker red */
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

/* Grid System */
.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 2rem;
}

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

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

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Service Cards */
.service-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.service-content p {
    margin-bottom: 1rem;
}

.service-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.service-card-content p {
    color: var(--text-light);
}

.service-list {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.service-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.service-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    padding-top: 1rem;
}

.service-link::after {
    content: "→";
}

/* Feature Cards */
.feature-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    color: var(--white);
}

.feature-card .feature-icon {
    background-color: var(--secondary);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

/* Process Section */
.process-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    height: 100%;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
    font-size: 1.25rem;
}

.process-card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

/* Gallery Section - WORKING Before/After Slider */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.before-after {
    position: relative;
    padding-top: 75%; /* This creates the proportional height */
    overflow: hidden;
}

.before-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-after .before {
    z-index: 1;
    /* clip-path will be set by JavaScript */
}

.before-after .after {
    z-index: 0;
}

.before-after .slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--secondary);
    cursor: ew-resize;
    z-index: 10;
}

.before-after .slider::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--secondary);
    border: 3px solid white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.before-label, .after-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 15;
    pointer-events: none;
}

.before-label {
    top: 10px;
    left: 10px;
}

.after-label {
    top: 10px;
    right: 10px;
}

.gallery-caption {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--text);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials Section */
.testimonials-slider {
    position: relative;
    padding: 2rem 0;
}

.testimonial {
    display: none;
}

.testimonial.active {
    display: block;
}

.testimonial-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-content::after {
    content: """;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 4rem;
    color: var(--gray-200);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    color: var(--primary);
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.875rem;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.testimonial-dots {
    display: flex;
    gap: 0.5rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gray-200);
    border: none;
    padding: 0;
    cursor: pointer;
}

.testimonial-dot.active {
    background-color: var(--secondary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e53e3e;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-details {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.contact-details h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    flex-shrink: 0;
}

/* Certification Badges */
.certification-badges {
    display: flex;
    justify-content: space-between;
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge-icon {
    width: 50px;
    height: 50px;
    background-color: #FFD700; /* Gold color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.badge span {
    font-weight: 500;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--white);
    background-color: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.social-links a:hover {
    background-color: #930000; /* Darker red */
}

.social-links svg {
    width: 20px;
    height: 20px;
}

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

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    background: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    font-size: 1.1rem;
}

.faq-question:hover {
    background-color: var(--gray-100);
}

.faq-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: var(--secondary);
    transition: transform 0.3s;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.25rem;
}

.faq-question.active + .faq-answer {
    max-height: 500px;
    padding: 0 1.25rem 1.25rem;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}