/* ============================================
   ABOUT PAGE - Сторінка "Про нас"
   ============================================ */

/* === HERO SECTION === */
.about-hero-section {
    width: 80%;
    max-width: 1400px;
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Video container with aspect ratio */
.about-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
    .about-video-container {
        padding-top: 56.25%; /* 16:9 aspect ratio */
    }
}

.about-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    /* Оптимізація для мобільних */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* === ТЕМНА ТЕМА === */
[data-theme="dark"] .about-hero-section {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* === МОБІЛЬНА АДАПТАЦІЯ === */
@media (max-width: 767px) {
    .about-hero-section {
        width: 90%;
        margin: 8px auto 0;
    }
}

/* === 2. IMAGE BLOCKS === */
.about-image-block {
    width: 100%;
    max-width: 100%;
    margin: var(--spacing-lg) auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image-block img {
    width: 100%;
    height: auto;
    display: block;
}

/* === 3. SECTION CONTENT === */
.about-triangle-section .section-content,
.about-mission-section .section-content,
.about-values-section .section-content {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* Спільні стилі для всіх заголовків секцій */
.about-mission-section .section-title,
.about-values-section .section-title,
.about-team-section .section-title {
    text-align: left;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

/* === 4. КОМАНДА ПРОФЕСІОНАЛІВ === */
.about-team-section .experts-subtitle {
    text-align: left;
    font-size: 1.1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xxl);
    max-width: 800px;
}

/* === ТЕМНА ТЕМА - ТЕКСТ === */
[data-theme="dark"] .about-mission-section .section-title,
[data-theme="dark"] .about-values-section .section-title,
[data-theme="dark"] .about-team-section .section-title {
    color: #ffffff;
}

[data-theme="dark"] .about-team-section .experts-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* === AUTO THEME - ТЕКСТ === */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .about-mission-section .section-title,
    [data-theme="auto"] .about-values-section .section-title,
    [data-theme="auto"] .about-team-section .section-title {
        color: #ffffff;
    }

    [data-theme="auto"] .about-team-section .experts-subtitle {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* === ПЛАНШЕТНА АДАПТАЦІЯ - ТЕКСТ === */
@media (min-width: 768px) and (max-width: 1024px) {
    .about-mission-section .section-title,
    .about-values-section .section-title,
    .about-team-section .section-title {
        font-size: 2rem;
    }
}

/* === ДЕСКТОПНА АДАПТАЦІЯ - ВІДСТУП === */
@media (min-width: 1025px) {
    .about-mission-section .section-title,
    .about-values-section .section-title,
    .about-team-section .section-title {
        margin-bottom: var(--spacing-xl);
    }
}

/* === МОБІЛЬНА АДАПТАЦІЯ - ТЕКСТ === */
@media (max-width: 767px) {
    .about-mission-section .section-title,
    .about-values-section .section-title,
    .about-team-section .section-title {
        font-size: 1.75rem;
    }

    .about-team-section .experts-subtitle {
        font-size: 1rem;
        font-family: 'Roboto', sans-serif;
    }

    .about-team-section .section-content {
        padding-bottom: 60px;
    }

    .about-triangle-section .section-content,
    .about-mission-section .section-content,
    .about-values-section .section-content {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }

    /* === 2-Й БЛОК: SVG на 100% розміру (ТІЛЬКИ для about-triangle-section) === */
    .about-triangle-section .about-image-block {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        display: block;
        min-height: 100%;
    }
    
    .about-triangle-section .theme-svg-wrapper {
        width: 100%;
        height: 100%;
        min-height: 100%;
        position: relative;
        display: block;
    }
    
    .about-triangle-section .theme-svg {
        width: 100%;
        height: 100%;
        min-height: 100%;
    }
    
    .about-triangle-section .theme-svg svg {
        width: 100%;
        height: 100%;
        min-height: 100%;
        display: block;
        object-fit: contain;
    }

    [data-theme="light"] .about-triangle-section .theme-svg--dark {
        display: none;
    }

    [data-theme="dark"] .about-triangle-section .theme-svg--light {
        display: none;
    }

    [data-theme="dark"] .about-triangle-section .theme-svg--light:only-child {
        display: block;
    }
}

/* === МАЛИЙ МОБАЙЛ - ТЕКСТ === */
@media (max-width: 767px) {
    .about-mission-section .section-title,
    .about-values-section .section-title,
    .about-team-section .section-title {
        font-size: 1.5rem;
    }

    .about-team-section .experts-subtitle {
        font-size: 0.95rem;
        font-family: 'Roboto', sans-serif;
    }

    .about-triangle-section .about-image-block {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        display: block;
        min-height: 100%;
    }
    
    .about-triangle-section .theme-svg-wrapper {
        width: 100%;
        height: 100%;
        min-height: 100%;
        position: relative;
        display: block;
    }
    
    .about-triangle-section .theme-svg {
        width: 100%;
        height: 100%;
        min-height: 100%;
    }
    
    .about-triangle-section .theme-svg svg {
        width: 100%;
        height: 100%;
        min-height: 100%;
        display: block;
        object-fit: contain;
    }

    [data-theme="light"] .about-triangle-section .theme-svg--dark {
        display: none;
    }

    [data-theme="dark"] .about-triangle-section .theme-svg--light {
        display: none;
    }

    [data-theme="dark"] .about-triangle-section .theme-svg--light:only-child {
        display: block;
    }
}

/* === GRID CELLS для Блоків 3 та 4 === */
.mission-grid,
.values-grid {
    display: grid;
    gap: 12px;
    width: 100%;
}

/* Блок 3: 3 колонки на desktop */
.mission-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Padding тільки для mission-grid в секції місії-візії */
.about-mission-section .mission-grid {
    padding: 10px;
}

/* Червоний колір для другого слова в заголовку */
.about-mission-section .text-highlight {
    color: var(--color-primary);
}

/* Блок 4: 3x2 (3 колонки, 2 ряди) на desktop */
.values-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.grid-cell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-cell .theme-svg-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-cell .theme-svg {
    width: 100%;
    height: auto;
}

.grid-cell .theme-svg svg {
    width: 100%;
    height: auto;
    display: block;
}

/* === ПЛАНШЕТНА АДАПТАЦІЯ (768px-1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Як на desktop */
    .mission-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

/* === МОБІЛЬНА АДАПТАЦІЯ (max-width: 767px) === */
@media (max-width: 767px) {
    /* Блок 3: 1 колонка (вертикально) */
    .mission-grid {
        grid-template-columns: 1fr;
    }
    
    /* Блок 4: 2 колонки, 3 ряди (2x3) */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    /* Зменшення gap на мобільних */
    .mission-grid,
    .values-grid {
        gap: 8px;
    }
}

/* === iOS SAFARI SPECIFIC === */
@supports (-webkit-touch-callout: none) {
    .mission-grid,
    .values-grid {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
    }
}

/* === LAZY LOADING === */
/* Картинки видимі одразу, Intersection Observer додає клас при завантаженні */
img[loading="lazy"].lazy-loaded {
    opacity: 1;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .about-hero-section,
    .about-image-block img,
    .grid-cell .theme-svg {
        transition: none;
        animation: none;
    }
}
