/* --- Project Comparison Slider --- */
.comparison-slider {
    position: relative;
    width: 100%;
    /* 1. REMOVE FIXED HEIGHT: height: 450px; */
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
    /* 2. ADD A DEFAULT LANDSCAPE RATIO (for stopcock project) */
    aspect-ratio: 16 / 9; 
}

/* 3. NEW CLASS: For Taller Portrait/Vertical Images (for Guinea Pig project) */
/* Adjust the ratio to match your photo (e.g., 4/3 or 3/2 or 9/16) */
.comparison-slider.aspect-4x3 {
    aspect-ratio: 3 / 4; /* Standard portrait photo ratio */
}

/* Share image properties */
.image-before, .image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 4. ESSENTIAL: Make the image perfectly fill its container space */
    background-size: cover; 
    background-position: left center;
}

/* Shared image properties - CRITICAL for visibility */

.image-before { 
    z-index: 1; 
}

.image-after { 
    z-index: 2; 
    width: 75%; 
    border-right: 5px solid white; 
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    /* Essential: stop the background from moving when the div shrinks */
    overflow: hidden; 
}

/* --- Slider Watermarks --- */

.image-before::after, 
.image-after::after {
    position: absolute;
    top: 15px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none; /* Ensures the watermark doesn't block the mouse/slider */
}

/* Label for the Top Curtain (Usually the 'Before' shot) */
.image-after::after {
    content: 'Before';
    left: 15px;
}

/* Label for the Bottom Layer (Usually the 'After' shot) */
.image-before::after {
    content: 'After';
    right: 15px;
}

/* The invisible input that handles the sliding */
.slider-input { 
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%; 
    appearance: none; 
    -webkit-appearance: none;
    background: transparent; 
    z-index: 10; 
    margin: 0;
    cursor: ew-resize; 
}

/* The Tool Icon Handle */
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 60px; 
    height: 60px; 
    background-color: white;
    background-image: var(--tool-icon); 
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    border: 3px solid var(--accent); 
    border-radius: 50%; 
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

/* --- Project Carousel Logic --- */
.project-slide, 
.testimonial-slide { 
    display: none !important; 
}

.project-slide.active, 
.testimonial-slide.active { 
    display: block !important; 
    animation: fadeIn 0.4s ease-in-out;
}

.carousel-nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 1.5rem; 
}

.nav-btn { 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold;
}

.nav-btn:hover { background: var(--accent); }

/* --- Testimonial Carousel --- */
.testimonial-wrapper {
    position: relative;
    padding: 20px 0;
    text-align: center;
}

/* Hide slides by default - using high specificity to stop them all showing at once */
.testimonial-slide { 
    display: none !important; 
    margin-bottom: 40px; 
}

/* Only show the active one */
.testimonial-slide.active { 
    display: block !important; 
    animation: fadeIn 0.4s ease-in-out;
}

.testimonial-header { 
    font-size: 1.1rem; 
    margin-bottom: 15px; 
    color: var(--primary); 
}

.star-rating { 
    color: #f1c40f !important; /* Forces the brand gold color back */
    margin-left: 10px;
    letter-spacing: 2px;
}

.testimonial-text { 
    font-style: italic; 
    font-size: 1.2rem; 
    line-height: 1.6; 
    color: #555; 
    position: relative; 
    padding: 0 40px; 
    margin-bottom: 10px; 
}

/* Restoring the opening and closing quotes */
.testimonial-text::before, .testimonial-text::after {
    content: '"'; 
    font-size: 3rem; 
    color: var(--accent); 
    position: absolute; 
    opacity: 0.3;
}

.testimonial-text::before { 
    left: 0; 
    top: -20px; 
}

.testimonial-text::after { 
    right: 0; 
    bottom: -30px; 
    transform: rotate(180deg); 
}

.testimonial-context {
    margin-top: 20px; 
    font-size: 0.85rem; 
    color: #777; 
    font-style: italic;
    border-top: 1px dashed #ddd; 
    padding-top: 10px; 
    display: inline-block; 
    max-width: 80%;
}

/* --- About Page Logo Widget --- */
.logo-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
    border-top: 5px solid var(--accent);
}

.hero-logo-container {
    max-width: 250px;
    margin: 0 auto 1.5rem;
}

.hero-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.hero-subtitle {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* --- Philosophy List --- */
.philosophy-list {
    list-style: none;
    padding: 0;
}

.philosophy-list li {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.philosophy-list li::before {
    content: '🔧'; /* A little tool icon for the bullets */
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.9rem;
}

.accent-text {
    color: var(--accent);
    font-weight: bold;
    display: block; /* Puts the description on the next line or keeps it distinct */
    margin-bottom: 2px;
}