/* 
    CROCCO PAINTING - CONSOLIDATED STYLESHEET
    Strategy: Premium Architectural Aesthetic
    Accessibility: WCAG 2.1 AA Compliant
*/

:root {
    --primary: #003366;    /* Original Navy */
    --accent: #D4AF37;     /* Gold/Premium accent */
    --text: #1a1a1a;
    --light-grey: #f4f7f9;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* 1. RESET & BASE */
* { box-sizing: border-box; margin: top 5px; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
}

/* 2. ACCESSIBILITY */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.skip-link {
    position: absolute; top: -60px; left: 0;
    background: var(--accent); color: var(--primary);
    padding: 1rem; z-index: 1000; text-decoration: none; font-weight: bold;
}
.skip-link:focus { top: 0; }

/* 3. NAVIGATION */
.main-header {
    padding: 1rem 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-logo {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a { 
    text-decoration: none; 
    color: var(--primary); 
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--accent); }

.btn-primary {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.8rem 1.8rem;
    margin: .4rem;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover { 
    background: var(--accent); 
    color: var(--primary) !important; 
    transform: translateY(-2px);
}


/* 4. HERO SECTION */
.hero { padding: 6rem 0; background: var(--light-grey); }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; color: var(--primary); }
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; color: #444; }

.cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid var(--primary);
    cursor: pointer;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--primary); transform: translateY(-2px); }

.btn-secondary { background: transparent; color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--white); }

/* 5. COMPARISON SLIDER */
.comparison-slider {
    position: relative; 
    width: 100%; 
    aspect-ratio: 16 / 9;
    overflow: hidden; 
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.comparison-slider img { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; }

.image-after { 
    position: absolute; 
    inset: 0; 
    clip-path: inset(0 0 0 50%); }

.slider-input {
    position: absolute; 
    inset: 0; 
    opacity: 0;
    cursor: ew-resize; 
    z-index: 10;
}

.slider-line {
    position: absolute; 
    top: 0; bottom: 0; left: 50%;
    width: 3px; 
    background: var(--white);
    pointer-events: none;
    z-index: 5; 
    transform: translateX(-50%);
}

.slider-button {
    position: absolute;
    top: 50%; left: 50%;
    width: 48px; height: 48px;
    background: var(--primary);
    border: 4px solid var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 6a. CARDS & GRID */
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; color: var(--primary); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.card {
    padding: 3rem;
    background: var(--white);
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: var(--transition);
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow); 
    border-color: var(--accent);
}

.card h3 { color: var(--primary); margin-bottom: 1rem; }

/* 6b. TRUST SIGNALS */
.trust-signals { padding: 3rem 0; background: var(--white); border-bottom: 1px solid #eee; }

.badge-grid {
    display: flex; justify-content: center; align-items: center; gap: 4rem;
}

.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.badge-item img { height: 60px; width: auto; margin-bottom: 0.5rem; }
.stars { color: var(--accent); font-size: 1.2rem; }

/* 7. QUOTE TOOL & FORM */
.quote-tool { 
    background: var(--primary); color: var(--white); 
    padding: 5rem 0; border-radius: 20px; margin: 4rem auto;
}

.form-container { max-width: 600px; margin: 0 auto; text-align: center; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }

.option-btn {
    padding: 1.5rem; background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2); color: var(--white);
    border-radius: 8px; cursor: pointer; font-weight: 600; transition: var(--transition);
}
.option-btn:hover { background: var(--accent); color: var(--primary); border-color: var(--accent); }

.input-group input, .input-group textarea {
    width: 100%; padding: 1.2rem; margin-bottom: 1rem;
    border-radius: 8px; border: none; font-size: 1rem; font-family: inherit;
}

.step-counter { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; color: var(--accent); margin-bottom: 0.5rem; }

#form-success { text-align: center; padding: 3rem 1rem; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; color: var(--accent); }

/* 8. FOOTER */
.main-footer {
    background: var(--primary); color: var(--white);
    padding: 5rem 0 0 0; margin-top: 5rem;
    border-top: 4px solid var(--accent);
}

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 3rem; padding-bottom: 4rem; }
.footer-logo { font-size: 1.8rem; color: var(--white); text-decoration: none; display: block; margin-bottom: 1.5rem;}

.footer-heading {
    color: var(--light-grey); text-transform: uppercase;
    font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 1.5rem;
}

