﻿/* ============================
   RESET BÁSICO
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================
   TIPOGRAFÍA Y BASE
============================ */
body {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
    padding: 20px;
    line-height: 1.5;
}

.login-footer,
.header {
    text-align:center;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.floating-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    font-size: 14px;
    transition: all 0.25s ease;
    display: flex;
}

.floating-label.up {
    top: -4px;
    font-size: 14px;
    color: #666;
}

.floating-label span {
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s ease;
}

.floating-label span.show {
    opacity: 1;
    transform: translateY(0);
}

.placeholder-anim {
    position: absolute;
    left: 12px; /* coincide con padding del input */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    font-size: 14px;
    font-family: inherit;
    display: flex;
}

.placeholder-anim span {
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s ease;
}

.placeholder-anim span.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   LOGIN – DISEÑO RESPONSIVE
============================ */
.login-container {
    max-width: 380px;
    margin: 40px auto;
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #2d89ef;
}

.login-container form input[type=text],
.login-container form input[type=password] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.login-container form input[type=submit] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #2d89ef;
    border-radius: 6px;
    cursor: pointer;
}

.login-footer {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}
.link-recuperar {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    color: #007bff;
    text-decoration: none;
}
.link-recuperar:hover {
    text-decoration: underline;
}
/* ============================
   LOGIN EN TELÉFONOS
============================ */
@media (max-width: 480px) {

    .login-container {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
        padding: 20px;
        border-radius: 10px;
    }

    .login-container h2 {
        font-size: 20px;
    }

    .login-container form input[type=text],
    .login-container form input[type=password],
    .login-container form input[type=submit] {
        font-size: 15px;
        padding: 12px;
    }

    .login-footer {
        font-size: 13px;
    }
}

/* ============================
   CONTENEDORES
============================ */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* ============================
   ENCABEZADOS
============================ */
h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: 600;
    color: #222;
    text-align:center;
}

/* ============================
   TABLAS
============================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

table th {
    background: #2d89ef;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
}

table tr:hover {
    background: #f0f7ff;
}

/* Búsqueda */
.table-search {
    width: 200px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Paginación */
.table-pager {
    margin-top: 10px;
    text-align: center;
}

.pager-btn {
    padding: 6px 12px;
    margin: 2px;
    border: 1px solid #2d89ef;
    background: white;
    color: #2d89ef;
    border-radius: 4px;
    cursor: pointer;
}

.pager-btn.active {
    background: #2d89ef;
    color: white;
}

/* Flechas */
th .th-text {
    display: inline-block;
    padding-right: 22px;
}

.sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    text-align: center;
    opacity: 0.6;
    pointer-events: none;
}

/* ============================
   FORMULARIOS
============================ */
form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

input[type=text], input[type=email], input[type=password], 
input[type=date], input[type=number], input[type=tel], select, textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    transition: all .2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #2d89ef;
    box-shadow: 0 0 4px rgba(45,137,239,0.4);
    outline: none;
}

textarea {
    min-height: 120px;
}

/* ============================
   BOTONES
============================ */
.btn, input[type=submit], button {
    background: #2d89ef;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover, input[type=submit]:hover, button:hover {
    background: #1b5fbf;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #444;
}

/* ============================
   MENSAJES
============================ */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.alert-success {
    background: #e8f9e8;
    border-left: 4px solid #2ecc71;
}

.alert-error {
    background: #fdeaea;
    border-left: 4px solid #e74c3c;
}

/* ============================
   CARDS
============================ */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card .material-icons {
    transition: transform 0.3s ease;
    display: inline-block;
}

.card:hover .material-icons {
    transform: scale(1.25);
}

/* ============================
   LISTAS
============================ */
ul {
    list-style: none;
}

ul li {
    background: #ffffff;
    margin-bottom: 10px;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: transform .2s ease, box-shadow .2s ease;
}

ul li:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #2d89ef;
    transform: translateX(-100%);
    transition: transform .25s ease;
}

ul li:hover::before {
    transform: translateX(0);
}

/* ============================
   LINKS
============================ */
a {
    color: #2d89ef;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================
   MODALES
============================ */
.modal-dashboard {
    display:none;
    position:fixed;
    top:0; left:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.45);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-dashboard.show { display:flex; }

.modal-content-dashboard {
    background:#fff;
    padding:20px;
    border-radius:10px;
    width:400px;
    box-shadow:0 5px 20px rgba(0,0,0,0.3);
}

.modal-close {
    float:right;
    cursor:pointer;
    font-size:22px;
    font-weight:bold;
}

.btn-link {
    display:inline-block;
    margin-top:10px;
    padding:8px 15px;
    background:#2d89ef;
    color:white;
    border-radius:6px;
    text-decoration:none;
}

.btn-link:hover {
    background:#1b5fb8;
}

/* ============================
   DASHBOARD
============================ */
.dashboard-container {
    padding: 20px;
}

.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex: 1 1 calc(33.33% - 20px);
    min-width: 280px;
}

