/**
 * Case Study Stylesheet
 * Electres Child Theme
 */

/* ==========================================================================
   Base & Resets for Case Study Page
   ========================================================================== */
.electres-case-study-page {
    font-family: inherit;
    color: #141211;
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.5;
}

.electres-case-study-page * {
    box-sizing: border-box;
}

/* 1440px Container for Every Case Study Section */
.cs-hero-section .mg-container,
.cs-snapshot-section .mg-container,
.cs-overview-section .mg-container,
.cs-challenge-section .mg-container,
.cs-solution-section .mg-container,
.cs-gallery-section .mg-container,
.cs-results-section .mg-container,
.cs-similar-section .mg-container,
.cs-cta-section .mg-container,
.electres-case-study-page .mg-container {
    max-width: 1440px;
    width: 100%;
    margin-inline: auto;
    padding-inline: 40px;
}

@media (max-width: 768px) {

    .cs-hero-section .mg-container,
    .cs-snapshot-section .mg-container,
    .cs-overview-section .mg-container,
    .cs-challenge-section .mg-container,
    .cs-solution-section .mg-container,
    .cs-gallery-section .mg-container,
    .cs-results-section .mg-container,
    .cs-similar-section .mg-container,
    .cs-cta-section .mg-container,
    .electres-case-study-page .mg-container {
        padding-inline: 20px;
    }
}

/* Common Section Heading */
.cs-section-heading {
    color: #141211;
    margin: 0 0 clamp(24px, 3vw, 36px) 0;
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 500;
    line-height: 120%;
}

/* ==========================================================================
   1. Hero Section
   ========================================================================== */
.cs-hero-section {
    background-color: #ffffff;
    padding: clamp(110px, 10vw, 160px) 0 clamp(60px, 10vw, 80px) 0;
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    gap: clamp(32px, 8vw, 64px);
    align-items: center;
}

.cs-hero-content {
    display: flex;
    flex-direction: column;
}

.cs-hero-title {
    font-size: clamp(22px, 3.6vw, 36px);
    color: #141211;
    margin: 0 0 20px 0;
    font-weight: 500;
    line-height: 120%;
}

.cs-hero-desc {
    font-size: clamp(16px, 2.15vw, 18px);
    color: #666;
    margin: 0 0 32px 0;
    max-width: 580px;
    font-weight: 400;
    line-height: 150%;
}

.cs-hero-tag-wrap {
    display: flex;
    align-items: center;
}

.cs-hero-tag-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    text-decoration: none;
    transition: all 0.25s ease;
    background-color: transparent;
    border-radius: 48px;
    border: 1px solid #e21e31;
    background: #fff;
    color: #E21E31;
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    height: 42px;
}

.cs-hero-tag-pill:hover {
    background-color: #e21e31;
    color: #ffffff;
}

.cs-hero-media {
    width: 100%;
}

.cs-hero-media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16 / 14;
}

.cs-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-hero-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: #f3f4f6;
}

.cs-hero-badge-pill {
    position: absolute;
    bottom: 20px;
    left: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 18px;
    border-radius: 6px;
    background: #FFF;
    color: #141211;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

/* ==========================================================================
   2. Project Snapshot Section (Dark)
   ========================================================================== */
.cs-snapshot-section {
    scroll-margin-top: 100px;
    background-color: #111215;
    padding: clamp(60px, 10.5vw, 80px) 0;
    color: #ffffff;
}

.cs-snapshot-title {
    color: #fff;
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 500;
    line-height: 120%;
    margin: 0 0 clamp(28px, 3.5vw, 40px) 0;
}

.cs-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(24px, 3vw, 36px) 16px;
}

.cs-snapshot-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-snapshot-label {
    color: #7D7D7D;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.cs-snapshot-value {
    color: #fff;
    font-size: clamp(16px, 2.2vw, 20px);
    font-weight: 600;
    line-height: 120%;
}

/* ==========================================================================
   3. Project Overview Section
   ========================================================================== */
.cs-overview-section {
    background-color: #ffffff;
    padding: clamp(52px, 6vw, 80px) 0;
}

.cs-overview-grid {
    display: grid;
    grid-template-columns: clamp(220px, 24vw, 340px) 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: flex-start;
}

.cs-overview-title {
    font-size: clamp(24px, 2.6vw, 32px);
    color: #141211;
    margin: 0;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
}

.cs-overview-text {
    color: #666;
    font-size: clamp(16px, 1.2vw, 18px);
    font-weight: 400;
    line-height: 150%;
}

.cs-overview-text p {
    margin: 0 0 16px 0;
}

.cs-overview-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   4, 5, 7. Feature Cards Grid (Challenge, Solution, Results)
   ========================================================================== */
.cs-challenge-section,
.cs-solution-section,
.cs-results-section {
    background-color: #F4F4F4;
    padding: clamp(60px, 6vw, 80px) 0;
}

.cs-feature-card.cs-solution-card {
    background: #F4F4F4;
}

.cs-solution-section {
    background-color: #ffffff;
}

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

