/* ================================
   TPGC Residential Page Styles
   Color Theme: Blue

   Theme tokens (--res-*) are defined in styles.css.
   ================================ */

/* ================================
   Page Transition Effect
   ================================ */
.residential-page {
    animation: pageFadeIn 0.6s ease-out;
}

@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Text Selection Color Override
   ================================ */
.residential-page ::selection {
    background: var(--res-accent);
    color: white;
}

.residential-page ::-moz-selection {
    background: var(--res-accent);
    color: white;
}

/* ================================
   Scrollbar Override - Light Blue
   ================================ */
body.residential-page::-webkit-scrollbar,
html:has(body.residential-page)::-webkit-scrollbar {
    width: 10px;
}

body.residential-page::-webkit-scrollbar-track,
html:has(body.residential-page)::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

body.residential-page::-webkit-scrollbar-thumb,
html:has(body.residential-page)::-webkit-scrollbar-thumb {
    background: var(--res-primary);
    border-radius: 5px;
}

body.residential-page::-webkit-scrollbar-thumb:hover,
html:has(body.residential-page)::-webkit-scrollbar-thumb:hover {
    background: var(--res-primary-light);
}

/* For Firefox */
.residential-page {
    scrollbar-color: var(--res-primary) var(--bg-cream);
    scrollbar-width: thin;
}

/* ================================
   Navigation Overrides
   ================================ */
.nav-residential {
    background: rgba(250, 251, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-residential.scrolled {
    background: rgba(250, 251, 252, 0.95);
    box-shadow: 0 4px 30px rgba(26, 70, 112, 0.1);
}

.nav-residential .logo-divider {
    background: linear-gradient(to bottom, transparent, var(--res-primary), transparent);
}

.nav-residential .logo-tagline {
    color: var(--res-primary);
}

.nav-cta-residential {
    background: var(--res-primary-dark) !important;
}

.nav-cta-residential:hover {
    background: var(--res-primary) !important;
}

/* Dropdown active state */
.nav-residential .dropdown-item.active .dropdown-title {
    color: var(--res-primary);
}

.nav-residential .dropdown-item.active .dropdown-desc {
    color: var(--res-primary);
    opacity: 0.8;
}

.nav-residential .dropdown-item.active::after {
    transform: scaleX(1);
}

/* Back to home button: moved to components.css in Batch 4 */

/* ================================
   Hero Section
   ================================ */
.service-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.service-hero-bg-image {
    /* Batch 11: now an <img> element with fetchpriority="high".
       object-fit + object-position replicate background-size: cover / position: center. */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
}

.service-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(26, 70, 112, 0.92) 0%, 
        rgba(10, 37, 64, 0.88) 50%,
        rgba(26, 70, 112, 0.85) 100%
    );
}

/* Moved to components.css in Batch 4:
   .hero-grid-overlay, .service-hero-content, .service-hero-title,
   .service-badge, .service-badge .badge-dot, @keyframes pulse
   Division-specific bits remain below.
*/

.title-static {
    display: block;
}

.title-cycle-wrapper {
    display: block;
    position: relative;
    min-height: 1.2em;
    padding-right: 20px;
}

