/* =================================== */
/* === ESTILOS GENERALES Y RESET ==== */
/* =================================== */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

/* =================================== */
/* === LAYOUT Y COMPONENTES COMUNES === */
/* =================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #343a40;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
header h1 {
    margin: 0;
    font-size: 1.5em;
}
header nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    transition: opacity 0.2s;
}
header nav a:hover {
    opacity: 0.8;
}

.button {
    text-decoration: none;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white !important;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}
.button:hover {
    background-color: #5a6268;
}

/* =================================== */
/* === FORMULARIOS Y CONTENEDORES ==== */
/* =================================== */
.form-container {
    background-color: white;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
}
.form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="url"],
.form-container input[type="date"],
.form-container input[type="number"],
.form-container input[type="search"],
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}
.form-container button {
    padding: 12px;
    box-sizing: border-box;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.form-container button:hover {
    background-color: #0056b3;
}

/* =================================== */
/* === TABLAS ======================== */
/* =================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
th {
    background-color: #f8f9fa;
}

/* =================================== */
/* === ESTILOS ESPECÍFICOS DE PÁGINAS === */
/* =================================== */

/* --- Tarjetas de Estadísticas (Dashboard) --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid #007bff;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.stat-link { text-decoration: none; color: inherit; }
.stat-link:hover .stat-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.stat-card h3 { margin-top: 0; font-size: 1em; color: #6c757d; text-transform: uppercase; }
.stat-card .stat-number { font-size: 2.5em; font-weight: bold; color: #343a40; }
.stat-card.ingresos { border-color: #28a745; }
.stat-card.checkins { border-color: #17a2b8; }
.stat-card.vencer { border-color: #ffc107; }

/* --- Menú de Reportes --- */
.report-menu {
    max-width: 900px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}
.report-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: block;
    border-left: 5px solid #6c757d;
    transition: transform 0.2s, box-shadow 0.2s;
}
.report-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.12); }
.report-card h3 { margin-top: 0; color: #0056b3; font-size: 1.2em; }
.report-card p { font-size: 0.9em; color: #6c757d; line-height: 1.5; }

/* --- Perfil de Miembro --- */
.profile-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid #6c757d;
}
.profile-section h2 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
.profile-section.membership { border-color: #28a745; }
.profile-section.routine { border-color: #007bff; }
.profile-section.progress { border-color: #ffc107; }

/* --- Página de Socios --- */
.actions-bar {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.actions-bar span { font-weight: bold; color: #333; }
.action-buttons a.button { margin-left: 10px; }
.action-buttons a.button.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
#member-list-body tr:hover { background-color: #f1f1f1; cursor: pointer; }
#member-list-body tr.tr-selected { background-color: #d4edda !important; font-weight: bold; }

/* --- Página de Check-in --- */
.search-container { max-width: 700px; margin: 40px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
#searchInput { width: 100%; padding: 15px; font-size: 1.2em; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; }
#resultsContainer { margin-top: 10px; border: 1px solid #ddd; border-radius: 5px; min-height: 50px; max-height: 400px; overflow-y: auto; }
.result-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; }
.result-item:last-child { border-bottom: none; }
.checkin-btn { padding: 10px 15px; background-color: #28a745; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; transition: background-color 0.2s; }
.checkin-btn:hover:not(:disabled) { background-color: #218838; }
.checkin-btn:disabled { background-color: #ccc; cursor: not-allowed; }
#checkinStatus { text-align: center; padding: 15px; font-size: 1.1em; font-weight: bold; margin-top: 10px; border-radius: 5px; }


/* =================================== */
/* === PÁGINAS DE LOGIN ================= */
/* =================================== */
.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    padding: 20px;
    box-sizing: border-box;
}
.login-container {
    padding: 30px 40px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}
.login-container h2 { text-align: center; margin-top: 0; margin-bottom: 10px; }
.login-container p { text-align: center; color: #6c757d; margin-bottom: 25px; }

/* =================================== */
/* === ALERTAS Y FILTROS ============== */
/* =================================== */
.alert { padding: 15px; margin-bottom: 20px; border-radius: 5px; border: 1px solid transparent; }
.alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.fila-vencida { background-color: #fff0f1; }
.filtros { margin-bottom: 15px; }
.filtros a { text-decoration: none; padding: 8px 12px; background-color: #e9ecef; color: #495057; border-radius: 5px; margin-right: 5px; font-size: 0.9em; }
.filtros a.activo { background-color: #007bff; color: white; font-weight: bold; }


/* =================================== */
/* === MEDIA QUERIES PARA MÓVILES ==== */
/* =================================== */

/* Para pantallas de hasta 768px (tablets y móviles grandes) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    header nav {
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    header nav a {
        margin: 5px;
        font-size: 0.9em;
        padding: 8px 10px;
        background-color: rgba(255,255,255,0.1);
        border-radius: 5px;
    }
    main {
        padding: 10px;
    }
    .form-container div[style*="display: flex"] {
        flex-direction: column;
        gap: 0 !important;
    }
    .form-container div[style*="display: flex"] > div {
        margin-bottom: 10px;
    }

    /* Regla para el contenedor de la tabla para permitir scroll horizontal */
    .table-responsive-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .actions-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .action-buttons a.button {
        margin-left: 0;
    }
}

/* Para pantallas de hasta 480px (móviles pequeños) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }
    .stat-card .stat-number {
        font-size: 2em;
    }
}

/* =================================== */
/* === ESTILOS PARA LA PÁGINA DE CLASES (SOCIO) === */
/* =================================== */

.semana-container {
    display: flex;
    overflow-x: auto; /* Permite el scroll horizontal en móviles */
    padding-bottom: 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
}

.dia-columna {
    min-width: 280px; /* Ancho mínimo de cada columna de día */
    max-width: 350px;
    flex: 1; /* Permite que las columnas crezcan si hay espacio */
    border-right: 1px solid #eee;
    padding: 0 10px 10px 10px;
}

.dia-columna:last-child {
    border-right: none;
}

.dia-header {
    text-align: center;
    padding: 10px 0;
    border-bottom: 2px solid #007bff;
    position: sticky; /* Encabezado del día se mantiene visible al hacer scroll vertical */
    top: 0;
    background-color: #fff;
    z-index: 5;
}
.dia-header h4, .dia-header p {
    margin: 0;
}
.dia-header p {
    font-size: 0.9em;
    color: #6c757d;
}

.clase-item {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-left: 5px solid #17a2b8; /* Color distintivo para las clases */
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}
.clase-item h5 {
    margin-top: 0;
    margin-bottom: 10px;
}
.clase-item p {
    margin: 5px 0;
    font-size: 0.9em;
}
/* =================================== */
/* === ESTILOS PARA LA PAGINACIÓN ==== */
/* =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
    flex-wrap: wrap; /* Para que se adapte en móviles */
}
.pagination .page-btn {
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    color: #007bff !important;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.pagination .page-btn:hover {
    background-color: #f1f1f1;
}
.pagination .page-btn.active {
    background-color: #007bff;
    color: white !important;
    border-color: #007bff;
    z-index: 2;
    cursor: default;
}
.pagination .page-btn.disabled {
    color: #ccc !important;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* ================================================== */
/* === ESTILOS MEJORADOS PARA GESTIÓN DE CLASES === */
/* ================================================== */

/* Contenedor principal del calendario semanal */
.semana-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Crea 7 columnas iguales */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Para que los bordes redondeados se apliquen bien */
    background-color: #f8f9fa;
}

/* Columna para cada día de la semana */
.dia-columna {
    border-right: 1px solid #ddd;
    background-color: white;
}
.dia-columna:last-child {
    border-right: none;
}

/* Encabezado de cada día (Lunes, Martes, etc.) */
.dia-header {
    text-align: center;
    padding: 10px 5px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0; /* Lo mantiene pegajoso si la columna es muy larga */
}
.dia-header h4, .dia-header p {
    margin: 0;
    font-size: 0.9em;
}
.dia-header h4 { font-weight: bold; }
.dia-header p { color: #6c757d; }

/* Tarjeta para cada clase individual */
.clase-card-gestion {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-left: 5px solid #007bff; /* Color distintivo */
    padding: 15px;
    margin: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.clase-card-gestion h5 {
    margin-top: 0;
    margin-bottom: 10px;
}
.clase-card-gestion p {
    margin: 4px 0;
    font-size: 0.9em;
    color: #495057;
}
.clase-card-gestion ul {
    list-style-type: none;
    padding-left: 5px;
    margin-top: 10px;
    font-size: 0.85em;
}

/* Estilos para la vista en celular */
@media (max-width: 992px) {
    .semana-container {
        display: flex; /* Cambia a modo flexible en tablets y móviles */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dia-columna {
        min-width: 280px; /* Ancho mínimo para cada día */
        max-width: 350px;
        flex: 1;
    }
}

/* =================================== */
/* === ESTILOS PARA BÚSQUEDA DINÁMICA === */
/* =================================== */

.dynamic-search-container {
    position: relative;
}
.search-results {
    position: absolute;
    width: 100%;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}
.search-result-item {
    padding: 10px;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: #f1f1f1;
}
.inscribir-btn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
}
/* Estilos para la lista de asistentes desplegable */
.attendee-list {
    margin-top: 10px;
    font-size: 0.9em;
}
.attendee-list summary {
    cursor: pointer;
    font-weight: bold;
    color: #007bff;
}
.attendee-list ul {
    list-style-type: none;
    padding-left: 15px;
    margin-top: 5px;
    background-color: #fff;
    border-radius: 4px;
    padding: 10px;
}
.attendee-list li {
    padding: 2px 0;
}

/* =================================== */
/* === ESTILOS PARA TARJETAS DE NOTICIAS === */
/* =================================== */
.news-container {
    margin-top: 30px;
}
.news-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border-left: 5px solid #6f42c1; /* Un color distintivo */
}
.news-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
}
.news-card .news-meta {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.news-card .news-content {
    font-size: 1em;
    line-height: 1.6;
}
/* Estilo para el nombre del autor en las noticias */
.news-author {
    font-weight: bold;
    display: inline-block; /* Evita que se rompa o colapse de forma extraña */
    margin: 0 4px; /* Añade un pequeño espacio a los lados */
}

/* ======================================================= */
/* === ESTILO ESPECIAL PARA NOTICIAS DEL ADMINISTRADOR === */
/* ======================================================= */
.news-card.admin-news {
    background-color: #FFFBEB; /* Un amarillo claro y suave */
    border-left-color: #FBBF24; /* Un color dorado/ámbar para el borde de acento */
}
    .news-meta {
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos pasen a la línea de abajo si no hay espacio */
    align-items: center;
}
.news-author {
    font-weight: bold;
    margin: 0 4px;
}


/* ============================================= */
/* === HEADER RESPONSIVE (PORTAL ADMIN) === */
/* ============================================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 70px;
}
.header-brand h1 { margin: 0; font-size: 1.5em; }
.desktop-nav { display: flex; align-items: center; gap: 15px; }
.desktop-nav a { color: #495057; text-decoration: none; padding: 10px 15px; border-radius: 5px; transition: background-color 0.2s; }
.desktop-nav a:hover { background-color: #f1f1f1; }
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 2em; cursor: pointer; }
.dropdown { position: relative; display: inline-block; }
.dropbtn { background: none; border: none; color: #495057; padding: 10px 15px; font-size: 1em; cursor: pointer; }
.dropdown-content { display: none; position: absolute; background-color: #ffffff; min-width: 180px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); z-index: 100; border-radius: 5px; right: 0; }
.dropdown-content a { color: #333; padding: 12px 16px; text-decoration: none; display: block; margin: 0 !important; }
.dropdown-content a:hover { background-color: #f1f1f1; }
.dropdown:hover .dropdown-content { display: block; }
.button-recepcion { background-color: #17a2b8; color: white !important; }
.button-recepcion:hover { background-color: #138496; }

/* Menú Lateral Móvil */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: #343a40;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 1001;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}
.mobile-nav.is-active { left: 0; }
.mobile-nav a { color: rgba(255, 255, 255, 0.9); padding: 15px 25px; text-decoration: none; display: block; font-size: 1.1em; }
.mobile-nav a:hover { background-color: #495057; }
.close-menu-btn { position: absolute; top: 15px; right: 25px; font-size: 2em; background: none; border: none; color: white; cursor: pointer; }
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.nav-overlay.is-active { opacity: 1; visibility: visible; }
body.mobile-menu-open { overflow: hidden; }

/* =================================== */
/* === DISEÑO RESPONSIVE === */
/* =================================== */
@media (max-width: 1200px) {
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: block; }
}

@media (max-width: 768px) {
    .stats-container { grid-template-columns: 1fr 1fr; }
    .main-header-controls { flex-direction: column; align-items: stretch; }
    .actions-bar { flex-direction: column; align-items: flex-start; }
}

/* --- MODIFICACIÓN EN BOTONES --- */
.button.btn-crear {
    background-color: #17a2b8; /* Mismo color que el botón "Recepción" */
    color: white !important;
}
.button.btn-crear:hover {
    background-color: #138496;
}

/* --- ESTILOS MEJORADOS PARA LA BARRA DE ACCIONES Y BÚSQUEDA --- */
.main-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.search-container {
    flex-grow: 1; /* Permite que la barra de búsqueda ocupe el espacio disponible */
    min-width: 300px;
}
.search-container input[type="search"] {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* --- ESTILOS PARA LA VISTA EN CELULAR --- */
@media (max-width: 768px) {
    .main-header-controls {
        flex-direction: column;
        align-items: stretch; /* Hace que los elementos ocupen todo el ancho */
    }
    
    .actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .action-buttons a.button {
        margin-left: 0;
    }
}

/* ============================================= */
/* === ESTILOS PARA EL PANEL DE ESTADO DE LICENCIA === */
/* ============================================= */
.license-status {
    border: 1px solid #ddd;
    border-left-width: 5px;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.license-status p {
    font-size: 1.2em;
    margin: 0;
}
.license-status .status-prueba { border-left-color: #ffc107; } /* Amarillo */
.license-status .status-activa { border-left-color: #28a745; } /* Verde */
.license-status .status-pendiente { border-left-color: #17a2b8; } /* Celeste */
.license-status .status-vencida { border-left-color: #dc3545; } /* Rojo */

.license-status ul {
    list-style-type: none;
    padding-left: 0;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}
.license-status ul li {
    margin-bottom: 10px;
}

/* --- ESTILOS MEJORADOS PARA PÁGINAS PÚBLICAS --- */
.landing-container { max-width: 1100px; margin: auto; padding: 2rem; }
.hero-section { text-align: center; padding: 4rem 1rem; background-color: #343a40; color: white; }
.hero-section h1 { font-size: 2.8em; margin-bottom: 0.5em; }
.hero-section .lead { font-size: 1.3em; color: rgba(255,255,255,0.8); max-width: 800px; margin: auto; }
.feature-row { display: flex; align-items: center; gap: 3rem; margin-top: 4rem; flex-wrap: wrap; }
.feature-row.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; min-width: 300px; }
.feature-media { flex: 1; min-width: 300px; background-color: #e9ecef; height: 300px; border-radius: 8px; }
.pricing-card { border: 1px solid #ddd; border-radius: 8px; padding: 2rem; max-width: 450px; margin: 2rem auto; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.register-container { max-width: 500px; margin: 4rem auto; padding: 2rem; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* ======================================================= */
/* === ESTILOS PARA EL NUEVO DASHBOARD DE SUPER ADMIN === */
/* ======================================================= */

.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}
.admin-controls .search-container {
    flex-grow: 1;
    min-width: 250px;
}
.admin-controls .filter-container {
    display: flex;
    gap: 10px;
    align-items: center;
}
.admin-controls select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* ================================================== */
/* === ESTILOS PARA MODAL DE VISOR DE IMÁGENES === */
/* ================================================== */

/* El contenedor del modal (overlay de fondo) */
.image-modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}

/* El botón para cerrar el modal */
.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* La imagen dentro del modal */
.image-modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 85vh;
    cursor: zoom-in; /* Cursor de lupa por defecto */
    transition: transform 0.3s ease; /* Animación suave para el zoom */
}

/* Estilo de la imagen cuando se hace zoom */
.image-modal-content.zoomed {
    max-width: none; /* Quitar límites para un zoom completo */
    max-height: none;
    transform: scale(1.5); /* Ajusta este valor para más o menos zoom */
    cursor: zoom-out;
}

/* ======================================================= */
/* === NUEVO DISEÑO PARA PÁGINAS PÚBLICAS (INSPIRADO) === */
/* ======================================================= */

/* Importamos una tipografía moderna */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Estilos base para las páginas públicas */
.public-body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
}

/* Encabezado de la página pública */
.landing-header {
    background-color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-header .logo {
    font-weight: 700;
    font-size: 1.5em;
    color: #343a40;
    text-decoration: none;
}
.landing-header .nav-links a {
    margin-left: 25px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
}
.landing-header .nav-links a.button {
    background-color: #0d6efd;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
}

/* Sección Héroe (la principal) */
.hero-section {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 6rem 1rem;
}
.hero-section h1 {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 0.5em;
}
.hero-section .lead {
    font-size: 1.25em;
    color: rgba(255,255,255,0.8);
    max-width: 800px;
    margin: auto;
}

/* Contenedor general para las secciones */
.landing-container {
    max-width: 1100px;
    margin: auto;
    padding: 4rem 2rem;
}

/* Estilo para las filas de características */
.feature-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}
.feature-row.reverse {
    flex-direction: row-reverse;
}
.feature-text {
    flex: 1;
    min-width: 300px;
}
.feature-text h3 {
    font-size: 1.8em;
    margin-bottom: 1rem;
}
.feature-media {
    flex: 1;
    min-width: 300px;
    background-color: #e9ecef;
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #6c757d;
}

/* Sección de Precios */
.pricing-section {
    background-color: #ffffff;
    text-align: center;
}
.pricing-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 450px;
    margin: 2rem auto;
}
.pricing-card .price {
    font-size: 3em;
    font-weight: 700;
    color: #0d6efd;
    margin: 1rem 0;
}
.pricing-card .price-note {
    color: #6c757d;
}

/* Botón de Llamada a la Acción */
.cta-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px; /* Botón más redondeado */
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Contenedor del formulario de registro */
.register-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ======================================================= */
/* === ESTILOS PARA EL NUEVO HEADER PÚBLICO RESPONSIVE === */
/* ======================================================= */

/* Contenedor principal del Header */
.landing-header {
    background-color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-header .logo {
    font-weight: 700;
    font-size: 1.5em;
    color: #343a40;
    text-decoration: none;
}
.landing-header .desktop-nav-links {
    display: flex; /* Se muestra en escritorio */
    align-items: center;
    gap: 25px;
}
.landing-header .desktop-nav-links a {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: color 0.2s;
}
.landing-header .desktop-nav-links a:hover {
    color: #0d6efd;
}
.landing-header .desktop-nav-links a.button {
    background-color: #0d6efd;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.landing-header .desktop-nav-links a.button:hover {
    background-color: #0056b3;
    color: white;
}

/* Botón de Menú Móvil (Hamburguesa) */
.mobile-menu-toggle {
    display: none; /* Oculto en escritorio por defecto */
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    z-index: 1001; /* Asegura que esté sobre otros elementos */
}

/* Menú de Superposición (Overlay) para Móvil */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.98); /* Fondo oscuro inmersivo */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-nav-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.mobile-nav-overlay .nav-links-mobile a {
    color: rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    text-decoration: none;
    display: block;
    font-size: 1.8em;
    font-weight: 500;
    text-align: center;
    width: 100%;
    transition: color 0.2s;
}
.mobile-nav-overlay .nav-links-mobile a:hover {
    color: white;
}
.mobile-nav-overlay .close-menu-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5em;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Media Query para activar el menú móvil */
@media (max-width: 992px) {
    .landing-header .desktop-nav-links {
        display: none; /* Ocultar el menú de escritorio */
    }
    .mobile-menu-toggle {
        display: block; /* Mostrar el botón de hamburguesa */
    }
}

/* Menú Lateral Móvil */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: #343a40;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 1001;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}
.mobile-nav.is-active { left: 0; }
.mobile-nav a { color: rgba(255, 255, 255, 0.9); padding: 15px 25px; text-decoration: none; display: block; font-size: 1.1em; }
.mobile-nav a:hover { background-color: #495057; }
.close-menu-btn { position: absolute; top: 15px; right: 25px; font-size: 2em; background: none; border: none; color: white; cursor: pointer; }
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.nav-overlay.is-active { opacity: 1; visibility: visible; }
body.mobile-menu-open { overflow: hidden; }

/* ============================================= */
/* === ESTILOS PARA LA PÁGINA DE REGISTRO PÚBLICA === */
/* ============================================= */

.register-container {
    max-width: 550px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.register-container h2 {
    text-align: center;
    font-weight: 600;
    font-size: 2em;
    margin-bottom: 0.5em;
}

.register-container p {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* El botón de registro hereda estilos de .cta-button, pero le damos ancho completo */
.register-container .cta-button {
    width: 100%;
    padding: 15px;
}

/* Estilos para el panel de estado de licencia */
.license-status p {
    font-size: 1.2em;
    margin: 0;
    padding: 10px;
    border-radius: 5px;
    color: black;
    text-align: center;
}
.license-status .status-prueba { background-color: #0d6efd; } /* Azul */
.license-status .status-activa { background-color: #198754; } /* Verde Oscuro */
.license-status .status-pendiente { background-color: #ffc107; color: #333; } /* Amarillo */
.license-status .status-vencida { background-color: #dc3545; } /* Rojo */