.footer-links { list-style: none; }
.footer-contact { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: #cbd5e0; text-decoration: none; transition: var(--transition); }
.footer-contact a { color: #cbd5e0; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }

.footer-bottom { background: #002244; padding: 1.5rem 0; font-size: 0.85rem; color: #a0aec0; }
.bottom-flex { display: flex; justify-content: space-between; align-items: center; }
.legal-links a { color: #a0aec0; margin-left: 1.5rem; text-decoration: none; }

/* 9. STICKY CALL BUTTON */
.sticky-call {
    position: fixed; bottom: 2rem; right: 2rem;
    background: var(--primary); color: var(--white);
    padding: 1rem 1.8rem; border-radius: 50px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    z-index: 999; font-weight: bold; border: 2px solid var(--accent);
}

/* 10. RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle{display: block;}
    .menu-toggle.active .hamburger {
        background: transparent; /* Hide middle bar */
    }

    .menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    h1 { font-size: 2.5rem; }
    
    .nav-flex { position: relative; }
    .header-logo { height: 50px; }
    
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .cta-group { justify-content: center; flex-direction: column; }
    
    .badge-grid { flex-direction: column; gap: 2.5rem; }
    
    .nav-links {
        display: flex !important;
        flex-direction: column; 
        position: fixed; 
        top: 0; 
        right: -100%;
        width: 80%; 
        height: 100vh; 
        background: var(--white);
        padding: 80px 2rem; 
        transition: right 0.4s ease;
        z-index: 999; 
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { right: 0; display: flex; }
    
    .option-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .bottom-flex { flex-direction: column; gap: 1rem; }
    
    .sticky-call { bottom: 1rem; right: 1rem; padding: 0.8rem 1.2rem; font-size: 0.9rem; }
   
    .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
    }
    .comparison-slider {
        position:relative;
        aspect-ratio: 4 / 3; /* Taller ratio for mobile so images aren't squashed */
        width: 100%;
        overflow: hidden;
        max-width: 500px; /* Prevents it from getting too massive on larger tablets */
        margin: 2rem auto; /* Centers the slider and adds spacing from buttons */
    }
    
    .comparison-slider .image-before,
    .comparison-slider .image-after {
        position: absolute; /* Pulls them out of the document flow */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .comparison-slider img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures the house fills the frame without gaps */
        display: block;
    }

    .image-after {
        /* Ensure the clip-path stays responsive */
        position: absolute;
        top: 0;
        left:0;
        width: 100;
        height: 100;
        z-index: 2;
        clip-path: inset(0 0 0 50%); 
    }

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary); /* Navy bars */
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--primary);
    left: 0;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Desktop state - hide the button */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}
.certs-flex {
        flex-direction: column; /* Stacks them vertically */
        align-items: stretch;    /* Makes them all equal width */
        gap: 12px;               /* Adds the missing vertical gap */
        padding: 0 10%;          /* Optional: adds some side breathing room */
    }
    .cert-badge {
        width: 100%;             /* Ensures they span the container width */
        justify-content: flex-start;
        padding: 1rem;           /* Slightly larger touch target for mobile */
    }
}
/* Premium Team Gallery Look */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.team-card {
    position: relative;
    border-radius: 4px; /* Matching the button border-radius */
    overflow: hidden;
    background: var(--primary);
    transition: var(--transition);
}

.team-image {
    width: 100%;
    aspect-ratio: 4 / 5; /* Slightly taller for a more professional portrait feel */
    object-fit: cover;
    display: block;
    filter: grayscale(20%); /* Subtle professional desaturation */
    transition: var(--transition);
}

.team-card:hover .team-image {
    filter: grayscale(0%);
    transform: scale(1.05);
    opacity: 0.7; /* Reveals the navy background slightly */
}

.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 51, 102, 0.95)); /* Fades into navy */
    color: var(--white);
    transform: translateY(20px);
    transition: var(--transition);
}

.team-card:hover .team-info {
    transform: translateY(0);
}

.team-info h3 {
    color: var(--white); /* White for better contrast on navy */
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.team-info p {
    color: var(--accent); /* Gold accent for the title */
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Certifications with Gold Accents */
.cert-badge {
    background: var(--white);
    padding: 0.7rem 1.2rem;
    border-radius: 4px; /* Sharp corners for architectural feel */
    border: 1px solid #ddd;
    border-left: 4px solid var(--accent); /* Gold indicator */
    transition: var(--transition);
}
.certs-flex {
    display: flex;
    flex-wrap: wrap;       /* Crucial: allows badges to move to next line */
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cert-badge:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

/*Carousel*/
/* 12. SERVICES GALLERY - FADE TRANSITION */
.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Constrains the width for a premium feel */
    height: 500px;     /* Fixed height constraint */
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;  /* Prevents white flashes during fade */
    box-shadow: var(--shadow);
}

.carousel-cell {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;        /* Hidden by default */
    transition: opacity 1.2s ease-in-out; /* Smooth fade speed */
    z-index: 1;
}

.carousel-cell.is-selected {
    opacity: 1;        /* Visible state */
    z-index: 2;
}

.carousel-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the fixed box without stretching */
}

/* Overlay Styling */
.project-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 51, 102, 0.85); /* Navy with slight transparency */
    color: var(--white);
    padding: 1rem 2rem;
    border-left: 5px solid var(--accent);
    z-index: 3;
    transform: translateY(20px);
    transition: all 0.5s ease 0.3s; /* Slight delay for text appearance */
    opacity: 0;
}

.carousel-cell.is-selected .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Constraints */
@media (max-width: 768px) {
    .gallery-carousel-wrapper {
        height: 350px; /* Shorter fixed height for mobile */
        width: 95%;
    }
    
    .project-overlay {
        bottom: 15px;
        left: 15px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
/* CAROUSEL NAVIGATION BUTTONS */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 51, 102, 0.7); /* Navy with transparency */
    border: 1px solid var(--accent);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.carousel-nav:hover {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.carousel-nav.prev { left: 20px; }
.carousel-nav.next { right: 20px; }

/* Hide arrows on very small screens to keep it clean */
@media (max-width: 480px) {
    .carousel-nav { width: 35px; height: 350px; opacity: 0.8; }
}
@media (max-width: 480px) {
    /* Changed height from 350px to 35px to match width */
    .carousel-nav { 
        width: 35px; 
        height: 35px; 
        opacity: 0.9; 
    }
    
    /* Adjust arrow size slightly for smaller buttons */
    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }

    .carousel-nav.prev { left: 10px; }
    .carousel-nav.next { right: 10px; }
}