/* styles.css */
:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-gradient: linear-gradient(135deg, #fc5c7d 0%, #6a82fb 100%);
    --accent-color: #fca311;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.presentation-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    padding: 4rem;
    background-color: var(--bg-color);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slide-content {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 2;
}

h1, h2, h3, h4 {
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: inline-block;
}

h2 .fas {
    margin-right: 1rem;
    -webkit-text-fill-color: initial; /* Reset for icons */
    color: #6a11cb;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #495057;
}

/* Title Slide */
.title-slide .main-title {
    font-size: 4rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-slide .subtitle {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}
.title-slide .author, .title-slide .institution {
    font-size: 1rem;
    color: #6c757d;
}

/* Contenedor que permite al diseño ocupar toda la pantalla */
.slide-content-full {
    width: 100%;
    height: 100%;
}

/* El contenedor principal que crea las dos columnas */
.title-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}

/* La columna de la izquierda para el texto */
.title-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5rem;
    background-color: var(--bg-color);
    position: relative; /* MUY IMPORTANTE: para que las burbujas floten dentro de esta columna */
    z-index: 1; /* Asegura que el texto esté sobre las burbujas */
}

/* La columna de la derecha para la imagen */
.title-image-container {
    width: 100%;
    height: 100%;
    /* MODIFICACIÓN: Se añaden bordes redondeados y overflow */
    border-top-left-radius: 90px;
    border-bottom-right-radius: 90px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    overflow: hidden; /* Recorta la imagen para que respete los bordes redondeados */
}

.title-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Ajustes a los textos para el nuevo layout */
/* MODIFICACIÓN: Se restaura el color gradiente del título */
.title-text-content .main-title {
    font-size: 3.5rem;
    line-height: 1.2;
    text-align: left;
    /* --- Estilos de gradiente restaurados --- */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Necesario para que el gradiente se aplique correctamente */
}

.title-text-content .subtitle {
    font-size: 1.8rem;
    text-align: left; /* Modificación: antes era centrado */
    /* Modificación: se quita el gradiente para mejor legibilidad */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-color);
    margin-bottom: 2rem;
    padding: 0;
}

.title-text-content .author,
.title-text-content .institution {
    text-align: left; /* Modificación: antes era centrado */
    font-size: 1rem;
}


/* ===================================== */
/* AJUSTES DE ESPACIADO PARA MEJORAR LA LEGIBILIDAD */
/* ===================================== */

/* Añade espacio debajo del subtítulo en las columnas de texto */
.text-content h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem; /* Aumenta el espacio debajo de "Para los Involucrados" */
}

/* Modifica la regla existente de la lista para darle más aire */
.text-content ul {
    list-style: none;
    padding-left: 0;
}

.text-content ul li {
    line-height: 1.6; /* Mejora la legibilidad del texto que ocupa más de una línea */
    margin-bottom: 1.2rem; /* Aumenta el espacio vertical entre cada punto de la lista */
}

/* Asegura que el último elemento de la lista no tenga un margen extra que no se necesita */
.text-content ul li:last-child {
    margin-bottom: 0;
}

/* Professional Image Placeholder */
.professional-image {
    width: 150px;
    height: 150px;
    margin: 2rem auto;
    border-radius: 50%;
    background: var(--secondary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 4rem;
    box-shadow: 0 0 40px rgba(106, 130, 251, 0.5);
    overflow: hidden; /* Oculta partes de la imagen que se salgan del círculo */
}

/* NUEVO: Estilo para la imagen dentro del placeholder */
.professional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra el espacio sin deformarse */
}

.professional-image.small-image {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}


/* Stats with Hover Effects */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card h3 {
    color: #2575fc;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
}

.hover-effects .stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

/* ===================================== */
/* NUEVAS REGLAS PARA DISEÑO EN COLUMNAS */
/* ===================================== */

.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Crea dos columnas de igual tamaño */
    gap: 3rem; /* Espacio entre el texto y la imagen */
    align-items: center;
    text-align: left; /* Alinea el texto a la izquierda en la columna */
    margin-top: 2rem;
}

.text-content p {
    margin-bottom: 2rem;
}

/* Ajusta los botones para que se alineen a la izquierda en su nueva columna */
.text-content .modal-buttons {
    justify-content: flex-start;
}

.image-container {
    width: 100%;
    height: 350px; /* Altura fija para la imagen */
    border-radius: 15px;
    background-color: #e9ecef; /* Un color de fondo por si no hay imagen */
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen llene el contenedor sin deformarse */
}


/* Modal Buttons & Modals */
.modal-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.modal-btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    background: var(--primary-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
}

