﻿.projec_our_students-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: 24px;
}

.item-for_projec_our_students-grid {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

    .item-for_projec_our_students-grid img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: 0.7s ease;
    }

    .item-for_projec_our_students-grid:hover img {
        transform: scale(1.12);
    }

.tall {
    grid-row: span 2;
}

.wide {
    grid-column: span 2;
}

.custom-gap{
    margin-top: 100px !important;
}


/*Panel*/
.projects-section {
    position: relative;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    padding: var(--space-section);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    background: var(--bg-section);
    color: white;
}


/*Text*/

.section-header {
    margin-bottom: 48px;
}

    .section-header h2 {
        font-size: 32px;
        font-weight: 600;
        color: #ffffff;
        letter-spacing: 0.5px;
    }

    .section-header p {
        margin-top: 8px;
        font-size: 14px;
        color: rgba(255,255,255,0.6);
    }

/* --- Общие стили карточки --- */
.project-card {
    height: 100%;
    background: var(--bg-section-dop);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px; /* рамка внутри */
}

    .project-card:hover .project-thumb::after {
        content: '';
        position: absolute;
        inset: 0;
        box-shadow: inset 0 0 30px rgba(79,140,255,0.3);
        pointer-events: none;
    }

/* --- Изображения --- */
.project-thumb {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius-xl) - 6px);
    flex-shrink: 0;
}

    .project-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: 0.6s ease;
    }

/* --- Hover overlay --- */
.project-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: 0.3s ease;
    text-decoration: none;

    gap: 16px;
}

.project-card:hover .project-hover {
    opacity: 1;
}

.project-card:hover img {
    transform: scale(1.08);
}

/* --- Видео подсказка и кнопка --- */
.video-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.play-btn {
    background: white;
    color: black;
    border: none;
    font-size: 15px;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s ease;

    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .play-btn:hover {
        transform: scale(1.05);
    }

/* --- Текст под картинкой --- */
.project-body {
    padding: 12px;
    flex-shrink: 0;
}

    .project-body h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
    }

    .project-body p {
        font-size: 13px;
        margin-top: 6px;
        color: rgba(255,255,255,0.6);
    }

/* --- Tall (вертикальные) --- */
.tall .project-thumb {
    aspect-ratio: 3 / 4;
    height: auto;
}

/* --- Wide (горизонтальные) --- */
.wide .project-card {
    flex-direction: row;
}

.wide .project-thumb {
    flex: 0 0 60%; /* картинка слева 60% */
}

.wide .project-body {
    flex: 1;
    padding: 16px;
}

/* --- Обычные (16:9) --- */
.item-for_projec_our_students-grid:not(.tall):not(.wide) .project-thumb {
    aspect-ratio: 16 / 9;
}


/*Vido*/
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.video-wrapper {
    position: relative;
    width: 90%;
    max-width: 800px;
}

    .video-wrapper iframe {
        width: 100%;
        height: 450px;
    }

.close-video {
    position: absolute;
    top: -20px;
    right: -20px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
}






@media (max-width: 768px) {
    .projec_our_students-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto; /* подстраивается под контент */
    }

    .tall, .wide {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

        .tall .project-thumb, .wide .project-thumb {
            aspect-ratio: 16 / 9; /* или 4/3 — чтобы не было слишком высоких */
        }

        .wide .project-card {
            flex-direction: column; /* на мобилке картинка сверху, текст снизу */
        }

        .wide .project-thumb {
            flex: 0 0 auto;
            height: 220px; /* фиксированная высота или auto */
        }
}

.watch-btn {
    text-decoration: none;
    color: white;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: 0.25s ease;
}

    .watch-btn:hover {
        background: rgba(255,255,255,0.9);
        color: black;
        transform: scale(1.05);
    }