.title-cycle {
    display: inline-block;
    color: var(--res-accent-light);
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
    /* Batch 10.6: padding-left prevents clipping of italic letter tops
       (italic glyphs like "F", "T", "Q" slant into the space to the left
       of the character's logical box). */
    padding-bottom: 0.1em;
    padding-left: 0.15em;
    padding-right: 0.1em;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide cycling text when final is shown */
.title-cycle.hidden {
    display: none;
}

/* Final word - shimmer shine effect */
.title-final {
    display: none;
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--res-accent-light);
    background: linear-gradient(
        90deg,
        var(--res-accent-light) 0%,
        var(--res-accent-light) 40%,
        #ffffff 50%,
        var(--res-accent-light) 60%,
        var(--res-accent-light) 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Batch 10.6: padding-left prevents clipping of italic letter tops.
       Especially important here because background-clip: text clips
       strictly at the content box edge. */
    padding-bottom: 0.1em;
    padding-left: 0.15em;
    padding-right: 0.1em;
    opacity: 0;
    transform: translateX(-30px);
}

/* When .visible is added: become block-level, fade-slide in.
   When .ready is THEN added (after fade completes), start the shimmer.
   Both animations are defined together so adding .ready does not cancel
   the fade's `forwards` retention — the browser preserves the cumulative
   end state of fadeSlideIn while shimmer plays separately. */
.title-final.visible {
    display: inline-block;
    animation: fadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.title-final.visible.ready {
    animation:
        fadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards,
        shimmer 3s ease-in-out 0s infinite;
    will-change: background-position;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.service-hero-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.subtitle-dot {
    color: var(--res-accent-light);
    font-size: 20px;
    line-height: 1;
}

.service-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--res-primary);
    padding: 18px 36px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.service-hero-btn:hover {
    background: var(--res-accent-light);
    color: var(--res-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.service-hero-btn svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Scroll Indicator for Service Page: moved to components.css in Batch 4 */

/* ================================
   Section Labels
   ================================ */
.section-label-residential {
    color: var(--res-primary) !important;
}

.section-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-title-link:hover {
    color: var(--res-primary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ================================
   Services Section - Fixed Padding
   ================================ */
.services-section {
    padding: var(--section-padding) 0;
}

/* ================================
   Service Accordions
   ================================ */
.service-accordions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-accordion {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(26, 70, 112, 0.1);
    transition: box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.service-accordion.in-view {
    opacity: 1;
    transform: translateY(0);
}

.service-accordion:nth-child(1) {
    transition-delay: 0s;
}

.service-accordion:nth-child(2) {
    transition-delay: 0.2s;
}

.service-accordion:nth-child(3) {
    transition-delay: 0.4s;
}

.service-accordion:hover {
    box-shadow: 0 8px 40px rgba(26, 70, 112, 0.12);
}

.service-accordion.active {
    border-color: var(--res-primary);
}

/* Icon pulse animation when in view */
.service-accordion.in-view .accordion-icon {
    animation: iconPulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.accordion-header {
    display: flex;
    align-items: stretch;
    cursor: pointer;
    position: relative;
    min-height: 120px;
}

.accordion-image {
    width: 240px;
    min-height: 140px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.accordion-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-primary-light) 100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-accordion:hover .accordion-img-placeholder {
    transform: scale(1.1);
}

.accordion-img-1 {
    background: url('/assets/images/accordion-interior.jpg');
    background-size: cover;
    background-position: center;
}

.accordion-img-2 {
    background: url('/assets/images/accordion-outdoor.jpg');
    background-size: cover;
    background-position: center;
}

.accordion-img-3 {
    background: url('/assets/images/accordion-newhome.jpg');
    background-size: cover;
    background-position: center;
}

.accordion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
}

.accordion-header-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
}

.accordion-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 70, 112, 0.08);
    border-radius: 12px;
    color: var(--res-primary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.service-accordion.active .accordion-icon,
.service-accordion:hover .accordion-icon {
    background: var(--res-primary);
    color: white;
}

.accordion-titles {
    flex: 1;
}

.accordion-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.accordion-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.accordion-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 70, 112, 0.08);
    border-radius: 50%;
    color: var(--res-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.accordion-toggle svg {
    transition: transform 0.3s ease;
}

.service-accordion.active .accordion-toggle {
    background: var(--res-primary);
    color: white;
}

.service-accordion.active .accordion-toggle svg {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-accordion.active .accordion-content {
    max-height: 1000px;
}

.accordion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 0 32px 32px;
    border-top: 1px solid rgba(26, 70, 112, 0.1);
    padding-top: 24px;
    margin-top: 0;
}

.sub-service {
    padding: 20px;
    background: rgba(26, 70, 112, 0.03);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.sub-service:hover {
    background: rgba(26, 70, 112, 0.06);
    transform: translateY(-2px);
}

.sub-service-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--res-primary);
    margin-bottom: 12px;
    padding-left: 0;
}

.sub-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-service-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.sub-service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: var(--res-accent);
    border-radius: 50%;
}

/* Custom Projects - Special styling with rotating border */
.sub-service.custom-project {
    grid-column: 1 / -1;
    background: transparent;
    position: relative;
    z-index: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sub-service.custom-project:hover {
    transform: translateY(-2px);
}

.sub-service.custom-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(var(--border-angle), var(--res-primary), var(--res-accent-light), var(--res-primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 8s linear infinite;
    opacity: 0.5;
    z-index: -1;
}

.sub-service.custom-project::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: rgba(26, 70, 112, 0.03);
    border-radius: 10px;
    z-index: -1;
}

@keyframes rotateBorder {
    0% { --border-angle: 0deg; }
    100% { --border-angle: 360deg; }
}

.custom-project-content {
    flex: 1;
}

.sub-service.custom-project .sub-service-title {
    color: var(--res-primary);
}

.custom-project-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.custom-project-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 70, 112, 0.08);
    border-radius: 50%;
    color: var(--res-primary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sub-service.custom-project:hover .custom-project-arrow {
    background: var(--res-primary);
    color: white;
    transform: translateX(4px);
}

/* ================================
   CTA Banner
   ================================ */
.cta-banner {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.cta-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-primary-dark) 100%);
}

.cta-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Mouse following glow for CTA */
.cta-mouse-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 204, 232, 0.2) 0%, rgba(168, 204, 232, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--res-primary);
    padding: 18px 40px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    background: var(--res-accent-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cta-btn svg {
    transition: transform 0.3s ease;
}

.cta-btn:hover svg {
    transform: translateX(4px);
}

/* ================================
   Gallery Section
   ================================ */
.gallery-section {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.gallery-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.gallery-carousel {
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 500px;
}

.gallery-slide {
    flex: 0 0 calc(33.333% - 12px);
    margin: 0 6px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0) scale(1.01);
    will-change: transform;
}

.gallery-slide:hover .gallery-image {
    transform: translateZ(0) scale(1.1);
}

/* Full Gallery CTA Card */
.gallery-slide-cta {
    position: relative;
    overflow: hidden;
}

.gallery-cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.gallery-cta-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transform: scale(1.05);
}

.gallery-cta-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 70, 112, 0.6) 0%, rgba(10, 37, 64, 0.7) 100%);
}

