/* Main Wrapper */
.cstudy-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
    /* Inherit font from Elementor/Theme */
}

.cstudy-main-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    /* BACKGROUND REMOVED FOR SPLIT LAYOUT */
    background-color: transparent;
    padding: 0;
    overflow: visible;
    /* Allow shadow/content to breathe if needed */
}

/* --- LEFT COLUMN: SLIDES --- */
.cstudy-slides-column {
    flex: 1;
    position: relative;
    background-color: #EDE8E1;
    /* Bg moved here */
    border-radius: 20px;
    padding: 20px;
    /* overflow: hidden; For slider masking */
}

.cstudy-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.cstudy-slide.cstudy-active {
    display: flex;
    /* Flex to separate content and phone image */
    opacity: 1;
    flex-wrap: wrap;
    align-items: center;
}

.cstudy-slide-content {
    flex: 1;
    padding: 20px 40px;
    min-width: 300px;
}

/* Badge */
.cstudy-badge {
    display: inline-block;
    background-color: #FF4D00;
    /* Orange */
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Typography */
.cstudy-title {
    font-size: 42px;
    font-weight: 700;
    color: #2b1f1f;
    /* Dark brown */
    margin-bottom: 10px;
    line-height: 1.2;
}

.cstudy-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.cstudy-divider {
    border: 0;
    border-top: 1px solid #ccc;
    /* Light grey line */
    margin: 20px 0;
    width: 60%;
}

/* Stats */
.cstudy-stats-area {
    margin-bottom: 30px;
}

.cstudy-stat-heading {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2b1f1f;
}

.cstudy-stats-grid {
    display: flex;
    gap: 40px;
}

.cstudy-stat-box {
    display: flex;
    flex-direction: column;
}

.cstudy-stat-val {
    font-size: 24px;
    font-weight: bold;
    color: #2b1f1f;
}

.cstudy-stat-lbl {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Preview Button (Eye) */
.cstudy-preview-btn {
    background-color: #2B1F1F;
    /* Dark brown */
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.cstudy-preview-btn:hover {
    background-color: #443333;
}

.cstudy-eye-icon {
    font-size: 18px;
}

/* Slide Image (Phone) */
.cstudy-slide-image-wrapper {
    flex: 0 0 40%;
    text-align: center;
    position: relative;
}

.cstudy-slide-image-wrapper img {
    max-width: 100%;
    height: auto;
    /* Optional: Slight rotation or positioning to match design */
}


/* --- RIGHT COLUMN: TABS --- */
.cstudy-tabs-column {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.cstudy-tab {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    /* Fixed height for clean grid */
}

.cstudy-tab:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.cstudy-tab.cstudy-active {
    background-color: #ede8e1;
    border-color: #bfaea6;
    /* Slightly darker border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cstudy-tab img.cstudy-tab-logo {
    max-height: 40px;
    max-width: 100%;
    object-fit: contain;
}


/* --- MOBILE NAV (Hidden on Desktop) --- */
.cstudy-mobile-nav {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.cstudy-nav-btn {
    background: #2b1f1f !important;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    padding: 6px !important;
    line-height: 1em !important;
}

.cstudy-dots {
    display: flex;
    gap: 8px;
}

.cstudy-dot {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    display: block;
    cursor: pointer;
}

.cstudy-dot.active {
    background: #2b1f1f;
}

.schedule-btn{
    padding: 14px 25px 14px 25px;
    line-height: 1.2em;
}


/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 800px) {
    .cstudy-main-container {
        flex-direction: column;
    }

    .cstudy-tabs-column {
        display: none;
        /* Hide Logo Tabs on Mobile */
    }

    .cstudy-mobile-nav {
        display: flex;
        /* Show Arrows on Mobile */
    }

    .cstudy-slide.cstudy-active {
        flex-direction: column-reverse;
        /* Phone on top/bottom logic - Design shows phone in middle */
        text-align: center;
    }

    .cstudy-slide-content {
        padding: 20px 6px;
    }

    .cstudy-stats-grid {
        justify-content: center;
    }

    .cstudy-divider {
        width: 100%;
    }

    .cstudy-slide-image-wrapper {
        margin-bottom: 20px;
    }
}


/* --- POPUP --- */
.cstudy-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cstudy-popup-content {
    background: #0D0D0D;
    width: 95dvw;
    max-width: 1200px;
    height: 90vh;
    /* Fixed height for modal feel */
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Enable vertical scrolling for the whole modal */
    padding: 40px;
    border: 1px solid #333;
        margin-inline: auto;
}

/* Custom Scrollbar */
.cstudy-popup-content::-webkit-scrollbar {
    width: 8px;
}

.cstudy-popup-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.cstudy-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #5c0120 !important;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    padding: 1px !important;
    height: 28px !important;
    width: 28px !important;
}

.cstudy-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 20px;
}

/* LEFT COLUMN */
.cstudy-popup-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cstudy-popup-logo img {
    height: 40px;
    object-fit: contain;
}

.cstudy-popup-heading {
    font-size: 32px;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.cstudy-popup-desc {
    color: #aaa;
    font-size: 16px;
    line-height: 1.6;
}

.cstudy-popup-actions {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.cstudy-next-case-btn {
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #555;
    line-height: 1;
    /* Default border matching PHP default */
}


/* RIGHT COLUMN (Image + Stats) */
.cstudy-popup-right-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.cstudy-popup-image-area img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.cstudy-popup-stats-area {
    background: #00000042;
    border-radius: 12px;
    padding: 20px;
}

.cstudy-stat-heading {
    color: #fff;
    margin-top: 10px;
    margin-bottom: 12px;
    font-size: 24px;
}

.cstudy-stats-row {
    display: flex;
    gap: 60px;
}

.cstudy-stat-item {
    display: flex;
    flex-direction: column;
}

.cstudy-stat-val {
    font-size: 36px;
    color: #FF4D00;
    /* Match brand color */
    font-weight: 700;
}

.cstudy-stat-lbl {
    color: #aaa;
    font-size: 14px;
    margin-top: 5px;
}


/* TESTIMONIAL BLOCK */
.cstudy-testimonial-block {
    margin-top: 20px;
    padding: 20px;
    background: #00000042;
    border-radius: 12px;
}

.cstudy-tm-heading {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cstudy-tm-quote {
    color: #ccc;
    font-size: 15px;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 12px;
}

.cstudy-tm-author-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cstudy-tm-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.cstudy-tm-meta {
    display: flex;
    flex-direction: column;
}

.cstudy-tm-name {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.cstudy-tm-role {
    color: #888;
    font-size: 13px;
}


/* Popup Responsive */
@media (max-width: 900px) {
    .cstudy-popup-content {
        height: 90vh;
        overflow-y: auto;
        padding: 20px;
        /* Reduced padding */
    }

    .cstudy-popup-grid {
        display: flex;
        /* Force flex */
        flex-direction: column;
        /* Stack vertically */
        gap: 40px;
        margin-top: 10px;
    }

    .cstudy-popup-right,
    .cstudy-popup-right-col {
        width: 100%;
        height: auto;
        order: -1;
        /* Image on top */
        flex: none;
    }

    .cstudy-popup-left {
        padding: 0;
        width: 100%;
        flex: none;
        overflow: visible;
        /* Let inner content flow */
    }

    .cstudy-popup-actions {
        flex-direction: column;
    }

    .cstudy-stats-row {
        gap: 20px;
        flex-wrap: wrap;
    }
}