* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    background: #F6F9FC;
    font-family: 'Lato', sans-serif;
    overflow-x: hidden;
}

/* Asegurar que el body tenga el fondo gris por defecto */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F6F9FC;
    z-index: -1;
}

/* Nueva sección superior - DEFINICIÓN ÚNICA */
.top-header {
    width: 100%;
    background: #F6F9FC;
    padding: 0;
    margin: 0;
    margin-top: -15px !important;
    border-bottom: 1px solid #E0E0E0;
}

.top-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-logo img {
    height: 90px;
    width: auto;
}

.top-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-icon {
    width: 32px;
    height: 32px;
    background: #2C5F5D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-icon svg {
    width: 18px;
    height: 18px;
}

.btn-primary,
.btn-secondary {
    padding: 8px 21px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.btn-primary {
    background: #2C5F5D;
    color: white;
}

.btn-primary:hover {
    background: #234a48;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 95, 93, 0.3);
}

.btn-secondary {
    background: white;
    color: #2C5F5D;
    border: 2px solid #2C5F5D;
}

.btn-secondary:hover {
    background: #2C5F5D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 95, 93, 0.3);
}

/* Logo Container */
.logo-container {
    width: 100%;
    display: flex; /* Cambié de inline-flex a flex */
    justify-content: center;
    align-items: center;
    padding: 20px 0px 40px 0px; /* Reducido de 360px a espacios específicos */
    min-height: 300px; /* Reducido de 360px a 200px */
}

.logo-container img {
    max-height: 144px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.carousel-3d-container {
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    padding: 0;
    margin-top: -140px;
}

.carousel-3d-wrapper {
    position: relative;
    width: 100%;
    height: 325px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-3d-slide {
    position: absolute;
    width: 325px;
    height: 260px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
}

/* Posiciones de las slides */
.carousel-3d-slide.active {
    z-index: 5;
    transform: translateX(0) scale(1);
    opacity: 1;
}

.carousel-3d-slide.prev-1 {
    z-index: 4;
    transform: translateX(-350px) scale(0.85);
    opacity: 0.7;
}

.carousel-3d-slide.prev-2 {
    z-index: 3;
    transform: translateX(-650px) scale(0.7);
    opacity: 0.4;
}

.carousel-3d-slide.next-1 {
    z-index: 4;
    transform: translateX(350px) scale(0.85);
    opacity: 0.7;
}

.carousel-3d-slide.next-2 {
    z-index: 3;
    transform: translateX(650px) scale(0.7);
    opacity: 0.4;
}

.carousel-3d-slide.hidden {
    z-index: 1;
    transform: scale(0.5);
    opacity: 0;
}

.carousel-3d-slide[data-disabled="true"] {
  opacity: 0.4;
  filter: grayscale(100%);
  cursor: not-allowed;
  pointer-events: none; /* Bloquea clicks */
}

/* Botones de navegación */
.carousel-3d-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-3d-nav:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-3d-nav.prev {
    left: 50px;
}

.carousel-3d-nav.next {
    right: 50px;
}

/* Indicadores */
.carousel-3d-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-3d-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-3d-indicator.active {
    background: rgba(0, 0, 0, 0.8);
    width: 30px;
    border-radius: 6px;
}

/* ===== Títulos sobre las slides del carrusel ===== */
.carousel-3d-slide {
    overflow: hidden;
}

.slide-title-overlay {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 18px;
    z-index: 2;
    pointer-events: none;
}

/* Posiciones verticales */
.slide-title-bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding-bottom: 18px;
    padding-top: 35px;
}

.slide-title-center {
    top: 50%;
    transform: translateY(-50%);
    background: rgba(226, 2, 133, 0.143); /*rgba(0,0,0,0.5);*/
    padding: 20px 18px;
}

.slide-title-top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding-top: 18px;
    padding-bottom: 35px;
}

/* Línea 1: más pequeña y ligera */
.slide-title-line1 {
    color: white;
    font-family: 'Noto Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    display: block;
}

/* Línea 2: más grande y bold */
.slide-title-line2 {
    color: white;
    font-family: 'Noto Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    display: block;
    margin-top: 2px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tarjeta Modal */
.course-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal-overlay.active .course-card {
    transform: scale(1);
}

.course-card-header {
    position: relative;
    height: 200px;
    background-size: cover; 
    background-position: top; /*bottom, center, top*/
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: flex-end; /* Para posicionar el título abajo */
    padding: 20px;
}

/* Título superpuesto sobre la imagen */
.course-card-header-title {
    color: white;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 24px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); /* Sombra para legibilidad */
    z-index: 2;
    margin: 0;
}

.course-card-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.course-card-close:hover {
    background: white;
    transform: rotate(90deg);
}

.course-card-body {
    padding: 30px;
}

/* Cambiar el título del curso por "Objetivo" */
.course-card-title {
    font-size: 18px;
    font-weight: bold; /* En negritas */
    color: #333;
    margin: 0 0 15px 0;
}

/* Agregar overlay oscuro sobre la imagen para mejor legibilidad del texto */
.course-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 100%);
    border-radius: 15px 15px 0 0;
    z-index: 1;
}

