/* Fitches Block Styles */

.fitches-block {
    background: #000;
    position: relative;
    padding: 80px 0;
    width: 100vw;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
}

.fitches-block .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Text Content */
.fitches-block .text-content {
    text-align: center;
    margin: 0 auto 60px auto;
    max-width: 900px;
}

.fitches-block .title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #ffffff;
}


/* Panel Section */
.fitches-block .panel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.fitches-block .panel-container {
    position: relative;
    margin-bottom: 40px;
}

.fitches-block .panel-image {
    position: relative;
    display: inline-block;
}

.fitches-block .panel-img {
    max-width: 330px;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

/* Video Container */
.fitches-block .fitches-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.fitches-block .panel-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 45%;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.fitches-block .panel-video.active {
    opacity: 1;
}

/* Function Buttons Container */
.fitches-block .function-buttons-container {
    background: #e8e8e8;
    border-radius: 20px;
    padding: 8px;
    display: inline-block;
    margin-top: 20px;
}

.fitches-block .function-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.fitches-block .function-button {
    background: transparent;
    color: #666666;
    border: none;
    border-radius: 20px;
    padding: 14px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 160px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    opacity: 0.4;
    margin: -8px -8px;
}

.fitches-block .function-button:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.9;
}

.fitches-block .function-button.active {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
    margin: -8px -8px;
    padding: 14px 14px;
    opacity: 1 !important;
}

.fitches-block .button-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fitches-block .button-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.7);
}

.fitches-block .function-button.active .button-icon img {
    filter: brightness(0);
}

.fitches-block .button-text {
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    line-height: 24px;
    color: inherit;
}

/* Description Content */
.fitches-block .description-content {
    text-align: center;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.fitches-block .description-content p {
    font-size: 20px;
    line-height: 24px;
    color: #ffffff;
    margin: 0;
}

.fitches-block .description-content strong {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
        .fitches-block .title {
    font-size: 22px;}
    .fitches-block {
        padding: 60px 0;
    }
    
    .fitches-block .panel-img {
        max-width: 230px;
    }
    
    .fitches-block .function-buttons {
        gap: 6px;
    }
    
    .fitches-block .function-button {
        min-width: 100px;
        padding: 12px 10px;
        margin: -4px -4px;
        gap: 4px;
    }
    
    .fitches-block .function-button.active {
        margin: -4px -4px;
        padding: 12px 10px;
    }
    
    .fitches-block .button-icon {
        width: 24px;
        height: 24px;
    }
    
    .fitches-block .button-text {
        font-size: 13px;
        line-height: 16px;
    }
    
    .fitches-block .panel-video {
        width: 80%;
        height: 58%;
        margin-top: 29px;
    }
}

@media (max-width: 480px) {
    .fitches-block .title {
    font-size: 22px;}
    .fitches-block .container {
        padding: 0 15px;
    }
    
    
    .fitches-block .function-buttons-container {
        padding: 3px;
    }
    
    .fitches-block .function-buttons {
        gap: 4px;
    }
    
    .fitches-block .function-button {
        min-width: 85px;
        padding: 10px 8px;
        margin: -3px -3px;
        gap: 3px;
    }
    
    .fitches-block .function-button.active {
        margin: -3px -3px;
        padding: 10px 8px;
    }
    
    .fitches-block .button-icon {
        width: 20px;
        height: 20px;
    }
    
    .fitches-block .description-content p {
        font-size: 14px;
    }
    
    .fitches-block .button-text {
        font-size: 11px;
        line-height: 14px;
    }
    
    .fitches-block .panel-video {
        width: 80%;
        height: 58%;
        margin-top: 29px;
    }
}

/* Animation Classes */
.fitches-block .function-button {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fitches-block .function-button:nth-child(1) { animation-delay: 0.1s; }
.fitches-block .function-button:nth-child(2) { animation-delay: 0.2s; }
.fitches-block .function-button:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 0.4;
        transform: translateY(0);
    }
}

/* Video Loading State */
.fitches-block .panel-video {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fine-tune video positioning for different panel sizes */
@media (min-width: 1200px) {
    .fitches-block .panel-video {
        width: 80%;
        height: 58%;
        margin-top: 29px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .fitches-block .panel-video {
        width: 70%;
        height: 43%;
    }
}

.fitches-block .panel-video::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #fff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

.fitches-block .panel-video.loading::before {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Focus States for Accessibility */
.fitches-block .function-button:focus {
    outline: none;
}

/* Remove blue flash on click */
.fitches-block .function-button:active {
    background: inherit;
    color: inherit;
    transform: none;
}

.fitches-block .function-button.active:active {
    background: #ffffff;
    color: #000000;
}

/* Additional styling to match the mockup exactly */
.fitches-block .function-button {
    font-weight: 400;
    letter-spacing: 0.2px;
    max-width: 200px;
}

.fitches-block .function-button.active {
    font-weight: 500;
}

/* Ensure proper spacing and alignment */
.fitches-block .function-buttons-container {
    box-shadow: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .fitches-block .function-button {
        border: 2px solid var(--button-text);
    }
    
    .fitches-block .function-button.active {
        border-color: var(--accent-color);
    }
}