/* ========================================
   SISMO.CSS - Estilos específicos para sismo.html
   Adaptado con el esquema de colores de menu.css
   ======================================== */

/* === VARIABLES CSS === */
:root {
    --primary-color: #ffffff;
    --accent-color: #88CFE0;
    --dark-text: #333333;
    --title-blue: #00448d;
    --light-text: #333;
    --body-bg: #f7f9fa;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --footer-link: #bdc3c7;
}

/* === HTML Y BODY - STICKY FOOTER === */
html {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    background-color: var(--body-bg);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* === NAVBAR PRINCIPAL === */
.navbar {
    background-color: var(--primary-color) !important;
    border: 0;
    font-size: 16px !important;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 10px 0;
    z-index: 10000;
    margin-bottom: 0;
}

.navbar li a,
.navbar .navbar-brand {
    color: var(--light-text) !important;
    transition: color 0.3s;
}

.navbar-nav li a:hover,
.navbar-nav li.active a {
    color: var(--accent-color) !important;
}

.navbar-default .navbar-toggle {
    border-color: transparent !important;
}

/* === LOGO === */
.logo-img {
    height: 70px;
    margin-top: -5px;
}

.navbar-header {
    display: flex;
    align-items: center;
}

/* === DROPDOWN MENU === */
.navbar-nav>li.dropdown:hover>.dropdown-menu {
    display: block;
}

.dropdown-menu.custom-dropdown {
    background-color: var(--primary-color);
    border-radius: 8px;
    border: none;
    padding: 10px 0;
    display: none;
}

.dropdown-menu.custom-dropdown li a {
    color: var(--light-text) !important;
    padding: 10px 20px;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-menu.custom-dropdown li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--light-text) !important;
}

/* === NAVBAR WRAPPER Y SUB-NAVBAR === */
.navbar-wrapper {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 9995;
}

.navbar-sub {
    background-color: #FFFFFF;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-sub .container {
    display: flex;
    align-items: center;
}

.selec {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--title-blue);
    background-color: #b9b7b741;
    border-radius: 8px;
    padding: 8px 15px !important;
    margin: 0;
    line-height: 1.2;
}

/* === CONTENEDOR PRINCIPAL === */
.container-fluid {
    padding-top: 140px !important;
    padding-bottom: 40px;
    flex: 1 0 auto;
}

/* === LAYOUT ROW === */
.content-row {
    display: flex;
    align-items: flex-start;
}

/* === PANEL LATERAL === */
.panel-lateral {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 300px;
}

.panel-lateral .list-group {
    width: 100%;
    margin-top: 10px;
}

/* === CONTENIDO PRINCIPAL === */
.contenido-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === CONTENEDOR DE IMÁGENES DE FALLAS === */
#contenedorImagenesFallas {
    margin-top: 20px;
}

#contenedorImagenesFallas img {
    max-width: 70%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.863);
}

#descripcionImagen {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: var(--title-blue);
}

/* === PANEL LATERAL (LIST-GROUP) === */
.list-group-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(136, 207, 224, 0.1);
}

.list-group-item.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* === FOOTER === */
#footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 10px 0;
    margin-top: auto;
    flex-shrink: 0;
}

#footer h4 {
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1em;
}

#footer p {
    color: var(--footer-link);
    font-size: 0.9em;
    line-height: 1.7;
    margin-bottom: 1px;
}

#footer i {
    margin-right: 2px;
    color: var(--primary-color);
}

#footer a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

#footer a:hover {
    color: var(--primary-color);
}

.footer-col {
    margin-bottom: 10px;
}

.contact-item {
    display: inline-block;
    margin-right: 60px;
}

.copyright {
    text-align: center;
    margin-top: 2px;
    border-top: 1px solid #34495e;
    padding-top: 2px;
    color: #7f8c8d;
}

/* === RESPONSIVE === */
@media (max-width: 1800px) {
    #descripcionImagen {
        font-size: 20px !important;
        text-align: center;
        margin-top: 5px;
    }

    /* Reducir tamaño de imagen en tablets */
    #contenedorImagenesFallas img {
        max-width: 55%;
    }

    .panel-lateral .list-group {
        width: 80%;
    }

    .navbar-sub {
        height: 72px;
    }
}

@media (max-width: 768px) {
    .logo-img {
        height: 55px;
        margin-top: -5px;
    }

    .container-fluid {
        padding-top: 130px !important;
    }

    /* Hamburguesa a la derecha, logo a la izquierda */
    .navbar-header {
        display: flex;
        justify-content: space-between !important;
        width: 100%;
    }

    .navbar-toggle {
        margin-right: 0;
        margin-left: auto;
        float: none;
    }

    /* Sismología alineado a la izquierda en móvil */
    .navbar-sub {
        justify-content: flex-start !important;
        text-align: left !important;
        height: 50px;
    }

    .navbar-sub .container {
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .navbar-sub .container .selec {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    /* Reordenar layout en móvil: Título -> Imagen -> Botones */
    .content-row {
        flex-direction: column;
    }

    .panel-lateral {
        order: 3;
        width: 100%;
        margin-top: 20px;
    }

    .contenido-principal {
        order: 1;
        width: 100%;
    }

    #descripcionImagen {
        order: 1;
        text-align: center;
        margin-bottom: 10px;
    }

    #contenedorImagenesFallas {
        order: 2;
    }

    .panel-lateral .list-group {
        margin-top: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .panel-lateral .list-group-item {
        width: calc(50% - 5px);
        flex: 0 0 calc(50% - 5px);
        margin-bottom: 0;
    }

    .navbar-nav>li.dropdown:hover>.dropdown-menu {
        display: none;
    }

    .navbar-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 10px;
    }

    .navbar-nav>li {
        text-align: center;
    }

    .navbar-nav>li.dropdown.open>.dropdown-menu.custom-dropdown {
        display: block;
    }

    .dropdown-menu.custom-dropdown {
        background-color: transparent;
        box-shadow: none;
        padding-left: 15px;
    }

    #contenedorImagenesFallas img {
        max-width: 95%;
    }

    .footer-col {
        text-align: left;
    }

    #footer h4 {
        font-size: 0.80em;
    }

    #footer p,
    #footer a {
        font-size: 0.80em;
    }

    .contact-item {
        display: block;
        margin-right: 0;
        margin-bottom: 2px;
    }

    .selec {
        font-size: 1.1em;
    }
}