.course-card-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.course-card-info-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.course-card-info-item strong {
    margin-right: 8px;
    color: #333;
}

.course-card-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.course-card-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.course-card-btn-primary {
    background: #9D2449;
    color: white;
}

.course-card-btn-primary:hover {
    background: #7a1a37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 36, 73, 0.3);
}

.course-card-btn-secondary {
    background: white;
    color: #9D2449;
    border: 2px solid #9D2449;
}

.course-card-btn-secondary:hover {
    background: #9D2449;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 36, 73, 0.3);
}

/* NUEVA SECCIÓN DE BIENVENIDA */
.welcome-section {
    background: #FFFFFF !important;
    width: 100%;
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* NUEVA SECCIÓN DE NOTICIAS */
.news-section {
    background: #E8E8E8 !important;
    width: 100%;
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Titulo arriba - Noticias */
.news-frame {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 10px;
}

/* Lado izquierdo - Slider de avisos */
.announcements-slider {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    overflow: hidden;
    background: #E8E8E8;
    border-radius: 10px;
}

.announcement-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.announcement-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: #721431;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.announcement-sidebar-text {
    color: white;
    font-size: 14px;
    font-weight: bold;
    writing-mode: vertical-lr !important;
    letter-spacing: 2px;
    transform: rotate(180deg) !important;
}

.announcement-slide {
    position: absolute;
    left: 40px;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-slide.active {
    opacity: 1;
}

.announcement-slide img {
    width: 100%;
    height: 80%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.announcement-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.announcement-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-indicator.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* Lado derecho - Descripción */
.welcome-content {
    padding: 0 20px;
}

.welcome-title {
    color: #6B6B6B;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 20px 0;
}

.welcome-title strong {
    color: #9D2449;
    font-weight: 700;
}

.welcome-description {
    color: #303030;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.welcome-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 35px;
}

.welcome-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #303030;
    font-size: 16px;
}

.welcome-stat-item::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #E8F5E9;
    color: #4CAF50;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.btn-know-more {
    display: inline-block;
    padding: 15px 40px;
    background: #721431;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-know-more:hover {
    background: #5a0f26;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(114, 20, 49, 0.3);
}

/* SECCIÓN DE TESTIMONIALES */
.testimonials-section {
    background: #F0F0F0;
    width: 100%;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.testimonials-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.testimonials-sidebar {
    min-width: 60px;
    width: 60px;
    height: 400px;
    background: #721431;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    flex-shrink: 0;
}

.testimonials-sidebar-text {
    color: white;
    font-size: 16px;
    font-weight: bold;
    writing-mode: vertical-lr;
    letter-spacing: 2px;
    transform: rotate(180deg);
}

.testimonials-content {
    flex: 1;
    overflow: hidden;
}

.testimonials-header {
    margin-bottom: 40px;
}

.testimonials-title {
    color: #2C5F5D;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

.testimonials-subtitle {
    color: #9D2449;
    font-size: 42px;
    font-weight: 700;
    margin: 0;
}

.testimonials-nav-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.testimonials-nav {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #2C5F5D;
    font-size: 20px;
    font-weight: bold;
}

.testimonials-nav:hover {
    background: #2C5F5D;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.testimonials-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}

.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    min-width: 350px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #E8E8E8;
}

.testimonial-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

.testimonial-info p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.testimonial-text {
    color: #D0D0D0;
    font-size: 15px;
    line-height: 1.8;
    flex: 1;
}

.testimonial-rating {
    display: flex;
    gap: 5px;
}

.testimonial-rating .star {
    color: #FF9800;
    font-size: 20px;
}

.testimonial-rating .star.empty {
    color: #E0E0E0;
}

/* Responsive */
@media (max-width: 1200px) {
    .carousel-3d-slide {
        width: 280px;
        height: 224px;
    }

    .carousel-3d-slide.prev-1,
    .carousel-3d-slide.next-1 {
        transform: translateX(300px) scale(0.85);
    }

    .carousel-3d-slide.prev-1 {
        transform: translateX(-300px) scale(0.85);
    }

    .welcome-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .announcements-slider {
        max-width: 100%;
    }

    .welcome-title {
        font-size: 36px;
    }

    .testimonials-wrapper {
        gap: 30px;
    }

    .testimonial-card {
        min-width: 320px;
    }
}

/* Responsive para títulos de slides */
@media (max-width: 1200px) {
    .slide-title-line1 {
        font-size: 12px;
    }
    .slide-title-line2 {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .top-header-container {
        padding: 0 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .top-header-logo img {
        height: 58px;
    }
    
    .top-header-actions {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel-3d-container {
        height: 400px;
        margin-top: -100px;
    }

    .carousel-3d-wrapper {
        height: 250px;
    }

    .carousel-3d-slide {
        width: 250px;
        height: 200px;
    }

    .slide-title-line1 {
        font-size: 11px;
    }
    .slide-title-line2 {
        font-size: 13px;
    }
    .slide-title-overlay {
        padding: 10px 12px;
    }
    .slide-title-bottom {
        padding-bottom: 12px;
        padding-top: 25px;
    }
    .slide-title-top {
        padding-top: 12px;
        padding-bottom: 25px;
    }

    .carousel-3d-slide.prev-1,
    .carousel-3d-slide.next-1 {
        transform: translateX(200px) scale(0.8);
    }

    .carousel-3d-slide.prev-1 {
        transform: translateX(-200px) scale(0.8);
    }

    .carousel-3d-slide.prev-2,
    .carousel-3d-slide.next-2 {
        display: none;
    }

    .carousel-3d-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .carousel-3d-nav.prev {
        left: 20px;
    }

    .carousel-3d-nav.next {
        right: 20px;
    }

    .logo-container {
        padding: 50px 15px;
        min-height: 300px;
    }

    .logo-container img {
        max-height: 150px;
    }

    .user-icon {
        width: 28px;
        height: 28px;
    }

    .user-icon svg {
        width: 16px;
        height: 16px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 7px 14px;
        font-size: 10px;
    }

    .course-card-body {
        padding: 20px;
    }

    .course-card-title {
        font-size: 20px;
    }

    .course-card-buttons {
        flex-direction: column;
    }

    .course-card-btn {
        min-width: 100%;
    }

    .welcome-section {
        padding: 50px 0;
    }

    .welcome-title {
        font-size: 28px;
        font-family: 'Noto Sans', sans-serif;
    }

    .announcements-slider {
        max-width: 100%;
    }

    .announcement-slide {
        padding: 20px 40px;
    }

    .testimonials-section {
        padding: 50px 0;
    }

    .testimonials-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .testimonials-sidebar {
        width: 100%;
        height: 50px;
        flex-direction: row;
    }

    .testimonials-sidebar-text {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .testimonials-title,
    .testimonials-subtitle {
        font-size: 28px;
    }

    .testimonial-card {
        min-width: 280px;
    }

    .testimonials-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}