/* CAPACITACION.CSS - OPTIMIZADO POR NOVA */

/*===   Hero  ===*/
.hero-capacitacion {
    height: clamp(250px, 40vh, 450px);
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4)), 
                url('../img/optimized/capacitacion/hero-capacitacion.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease-out;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: white;
    max-width: min(800px, 90%);
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.3s;
    line-height: 1.4;
}

.lead {
    margin-top: 0;
    padding-top: 0;
}

/*===   Capacitacion Grid - RESPONSIVE FIXED  ===*/
.capacitacion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(0.75rem, 2vw, 1.25rem);
    height: clamp(400px, 60vw, 600px);
    position: relative;
    margin: 2rem auto;
    max-width: 1200px;
}

/* Líneas centrales en forma de cruz - Mejorado para móvil */
.capacitacion-grid::before,
.capacitacion-grid::after {
    content: '';
    position: absolute;
    background-color: rgba(0, 0, 0, 0.08);
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.capacitacion-grid::before {
    width: 1px;
    height: 100%;
}

.capacitacion-grid::after {
    width: 100%;
    height: 1px;
}

@media (max-width: 768px) {
    .capacitacion-grid::before,
    .capacitacion-grid::after {
        display: none; /* Ocultar líneas en móvil para mejor visual */
    }
}

.capacitacion-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
    background: white;
}

.capacitacion-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.capacitacion-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(0.9);
}

.capacitacion-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.capacitacion-item:hover img {
    transform: scale(1.08);
    filter: brightness(1);
}

.capacitacion-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 51, 102, 0.95), rgba(0, 51, 102, 0.7));
    color: white;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.capacitacion-item:hover .capacitacion-overlay {
    opacity: 1;
}

.capacitacion-overlay h3 {
    margin: 0;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

/*===   Contenido del curso (PARA PÁGINAS DE CURSOS) ===*/
.curso-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 992px) {
    .curso-container {
        grid-template-columns: 2fr 1fr;
    }
}

/* Tarjeta de descripción */
.curso-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: clamp(1.25rem, 3vw, 2rem);
    transition: transform 0.3s ease;
}

.curso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.curso-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.curso-icon {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #0d6efd;
    flex-shrink: 0;
}

.curso-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #003366;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.curso-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0d6efd;
}

.curso-meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin: 1.5rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #5d6d7e;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    flex: 1 0 auto;
}

.meta-item i {
    margin-right: 0.5rem;
    color: #0d6efd;
    font-size: 1.1em;
}

/* Sidebar */
.curso-sidebar {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.25rem);
}

.info-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: clamp(1.25rem, 3vw, 1.5rem);
}

.info-box h3 {
    color: #003366;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 0.5rem;
}

.info-box p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Botones específicos para cursos */
.btn-curso {
    display: inline-block;
    padding: clamp(0.75rem, 2vw, 0.875rem) clamp(1.5rem, 3vw, 2rem);
    background: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid #0d6efd;
    width: 100%;
    margin-top: 1rem;
}

.btn-curso:hover {
    background: #0B5ED7;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
    color: white;
}

.btn-curso-outline {
    background: transparent;
    border: 2px solid #0d6efd;
    color: #0d6efd;
}

.btn-curso-outline:hover {
    background: #0d6efd;
    color: white;
}

/* Responsividad específica */
@media (max-width: 992px) {
    .capacitacion-grid {
        height: clamp(350px, 70vw, 500px);
    }

    .curso-header {
        flex-direction: column;
        text-align: center;
    }

    .curso-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .capacitacion-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        height: auto;
        min-height: 600px;
    }

    .hero-capacitacion {
        height: 35vh;
    }

    .curso-meta {
        flex-direction: column;
    }

    .meta-item {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-capacitacion {
        height: 30vh;
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .capacitacion-grid {
        gap: 0.75rem;
        min-height: 500px;
    }

    .capacitacion-overlay h3 {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .curso-card,
    .info-box {
        padding: 1.25rem;
    }

    .btn-curso {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Animaciones */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .capacitacion-item,
    .capacitacion-item img,
    .curso-card,
    .btn-curso {
        transition: none !important;
    }

    .capacitacion-item:hover {
        transform: none !important;
    }
}

/* Clases utilitarias para cursos */
.text-justify-responsive {
    text-align: justify;
}

@media (max-width: 576px) {
    .text-justify-responsive {
        text-align: left;
    }
}