@charset "UTF-8";
/* CSS Document */
/* ============================================================
   ESTILOS PARA LAS GALERÍAS - LIGHTBOX GRANDE
   ============================================================ */

/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f4f6f8;
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

#moodle-presentacion-materia {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px;
    color: #2c3e50;
    line-height: 1.6;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: background 0.3s, color 0.3s;
}

/* ===== ENCABEZADO ===== */
.galeria-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

.galeria-header h1 {
    margin: 0 0 8px 0;
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
}

.galeria-header h1 i {
    color: #037BB3;
    margin-right: 12px;
}

.galeria-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 1.1em;
}

.galeria-header .sub {
    margin-top: 6px;
    font-size: 0.95em;
    color: #6c757d;
}

/* ===== CUADRÍCULA ===== */
.grid-imagenes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 20px 0 30px 0;
}

.grid-imagenes figure {
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.grid-imagenes figure:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.grid-imagenes figure img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e9ecef;
    transition: transform 0.3s ease;
}

.grid-imagenes figure:hover img {
    transform: scale(1.02);
}

.grid-imagenes figcaption {
    padding: 12px 14px 14px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
}

.grid-imagenes figcaption small {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* ============================================================
   LIGHTBOX MÁS GRANDE
   ============================================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
}

/* ===== CONTENEDOR MÁS GRANDE ===== */
.lightbox-contenedor {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* ===== VERSIÓN GRANDE (clase extra) ===== */
.lightbox-grande {
    max-width: 98vw;
    max-height: 98vh;
    padding: 20px;
}

.lightbox-contenedor img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
    margin: 0 auto;
}

/* ===== BOTÓN CERRAR MÁS GRANDE ===== */
.lightbox-cerrar {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox-cerrar:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.08);
}

/* ===== PIE DE LIGHTBOX MÁS GRANDE ===== */
.lightbox-pie {
    padding: 14px 20px 10px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
    border-top: 1px solid #eee;
    border-radius: 0 0 16px 16px;
}

.lightbox-pie small {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   FOOTER
   ============================================================ */
.galeria-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #6c757d;
    font-size: 0.9rem;
}

.galeria-footer p {
    margin: 0 0 4px 0;
}

.galeria-footer small {
    font-size: 0.8rem;
    color: #888;
}

.galeria-footer a {
    color: #037BB3;
    text-decoration: none;
    font-weight: 500;
}

.galeria-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .grid-imagenes {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .grid-imagenes figure img {
        height: 140px;
    }

    .galeria-header h1 {
        font-size: 1.5em;
    }

    .lightbox-contenedor {
        max-width: 98vw;
        max-height: 98vh;
        padding: 10px;
        border-radius: 16px;
    }

    .lightbox-contenedor img {
        max-height: 75vh;
        border-radius: 12px;
    }

    .lightbox-cerrar {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        top: 10px;
        right: 12px;
    }

    .lightbox-pie {
        font-size: 0.9rem;
        padding: 10px 14px 8px 14px;
    }

    .lightbox-pie small {
        font-size: 0.75rem;
    }
}

/* ============================================================
   MODO CONTRASTE
   ============================================================ */
.modo-contraste .sitios-section {
    background: #111111 !important;
    border-color: #333333 !important;
}

.modo-contraste .sitios-section:hover {
    border-color: #444444 !important;
}

.modo-contraste .sitio-card {
    background: #000000 !important;
    border-color: #444444 !important;
}

.modo-contraste .sitio-card .sitio-nombre {
    color: #ffffff !important;
}

.modo-contraste .sitio-card .sitio-desc {
    color: #cccccc !important;
}

.modo-contraste .sitio-card .sitio-icon {
    background: #222222 !important;
    color: #ffffff !important;
}

.modo-contraste .sitio-card:hover {
    border-color: #ffffff !important;
}

.modo-contraste .sitios-header {
    border-bottom-color: #333333 !important;
}

.modo-contraste .galeria-imagenes-header {
    border-bottom-color: #333333 !important;
}