.dashboard-card.full {
    flex: 1 1 100%;
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

/* ============================
   RESPONSIVE GENERAL
============================ */
@media (max-width: 1024px) {
    .dashboard-card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .dashboard-card {
        flex: 1 1 100%;
    }
}

/* ============================
   OPTIMIZACIÓN PARA TELÉFONOS
============================ */
@media (max-width: 480px) {

    body {
        padding: 10px;
    }

    .container,
    .dashboard-container {
        padding: 10px;
    }

    h1, h2, h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .dashboard-card {
        flex: 1 1 100%;
        min-width: auto;
        padding: 15px;
    }

    form {
        padding: 15px;
    }

    input, select, textarea {
        font-size: 14px;
        padding: 8px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    table th, table td {
        font-size: 13px;
        padding: 8px;
    }

    .btn, button, input[type=submit] {
        width: 100%;
        margin-bottom: 10px;
        font-size: 14px;
        padding: 10px;
    }

    .modal-content-dashboard {
        width: 90%;
        padding: 15px;
    }

    #formFiltros {
        flex-direction: column;
        gap: 10px;
    }

    #formFiltros select {
        width: 100%;
    }

    #calendar {
        padding: 5px;
    }

    .fc-toolbar-title {
        font-size: 16px !important;
    }

    .fc-button {
        padding: 4px 6px !important;
        font-size: 12px !important;
    }
}
/* ============================
   POPUP ALERT
============================ */
.popup-alert {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.popup-alert.show {
    display: flex;
}
.popup-content {
    background: #fff8e1;
    border-left: 6px solid #f4b400;
    padding: 20px;
    width: 380px;
    border-radius: 6px;
    font-family: Arial;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    animation: pop 0.25s ease-out;
}
@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.popup-content b {
    color: #b36b00;
}
.popup-content button {
    margin-top: 15px;
    background: #f4b400;
    border: none;
    padding: 8px 16px;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.popup-content button:hover {
    background: #d99a00;
}

.popup-close {
    margin-top: 15px;
    padding: 8px 20px;
    background: #1D6F42;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background .2s ease;
}

.popup-close:hover {
    background: #14532d;
}

/* ============================
   FIX: Encabezados del calendario
============================ */
.fc .fc-col-header-cell {
    background: #2d89ef !important;   /* fondo blanco */
    color: white !important;           /* texto oscuro */
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.fc .fc-col-header-cell-cushion {
    color: white !important;
    font-size: 14px;
}

/* ============================
   PASSWORD WRAPPER
============================ */
.password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #666;
    user-select: none;
}

.password-toggle:hover {
    color: #000;
}

/* ============================
   EXPORT / EXCEL ICON
============================ */
.export-container {
    text-align: right;
    margin: 10px 0;
}

.excel-icon {
    width: 38px;
    height: 38px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.excel-icon:hover {
    transform: scale(1.15);
}

.pdf-icon {
    width: 22px;
    height: 22px;
}
.export-pdf-btn:hover .pdf-icon {
    opacity: 0.8;
}

/* ============================
   TOOLTIP WRAPPERS
============================ */
.tooltip-wrapper,
.xl-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Tooltip arriba */
.tooltip-wrapper::after {
    content: attr(data-tip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #2d89ef;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.tooltip-wrapper::before {
    content: "";
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #2d89ef transparent;
    opacity: 0;
    z-index: 9998;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.tooltip-wrapper:hover::after,
.tooltip-wrapper:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tooltip-wrapper:hover .material-icons {
    transform: scale(1.25);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

/* Tooltip lateral (Excel) */
.xl-tooltip-wrapper::after {
    content: attr(data-tip);
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(10px);
    background: #2d89ef;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.xl-tooltip-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%) translateX(10px);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #2d89ef transparent transparent;
    opacity: 0;
    z-index: 9998;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.xl-tooltip-wrapper:hover::after,
.xl-tooltip-wrapper:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.image-container {
    position:absolute;
    width: 50px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;

    /* Animación suave */
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeIn 0.6s ease-out forwards;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;

    /* Imagen transparente en vez de blur */
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.image-container img:hover {
    opacity: 1; /* efecto elegante al pasar el mouse */
}

/* Keyframes de animación */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-gallery {
    margin-top: 10px;                 /* separa las imágenes del texto */
    display: inline-flex;             /* centra el bloque */
    gap: 12px;                        /* espacio entre imágenes */
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    /* Animación suave */
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.6s ease-out forwards;
}

.footer-gallery img {
    width: auto;
    height: 40px;
    border-radius: 10px;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.footer-gallery img:hover {
    opacity: 1;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   ROWS PER PAGE
============================ */
.rows-per-page {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    width: auto;
}

/* Ajuste móvil: desactivar tooltips */
@media (max-width: 480px) {
    .tooltip-wrapper::after,
    .tooltip-wrapper::before,
    .xl-tooltip-wrapper::after,
    .xl-tooltip-wrapper::before {
        display: none;
    }
}

@media (max-width: 480px) {
    #modalReprogramar .modal-content-dashboard {
        width: 90%;
        padding: 15px;
    }
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    background-size: cover;
    background-position: center;
}

.video-item::after {
    content: "▶";
    position: absolute;
    font-size: 50px;
    color: white;
    text-shadow: 0 0 10px black;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-wrapper {
    display: flex;
    flex-direction: column;
}

.video-title {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

/* MODAL */

/* Fondo del modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Contenedor centrado */
.video-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Título */
#modalTitulo {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
}

/* Descripción */
#modalDescripcion {
    font-size: 16px;
    color: #444;
    margin: 0 0 10px 0;
}

/* Video responsivo */
#modalVideo {
    width: 100%;
    height: 420px;
    border: none;
    border-radius: 8px;
}

/* Botón cerrar */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
}

.video-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.nav-btn {
    background: #2d89ef;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.nav-btn:hover {
    background: #1b5fbf;
}