/* -------------------- RESET -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: #fff;
}

/* -------------------- HEADER (banner igual que los demás) -------------------- */
.header {
    position: relative;
    width: 100%;
    height: 400px;
    background: url('../img/banner-videos.jpg') no-repeat center calc(50% - 270px);
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Capa verde transparente encima del fondo */
.header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(90, 160, 122, 0.5);
}

/* Contenedor centrado */
.title-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rectángulo que resalta el título */
.rect-box {
  background-color: rgba(90, 160, 122, 0.75); /* Verde más transparente */
  padding: 10px 40px; /* Más bajo (menos altura) */
  border-radius: 40px;
}


/* Texto del título */
.title-text-1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}



/* -------------------- SECCIÓN PRINCIPAL -------------------- */
.materials-section {
    padding: 60px 8%;
    background-color: #fff;
}

.materials-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

/* -------------------- TARJETAS -------------------- */
.material-item {
    border: 2px solid #1DD3B0;
    border-radius: 12px;
    width: 280px;
    text-align: center;
    padding: 30px 20px 25px;
    position: relative;
    background-color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.material-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.material-item a {
    text-decoration: none;
    color: inherit;
}
/* -------------------- MODAL DE VIDEO -------------------- */

.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.video-modal video {
    width: 80%;
    max-width: 850px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.video-modal .close-btn {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
}

.video-modal .close-btn:hover {
    transform: scale(1.1);
    color: #ff5757;
}

/* Animación de entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* -------------------- MINIATURAS DE VIDEO -------------------- */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.video-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.play-overlay i {
    color: white;
    font-size: 1.5rem;
}

.video-thumbnail:hover .play-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}


/* -------------------- ICONOS -------------------- */
.material-icon {
    width: 60px;
    height: 60px;
    border: 2px solid #1DD3B0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    background-color: #fff;
}

.material-icon i {
    font-size: 28px;
    color: #000;
}

.material-icon.pdf i {
    color: #E63946;
}

.material-icon.video i {
    color: #1DD3B0;
}

/* -------------------- TEXTO -------------------- */
.material-item span {
    display: block;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 900px) {
    .materials-grid {
        flex-direction: column;
        align-items: center;
    }

    .material-item {
        width: 90%;
    }

    .title-text-1 {
        font-size: 40px;
    }

    .header {
        background-position: center;
        height: 300px;
    }
}
