/**
 * Maverick Case Studies 2 Block - Vertical Tabs Design
 */

/* Block Container */
.maverick-case-studies-2 {
    background: #ffffff;
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.mcs2-header-section {
    text-align: left;
    margin-bottom: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 30px;
}

.mcs2-title {
    font-size: 20px;
    color: var(--tertiary);
    margin-bottom: 20px;
    margin-top: 0;
}

.mcs2-description {
    font-size: 38px;
    color: var(--primary);
    font-weight: 500;
    max-width: 800px;
    line-height: 1;
}

/* Interactive Wrapper */
.mcs2-interactive-wrapper {
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: 0;
    align-items: stretch;
}

/* Featured Image Section (Left) */
.mcs2-featured-image {
    position: relative;
}

.mcs2-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.mcs2-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Tabs Section (Right) */
.mcs2-tabs-section {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.mcs2-tabs-wrapper {
    display: flex;
    flex-direction: row;
    height: 500px;
    width: 100%;
}

/* Individual Tab */
.mcs2-tab {
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
    background: #f8f9fa;
    border-left: 3px solid var(--tertiary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 60px;
}

.mcs2-tab.active {
    background: #ffffff;
    border-left: 3px solid var(--primary);
    flex: 1 1 auto;
}

/* Tab Label Wrapper */
.mcs2-tab-label-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

/* Tab Label - Vertical writing mode for inactive tabs */
.mcs2-tab-label {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0;
    transition: all 0.4s ease;
    opacity: 0.6;
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.mcs2-tab.active .mcs2-tab-label {
    opacity: 0;
    visibility: hidden;
}

/* Tab Content - Only Visible When Active */
.mcs2-tab-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 0 30px 30px 30px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.mcs2-tab.active .mcs2-tab-content {
    opacity: 1;
    visibility: visible;
    position: static;
}

.mcs2-tab.active .mcs2-tab-label-wrapper {
    position: static;
    height: auto;
    padding: 0;
}

/* Content Inner */
.mcs2-content-inner {
    position: relative;
}

/* Eyebrow Title */
.mcs2-eyebrow-title {
    font-size: 0.9rem;
    color: var(--tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

/* Content Title */
.mcs2-content-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 0 20px 0;
    text-align: left;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tab Excerpt with Left Accent */
.mcs2-tab-excerpt {
    font-size: 0.95rem;
    color: var(--primary);
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.8;
    position: relative;
    padding-left: 20px;
}

.mcs2-tab-excerpt::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--secondary);
}

/* Read More Link */
.mcs2-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 300;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.mcs2-read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.mcs2-read-more:hover {
    color: var(--tertiary);
}

.mcs2-read-more:hover i {
    transform: translateX(5px);
}

/* No Content State */
.mcs2-no-content {
    text-align: center;
    padding: 80px 20px;
    color: var(--primary);
    opacity: 0.6;
}

/* AOS Enabled Styling */
.maverick-case-studies-2.aos-enabled {
    /* Add any special styling for AOS enabled blocks */
}

/* Tablet Styles */
@media (max-width: 1199px) {
    .mcs2-interactive-wrapper {
        gap: 0;
    }

    .mcs2-image-container {
        height: 400px;
    }

    .mcs2-tabs-wrapper {
        height: 400px;
    }

    .mcs2-content-title {
        font-size: 1.5rem;
    }
}


/* Mobile Styles */
@media (max-width: 991px) {
    .maverick-case-studies-2 {
        padding: 60px 20px;
    }

    .mcs2-header-section {
        margin-bottom: 40px;
        text-align: center;
        padding: 0 20px;
    }

    .mcs2-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .mcs2-description {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .mcs2-interactive-wrapper {
        display: block;
        min-height: auto;
    }

    .mcs2-featured-image {
        margin-bottom: 30px;
    }

    .mcs2-image-container {
        height: 250px;
        overflow: hidden;
    }

    .mcs2-tabs-section {
        display: block;
    }

    .mcs2-tabs-wrapper {
        display: block;
        height: auto;
    }

    .mcs2-tab {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        margin-bottom: 15px;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        flex: none;
        height: auto;
        min-height: auto;
        border-left: 1px solid #e5e7eb;
        flex-direction: column;
        justify-content: flex-start;
        overflow: visible;
    }

    .mcs2-tab:hover {
        border-color: var(--tertiary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .mcs2-tab.active {
        border-color: var(--primary);
        background: #ffffff;
        border-left: 1px solid var(--primary);
        flex: none;
        height: auto;
        min-height: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .mcs2-tab-label-wrapper {
        padding: 20px;
        height: auto;
        align-items: center;
        justify-content: flex-start;
    }

    .mcs2-tab-label {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        transform: none;
        font-size: 1.1rem;
        opacity: 1;
        text-align: left;
        font-weight: 600;
        color: var(--primary);
    }

    .mcs2-tab.active .mcs2-tab-label {
        opacity: 0;
        visibility: hidden;
        position: absolute;
    }

    .mcs2-tab.active .mcs2-tab-label-wrapper {
        padding: 0;
        height: 0;
        overflow: hidden;
    }

    .mcs2-tab-content {
        padding: 20px;
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease;
    }

    .mcs2-tab.active .mcs2-tab-content {
        opacity: 1;
        visibility: visible;
        max-height: 1000px;
        padding: 20px;
    }

    .mcs2-eyebrow-title {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .mcs2-content-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .mcs2-tab-excerpt {
        font-size: 0.9rem;
        margin-bottom: 20px;
        padding-left: 0;
        position: relative;
    }

    .mcs2-tab-excerpt::before {
        display: none;
    }

    .mcs2-read-more {
        font-size: 0.85rem;
        font-weight: 600;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .maverick-case-studies-2 {
        padding: 40px 15px;
    }

    .mcs2-header-section {
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .mcs2-title {
        font-size: 1rem;
    }

    .mcs2-description {
        font-size: 1.5rem;
    }

    .mcs2-featured-image {
        margin-bottom: 25px;
    }

    .mcs2-image-container {
        height: 200px;
    }

    .mcs2-tab {
        margin-bottom: 12px;
    }

    .mcs2-tab-label-wrapper {
        padding: 15px;
    }

    .mcs2-tab-label {
        font-size: 1rem;
    }

    .mcs2-tab-content {
        padding: 15px;
    }

    .mcs2-tab.active .mcs2-tab-content {
        padding: 15px;
    }

    .mcs2-eyebrow-title {
        font-size: 0.75rem;
    }

    .mcs2-content-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .mcs2-tab-excerpt {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .mcs2-read-more {
        font-size: 0.8rem;
    }
}