.cs-feature-card {
    padding: clamp(24px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 12px;
    background: #fff;
}



.cs-card-icon-wrap {
    width: 40px;
    height: 40px;
    aspect-ratio: 1/1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}




.cs-card-icon-wrap svg {
    width: 100%;
    height: 100%;
}


.cs-card-custom-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cs-card-title {
    margin: 0 0 12px 0;
    color: #141211;
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 600;
    line-height: 120%;
}

.cs-card-desc {
    color: #666;
    font-size: clamp(14px, 2.1vw, 16px);
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

/* ==========================================================================
   6. Installation Photos Gallery
   ========================================================================== */
.cs-gallery-section {
    background-color: #ffffff;
    padding: clamp(40px, 8vw, 56px) 0 clamp(60px, 10vw, 80px);
}

.cs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cs-gallery-item {
    overflow: hidden;
    border-radius: 12px;
    background: #898989;
    aspect-ratio: 16 / 10.5;
}

.cs-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cs-gallery-item:hover .cs-gallery-img {
    transform: scale(1.025);
}

.cs-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.cs-gallery-ph-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

/* ==========================================================================
   7. Results Disclaimer Card
   ========================================================================== */
.cs-disclaimer-card {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    border-radius: 12px;
    background: #fff;
}

.cs-disclaimer-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-disclaimer-text p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
}

.cs-disclaimer-icon svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   8. Explore Similar Projects
   ========================================================================== */
.cs-similar-section {
    background-color: #ffffff;
    padding: clamp(60px, 7vw, 80px) 0;
    overflow: hidden;
}

.cs-similar-heading {
    font-size: clamp(24px, 2.8vw, 36px);
    color: #141211;
    text-align: center;
    margin: 0 0 clamp(32px, 4vw, 40px) 0;
    font-weight: 500;
    line-height: 120%;
}

.cs-similar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 1040px;
    margin: 0 auto;
}

.cs-project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 12px;
    background: #F4F4F4;
    overflow: hidden;
}

.cs-project-card.swiper-slide {
    padding-right: 0;
}

.cs-project-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f3f4f6;
}

.cs-project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.cs-project-card:hover .cs-project-img {
    transform: scale(1.03);
}

.cs-project-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #20222a 0%, #0d0e12 100%);
    position: relative;
}

.cs-project-ph-pattern {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(226, 30, 49, 0.5) 0%, transparent 60%);
}

.cs-project-body {
    padding: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-grow: 1;
}

.cs-project-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
}

.cs-project-tag {
    border: 1px solid #EEE;
    background: #FFF;

    padding: 2px 6px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--Black, #000);
    font-family: "Google Sans";
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    display: inline-flex;
    width: max-content;
}

.cs-project-meta {
    color: var(--Black, #000);
    font-family: "Google Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.cs-project-title {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.cs-project-desc {

    color: #666;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.cs-project-btn-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e21e31;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.cs-project-card:hover .cs-project-btn-arrow {
    transform: scale(1.1);
    background-color: #c81829;
}

/* ==========================================================================
   9. Bottom CTA Section
   ========================================================================== */
.cs-cta-section {
    background-color: #ffffff;
    padding: 0 0 clamp(60px, 6vw, 80px) 0;
}

.cs-cta-card {
    position: relative;
    border-radius: 12px;
    background: #010101;
    padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 40px);
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    max-width: 1180px;
    width: 100%;
    margin-inline: auto;
    aspect-ratio: 1180 / 475;
    min-height: 350px;
}

.case-cta-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.case-cta-media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.case-cta-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}

.cs-cta-overlay-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 75% 65% at 50% 120%, rgba(226, 30, 49, 0.42) 0%, rgba(226, 30, 49, 0.12) 45%, rgba(11, 12, 15, 0) 100%);
}

.cs-cta-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
}

.cs-cta-title {
    font-size: clamp(24px, 3.25vw, 40px);
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 14px 0;
    line-height: 120%;
}

.cs-cta-desc {
    color: #fff;
    text-align: center;
    font-size: clamp(16px, 1.6vw, 18px);
    font-weight: 400;
    line-height: 150%;
    margin-bottom: 24px;
}

.cs-cta-btn-wrap {
    display: flex;
    justify-content: center;
}


/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .cs-hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .cs-snapshot-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px 16px;
    }

    .cs-overview-grid {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }
}

/* Small Tablet (max-width: 860px) */
@media (max-width: 860px) {
    .cs-snapshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        row-gap: 24px;
    }

    .cs-overview-grid {
        grid-template-columns: 1fr;

    }

    .cs-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (max-width: 680px) */
@media (max-width: 680px) {
    .cs-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cs-hero-content {
        order: 1;
    }

    .cs-hero-media {
        order: 2;
    }

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


    .cs-disclaimer-card {
        flex-direction: row;
        padding: 14px 18px;
        align-items: flex-start;
    }

    .cs-disclaimer-icon svg {
        width: 18px;
        height: 18px;
    }

    .cs-cta-btn {
        width: 100%;
        justify-content: center;
    }

    .cs-similar-heading {
        text-align: left;
    }
}

/* Similar Projects Responsive Swiper Slider (max-width: 768px) */
@media (max-width: 768px) {


    .cs-similar-heading {
        text-align: left;
        margin: 0 0 20px 0;
    }

    .cs-similar-swiper {
        width: 100%;
        overflow: visible;
        padding-bottom: 8px;
    }

    .cs-similar-grid.swiper-wrapper,
    .cs-similar-swiper .cs-similar-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: content-box;
    }

    .cs-project-card.swiper-slide {
        height: auto;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .cs-project-body {
        padding: 16px;
        gap: 12px;
    }



    .cs-project-btn-arrow {
        width: 32px;
        height: 32px;
    }
}