﻿/* Modal Styles (Video & Form) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*    background-color: rgba(0, 0, 0, 0.8);*/
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    color: black;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #333;
}

    .modal-close-button:hover {
        transform: scale(1.1) rotate(90deg);
        background: var(--secondary-accent);
        color: white;
    }

.modal-content-video {
    position: relative;
    background: var(--bg-color);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 90vw;
    max-height: 90vh;
    animation: slideInUp 0.4s ease;
    border: 1px solid var(--light-border);
    line-height: 0; /* collapse whitespace gap beneath video */
}

    .modal-content-video video {
        display: block;
        width: auto;
        height: auto;
        max-width: calc(90vw - 40px);  /* 40px = 2 × 20px container padding */
        max-height: calc(90vh - 40px);
        border-radius: 4px;
    }

/* vertical videos — no extra rules needed;
   width:auto + max-height already constrains 9:16 correctly */
.modal-content-video.vertical-video {
    width: auto;
}

/* Video Gallery Section - Updated Design */
.video-gallery-section {
    margin-top: 80px;
    padding-top: 50px;
    border-top: 1px solid var(--light-border);
}

    .video-gallery-section h2 {
        font-size: 2.5rem;
        margin-bottom: 30px;
        text-align: center;
        color: var(--text-color);
    }

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Re-styled video-card to match ecosystem-card */
.video-card {
    background: var(--g50);
    border-radius: 16px;
    border: 1px solid var(--g100);
    box-shadow: 0 2px 12px rgba(0,120,168,.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    align-items: center;
    min-height: 220px;
    padding: 0; /* Remove padding so h3 can reach the edge */
}

    .video-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        transition: left 0.5s ease;
        z-index: 0;
    }

    .video-card:hover::before {
        left: 100%;
    }

    .video-card:hover {
        transform: translateY(-10px);
        background: var(--g100);
        box-shadow: 0 12px 48px rgba(0,120,168,.14);
    }

    .video-card .play-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

        .video-card .play-icon i {
            font-size: 3.5rem;
            color: var(--secondary-accent);
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
        }

    .video-card h3 {
        font-size: 1.5rem;
        width: 100%;
        padding: 15px;
        margin: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
        text-align: center;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
        color: white;
        z-index: 1;
    }