/*
 * site-common.css
 * Estilos compartidos globales del sitio UNSJ.
 * Incluye: sección reseña, layout de dos columnas, grilla de menú
 * con efecto activo/inactivo, contacto, títulos y sidebar.
 * 
 * Para incluir en una página:
 *   <link rel="stylesheet" href="<?php echo base_url('site-common.css'); ?>">
 * O desde una subcarpeta:
 *   <link rel="stylesheet" href="../site-common.css">
 */

/* =====================================================
   1. SECCIÓN RESEÑA (estilo base - academica-servicios)
   ===================================================== */
.reseña {
    background: #fff;
    padding: 50px 0 60px;
    margin-top: 0;
}

.reseña .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* =====================================================
   2. TÍTULOS DENTRO DE RESEÑA (con barra decorativa)
   ===================================================== */
.reseña-title,
.box-title-inside h3,
.box-title h3,
.reseña .container > h2,
.reseña .container > h3 {
    color: #0e2c4a;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 28px 0;
    position: relative;
    padding-bottom: 14px;
}

.reseña-title::after,
.box-title-inside h3::after,
.box-title h3::after,
.reseña .container > h2::after,
.reseña .container > h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #8b9640;
    border-radius: 2px;
}

.reseña .container p,
.box-title-inside p,
.reseña-main p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444;
    font-size: 15px;
}

/* =====================================================
   3. LAYOUT DE DOS COLUMNAS (columna principal + sidebar)
   ===================================================== */
.reseña-layout {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(280px, 3fr);
    gap: 40px;
    align-items: start;
}

.reseña-main {
    min-width: 0;
}

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 120px;
}

/* =====================================================
   4. TARJETA DE CONTACTO (sidebar y sección contacto)
   ===================================================== */
