@charset "UTF-8";

/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    --oecsa-azul: #0a2e4d;      /* Azul Corporativo */
    --oecsa-verde: #c1d72e;     /* Verde Corporativo */
    --oecsa-verde-hover: #aabd26;
    --bg-body: #f4f6f8;
    --bg-white: #ffffff;
    --texto: #333333;
    --texto-suave: #666666;
    --borde: #e1e4e8;
    --rojo: #d32f2f;
    --bg-error: #ffebee;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--texto);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
}

/* =========================================
   2. ENCABEZADO (HEADER)
   ========================================= */
header {
    background: var(--bg-white);
    padding: 15px 25px;
    border-bottom: 3px solid var(--oecsa-verde);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 200;
}

.header-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 20px;
}

.header-logo {
    height: 55px;
    width: auto;
    display: block;
    transition: transform 0.3s;
}

.header-logo:hover { transform: scale(1.05); }

header h1 {
    margin: 0;
    color: var(--oecsa-azul);
    font-size: 1.5rem;
}

.top-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* =========================================
   3. NAVEGACIÓN MODERNA (CÁPSULAS)
   ========================================= */
nav {
    display: flex;
    justify-content: center;
    background: var(--bg-white);
    padding: 15px 20px;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--borde);
}

.nav-btn {
    background-color: #f4f6f8;
    color: var(--texto);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav-icon { font-size: 1.1rem; line-height: 1; }
.arrow { font-size: 0.8rem; transition: transform 0.3s; }

.nav-btn:hover, .dropdown.active .nav-btn {
    background-color: var(--oecsa-azul);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 46, 77, 0.2);
}

.dropdown.active .arrow { transform: rotate(180deg); }

.dropdown { position: relative; }

/* Submenús Flotantes */
.submenu {
    display: none;
    position: absolute;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

@keyframes fadeIn { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.dropdown.active .submenu { display: block; }

.submenu a {
    display: block;
    padding: 10px 15px;
    color: var(--texto);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-align: left;
    border-bottom: none;
}

.submenu a:hover {
    background-color: #f0f7ff;
    color: var(--oecsa-azul);
    font-weight: 600;
}

/* =========================================
   4. LAYOUT GENERAL
   ========================================= */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.column {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--borde);
}

.panel {
    background-color: var(--bg-white);
    border: 1px solid var(--borde);
    border-top: 4px solid var(--oecsa-verde);
    border-radius: 10px;
    padding: 20px;
    max-width: 1200px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

/* =========================================
   5. NOTICIAS (CARRUSEL CONTROLADO)
   ========================================= */
h2 {
    color: var(--oecsa-azul);
    border-bottom: 2px solid var(--oecsa-azul);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

#noticias-carrusel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 620px;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid var(--borde);
    margin-bottom: 30px;
}

#noticia-container {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
}

.noticia-item {
    min-width: 100%;
    height: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    box-sizing: border-box;
}

.noticia-box {
    background-color: transparent;
    max-width: 800px;
    width: 100%;
    border-radius: 8px;
}

.noticias-normales-container .noticia-box {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--borde);
    border-left: 4px solid var(--oecsa-verde);
}

.noticia-box h3 {
    color: var(--oecsa-azul);
    font-size: 1.6rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.noticia-box p {
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.7;
}

.noticia-box img {
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 100%;      
    max-height: 350px;    
    width: auto;
    height: auto;
    object-fit: contain;  
    background-color: #f9f9f9;
}

#prevNoticia, #nextNoticia {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--borde);
    color: var(--oecsa-azul);
    font-size: 24px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#prevNoticia:hover, #nextNoticia:hover {
    background: var(--oecsa-azul);
    color: white;
    border-color: var(--oecsa-azul);
}

#prevNoticia { left: 15px; }
#nextNoticia { right: 15px; }

/* =========================================
   6. REACCIONES
   ========================================= */
.reacciones-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reacciones-botones {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.reaccion-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: #555;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.reaccion-btn:hover { transform: scale(1.05); border-color: var(--oecsa-azul); }

.reaccion-btn.activa {
    background-color: #e3f2fd;
    border-color: var(--oecsa-azul);
    color: var(--oecsa-azul);
    font-weight: bold;
}

.reaccion-count { font-size: 0.85rem; }
.usuarios-reaccion { font-size: 0.8rem; color: var(--texto-suave); text-align: center; }

/* =========================================
   7. FORMULARIOS, LOGIN Y TABLAS
   ========================================= */
.login-box {
    width: 350px;
    margin: 80px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    border-top: 5px solid var(--oecsa-verde);
}

.logo-login { 
    width: 180px;
    height: auto; 
    margin-bottom: 25px; 
    display: block;
    margin-left: auto;
    margin-right: auto;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--oecsa-azul);
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 46, 77, 0.1);
}

