

/* -----------------------------------
   Estilos globales y estructura
   ----------------------------------- */
   /* -----------------------------------
   Variables CSS para consistencia
   ----------------------------------- */
:root {
  /* Colores institucionales */
  --color-primario: #004AAD;
  --color-secundario: #E0BE74;
  --color-fondo-inicial: #f9fafc;
  --color-fondo-final: #eef2f6;
  --color-texto: #1a1a1a;
  --tiempo-transicion: 0.3s;
}

/* Tipografías institucionales */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Roboto:wght@400;500;700&display=swap');

/* Fondo general del sitio */
body {
  background: linear-gradient(180deg, var(--color-fondo-inicial) 0%, var(--color-fondo-final) 100%);
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-texto);
}

/* Encabezado completamente azul */
header {
  background: var(--color-primario);
  color: white;
  text-align: center;
  padding: 1.5em 0;
  animation: fadeInDown 1.7s ease-in-out;
}
/* Título principal dentro del encabezado */
header h1, 
header h2 {
  color: var(--color-secundario); /* Dorado institucional */
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Barra de navegación */
nav {
  background: #333;
  padding: 0.8em;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  transition: color var(--tiempo-transicion) ease;
}

/* Hover dorado */
nav a:hover {
  color: var(--color-secundario);
  text-decoration: underline;
}

/* Enlace activo en dorado */
nav a.active {
  color: var(--color-secundario);
  border-bottom: 3px solid var(--color-secundario);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Botón tipo “hamburguesa” (solo visible en móvil) */
.menu-toggle {
    display: none;
    background: #E0BE74;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
}

/* Barra de navegación principal */
nav {
    background: linear-gradient(90deg, #333, #555);
    padding: 0.8em;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color var(--tiempo-transicion) ease, text-decoration var(--tiempo-transicion) ease;
}

nav a:hover {
    color: #E0BE74;
    text-decoration: underline;
}

/* Navegación responsiva para pantallas pequeñas */
@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
    }
    
    nav.show {
        display: flex;
        transition: all var(--tiempo-transicion) ease-in-out;
    }
    .menu-toggle {
        display: block;
        margin: auto;
    }
}

/* -----------------------------------
   Carrusel de imágenes
   ----------------------------------- */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.carousel-track {
    display: flex;
    animation: scroll 18s linear infinite;
}

.carousel-track img {
    width: 38.33%;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 10px;
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
    cursor: pointer;
}

.carousel-track img:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Animación de desplazamiento del carrusel */
@keyframes scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Ajustes responsivos del carrusel */
@media (max-width: 768px) {
    .carousel-track img {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .carousel-track img {
        width: 100%;
    }
}

/* -----------------------------------
   Sección de video (inicio)
----------------------------------- */
.video-section {
    background: #f1f8f2;
    padding: 30px 20px;
    margin: 40px auto;
    max-width: 800px; /* Aumentamos el ancho para permitir dos columnas */
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-section h2 {
    color: var(--color-primario);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--color-secundario);
    display: inline-block;
    padding-bottom: 6px;
}

.video-duo {
    display: flex;
    justify-content: space-between;
    gap: 40px; /* Más espacio entre los videos */
    flex-wrap: wrap; /* Permite que se acomoden uno debajo del otro en pantallas pequeñas */
    align-items: flex-start;
    margin-bottom: 20px;
}

.video-wrapper {
    flex: 1 1 46%; /* Un poco menos del 50% para que entre el gap */
}

.video-wrapper video,
.video-humedal {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.video-section p {
    max-width: 800px;
    margin: 15px auto 0;
    text-align: justify;
    color: #333;
    font-size: 1rem;
    line-height: 1.7;
}

/* Ajustes responsivos para sección de video */
@media (max-width: 768px) {
    .video-section {
        padding: 20px 10px;
        margin: 20px;
    }
    .video-section h2 {
        font-size: 1.4rem;
    }
    .video-section p {
        font-size: 0.95rem;
    }
}

/* -----------------------------------
   Foro / chat de comentarios
   ----------------------------------- */
.foro-chat {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.comment-history {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #fdfdfd;
}

.comment-history .comentario {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #e7f5e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 85%;
    word-wrap: break-word;
}

.comment-history .comentario:nth-child(odd) {
    background: #f0f0f0;
}

.comment-history .comentario strong {
    color: var(--color-primario);
    margin-right: 6px;
}

.comentario-imagen {
    max-width: 150px;
    max-height: 150px;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    object-fit: cover;
}

/* -----------------------------------
   Login / Registro (formularios de autenticación)
   ----------------------------------- */
.auth-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 20px;
}

.auth-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.auth-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.auth-box h2 {
    color: var(--color-primario);
    text-align: center;
}

/* Estilos para campos del formulario */
.auth-box input[type="text"],
.auth-box input[type="password"],
.auth-box input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* Botón de envío/Login/Registro */
.auth-box button {
    margin-top: 15px;
    padding: 10px 15px;
    background: var(--color-primario);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background var(--tiempo-transicion) ease, transform var(--tiempo-transicion) ease;
}

.auth-box button:hover {
    background: #1e5322;
}

.auth-box button:focus {
    outline: 3px solid var(--color-secundario);
}

/* -----------------------------------
   Sección de “Curiosidades” o bloques informativos
   ----------------------------------- */
.intro-content {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sabia-block {
    margin-bottom: 24px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.sabia-block h3 {
    font-size: 1.4rem;
    color: var(--color-primario);
}

.sabia-block img {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 15px auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
    cursor: zoom-in;
}

.sabia-block img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Bloques horizontales (texto / multimedia) */
.sabia-block.horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 25px;
}

.sabia-texto {
    flex: 1 1 50%;
    text-align: justify;
    color: #333;
    font-size: 1rem;
}

.sabia-imagen {
    flex: 1 1 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sabia-imagen img,
.sabia-imagen video {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .sabia-block.horizontal {
        flex-direction: column;
        text-align: center;
    }
    .sabia-texto, .sabia-imagen {
        flex: 1 1 100%;
    }
    .sabia-imagen img,
    .sabia-imagen video {
        max-width: 100%;
    }
}

/* -----------------------------------
   Página: Impacto Ambiental
   ----------------------------------- */
.impacto-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px 25px;
    background: linear-gradient(180deg, #ffffff 0%, #f2fff4 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    animation: fadeInUp 1.2s ease-in-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.impacto-content > h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--color-primario);
    border-bottom: 3px solid var(--color-secundario);
    display: inline-block;
    padding-bottom: 8px;
    margin-bottom: 25px;
    width: 100%;
}

.impacto-content p {
    color: #333;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 18px;
}

.impacto-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.impactos-positivos {
    background: linear-gradient(180deg, #e8f5e9 0%, #dcedc8 100%);
    border-left: 6px solid var(--color-primario);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.impactos-positivos:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(46,125,50,0.2);
}

.impactos-positivos h2 {
    color: var(--color-primario);
    margin-bottom: 15px;
    text-align: center;
}

.impactos-positivos li {
    margin-bottom: 10px;
    padding-left: 10px;
    position: relative;
    color: var(--color-primario);
}

.impactos-positivos li::before {
    content: "✔";
    color: var(--color-verde-claro);
    font-weight: bold;
    position: absolute;
    left: -18px;
}

.impactos-negativos {
    background: linear-gradient(180deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 6px solid var(--color-alerta);
    border-radius: 10px;
    padding: 20px;
    margin-top: 35px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.impactos-negativos:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(229,57,53,0.2);
}

.impactos-negativos h2 {
    color: #c62828;
    margin-bottom: 15px;
    text-align: center;
}

.impactos-negativos li {
    margin-bottom: 10px;
    padding-left: 10px;
    position: relative;
    color: #5d4037;
}

.impactos-negativos li::before {
    content: "✖";
    color: var(--color-alerta);
    font-weight: bold;
    position: absolute;
    left: -18px;
}

.cita {
    margin-top: 40px;
    font-style: italic;
    font-size: 1.1rem;
    text-align: center;
    color: var(--color-primario);
    background: rgba(232,245,233,0.6);
    border-left: 5px solid var(--color-secundario);
    border-radius: 10px;
    padding: 20px;
    line-height: 1.7;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.cita .autor {
    display: block;
    margin-top: 10px;
    color: var(--color-primario);
    font-weight: bold;
}

/* Ajustes responsivos para sección impacto */
@media (max-width: 768px) {
    .impacto-content {
        padding: 20px 15px;
        margin: 20px;
    }
    .impacto-content > h2 {
        font-size: 1.6rem;
    }
    .impactos-positivos h2,
    .impactos-negativos h2 {
        font-size: 1.3rem;
    }
    .impacto-content p,
    .impacto-content li {
        font-size: 0.95rem;
    }
    .cita {
        font-size: 1rem;
    }
}

/* -----------------------------------
   Página: Historia del Humedal
   ----------------------------------- */
.historia-block {
    background: linear-gradient(180deg, #ffffff 0%, #f4fff7 100%);
    border-radius: 12px;
    padding: 30px 25px;
    margin: 40px auto;
    max-width: 1000px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    animation: fadeInUp 1.2s ease-in-out;
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.historia-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.historia-block h3 {
    font-size: 1.9rem;
    color: var(--color-primario);
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--color-secundario);
    display: inline-block;
    padding-bottom: 6px;
}

.historia-block p {
    text-align: justify;
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #2e2e2e;
}

.historia-block img {
    display: block;
    width: 100%;
    max-width: 700px;
    margin: 25px auto;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    object-fit: cover;
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.historia-block img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(0,0,0,0.3);
}

.historia-block strong {
    color: var(--color-primario);
}

/* Ajustes responsivos para historia */
@media (max-width: 768px) {
    .historia-block {
        padding: 20px 15px;
        margin: 20px;
    }
    .historia-block h3 {
        font-size: 1.5rem;
    }
    .historia-block p {
        font-size: 0.95rem;
    }
    .historia-block img {
        max-width: 100%;
    }
    .carousel-track img {
        width: 50%;
    }
}

/* -----------------------------------
   Página: Cómo Ayudar a Cuidar el Humedal
   ----------------------------------- */
.ayuda-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px 25px;
    background: linear-gradient(180deg, #ffffff 0%, #e8f5e9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    animation: fadeInUp 1.2s ease-in-out;
}

main > h2 {
    text-align: center;
    color: var(--color-primario);
    font-size: 2rem;
    margin-top: 30px;
    margin-bottom: 10px;
    border-bottom: 3px solid var(--color-secundario);
    display: inline-block;
    width: 100%;
    padding-bottom: 8px;
}

.ayuda-content p {
    color: #333;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 20px;
}

.lista-ayuda {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    counter-reset: ayuda;
}

.lista-ayuda li {
    position: relative;
    margin-bottom: 18px;
    background: #f9fff9;
    border-left: 6px solid var(--color-primario);
    border-radius: 10px;
    padding: 15px 20px 15px 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
}

.lista-ayuda li::before {
    counter-increment: ayuda;
    content: counter(ayuda);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-verde-claro);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.lista-ayuda li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46,125,50,0.2);
    background: #f0fff3;
}

.lista-ayuda li strong {
    color: var(--color-primario);
}

/* Frase o párrafo final destacado */
.ayuda-content p:last-of-type {
    background: rgba(232,245,233,0.6);
    border-left: 5px solid var(--color-secundario);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primario);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Ajustes responsivos para sección de ayuda */
@media (max-width: 768px) {
    .ayuda-content {
        padding: 20px 15px;
        margin: 20px;
    }
    main > h2 {
        font-size: 1.6rem;
    }
    .lista-ayuda li {
        padding: 15px 15px 15px 55px;
    }
    .lista-ayuda li::before {
        width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 0.9rem;
        left: 15px;
    }
    .ayuda-content p {
        font-size: 0.95rem;
    }
    .ayuda-content p:last-of-type {
        font-size: 1rem;
    }
}

/* -----------------------------------
   Página: Telemetría del Humedal
   ----------------------------------- */
.telemetria-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px 25px;
    background: linear-gradient(180deg, #ffffff 0%, #e3f2fd 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    animation: fadeInUp 1.2s ease-in-out;
}

.telemetria-content p {
    color: #333;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 25px;
}

.telemetria-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.sensor-box {
    background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform var(--tiempo-transicion) ease, box-shadow var(--tiempo-transicion) ease;
    position: relative;
}

.sensor-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.sensor-box h3 {
    color: var(--color-primario);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.sensor-box p {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primario);
    margin: 0;
}

/* Animación leve para valor actualizado */
@keyframes highlight {
    0% { background-color: rgba(76,175,80,0.3); }
    100% { background-color: transparent; }
}
.sensor-box p.updated {
    animation: highlight 0.6s ease;
}

/* Estilos para tabla de reportes */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.table th, .table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 0.95rem;
}

.table th {
    background: #1565c0;
    color: #fff;
    font-weight: 600;
}

.table tr:nth-child(even) {
    background: #f5f5f5;
}

.table tr:hover {
    background: #e3f2fd;
    transition: background var(--tiempo-transicion) ease;
}

.telemetria-content h3 {
    text-align: center;
    color: #1565c0;
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.telemetria-content p:last-of-type {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    margin-top: 15px;
    font-style: italic;
}

/* Ajustes responsivos para sección de telemetría */
@media (max-width: 768px) {
    .telemetria-content {
        padding: 20px 15px;
        margin: 20px;
    }
    main > h2 {
        font-size: 1.6rem;
    }
    .sensor-box {
        width: 100%;
        max-width: 280px;
    }
    .sensor-box p {
        font-size: 1.5rem;
    }
    .table th, .table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sensor-box {
        width: 100%;
    }
    .table {
        font-size: 0.85rem;
    }
    .telemetria-content h3 {
        font-size: 1.2rem;
    }
}
    /* ==============================
   EDICIÓN DIRECTA (INLINE)
============================== */
.editable {
  outline: 2px dashed #66bb6a;
  padding: 6px;
  background: #f9fff9;
  transition: background 0.3s, outline 0.3s;
}

.editable:hover {
  outline: 2px solid #2e7d32;
  background: #f1fff1;
}

.editable:focus {
  background: #e8f5e9;
  outline: 2px solid #1b5e20;
}

.btn-guardar {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.btn-guardar:hover {
  background: #1b5e20;
  transform: scale(1.03);
}

/* ============================================================
   ⚙️ PANEL ADMINISTRATIVO
============================================================ */

main.panel-admin {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  background: #f9fff9;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
}

.panel-admin h2 {
  text-align: center;
  color: #2e7d32;
  margin-bottom: 25px;
}

.panel-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin-bottom: 35px;
}

.panel-links li a {
  background: #2e7d32;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.panel-links li a:hover {
  background: #1b5e20;
  transform: scale(1.05);
}

.panel-links a.moderar {
  background: #c62828;
}
.panel-links a.moderar:hover {
  background: #8e0000;
}

hr {
  margin: 30px 0;
  border: none;
  border-top: 1px solid #ccc;
}

/* ============================================================
   📋 TABLA DE REGISTROS (AUDITORÍA)
============================================================ */

.tabla-contenedor {
  overflow-x: auto;
}

.tabla-auditoria {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.tabla-auditoria th,
.tabla-auditoria td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  font-size: 0.95rem;
}

.tabla-auditoria th {
  background: #2e7d32;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.tabla-auditoria tr:nth-child(even) {
  background: #f1f8e9;
}

.tabla-auditoria tr:hover {
  background: #e8f5e9;
  transition: background 0.3s ease;
}

.tabla-auditoria td.accion {
  color: #2e7d32;
  font-weight: 600;
}
.tabla-auditoria td.modulo {
  color: #1565c0;
  font-weight: 600;
}

/* ============================================================
   🔘 BOTÓN “RECARGAR REGISTROS”
============================================================ */

.btn-recargar {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-recargar:hover {
  background: #1b5e20;
  transform: scale(1.05);
}

/* ============================================================
   📱 AJUSTES RESPONSIVOS
============================================================ */

@media (max-width: 768px) {
  .tabla-auditoria th,
  .tabla-auditoria td {
    font-size: 0.85rem;
    padding: 8px;
  }
}
/* ============================================================
   🎨 ESTILOS DE TABLAS DE REGISTROS Y AUDITORÍA
   ============================================================ */

.contenedor-tabla {
  overflow-x: auto;
  margin-top: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 10px;
}

/* Tabla principal */
.tabla-registros {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border-radius: 10px;
  overflow: hidden;
}

/* Cabecera */
.tabla-registros thead {
  background: linear-gradient(90deg, #2e7d32, #43a047);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabla-registros th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 3px solid #66bb6a;
}

/* Cuerpo */
.tabla-registros td {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  word-wrap: break-word;
}

/* Filas alternadas */
.tabla-registros tr:nth-child(even) {
  background-color: #f9fff9;
}

/* Hover suave */
.tabla-registros tr:hover {
  background-color: #e8f5e9;
  transition: background 0.3s ease;
}

/* Celdas destacadas */
.tabla-registros td.accion {
  color: #2e7d32;
  font-weight: 600;
  text-transform: capitalize;
}

.tabla-registros td.modulo {
  color: #1565c0;
  font-weight: 600;
}

/* Botón recargar */
.boton-recargar {
  background: #2e7d32;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.boton-recargar:hover {
  background: #1b5e20;
  transform: scale(1.05);
}

/* Encabezado de sección */
.panel-registros h3 {
  color: #2e7d32;
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.panel-registros p {
  text-align: center;
  color: #555;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

/* Estado vacío / cargando */
.tabla-registros td[colspan="6"] {
  text-align: center;
  font-style: italic;
  color: #777;
  background: #f9f9f9;
}

/* Responsivo */
@media (max-width: 768px) {
  .tabla-registros th,
  .tabla-registros td {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .tabla-registros {
    min-width: 600px;
  }
}
/* ============================================================
   🎨 ESTILOS DE TABLA DE INFORMACIÓN DETALLADA
   ============================================================ */

.boton-volver {
  display: inline-block;
  background: #1565c0;
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: bold;
  margin: 15px 0;
  transition: background 0.3s ease, transform 0.2s ease;
}

.boton-volver:hover {
  background: #0d47a1;
  transform: scale(1.05);
}

/* Contenedor de tabla */
.contenedor-tabla {
  overflow-x: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-top: 20px;
}

/* Tabla */
.tabla-informacion {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border-radius: 10px;
  overflow: hidden;
}

/* Cabecera */
.tabla-informacion thead {
  background: linear-gradient(90deg, #2e7d32, #43a047);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabla-informacion th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
}

/* Filas */
.tabla-informacion td {
  padding: 10px 14px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.tabla-informacion tr:nth-child(even) {
  background: #f9fff9;
}

.tabla-informacion tr:hover {
  background: #e8f5e9;
  transition: background 0.3s ease;
}

/* Colores diferenciados */
.valor-anterior {
  background: #ffebee;
  color: #b71c1c;
  font-weight: 500;
}

.valor-nuevo {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 500;
}

/* Mensaje vacío */
.sin-datos {
  text-align: center;
  font-style: italic;
  color: #777;
  padding: 15px 0;
}

/* Responsivo */
@media (max-width: 768px) {
  .tabla-informacion th,
  .tabla-informacion td {
    font-size: 0.85rem;
    padding: 8px;
  }
}

/* ============================================================
   🌡️ TABLA DE TELEMETRÍA - ADMIN
============================================================ */
.admin-telemetria {
  margin-top: 40px;
  background: #f9fff9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-telemetria h3 {
  color: #2e7d32;
  text-align: center;
  margin-bottom: 10px;
}

.tabla-telemetria-contenedor {
  overflow-x: auto;
}

.tabla-telemetria {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tabla-telemetria th {
  background: #2e7d32;
  color: #fff;
  padding: 10px;
  text-align: center;
}

.tabla-telemetria td {
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

.tabla-telemetria tr:nth-child(even) {
  background: #f1f8e9;
}

.tabla-telemetria tr:hover {
  background: #e8f5e9;
}

/* ============================================================
   ✏️ EDICIÓN EN LÍNEA — SOLO ADMINISTRADOR
============================================================ */
body.admin-mode .editable {
  outline: 2px dashed #66bb6a;
  padding: 6px;
  background: #f9fff9;
  transition: background 0.3s, outline 0.3s;
}

body.admin-mode .editable:hover {
  outline: 2px solid #2e7d32;
  background: #f1fff1;
}

body.admin-mode .editable:focus {
  background: #e8f5e9;
  outline: 2px solid #1b5e20;
}

/* Botón de guardar solo visible en admin */
body.admin-mode .btn-guardar {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

body.admin-mode .btn-guardar:hover {
  background: #1b5e20;
  transform: scale(1.03);
}

/* En modo usuario, desactivar edición completamente */
body.usuario-mode .editable {
  outline: none !important;
  background: none !important;
  cursor: default !important;
  pointer-events: none !important;
}

body.usuario-mode .btn-guardar {
  display: none !important;
}

/* ============================================================
   ⚙️ PANEL ADMINISTRATIVO — LIMPIO Y ORGANIZADO
============================================================ */

main.panel-admin {
  max-width: 1000px;
  margin: 60px auto;
  padding: 40px 35px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  text-align: center;
}

/* Título principal */
.panel-admin h2 {
  text-align: center;
  color: #2e7d32;
  font-size: 2rem;
  margin-bottom: 25px;
  border-bottom: 2px solid #81c784;
  display: inline-block;
  padding-bottom: 8px;
}

/* Contenedor de enlaces principales */
.panel-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.panel-links li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2e7d32;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.panel-links li a:hover {
  background: #1b5e20;
  transform: translateY(-3px);
}

/* Botón especial de moderación */
.panel-links a.moderar {
  background: #c62828;
}
.panel-links a.moderar:hover {
  background: #8e0000;
}

/* Separador visual */
hr {
  margin: 35px 0;
  border: none;
  border-top: 1px solid #ccc;
}

.tabla-contenedor {
  overflow-x: auto;
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 15px;
}

/* Tabla de auditoría */
.tabla-auditoria {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
}

.tabla-auditoria th {
  background: #2e7d32;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ============================================================
   🔘 BOTONES SECUNDARIOS
============================================================ */

.btn-recargar,
.boton-recargar {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin: 20px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-recargar:hover,
.boton-recargar:hover {
  background: #1b5e20;
  transform: scale(1.05);
}

/* ============================================================
   📱 RESPONSIVO
============================================================ */
@media (max-width: 768px) {
  main.panel-admin {
    padding: 25px 15px;
    margin: 30px auto;
  }

  .panel-links li a {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .tabla-auditoria th,
  .tabla-auditoria td {
    font-size: 0.85rem;
    padding: 8px;
  }

header h1 {
  color: var(--color-secundario); /* Dorado institucional */
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

}

/* =============================
   🔰 LOGO + TÍTULO INSTITUCIONAL
   ============================= */
.header-logo-titulo {
  display: flex;
  align-items: center;
  justify-content: center; /* centra el título */
  gap: 12px;
  flex-wrap: nowrap;
  text-align: center;
  margin: 0 auto;
  padding: 10px 0;
  position: relative;
}

/* Logo alineado a la izquierda */
.logo-uni-titulo {
  position: absolute;
  left: 30px;   /* mueve el logo al borde izquierdo */
  width: 405px;  /* tamaño corregido, era 405px */
  height: auto;
  vertical-align: middle;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

.logo-uni-titulo:hover {
  transform: scale(1.08);
}

/* ==========================================================
   🌅 FOOTER CON IMAGEN DE FONDO + MAPA A LA IZQUIERDA
========================================================== */

footer {
  position: relative;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  padding: 40px 20px;
  overflow: hidden;
  text-align: center;
  min-height: 300px;
}

/* 🖼️ Imagen de fondo */
.footer-imagen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
  filter: brightness(0.7);
}

/* Capa oscura para contraste */
.footer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* Contenido principal */
.footer-contenido {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  gap: 20px;
}

/* 🗺️ Mapa a la izquierda */
.mapa-footer {
  flex: 1 1 45%;
  border: none;
  width: 100%;
  height: 250px;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

/* 📜 Texto a la derecha */
.footer-texto {
  flex: 1 1 45%;
  text-align: left;
  color: #fff;
}

.footer-texto p {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 10px;
}

.footer-texto small {
  color: #E0BE74; /* Dorado institucional */
  font-weight: 600;
  font-size: 0.95rem;
}

/* 📱 Responsivo */
@media (max-width: 768px) {
  .footer-contenido {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mapa-footer {
    width: 100%;
    height: 220px;
  }

  .footer-texto {
    text-align: center;
  }
}

/* ==========================================================
   🕹️ PÁGINA ROBLOX
========================================================== */
.roblox-content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px 25px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  text-align: center;
  animation: fadeInUp 1s ease-in-out;
}

.roblox-content h2 {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-primario);
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--color-secundario);
  display: inline-block;
  padding-bottom: 6px;
}

.roblox-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.roblox-imagen {
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.roblox-imagen:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.roblox-main p {
  max-width: 800px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: #333;
  text-align: justify;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .roblox-imagen { width: 100%; }
}

.recorrido-content {
    padding: 20px;
}

.recorrido-titulo {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
}

.recorrido-contenedor-iframe {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recorrido-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 10px;
    background: #000;
}

/* ===============================
   📱 Ajustes para pantallas pequeñas
   =============================== */
@media (max-width: 768px) {

  .header-logo-titulo {
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
  }

  .logo-uni-titulo {
    position: static;        /* ya no absoluta */
    width: 180px;            /* más pequeño */
    margin: 0 auto;
    display: block;
  }

  header h1, header h2 {
    font-size: 1.4rem;       /* reducir título */
    line-height: 1.2;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {

  .logo-uni-titulo {
    width: 150px;            /* aún más pequeño */
  }

  header h1, header h2 {
    font-size: 1.2rem;
  }
}