.contacto-info,
.box-list-info {
    background: #fff;
    border-left: 4px solid #0e2c4a;
    border-radius: 8px;
    padding: 24px 26px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.contacto-info h4,
.box-list-info h4,
.contacto-info-full h4 {
    color: #0e2c4a;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 16px;
    margin: 0 0 18px 0;
    letter-spacing: 0.4px;
}

.contacto-info p,
.box-list-info p {
    margin: 8px 0;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.contacto-info strong,
.box-list-info strong {
    color: #0e2c4a;
}

.contacto-info a,
.box-list-info a {
    color: #1a6c9c;
    text-decoration: none;
}

.contacto-info a:hover,
.box-list-info a:hover {
    text-decoration: underline;
}

/* Variante de contacto de ancho completo (sin sidebar) */
.contacto-info-full {
    background: #f6f6f6;
    border-left: 5px solid #0e2c4a;
    border-radius: 0;
    padding: 30px;
    margin-top: 30px;
}

.contacto-info-full p {
    margin: 10px 0;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.contacto-info-full strong { color: #0e2c4a; }
.contacto-info-full a { color: #1a6c9c; text-decoration: none; }
.contacto-info-full a:hover { text-decoration: underline; }

/* =====================================================
   5. TARJETAS Y BLOQUES DE CONTENIDO INTERNO
   ===================================================== */
.header-internal,
.body-internal,
.box-lista,
.temas-relacionados,
.box-sidebar-menu {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-internal {
    padding: 30px;
    margin-bottom: 30px;
    border-left: 4px solid #0e2c4a;
    color: #0e2c4a;
}

.body-internal {
    padding: 30px;
}

.body-internal h4,
.temas-relacionados h4 {
    color: #0e2c4a;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 18px;
    margin: 30px 0 16px;
}

.body-internal h4:first-child {
    margin-top: 0;
}

.body-internal ul,
.body-internal ol {
    padding-left: 20px;
    margin-bottom: 18px;
}

.body-internal li {
    color: #444;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.body-internal a,
.temas-relacionados a,
.document-list a,
.list-links a,
.wrap-event-home a {
    color: #1a6c9c;
    text-decoration: none;
    font-weight: 600;
}

.body-internal a:hover,
.temas-relacionados a:hover,
.document-list a:hover,
.list-links a:hover,
.wrap-event-home a:hover {
    text-decoration: underline;
}

.box-lista {
    padding: 10px;
}

.listado-personas {
    list-style: none;
    margin: 0;
    padding: 0;
}

.listado-personas li {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.listado-personas li:last-child {
    border-bottom: none;
}

.wrap-item {
    flex: 1;
    min-width: 220px;
}

.wrap-item h4,
.listado-personas > li > h4 {
    margin: 0 0 10px;
    color: #0e2c4a;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.wrap-item span,
.wrap-item p,
.listado-personas p {
    display: block;
    margin: 0 0 6px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.wrap-item .email,
.wrap-text .email {
    text-transform: none;
    font-weight: 500;
}

.list-people {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.list-people .item {
    max-width: 220px;
    text-align: center;
}

.wrap-img img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center 10%;
    border-radius: 50%;
    margin-bottom: 15px;
    background: #f9f9f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.wrap-text span {
    display: block;
    color: #0e2c4a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.box-address {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.integrantes-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.integrantes-list .item {
    padding: 16px 18px;
    background: #f9f9f9;
    border-radius: 6px;
}

.integrantes-list h5 {
    margin: 0 0 6px;
    color: #0e2c4a;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.integrantes-list span {
    color: #555;
    font-size: 14px;
    font-style: italic;
}

.temas-relacionados {
    padding: 18px 20px;
}

.temas-relacionados h4 {
    margin-top: 0;
    font-size: 16px;
}

.temas-relacionados ul,
.document-list,
.list-links,
.list-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.temas-relacionados li,
.document-list li,
.list-info li {
    margin-bottom: 10px;
}

.temas-relacionados li:last-child,
.document-list li:last-child,
.list-info li:last-child {
    margin-bottom: 0;
}

.temas-relacionados a,
.document-list a {
    display: block;
    padding: 10px 12px;
    background: #f6f6f6;
    border-left: 3px solid #1a6c9c;
}

.document-list a::before {
    content: 'PDF';
    display: inline-block;
    margin-right: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #0e2c4a;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.list-info li {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.list-info li.title {
    margin-bottom: 14px;
}

.list-info img {
    display: block;
    max-width: 100px;
    margin: 0 auto 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.list-info hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 12px 0;
}

.list-info i {
    width: 18px;
    color: #0e2c4a;
    text-align: center;
    margin-right: 10px;
}

.list-drop-elements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-drop-elements > li {
    margin-bottom: 12px;
}

.my-btn-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    background: #0e2c4a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

.my-btn-full img {
    width: 12px;
    filter: brightness(0) invert(1);
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
}

.dropdown-menu {
    display: none;
    position: relative;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.dropdown.show .dropdown-menu {
    display: block;
}

.dropdown.show .my-btn-full img {
    transform: rotate(180deg);
}

.panel {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

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

.panel li {
    margin-bottom: 10px;
}

.panel li:last-child {
    margin-bottom: 0;
}

.wrap-event-home a {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    background: #0e2c4a;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.wrap-event-home a:hover {
    background: #1a6c9c;
    color: #fff;
    text-decoration: none;
}

.table {
    margin-top: 20px;
    background: #fff;
}

.table thead th {
    background: #0e2c4a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    padding: 12px;
}

.table td {
    padding: 12px;
    font-size: 14px;
}

.simple-grid-links {
    display: grid;
    gap: 10px;
}

/* =====================================================
   6. GRILLA DE MENÚ GENÉRICA (estilo obras/planificacion)
      Con efecto activo/inactivo (grises)
   ===================================================== */
.site-menu-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.site-menu-grid {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Bloque de menú base */
.site-menu-block {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-weight: 800;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin: 0;
    padding: 35px 20px;
    box-sizing: border-box;
    min-height: 100px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.site-menu-block span {
    display: block;
    width: 100%;
}

/* Header de sección (ocupa todo el ancho) */
.site-menu-header {
    grid-column: 1 / -1;
    font-size: 30px;
    font-weight: 900;
    padding: 25px;
    letter-spacing: 1px;
}

/* ---- Estado ACTIVO ---- */
.site-menu-block.active {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* ---- Estado INACTIVO (efecto gris cuando otro bloque está activo) ---- */
.site-menu-container.has-active .site-menu-block:not(.active):not(:hover) {
    background-color: #8c8c8c !important;
    box-shadow: inset 0 0 0 1px rgba(115, 115, 115, 0.32);
    opacity: 0.92;
}

/* Al pasar el mouse sobre un bloque inactivo, recupera su color */
.site-menu-container.has-active .site-menu-block:not(.active):hover {
    opacity: 1;
    box-shadow: none;
    /* El color original se restaura porque background-color del bloque
       tiene más especificidad que .has-active ... cuando se usa !important
       en el color propio. Las subclases deben declarar su color con 
       !important o usar la variable --block-color. */
}

/* Hover general */
.site-menu-block:hover {
    opacity: 0.9;
    filter: brightness(1.05);
}

.site-menu-2x2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}

.site-menu-2x4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
}

.bg-navy { background-color: #00204a !important; }
.bg-beige { background-color: #a9a86a !important; }
.bg-lightblue { background-color: #95a3c2 !important; }
.bg-olive { background-color: #9baa35 !important; }
.bg-blue { background-color: #1a6c9c !important; }

/* =====================================================
   7. RESPONSIVE
   ===================================================== */
@media (max-width: 991px) {
    .reseña-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar-wrapper {
        position: static;
        top: auto;
    }

    .site-menu-block {
        font-size: 20px;
        padding: 30px 15px;
    }

    .site-menu-header {
        font-size: 26px;
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .reseña {
        padding: 35px 0 45px;
    }

    .site-menu-block {
        font-size: 18px;
        padding: 25px 15px;
        min-height: 80px;
    }

    .site-menu-header {
        font-size: 22px;
        padding: 18px;
    }

    .site-menu-2x2,
    .site-menu-2x4 {
        grid-template-columns: 1fr;
    }

    .contacto-info,
    .box-list-info,
    .body-internal,
    .header-internal,
    .temas-relacionados {
        padding: 18px 20px;
    }

    .listado-personas li {
        padding: 18px 20px;
    }
}

@media (max-width: 575px) {
    .site-menu-block {
        font-size: 16px;
        padding: 20px 10px;
    }
}