.btn, button, .top-controls a, input[type="submit"] {
    display: inline-block;
    background-color: var(--oecsa-verde);
    color: var(--oecsa-azul);
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.95rem;
}

.btn:hover, button:hover, .top-controls a:hover {
    background-color: var(--oecsa-verde-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}
.btn-secondary:hover { background-color: #d0d0d0; }

.btn-danger {
    background-color: #ffebee;
    color: var(--rojo);
    border: 1px solid #ffcdd2;
}
.btn-danger:hover { background-color: #ffcdd2; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

th { background-color: var(--oecsa-azul); color: white; padding: 12px; text-align: left; }
td { border-bottom: 1px solid #eee; padding: 12px; }
tr:hover { background-color: #f9f9f9; }

/* =========================================
   8. CALENDARIO Y RESERVAS (PREMIUM)
   ========================================= */
#calendar {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(10, 46, 77, 0.08);
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 30px;
    font-family: 'Segoe UI', sans-serif;
    transition: transform 0.3s ease;
}

/* Título */
.fc .fc-toolbar-title {
    font-size: 1.8em;
    color: var(--oecsa-azul);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Botones Calendario (Normal) - ALTO CONTRASTE */
.fc .fc-button-primary {
    background-color: #ffffff;
    border: 1px solid var(--oecsa-azul);
    color: var(--oecsa-azul);
    opacity: 1 !important; /* Forzar visibilidad */
    font-weight: 600;
    text-transform: capitalize;
    border-radius: 8px;
    padding: 8px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

/* Hover */
.fc .fc-button-primary:hover {
    background-color: var(--oecsa-azul);
    border-color: var(--oecsa-azul);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 46, 77, 0.2);
}

/* Activo */
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: var(--oecsa-verde);
    border-color: var(--oecsa-verde);
    color: var(--oecsa-azul);
    font-weight: 800;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Focus */
.fc .fc-button-primary:focus {
    box-shadow: 0 0 0 3px rgba(193, 215, 46, 0.4) !important;
}

/* Días */
.fc-col-header-cell {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-bottom: 3px solid var(--oecsa-azul) !important;
}
.fc-col-header-cell-cushion {
    color: var(--oecsa-azul);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.fc-day-today {
    background-color: rgba(193, 215, 46, 0.1) !important;
}

/* Eventos */
.fc-event {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 1px 0;
    padding: 2px 4px;
    font-size: 0.85rem;
    border-left: 4px solid rgba(0,0,0,0.2);
}
.fc-event:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    z-index: 50 !important;
}

/* Modal y Leyenda */
.leyenda {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.tag {
    padding: 8px 18px;
    border-radius: 50px;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tag-rojo { background: linear-gradient(135deg, #ff5252, #d32f2f); }
.tag-verde { background: linear-gradient(135deg, #d4e157, #afb42b); color: #0a2e4d; }
.tag-azul { background: linear-gradient(135deg, #42a5f5, #1976d2); }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 46, 77, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeInOverlay 0.3s ease-out;
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    position: relative;
    animation: zoomInModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-box h3 {
    margin-top: 0;
    color: var(--oecsa-azul);
    font-size: 1.6rem;
    border-bottom: 2px solid var(--oecsa-verde);
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.btn-confirm {
    margin-top: 30px;
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--oecsa-azul);
    background: linear-gradient(45deg, var(--oecsa-verde), #d4e157);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(193, 215, 46, 0.4);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-confirm:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(193, 215, 46, 0.6); }

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}
.close-modal:hover { color: var(--rojo); transform: rotate(90deg); }

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomInModal { from { transform: scale(0.8) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* =========================================
   9. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; padding: 15px; }
    .header-left { flex-direction: column; }
    .top-controls { width: 100%; margin-top: 15px; align-items: center; }
    
    nav { flex-direction: column; gap: 10px; align-items: stretch; padding: 10px; }
    .nav-btn { justify-content: space-between; width: 100%; border-radius: 10px; }
    .submenu { position: static; transform: none; width: 100%; box-shadow: none; border: 1px solid #eee; margin-top: 5px; opacity: 1; animation: none; }
    
    .row { flex-direction: column; }
    #noticias-carrusel { height: 500px; }
    .noticia-item { padding: 15px 30px; }
    .noticia-box img { max-height: 200px; }
}