/* css/common.css */

/* Define la paleta de colores usando variables CSS */
:root {
    --background-color: #f8f9fa; /* Un fondo claro */
    --text-color: #212529;       /* Texto oscuro para contraste */
    --primary-color: #007bff;    /* Un azul primario */
    --secondary-color: #6c757d;  /* Un gris secundario */
    --accent-color: #ffc107;     /* Un color de acento (amarillo) */
    --button-color: #e9ecef;     /* Color de fondo para botones */
    --button-text-color: #495057; /* Color de texto para botones */
    --button-hover-color: #ced4da; /* Color de hover para botones */
}

/* Estilos básicos para el cuerpo de las diapositivas individuales */
body {
    font-family: sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 40px; /* Añade algo de espacio alrededor del contenido */
    box-sizing: border-box; /* Asegura que el padding no aumente el tamaño total */
    height: 100vh; /* Asegura que el body ocupe toda la altura de la ventana */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el contenido verticalmente */
    align-items: center; /* Centra el contenido horizontalmente */
    text-align: center;
}

h1, h2, h3 {
    color: var(--primary-color);
}

p {
    line-height: 1.6;
}

/* Puedes añadir más estilos comunes aquí */

/* Estilo para el logo */
.slide-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 50px; /* Ajusta la altura según necesites */
    width: auto;
}

/* --- Estilos para el Modal de Imagen --- */

#image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    cursor: zoom-out; /* Indica que se puede cerrar haciendo clic */
}

#image-modal-overlay .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex; /* Usar flex para centrar la imagen si es necesario */
    justify-content: center;
    align-items: center;
}

#image-modal-overlay img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto; /* Mantiene la proporción */
    height: auto; /* Mantiene la proporción */
    cursor: default; /* Cursor normal sobre la imagen */
}

#image-modal-overlay .close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em; /* Tamaño más grande para el botón 'X' */
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1; /* Ajusta la línea para centrar la 'X' */
    text-shadow: 0 0 5px black; /* Sombra para mejorar visibilidad */
}

/* Estilo para imágenes dentro de las diapositivas para indicar que son clickeables */
.slide img { /* Aplica a imágenes dentro de elementos con clase 'slide' */
    cursor: zoom-in !important; /* Forzar el cursor zoom-in */
}

/* O si las imágenes están directamente en el body del iframe */
iframe body img {
     cursor: zoom-in !important; /* Forzar el cursor zoom-in */
}

/* Deshabilitar scroll del body cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}

/* Navigation Footer */
.navigation-footer {
    position: fixed;
    bottom: 15px;
    width: 95%;
    left: 2.5%;
    display: flex;
    justify-content: space-between;
    z-index: 1001;
}

/* Navigation Buttons */
.nav-button {
    width: 40px; /* Small size */
    height: 40px; /* Small size */
    background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%; /* Circular */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* White arrows for visibility */
    font-size: 1.2em; /* Slightly larger for clarity */
    line-height: 1;
    font-weight: bold;
}

.nav-button:hover {
    background-color: rgba(135, 206, 250, 0.4); /* Light blue tint on hover */
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 12px rgba(135, 206, 250, 0.6); /* Glow effect */
    transform: scale(1.1);
    color: white;
}

/* --- Responsive Adjustments --- */

/* General adjustments for smaller screens */
@media (max-width: 768px) {
    body {
        padding: 20px; /* Reduce padding on smaller screens */
    }
    h1 {
        font-size: 6vw; /* Adjust heading sizes */
    }
    p {
        font-size: 3vw; /* Adjust paragraph sizes */
    }
    .nav-button {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}

/* Mobile Landscape (Prioritized View) */
@media (orientation: landscape) and (max-height: 600px) {
    body {
        padding: 15px; /* Further reduce padding */
    }
    h1 {
        font-size: 5vh; /* Use viewport height for landscape */
        margin-bottom: 3vh; /* Adjust margin */
    }
    p {
        font-size: 2.5vh;
        line-height: 1.5;
    }
    /* Example: Adjust button container if needed */
    /* .topic-buttons-container { gap: 1.5vh; } */
    /* Example: Adjust specific button sizes if needed */
    /* .topic-button { font-size: 2vh; padding: 1.5vh 1.5vw; min-height: 15vh; } */

    .nav-button {
        bottom: 10px; /* Adjust position slightly */
    }
}

/* Mobile Portrait (Secondary View) */
@media (orientation: portrait) and (max-width: 600px) {
    h1 {
        font-size: 7vw; /* Slightly larger font for portrait width */
    }
    p {
        font-size: 4vw;
    }
    /* Example: Stack buttons if they wrap poorly */
    /* .topic-buttons-container { flex-direction: column; align-items: center; gap: 2vw; } */
    /* .topic-button { width: 80%; font-size: 4vw; min-height: 10vh; } */
}
