/**
 * About Section Styles
 * OBF 2026 Theme - About Fund Section
 */

/* About Section — в потоке документа (не absolute), иначе projects-section перекрывает блок */
.about-section {
    padding: 40px 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

.about-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
}

/* About Blocks Container */
.about-blocks {
    display: grid;
    grid-template-columns: 1fr 2fr; /* col-4 и col-8 пропорции */
    gap: 40px;
    align-items: stretch;
    margin-bottom: 50px;
}

/* About Text Block */
.about-text {
    text-align: left;
    width: 100%;
    max-width: 100%;
    margin: 30px 0 0 0;
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    /* Принудительно ограничиваем ширину */
    overflow: hidden;
}

.about-description {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 25px 0;
    text-align: justify;
}

.about-quote {
    font-family: 'Jost', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    color: #228B22;
    margin: 0;
    text-align: center;
    font-style: italic;
    position: relative;
    padding: 20px 0;
}

.about-quote::before,
.about-quote::after {
    content: '"';
    font-size: 1.5em;
    color: #DC143C;
    font-weight: bold;
}

/* QR Code Block */
.about-block--qr {
    text-align: center;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

/* Карточка акции задаёт высоту строки; видео справа подстраивается под неё */
.about-promo-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.about-promo-card .project-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.about-promo-card .project-card__image-container {
    flex: unset;
    height: 200px;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qr-code-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 10px;
}

.qr-code-description {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #666666;
    line-height: 1.4;
    margin: 0;
}

/* Video Block — высота как у карточки слева (grid stretch) */
.about-block--video {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.about-block--video .video-container {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    outline: none;
}

.video-container:focus {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(34, 139, 34, 0.3);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: transform 0.6s ease;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.video-play-button {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DC143C; /* Красный цвет */
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-container:hover .video-play-button {
    background: #ffffff;
    transform: scale(1.1);
}

.video-container:hover .video-background {
    transform: scale(1.02);
}

.video-iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

.video-iframe-container video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    object-fit: cover;
    cursor: pointer;
}

.video-iframe-container video:focus {
    outline: 3px solid rgba(220, 20, 60, 0.5);
    outline-offset: 2px;
}

/* Попытка скрыть рекламные элементы VK */
.video-iframe-container iframe[src*="vk.com"] {
    /* Дополнительные стили для VK iframe */
    pointer-events: auto;
}

/* Скрытие возможных рекламных оверлеев */
.video-iframe-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Высота возможной рекламной полосы */
    background: transparent;
    pointer-events: none;
    z-index: 10;
}

/* Video states */
.video-container .video-placeholder {
    display: block;
}

.video-container .video-iframe-container {
    display: none;
}

.video-container.video-loaded .video-placeholder {
    display: none;
}

.video-container.video-loaded .video-iframe-container {
    display: block;
}

.video-container.video-loaded {
    cursor: pointer;
}

/* Loading state styles */
.video-container.video-loading {
    pointer-events: none;
}

.video-container.video-loading .video-play-button {
    transform: none !important;
}

.video-container.video-loaded {
    pointer-events: auto;
}

.video-loading-spinner {
    animation: spin 1s linear infinite;
}

.about-block--qr .news-card--regular .news-card__image-container {
    height: 260px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Subtitle - smaller text */
.about-subtitle {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666666;
    line-height: 1.2;
}

/* Main Title - larger text */
.about-title {
    font-family: 'Jost', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #228B22;
    line-height: 1.1;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .about-title {
        font-size: 3rem;
    }
    
    .about-subtitle {
        font-size: 0.95rem;
    }
    
    .about-blocks {
        gap: 30px;
    }
    
    .qr-code-image {
        max-width: 250px;
    }
}

@media (max-width: 992px) {
    
    .about-title {
        font-size: 2.5rem;
    }
    
    .about-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1.5px;
    }
    
    .about-header {
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .about-blocks {
        grid-template-columns: 1fr 1.5fr;
        gap: 25px;
        margin-bottom: 45px;
    }
    
    .qr-code-image {
        max-width: 220px;
    }
    
    .qr-code-description {
        font-size: 0.85rem;
    }
    
    .video-play-button {
        width: 70px;
        height: 70px;
    }
    
    .about-description {
        font-size: 1.05rem;
    }
    
    .about-quote {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    
    .about-section {
        padding: 60px 0 40px 0; /* Увеличили верхний отступ с 40px до 60px */
    }
    
    .about-title {
        font-size: 2.2rem;
    }
    
    .about-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    .about-header {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .about-blocks {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .about-block--qr {
        order: 2;
    }
    
    .about-block--video {
        order: 1;
    }

    .about-block--video .video-container {
        height: auto;
        flex: none;
        aspect-ratio: 16 / 9;
    }
    
    .qr-code-image {
        max-width: 200px;
    }
    
    .video-play-button {
        width: 60px;
        height: 60px;
    }
    
    .about-text {
        padding: 20px;
        margin: 20px 0 0 0;
        width: calc(100% - 0px);
        max-width: 100%;
    }
    
    .about-description {
        font-size: 1rem;
        text-align: left;
    }
    
    .about-quote {
        font-size: 1.1rem;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    
    .about-section {
        padding: 50px 0 30px 0; /* Добавили отступы для мобильных */
    }
    
    .about-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .about-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        line-height: 1.3;
    }
    
    .about-header {
        gap: 8px;
        margin-bottom: 25px;
    }
    
    .about-blocks {
        gap: 25px;
    }
    
    .about-text {
        padding: 15px;
        margin: 15px 0 0 0;
        width: calc(100% - 0px);
        max-width: 100%;
    }
    
    .qr-code-image {
        max-width: 100%;
    }
    
    .qr-code-description {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .video-play-button {
        width: 50px;
        height: 50px;
    }
    
    .video-play-button svg {
        width: 24px;
        height: 24px;
    }
}


/* High contrast mode support */
@media (prefers-contrast: high) {
    .about-subtitle {
        color: #333333;
    }
    
    .about-title {
        color: #000000;
    }
}


/* Print styles */
@media print {
    .about-section {
        background: transparent !important;
        padding: 20px 0;
    }
    
    .about-title,
    .about-subtitle {
        color: #000000 !important;
    }
}