﻿/* Reset básico y box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables de color basado en psicología de color educación media */
:root {
    --color-primary: deepskyblue;
    --color-secondary: #2e5984; /* Azul oscuro para contraste */
    --color-tertiary: #f2f9ff; /* Azul muy claro para fondos */
    --color-accent: #f6b26b; /* Naranja suave para acentos */
    --color-text-primary: #082567; /* Azul muy oscuro para texto */
    --color-text-light: #444;
    --color-bg: #ffffff;
}

/* Body y fuente */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /*flex-direction: column;*/
}

/* Header navbar */
header {
    background-color: var(--color-primary);
    color: white;
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-icon {
    height: 50px;
    width: 100px;
}

/* Menú de navegación */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu li a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a:focus {
    color: var(--color-accent);
}

/* Contenedor principal */
.container {
    display: flex;
    flex: 1;
    padding: 2rem 2rem;
    gap: 2rem;
    background-color: var(--color-tertiary);
}

/* Main contenido */
main {
    flex: 3;
    display: flex;
    flex-direction: column;
}

/* Título principal */
h1 {
    /* color: var(--color-secondary);
    margin-bottom: 1rem;
    font-size: 2rem; */
    text-align: center;
    color: #24496a; /*Azul oscuro, para texto*/ /* #228B22; */ /* Verde: tranquilidad y crecimiento */
    margin-bottom: 36px;
    font-weight: 800;
    font-size: 2.2em;
}

/* Slider */
.slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 1rem;
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    height: 450px;
    /*object-fit: cover;*/ /* recorta imagen si es necesario manteniendo proporción */
    display: none;
}

    .slide.active {
        display: block;
        width: 100%;
        height: 450px;
        object-fit: cover;
        border-radius: 8px;
    }

/* Texto introductorio */
.intro-text {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    max-width: 100%;
}

/* Botón grande central */
.btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-main {
    background-color: #24496a /*var(--color-primary)*/;
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(30,144,255,0.6);
    transition: background-color 0.3s ease;
}

.btn-main:hover,
.btn-main:focus {
    background-color: var(--color-accent);
    box-shadow: 0 6px 12px rgba(246,178,107,0.8);
}

/* Barra lateral */
.sidebar {
    flex: 1;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    color: var(--color-text-primary);
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

/* Calendario básico estilos */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    user-select: none;
}

.day-name,
.day {
    padding: 0.4rem;
    text-align: center;
    border-radius: 4px;
}

.day-name {
    font-weight: 600;
    background-color: var(--color-primary);
    color: white;
}

.day {
    background-color: var(--color-tertiary);
    cursor: default;
    position: relative;
}

.day.today {
    border: 2px solid var(--color-primary);
}

.day.holiday {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
    cursor: pointer;
}

.tooltip {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-secondary);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Contenedor de controles del calendario */
.calendar-header {
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.calendar-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

    .calendar-controls button {
        background-color: var(--color-primary);
        color: white;
        border: none;
        border-radius: 5px;
        width: 36px;
        height: 36px;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(30,144,255,0.4);
        transition: background-color 0.3s ease;
        user-select: none;
    }

        .calendar-controls button:hover,
        .calendar-controls button:focus {
            background-color: var(--color-accent);
            box-shadow: 0 4px 12px rgba(246,178,107,0.7);
            outline: none;
        }

/* Footer */
footer {
    background-color: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-icon {
    width: 200px;
    height: 100px;
}

.footer-right a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.footer-right a:hover,
.footer-right a:focus {
    color: var(--color-accent);
}

.footer-text {
    width: 100%;
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 1rem;
    }

    main, .sidebar {
        width: 100%;
    }

    .btn-main {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .nav-menu {
        display: none; /* Para un menú móvil debes implementar un menú hamburguesa aparte */
    }

    header {
        padding: 0.5rem 1rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .intro-text {
        font-size: 1rem;
    }
}

/* Botón hamburguesa, sólo visible en móviles */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 14px;
    z-index: 999;
}

/* Icono hamburguesa */
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    background: white;
    height: 3px;
    width: 25px;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s;
}

.hamburger::before, .hamburger::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Estilos menú móvil */
@media (max-width: 600px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: var(--color-secondary);
        width: 70vw;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        padding: 18px 0;
        border-radius: 0 0 8px 8px;
        z-index: 998;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu li {
        margin: 0 0 2px 0;
    }

    .nav-menu li a {
        color: white;
        padding: 10px 24px;
        font-size: 1.1rem;
        width: 100%;
        border-bottom: 1px solid #20609022;
    }
}

/* Animación botón hamburguesa activo */
.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg) translate(5px,5px);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg) translate(5px,-5px);
}

/* Estilos para formularios e inputs */
form {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    width: 320px;
    box-sizing: border-box;
    margin: 50px auto; /* margen superior e inferior 50px, auto horizontal */
    display: block;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 20px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
}

#boton_captcha, input[type="submit"] {
    background-color: #017bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}

#captcha-box {
    font-family: monospace;
    font-weight: bold;
    font-size: 26px;
    padding: 10px 15px;
    border: 2px solid #333;
    width: max-content;
    margin-bottom: 10px;
    user-select: none;
    letter-spacing: 3px;
    background-color: #eee;
    text-align: center;
}