.gallery-cta-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-cta-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-cta-content {
    text-align: center;
    margin-bottom: 16px;
}

.gallery-cta-text {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-cta-subtext {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gallery-cta-arrow {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-cta-card:hover .gallery-cta-arrow {
    background: white;
    color: var(--res-primary);
    transform: translateX(4px);
}

.gallery-cta-card:hover .gallery-cta-arrow svg {
    stroke: var(--res-primary);
}

/* Pulse animation for Full Gallery card when visible */
.gallery-slide-cta.in-view .gallery-cta-arrow {
    animation: pulseBlue 0.6s ease-in-out 2;
}

@keyframes pulseBlue {
    0% {
        box-shadow: 0 0 0 0 rgba(107, 163, 214, 0.7);
        background: rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(107, 163, 214, 0);
        background: rgba(107, 163, 214, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(107, 163, 214, 0);
        background: rgba(255, 255, 255, 0.15);
    }
}

.gallery-nav {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    border: 2px solid var(--res-primary);
    border-radius: 50%;
    color: var(--res-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-nav:hover {
    background: var(--res-primary);
    color: white;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(26, 70, 112, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active,
.gallery-dot:hover {
    background: var(--res-primary);
    transform: scale(1.2);
}

.gallery-cta {
    text-align: center;
}

.btn-secondary-residential {
    color: var(--res-primary) !important;
    border-color: var(--res-primary) !important;
}

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

/* ================================
   Clients Section - Updated with Real Logos
   ================================ */
.clients-section {
    padding: var(--section-padding) 0;
    padding-bottom: 60px;
    background: white;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    align-items: center;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(26, 70, 112, 0.03);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 120px;
}

.client-logo:hover {
    background: rgba(26, 70, 112, 0.06);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26, 70, 112, 0.1);
}

.client-logo-img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 0.85;
    transition: all 0.4s ease;
}

.client-logo:hover .client-logo-img {
    opacity: 1;
    transform: scale(1.05);
}

/* "+ more" box styling */
.client-logo.client-logo-more {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: default !important;
    transition: none !important;
}

.client-logo.client-logo-more:hover {
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.more-text {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    color: var(--res-primary);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================
   Testimonial Section - NEW
   ================================ */
.testimonial-section {
    padding: 40px 0 var(--section-padding);
    background: white;
    position: relative;
}

.testimonial-wrapper {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    background: white;
}

.testimonial-quote-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.quote-icon-img {
    width: 56px;
    height: auto;
    opacity: 0.6;
}

.testimonial-quote {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(24px, 4vw, 36px);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 32px 0;
    position: relative;
    background: white;
}

/* Typing effect for testimonial */
.testimonial-quote.typing {
    overflow: hidden;
}

.testimonial-quote .quote-text {
    display: inline;
}

.testimonial-quote .quote-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--res-primary);
    margin-left: 4px;
    animation: cursorBlink 0.8s ease-in-out infinite;
    vertical-align: middle;
    transform: translateY(-0.05em);
}

.testimonial-quote .quote-cursor.hidden {
    opacity: 0;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.testimonial-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--res-primary), var(--res-accent-light));
    margin: 0 auto 24px;
    border-radius: 2px;
}

.testimonial-attribution {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ================================
   Contact Section Overrides
   ================================ */
.contact-section-residential {
    background: var(--bg-cream);
}

.contact-section-residential .contact-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.contact-icon-residential {
    background: rgba(26, 70, 112, 0.1) !important;
    color: var(--res-primary) !important;
}

.input-line-residential {
    background: linear-gradient(90deg, var(--res-primary), var(--res-accent)) !important;
}

.btn-primary-residential {
    background: var(--res-primary) !important;
}

.btn-primary-residential:hover {
    background: var(--res-primary-dark) !important;
}

.contact-form-residential input:focus ~ label,
.contact-form-residential input:not(:placeholder-shown) ~ label,
.contact-form-residential textarea:focus ~ label,
.contact-form-residential textarea:not(:placeholder-shown) ~ label,
.contact-form-residential select:focus ~ label,
.contact-form-residential select:valid ~ label {
    color: var(--res-primary);
}

/* ================================
   Footer Overrides
   ================================ */
.footer-residential {
    background: var(--res-primary-dark);
}

.footer-top-line-residential {
    background: linear-gradient(90deg, var(--res-accent), var(--res-primary), var(--res-accent));
}

.footer-residential .footer-logo .logo-text {
    color: white;
}

.footer-residential .footer-logo .logo-est {
    color: var(--res-accent-light);
}

.footer-residential .social-links a:hover {
    background: var(--res-primary);
    border-color: var(--res-primary);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 1200px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .accordion-header {
        flex-direction: column;
    }
    
    .accordion-image {
        width: 100%;
        height: 150px;
    }
    
    .accordion-header-content {
        padding: 20px;
    }
    
    .gallery-slide {
        flex: 0 0 calc(50% - 12px);
    }
    
    .gallery-track {
        min-height: 450px;
    }
    
    .gallery-cta-text {
        font-size: 20px;
    }
    
    .gallery-cta-arrow {
        width: 48px;
        height: 48px;
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .client-logo {
        padding: 20px;
        min-height: 100px;
    }
    
    .client-logo-img {
        max-height: 60px;
    }
    
    .back-to-home {
        display: none;
    }
    
    .testimonial-quote {
        font-size: clamp(20px, 4vw, 28px);
    }
    
    .contact-section-residential .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-section-residential .contact-form {
        padding: 32px 24px;
    }
}

@media (max-width: 600px) {
    .service-hero-content {
        padding: 0 20px;
    }
    
    .service-hero-title {
        font-size: clamp(36px, 10vw, 60px);
    }

    .title-cycle-wrapper {
        padding-right: 0;
    }
    
    .service-badge {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .service-hero-subtitle {
        flex-direction: column;
        gap: 8px;
    }
    
    .subtitle-dot {
        display: none;
    }
    
    .service-hero-btn {
        padding: 16px 28px;
        font-size: 14px;
    }
    
    .accordion-header-content {
        flex-wrap: wrap;
    }
    
    .accordion-icon {
        display: none;
    }
    
    .accordion-title {
        font-size: 18px;
    }
    
    .accordion-subtitle {
        font-size: 13px;
    }
    
    .accordion-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 20px;
    }
    
    .gallery-carousel-wrapper {
        gap: 10px;
    }
    
    .gallery-slide {
        flex: 0 0 calc(100% - 12px);
    }
    
    .gallery-track {
        min-height: 400px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery-cta-text {
        font-size: 18px;
    }
    
    .gallery-cta-arrow {
        width: 40px;
        height: 40px;
    }
    
    .gallery-dots {
        gap: 8px;
    }
    
    .gallery-dot {
        width: 10px;
        height: 10px;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .client-logo {
        padding: 16px;
        min-height: 90px;
    }
    
    .client-logo-img {
        max-height: 50px;
    }
    
    .more-text {
        font-size: 16px;
    }
    
    .service-scroll-indicator {
        bottom: 20px;
    }
    
    .testimonial-section {
        padding: 30px 0 60px;
    }
    
    .testimonial-quote {
        font-size: clamp(18px, 5vw, 24px);
        padding: 0 10px;
    }
    
    .quote-icon-img {
        width: 40px;
    }
    
    .testimonial-attribution {
        font-size: 12px;
    }
    
    .cta-banner {
        padding: 60px 0;
    }
    
    .cta-title {
        font-size: clamp(24px, 6vw, 36px);
    }
    
    .cta-subtitle {
        font-size: 15px;
    }
    
    .cta-btn {
        padding: 16px 28px;
        font-size: 14px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: clamp(28px, 6vw, 40px);
    }
    
    .section-subtitle {
        font-size: 15px;
    }
}