.modo-contraste .sitios-count {
    background: #222222 !important;
    color: #ffffff !important;
}

.modo-contraste .galeria-count {
    background: #222222 !important;
    color: #ffdd44 !important;
}

/* ============================================================
   ESTILOS ESPECÍFICOS PARA LA GALERÍA DE SITIOS WEB
   VERSIÓN CON CATEGORÍAS
   ============================================================ */

/* ===== SECCIÓN DE SITIOS WEB ===== */
.sitios-section {
    margin: 20px 0 30px 0;
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 18px;
    border: 1px solid #eef0f2;
    transition: all 0.3s ease;
}

.sitios-section:hover {
    border-color: rgba(3, 123, 179, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.sitios-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef0f2;
    flex-wrap: wrap;
    gap: 8px;
}

.sitios-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1a2a;
    margin: 0;
}

.sitios-header h2 i {
    margin-right: 10px;
}

.sitios-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: #037BB3;
    background: #e8f4fd;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== GRID DE SITIOS ===== */
.sitios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

/* ===== TARJETA DE SITIO ===== */
.sitio-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 14px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #eef0f2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    min-height: 54px;
}

.sitio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: #037BB3;
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: all 0.35s ease;
}

.sitio-card:hover::before {
    opacity: 1;
}

.sitio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(3, 123, 179, 0.10);
    border-color: rgba(3, 123, 179, 0.15);
    background: #ffffff;
}

.sitio-card .sitio-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.35s ease;
}

.sitio-card:hover .sitio-icon {
    transform: scale(1.05);
}

.sitio-card .sitio-info {
    flex: 1;
    min-width: 0;
}

.sitio-card .sitio-nombre {
    font-weight: 600;
    font-size: 0.82rem;
    color: #0a1a2a;
    line-height: 1.3;
}

.sitio-card .sitio-desc {
    font-weight: 400;
    font-size: 0.68rem;
    color: #8a9aaa;
    line-height: 1.3;
}

.sitio-card .sitio-link {
    color: #c8d0d8;
    font-size: 0.75rem;
    transition: all 0.35s ease;
    flex-shrink: 0;
}

.sitio-card:hover .sitio-link {
    color: #037BB3;
    transform: translateX(3px);
}

/* ===== SECCIÓN DE GALERÍA DE IMÁGENES ===== */
.galeria-imagenes-section {
    margin-top: 30px;
}

.galeria-imagenes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef0f2;
    flex-wrap: wrap;
    gap: 8px;
}

.galeria-imagenes-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1a2a;
    margin: 0;
}

.galeria-imagenes-header h2 i {
    margin-right: 10px;
}

.galeria-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: #b8960f;
    background: #fdf3d6;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .sitios-section {
        padding: 14px 14px;
        border-radius: 14px;
        margin: 14px 0 20px 0;
    }

    .sitios-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sitio-card {
        padding: 10px 14px;
        min-height: 48px;
        gap: 12px;
    }

    .sitio-card .sitio-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .sitio-card .sitio-nombre {
        font-size: 0.78rem;
    }

    .sitio-card .sitio-desc {
        font-size: 0.64rem;
    }

    .sitios-header h2,
    .galeria-imagenes-header h2 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .sitios-section {
        padding: 10px 10px;
        border-radius: 12px;
        margin: 10px 0 14px 0;
    }

    .sitios-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .sitio-card {
        padding: 8px 12px;
        min-height: 42px;
        gap: 10px;
        border-radius: 10px;
    }

    .sitio-card .sitio-icon {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .sitio-card .sitio-nombre {
        font-size: 0.72rem;
    }

    .sitio-card .sitio-desc {
        font-size: 0.6rem;
    }

    .sitios-header h2,
    .galeria-imagenes-header h2 {
        font-size: 0.85rem;
    }

    .sitios-count,
    .galeria-count {
        font-size: 0.55rem;
        padding: 2px 10px;
    }
}