/* 
===============================================================================
APCA Tabs Section Styles
===============================================================================
*/

.apca-tabs-section {
    width: 100%;
    background: #f5f5f5;
    position: relative;
}

/* Textured Background Variant - Enhanced */
.apca-tabs-section.textured-bg {
    background-color: #ffffff;
}

.apca-tabs-section.textured-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/background/texture-2.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.apca-tabs-section.textured-bg .apca-tabs-container {
    position: relative;
    z-index: 1;
}

.apca-tabs-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Tabs Navigation - Enhanced */
.apca-tabs-nav {
    display: flex;
    width: 100%;
    background: #f8f8f8;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.apca-tabs-nav::-webkit-scrollbar {
    height: 3px;
}

.apca-tabs-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.apca-tabs-nav::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.apca-tab-button {
    flex: 1;
    min-width: max-content;
    padding: clamp(18px, 2.2vw, 28px) clamp(24px, 3.5vw, 48px);
    font-family: 'Cabrito Sans', sans-serif;
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 500;
    color: #4A4A4A;
    background: #f0f0f0;
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.apca-tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #CD0529;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apca-tab-button:last-child {
    border-right: none;
}

.apca-tab-button:hover {
    background: #e0e0e0;
    color: #1C1C1C;
    transform: translateY(-1px);
}

.apca-tab-button.active {
    background: #000000;
    color: #ffffff;
    font-weight: 600;
}

.apca-tab-button.active::after {
    transform: scaleX(1);
}

.apca-tab-button:focus {
    outline: 2px solid #CD0529;
    outline-offset: -2px;
}

/* Tabs Content Wrapper */
.apca-tabs-content-wrapper {
    position: relative;
    width: 100%;
}

/* Tab Panel - Enhanced transitions */
.apca-tab-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.apca-tab-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: 1;
    animation: fadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left: Image - Enhanced */
.apca-tab-image {
    width: 100%;
    height: 100%;
    min-height: 650px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.apca-tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    animation: imageReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

@keyframes imageReveal {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Right: Content */
.apca-tab-content {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: clamp(40px, 6vw, 80px);
}

.apca-tab-content-inner {
    max-width: 700px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.apca-tab-certificate-badge {
    position: absolute;
    top: clamp(-18px, -1vw, 0px);
    right: clamp(-32px, -1.5vw, -8px);
    z-index: 1;
    pointer-events: none;
    order: 10;
}

.apca-tab-certificate-badge img {
    display: block;
    width: clamp(180px, 22vw, 280px);
    max-width: 50%;
    height: auto;
    object-fit: contain;
}

/* Number */
.apca-tab-number {
    font-family: 'Coolvetica Rg', sans-serif;
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 400;
    color: rgba(28, 28, 28, 0.08);
    line-height: 1;
    display: block;
    margin-bottom: clamp(16px, 2vw, 24px);
}

/* Title - Enhanced */
.apca-tab-title {
    font-family: 'Nimbus Sans Extd', sans-serif;
    font-weight: 900;
    font-size: clamp(26px, 3.8vw, 40px);
    color: #000000;
    line-height: 1.15;
    margin: 0 0 clamp(24px, 3.5vw, 36px) 0;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

/* Description - Enhanced */
.apca-tab-description {
    font-family: 'Cabrito Sans', sans-serif;
    font-size: clamp(16px, 1.85vw, 19px);
    font-weight: 400;
    color: #2C2C2C;
    line-height: 1.65;
    margin: 0 0 clamp(28px, 3.5vw, 36px) 0;
}

/* Bullets - Enhanced red dots */
.apca-tab-bullets {
    list-style: none;
    margin: 0 0 clamp(28px, 3.5vw, 36px) 0;
    padding: 0;
}

.apca-tab-bullet-item {
    position: relative;
    padding-left: 32px;
    font-family: 'Cabrito Sans', sans-serif;
    font-size: clamp(15px, 1.65vw, 18px);
    font-weight: 400;
    color: #2C2C2C;
    line-height: 1.65;
    margin-bottom: clamp(18px, 2.5vw, 24px);
}

.apca-tab-bullet-item:last-child {
    margin-bottom: 0;
}

.apca-tab-bullet-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 10px;
    height: 10px;
    background: #CD0529;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(205, 5, 41, 0.15);
}

.apca-tab-bullet-item strong {
    font-weight: 700;
    color: #000000;
}

/* Footer - Enhanced */
.apca-tab-footer {
    font-family: 'Cabrito Sans', sans-serif;
    font-size: clamp(13px, 1.45vw, 16px);
    font-weight: 400;
    color: rgba(28, 28, 28, 0.55);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    padding-top: clamp(8px, 1vw, 12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .apca-tab-panel.active {
        grid-template-columns: 1fr;
    }

    .apca-tab-image {
        min-height: 400px;
    }

    .apca-tab-content {
        padding: clamp(32px, 5vw, 40px);
    }

    .apca-tab-certificate-badge img {
        width: clamp(120px, 16vw, 190px);
        max-width: 30%;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .apca-tabs-nav {
        overflow-x: auto;
    }

    .apca-tab-button {
        flex: 0 0 auto;
        min-width: 200px;
    }

    .apca-tab-image {
        min-height: 300px;
    }

    .apca-tab-content {
        padding: clamp(24px, 4vw, 32px);
    }

    .apca-tab-certificate-badge {
        position: static;
        align-self: flex-end;
        margin-top: 20px;
        margin-left: auto;
    }

    .apca-tab-certificate-badge img {
        width: clamp(96px, 26vw, 140px);
        max-width: none;
    }

    .apca-tab-number {
        margin-bottom: 12px;
    }

    .apca-tab-title {
        margin-bottom: 16px;
    }

    .apca-tab-description {
        margin-bottom: 20px;
    }

    .apca-tab-bullets {
        margin-bottom: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .apca-tab-button {
        min-width: 180px;
        padding: 14px 16px;
        font-size: 13px;
    }

    .apca-tab-image {
        min-height: 250px;
    }

    .apca-tab-certificate-badge img {
        width: 96px;
    }
}
