/* ===================================
   Skills Section Tabs - Adlegio About Page

   Pattern: Horizontal tab navigation with content panels
   Source: law_firm_case.css (adapted for Adlegio branding)

   Components:
   - .skills-tabs: Tab navigation container
   - .tab-button: Individual tab buttons with icons
   - .tab-panel: Content panels (hidden by default)
   - .tab-panel-wrapper: Background image container
   - .tab-panel-grid: Two-column layout (text + feature)

   Responsive Breakpoints:
   - Desktop (>992px): Horizontal tabs with text
   - Tablet (768-992px): Icon-only tabs, single column content
   - Mobile (<768px): Stacked vertical tabs

   =================================== */

/* ----- SKILLS SECTION ----- */
.skills-section {
    padding: var(--space-6) 0;
    background-color: var(--color-bg-primary);
}

.skills-section .section-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.skills-section .section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: var(--space-3) auto 0;
    line-height: 1.6;
}

/* ----- TAB NAVIGATION ----- */
.skills-tabs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
    padding: var(--space-2);
    background-color: var(--color-bg-secondary);
    border-radius: 12px;
    flex-wrap: wrap;
}

.tab-button {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    background-color: transparent;
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    white-space: nowrap;
}

.tab-button i {
    display: none;
}

.tab-button:hover {
    color: var(--color-primary);
    background-color: rgba(33, 150, 243, 0.1);
}

.tab-button.active {
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--color-primary);
}

/* ----- TAB CONTENT ----- */
.skills-tab-content {
    position: relative;
    min-height: 500px;
}

.tab-panel {
    display: none;
    opacity: 0;
}

.tab-panel.active {
    display: block;
    opacity: 1;
    animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Panel Wrapper (no background image) */
.tab-panel-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(
        to right,
        var(--color-bg-secondary) 0%,
        var(--color-surface) 100%
    );
}

.tab-panel-overlay {
    display: none;
}

/* ----- TAB PANEL GRID LAYOUT ----- */
.tab-panel-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-6);
    align-items: start;
    padding: var(--space-6);
    z-index: 2;
}

.tab-panel-text {
    padding-right: var(--space-4);
}

.tab-panel-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.tab-panel-title i {
    font-size: 2rem;
    color: var(--color-primary);
}

.tab-panel-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: var(--space-5);
}

.tab-panel-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

.tab-panel-list li {
    position: relative;
    padding-left: var(--space-5);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-base);
    line-height: 1.6;
}

.tab-panel-list li i.fa-check-circle {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* ----- FEATURE BOX ----- */
.tab-panel-feature {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    padding: var(--space-5);
    border: none;
    min-height: 300px;
    transition: all var(--transition-base);
    overflow: hidden;
}

.tab-panel-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 17, 23, 0.3) 0%,
        rgba(26, 31, 46, 0.2) 100%
    );
    z-index: 1;
    transition: opacity var(--transition-base);
}

.tab-panel-feature:hover {
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.2);
    transform: translateY(-5px);
}

.tab-panel-feature:hover::before {
    opacity: 0;
}

.feature-icon,
.feature-title,
.feature-text {
    display: none;
}

/* ===================================
   RESPONSIVE DESIGN - TABLET
   =================================== */
@media (max-width: 992px) {
    .skills-tabs {
        max-width: 100%;
    }

    .tab-panel-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .tab-panel-text {
        padding-right: 0;
    }

    .tab-panel-feature {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */
@media (max-width: 768px) {
    .skills-section {
        padding: var(--space-5) 0;
    }

    /* Tab Wrapper with Scroll Indicators */
    .skills-tabs-wrapper {
        position: relative;
        margin-bottom: var(--space-3);
    }

    .skills-tabs {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        padding: var(--space-2) var(--space-3);
    }

    /* Hide scrollbar for Webkit browsers */
    .skills-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Scroll Fade Indicators */
    .scroll-fade-left,
    .scroll-fade-right {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 60px;
        pointer-events: none;
        z-index: 10;
        transition: opacity 0.3s ease;
    }

    .scroll-fade-left {
        left: 0;
        background: linear-gradient(to right, var(--color-bg-secondary) 0%, transparent 100%);
        opacity: 0;
    }

    .scroll-fade-right {
        right: 0;
        background: linear-gradient(to left, var(--color-bg-secondary) 0%, transparent 100%);
        opacity: 1;
    }

    .scroll-fade-left.visible {
        opacity: 1;
    }

    .scroll-fade-right.visible {
        opacity: 1;
    }

    .tab-button {
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Tab Panels - Vertical Scrolling */
    .tab-panel-grid {
        padding: var(--space-4);
        gap: var(--space-4);
        max-height: 600px;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-panel-grid::-webkit-scrollbar {
        display: none;
    }

    .tab-panel-title {
        font-size: var(--text-xl);
    }

    .tab-panel-description {
        font-size: var(--text-base);
    }

    .tab-panel-feature {
        min-height: 200px;
        aspect-ratio: 16 / 9;
        max-height: 250px;
        width: 100%;
        max-width: 100%;
    }

    /* Remove shadow overlay on mobile */
    .tab-panel-feature::before {
        display: none;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .skills-section .section-title {
        font-size: var(--text-2xl);
    }

    .skills-section .section-subtitle {
        font-size: var(--text-base);
    }

    .tab-panel-grid {
        padding: var(--space-3);
    }

    .tab-button {
        font-size: var(--text-sm);
        padding: var(--space-2) var(--space-3);
    }
}
