/* ========================================
   YOUTUBE VIDEOS BLOCK - ESTILOS CSS
   Basado en diseño Figma
   ======================================== */

/* ========================================
   CONTAINER STYLES
   ======================================== */

.youtube-videos-block {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

.youtube-videos-container {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

.youtube-videos-wrapper {
    width: 100% !important;
    padding: 0 !important;
}

.youtube-videos-grid {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.youtube-videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
    margin-bottom: 1.2rem;
}

.youtube-videos-title {
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.64px;
    flex: 1;
    padding-right: 1rem;
    min-width: 0;
    word-wrap: break-word;
}

.youtube-videos-view-all {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #228800;
    text-decoration: none !important;
    transition: color 0.2s ease;
    white-space: normal;
    flex: 0 0 auto;
    text-align: right;
    max-width: 300px;
    min-width: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.youtube-videos-view-all:hover {
    color: #1a6b00;
    text-decoration: none !important;
}

.youtube-videos-view-all:visited {
    text-decoration: none !important;
}

.youtube-videos-view-all:focus {
    text-decoration: none !important;
}

/* Ocultar botón móvil en desktop */
.youtube-videos-view-all-mobile {
    display: none;
}

.youtube-videos-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   GRID LAYOUT
   ======================================== */

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ========================================
   VIDEO CARD STYLES
   ======================================== */

.youtube-video-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E5E5;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/*
.youtube-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}*/

/* ========================================
   VIDEO CONTAINER
   ======================================== */

.youtube-video-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
    border-radius: 8px 8px 0 0;
}

.youtube-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 200px !important;
    border: none;
    border-radius: 8px 8px 0 0;
    object-fit: cover;
}

/* ========================================
   VIDEO CONTENT
   ======================================== */

.youtube-video-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.youtube-video-title {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1200px) {
    .youtube-videos-container {
        padding: 0 20px;
    }
    
    .youtube-videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .youtube-videos-title {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .youtube-videos-container {
        padding: 0 16px;
    }
    
    .youtube-videos-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-bottom: 0;
    }
    
    .youtube-videos-title {
        font-size: 24px;
        width: 100%;
        margin-bottom: 16px;
        padding-right: 0;
    }
    
    .youtube-videos-view-all {
        display: none;
    }
    
    .youtube-videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    /* Botón "Ver todos" móvil */
    .youtube-videos-view-all-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 20px;
        font-family: 'Nunito', sans-serif;
        font-size: 16px;
        font-weight: 800;
        color: #000000;
        text-decoration: none !important;
        padding: 12px 24px;
        border: 2px solid #228800;
        border-radius: 8px;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .youtube-videos-view-all-mobile:hover {
        background-color: #228800;
        color: white;
        text-decoration: none;
    }
    
    .youtube-video-container {
        height: 180px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .youtube-videos-container {
        padding: 0 12px;
    }
    
    .youtube-videos-title {
        font-size: 20px;
    }
    
    .youtube-video-container {
        height: 160px;
    }
    
    .youtube-video-content {
        padding: 12px;
    }
    
    .youtube-video-title {
        font-size: 16px;
    }
}