.modal-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 117, 252, 0.6);
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 2rem 3rem;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #6a11cb;
}

.modal-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fc5c7d;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
    text-align: left;
}

.modal-content ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.modal-content ul li::before {
    content: '✓';
    color: #2575fc;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Floating Effects */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}
.shape:nth-child(1) { width: 150px; height: 150px; top: 10%; left: 15%; animation-duration: 25s; }
.shape:nth-child(2) { width: 80px; height: 80px; top: 70%; left: 80%; animation-duration: 18s; background: var(--secondary-gradient); }
.shape:nth-child(3) { width: 50px; height: 50px; top: 40%; left: 5%; animation-duration: 22s; }
.shape:nth-child(4) { width: 120px; height: 120px; top: 20%; left: 90%; animation-duration: 28s; background: var(--secondary-gradient); }

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(40px, 80px) scale(1.2); }
    100% { transform: translate(0, 0); }
}

.floating-point {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    text-align: left;
    transition: transform 0.3s ease;
}
.floating-point:hover {
    transform: translateY(-5px);
}
.point-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.point-header .fas {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--accent-color);
}
.point-header h3 {
    font-size: 1.3rem;
    color: #6a11cb;
}


/* Impact Slide */
.impact-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    text-align: left;
    align-items: center;
}
.impact-card ul {
    list-style: none;
    padding: 0;
}
.impact-card ul li {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.impact-card ul li strong {
    color: #2575fc;
}


/* Recommendations Slide */
.recommendations-list {
    text-align: left;
    padding-left: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}
.recommendations-list li {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}


/* Estilos comunes para ambos botones */
#prevBtn, #nextBtn {
    position: absolute; /* Clave para posicionarlos individualmente */
    bottom: 30px;
    z-index: 10;
    background-color: rgba(60, 0, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Posición individual para el botón "Anterior" */
#prevBtn {
    left: 30px; /* A la izquierda */
}

/* Posición individual para el botón "Siguiente" */
#nextBtn {
    right: 30px; /* A la derecha */
}

/* El hover se mantiene igual para ambos */
#prevBtn:hover, #nextBtn:hover {
    background-color: rgba(60, 0, 255, 0.6);
}

#fullscreenBtn {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
    background: none;
    border: none;
    font-size: 1.3rem; /* Lo hacemos un poco más pequeño */
    color: rgba(0, 0, 0, 0.11); /* Color oscuro pero con más transparencia */
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease; /* Transición suave para el hover */
}

#fullscreenBtn:hover {
    color: rgba(0, 0, 0, 0.7); /* Se hace más visible al pasar el mouse */
}

/* ======================================================= */
/* === SECCIÓN RESPONSIVA PARA PANTALLAS PEQUEÑAS (MÓVILES) === */
/* ======================================================= */
@media (max-width: 768px) {
    .slide {
        padding: 4rem 1.5rem; /* Aumentamos el padding vertical para dar más espacio */
        align-items: flex-start; /* Alinea el contenido arriba para facilitar el scroll */
        overflow-y: auto; /* Habilita el scroll vertical si el contenido se desborda */
    }

    h1, .title-text-content .main-title {
        font-size: 2.2rem;
    }
    
    h2, .title-text-content .subtitle {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 1rem;
    }

    /* Ajustes para la diapositiva de título */
    .title-split-container {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh auto; /* La imagen ocupa 40% de la altura */
    }

    .title-image-container {
        order: -1;
    }

    .title-text-content {
        padding: 2rem;
        justify-content: center;
    }

    /* Ajustes para las diapositivas con columnas */
    .content-split {
        grid-template-columns: 1fr; /* Apila las columnas */
        gap: 2rem;
    }
    
    .text-content h2 {
        font-size: 2rem; /* Ajusta el H2 dentro de las columnas */
    }

    .image-container {
        height: 250px;
        order: -1; /* Mueve la imagen arriba del texto */
    }

    /* Ajustes para las tarjetas de estadísticas */
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 3rem;
    }

    /* Ajustes para modales y botones */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-buttons {
        gap: 1rem;
    }

    .modal-btn {
        width: 100%;
        text-align: center;
    }
    
    /* AJUSTE RESPONSIVO PARA BOTONES DE NAVEGACIÓN */
    #prevBtn, #nextBtn {
        width: 35px; /* Más pequeños */
        height: 35px; /* Más pequeños */
        bottom: 20px; /* Más cerca del borde inferior */
    }
    
    #prevBtn {
        left: 20px; /* Más cerca del borde izquierdo */
    }
    
    #nextBtn {
        right: 20px; /* Más cerca del borde derecho */
    }
}