/* style.css */

/* Variables CSS para definir los colores del tema */
:root {
    /* Modo Oscuro por defecto */
    --bg-body: #1a202c;
    --text-color: #e2e8f0;
    --bg-card: #2d3748;
    --text-accent: #a0aec0;
    --btn-primary-bg: #4a5568;
    --btn-primary-hover-bg: #64748b;
    --section-title-color: #63b3ed; /* Color azul claro para los títulos de sección */
    --carousel-arrow-bg: rgba(0, 0, 0, 0.5);
    --carousel-arrow-hover-bg: rgba(0, 0, 0, 0.8);
    --carousel-dot-bg: #cbd5e0;
    --carousel-dot-active-bg: #3182ce;
    /* Colores del título y eslogan en el encabezado, SIEMPRE BLANCO para contrastar con el overlay oscuro */
    --header-main-text-color: #FFFFFF; /* Blanco fijo */
    --highlight-word-color: #63b3ed; /* Color para palabras resaltadas: Azul claro */
    --header-title-font-size: 8rem; /* Tamaño de fuente para el título principal en escritorio */
    --header-slogan-font-size: 2.8rem; /* Tamaño de fuente para el eslogan en escritorio */
    --overlay-color: rgba(0, 0, 0, 0.7); /* Overlay oscuro más fuerte */
    --header-text-shadow-color: rgba(0, 0, 0, 1); /* Sombra de texto muy fuerte para el encabezado */
}

/* Colores para el Modo Claro */
body.light-mode {
    --bg-body: #f7fafc; /* Blanco muy claro */
    --text-color: #2d3748; /* Gris oscuro para el texto */
    --bg-card: #ffffff; /* Blanco para las tarjetas */
    --text-accent: #4a5568; /* Gris para el acento */
    --btn-primary-bg: #e2e8f0; /* Gris claro para botón */
    --btn-primary-hover-bg: #cbd5e0; /* Gris más claro al pasar el ratón */
    --section-title-color: #3182ce; /* Color azul oscuro para títulos en modo claro */
    --carousel-arrow-bg: rgba(255, 255, 255, 0.5);
    --carousel-arrow-hover-bg: rgba(255, 255, 255, 0.8);
    --carousel-dot-bg: #a0aec0;
    --carousel-dot-active-bg: #4a5568;
    /* Colores del título y eslogan en el encabezado, SIEMPRE BLANCO para contrastar con el overlay oscuro */
    --header-main-text-color: #FFFFFF; /* Blanco fijo (cambiado de negro) */
    --highlight-word-color: #3182ce; /* Color para palabras resaltadas en modo claro: Azul oscuro */
    --overlay-color: rgba(0, 0, 0, 0.6); /* Overlay oscuro un poco menos opaco para modo claro (cambiado de rgba(255,255,255,0.7)) */
    --header-text-shadow-color: rgba(0, 0, 0, 1); /* Sombra de texto muy fuerte para el encabezado (mantenida negra) */
}

/* Estilos globales y aplicación de las variables CSS */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    padding-top: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Botón de Iniciar Sesión (posición fija inferior derecha) */
.sticky-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background-color: var(--btn-primary-bg);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.2s ease-in-out;
}
.sticky-button:hover {
    background-color: var(--btn-primary-hover-bg);
    transform: scale(1.05);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--section-title-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    transition: color 0.5s ease;
}
.card {
    background-color: var(--bg-card);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: background-color 0.5s ease;
}
.social-icon {
    font-size: 2.5rem;
    color: var(--text-accent);
    transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
}
.social-icon:hover {
    color: var(--text-color);
    transform: translateY(-5px);
}

.btn-custom-primary {
    background-color: var(--btn-primary-bg);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.2s ease-in-out;
}
.btn-custom-primary:hover {
    background-color: var(--btn-primary-hover-bg);
    transform: scale(1.05);
}

/* Sombra de texto para mejorar la legibilidad de otros textos (no del encabezado) */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Contenedor para el botón de alternancia de tema (posición fija superior derecha) */
.theme-toggle-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

/* Estilo del botón del icono de tema */
#themeToggleButton {
    background-color: var(--btn-primary-bg);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

#themeToggleButton:hover {
    background-color: var(--btn-primary-hover-bg);
    transform: rotate(20deg);
}

/* Estilos para el texto del HEADER */
.header-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--header-main-text-color); /* Usa el nuevo color fijo */
    text-shadow: 2px 2px 10px var(--header-text-shadow-color); /* Sombra de texto con color variable */
    font-size: var(--header-title-font-size);
}

.header-slogan {
    font-family: 'Inter', sans-serif;
    color: var(--header-main-text-color); /* Usa el nuevo color fijo */
    text-shadow: 2px 2px 8px var(--header-text-shadow-color); /* Sombra de texto con color variable */
    font-size: var(--header-slogan-font-size);
}

.highlight-word {
    color: var(--highlight-word-color);
    font-weight: 700;
    transition: color 0.5s ease;
}


/* Estilos del Carrusel en el Header */
header {
    position: relative;
    overflow: hidden;
    height: 100vh;
}

.hero-carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.hero-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Nueva capa de overlay para oscurecer las imágenes del carrusel */
.hero-carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color); /* Usa la variable de color del overlay */
    z-index: 4; /* Debe estar entre las imágenes (z-index:0) y el contenido (z-index:5) */
    transition: background-color 0.5s ease; /* Transición para el cambio de modo */
}

.hero-carousel-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
    padding-top: 0;
}

.hero-carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--carousel-arrow-bg);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.hero-carousel-button:hover {
    background-color: var(--carousel-arrow-hover-bg);
}

.hero-carousel-button.prev {
    left: 1rem;
}

.hero-carousel-button.next {
    right: 1rem;
}

.hero-carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    background-color: var(--carousel-dot-bg);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-dot.active {
    background-color: var(--carousel-dot-active-bg);
    transform: scale(1.2);
}

/* Responsive adjustments for header text and carousel */
@media (max-width: 1024px) {
    :root {
        --header-title-font-size: 6.5rem; /* Ajuste para pantallas medianas */
        --header-slogan-font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .hero-carousel-button {
        padding: 0.5rem 0.75rem;
        font-size: 1.2rem;
    }
    .hero-carousel-content {
        padding-top: 0;
    }
    :root {
        --header-title-font-size: 4.5rem; /* Ajuste para tablets */
        --header-slogan-font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    .hero-carousel-button {
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }
    .hero-carousel-dots {
        bottom: 1rem;
        gap: 0.3rem;
    }
    .hero-dot {
        width: 10px;
        height: 10px;
    }
    .hero-carousel-content {
        padding-top: 0;
    }
    :root {
        --header-title-font-size: 2.5rem; /* Ajuste para móviles */
        --header-slogan-font-size: 1.3rem;
    }
}
