/* Case Study Page Styles */

/* Base overrides */
body {
    background: #ffffff;
    color: #21333e;
    margin-top: -50px;
}

/* 1. HERO SECTION */
.cs-hero {
    width: 100%;
    aspect-ratio: 1920 / 800;
    background: url('https://res.cloudinary.com/dqfuozgjq/image/upload/v1773208514/images/case-study/bg.jpeg.png') no-repeat center center / contain;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cs-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #21333e;
    margin: 0;
    line-height: 1.3;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
    font-family: 'Forum', serif;
}

.font-italic {
    font-style: italic;
    font-family: 'Forum', serif;
}

.hero-inspiration {
    margin-top: 25px;
    position: relative;
    display: inline-block;
    padding-left: 20px;
}

.inspiration-arrow {
    position: absolute;
    left: -20px;
    top: -25px;
}

.hero-inspiration p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 5px 0 0;
    text-align: center;
    color: #21333e;
}

/* 2. TABS SECTION */
.cs-tabs {
    padding: 30px 5%;
    position: relative;
    z-index: 10;
}

.tabs-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.tabs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 60px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.tab-item {
    font-size: 0.9rem;
    color: #94a3b8;
    padding-bottom: 25px;
    padding-top: 15px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-item.active {
    color: #21333e;
    font-weight: 600;
}

.tab-underline {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #000000;
    display: none;
}

.tab-item.active .tab-underline {
    display: block;
}

/* 3. CASE STUDY ITEM */
.cs-item {
    padding: 40px 0px 40px;
    background-color: #e9f1f4;
}

.cs-items-container {
    max-width: 1300px;
    margin: 0 auto;
}

.item-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background-color: #ffffff;
    border-radius: 30px;
    padding: 40px 60px;
    animation: fadeIn 0.5s ease forwards;
}

.item-grid.active {
    display: grid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-content h2 {
    font-family: 'Forum', serif;
    font-size: clamp(2rem, 3vw, 2.5rem);
    color: #21333e;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 400;
}

.item-content p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 90%;
    font-weight: 400;
    text-align: justify;
}

.item-image {
    width: 100%;
    position: relative;
    border-radius: 20px;
}

.item-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.item-image .image-placeholder img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 4. STATISTICS */
.cs-stats {
    padding: 60px 5%;
    background: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    padding-bottom: 20px;
}

.stat-box {
    position: relative;
}

.stat-box h4 {
    font-size: 1.2rem;
    color: #21333e;
    font-weight: 500;
    margin-bottom: 30px;
}

.stat-underline {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #000000;
}

.stat-box p {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 500;
    color: #21333e;
    margin-bottom: 0;
}

/* 5. COMPANIES */
.cs-companies {
    padding: 20px 5% 40px;
    text-align: center;
}

.companies-header h2 {
    font-family: 'Forum', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #21333e;
    margin-bottom: 80px;
    line-height: 1.2;
    font-weight: 400;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.company-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
}

.company-card:hover {
    box-shadow: none;
}

.company-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 70%, rgba(0, 0, 0, 0.4) 100%);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.company-card:hover .company-overlay {
    transform: translateY(0);
}

.company-overlay h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.company-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

/* Using distinct color gradients for placeholder images */
.company-img-placeholder,
.company-video {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

.company-img-placeholder.c-1 {
    background-image: url('https://res.cloudinary.com/dqfuozgjq/image/upload/v1773208508/images/case-study/aaru-mobility.png.png');
}

.company-img-placeholder.c-2 {
    background-image: url('../images/case-study/v2r.png');
}

.company-img-placeholder.c-3 {
    background-image: url('https://res.cloudinary.com/dqfuozgjq/image/upload/v1773208517/images/case-study/awt.png.png');
}

.company-img-placeholder.c-4 {
    background: linear-gradient(to bottom, #2b1f40 0%, #180928 100%);
}

.company-img-placeholder.c-5 {
    background-image: url('https://res.cloudinary.com/dqfuozgjq/image/upload/v1773208512/images/case-study/jfam.jpeg.jpg');
}

.company-img-placeholder.c-6 {
    background: linear-gradient(to bottom, #32253f 0%, #14081c 100%);
}

/* 6. FAQ SECTION */
.cs-faq {
    padding: 40px 5%;
    background: #ffffff;
}

.faq-header h2 {
    font-family: 'Forum', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #21333e;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
}

.faq-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-list {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.faq-item {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.faq-item.active {
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-item.active .faq-marker {
    background: #475569;
}

.faq-question p {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #21333e;
    margin: 0;
}

.faq-answer {
    display: none;
    padding-top: 15px;
    padding-left: 39px;
}

.faq-answer p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}

.faq-item.active .faq-caret {
    transform: rotate(90deg);
}

.faq-caret {
    font-size: 1.5rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.faq-answer-panel {
    flex: 0 0 600px;
    background: #ffffff;
    padding: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    align-self: center;
    min-height: 340px;
}

.faq-answer-panel p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    text-align: justify;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .item-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

    .faq-container {
        flex-direction: column;
    }

    .faq-item.active .faq-answer {
        display: block;
    }

    .faq-answer-panel {
        display: none;
    }
}

@media (min-width: 993px) {
    .faq-item.active .faq-answer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .cs-hero h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .companies-grid {
        grid-template-columns: 1fr;
    }

    .cs-tabs {
        padding: 20px 5%;
    }

    .tabs-list {
        gap: 20px;
        justify-content: center;
    }

    .company-card {
        aspect-ratio: 1;
    }
}