/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fuente principal y colores corporativos */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #002028;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Contenedor principal con dos secciones: sidebar y content */
.container {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Sidebar (menú izquierdo) */
.sidebar {
    width: 30%;
    background-color: #002028;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Logo superior */
.logo img {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

/* Botones del menú */
.menu {
    width: 100%;
}

/* Botones del menú */
.menu-btn {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #fff;
    font-size: 1.7em;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.menu-btn:hover {
    background-color: #e03b23;
    border-color: #fff;
}

/* Área de contenido (parte derecha) */
.content {
    width: 70%;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

/* Contenido dinámico */
.page-content {
    min-height: 100%;
}

/* Efecto de carga */
.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.hidden {
    display: none;
}

/* Spinner para la carga */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #e03b23;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Por defecto, en escritorio no muestras la barra superior ni el menú móvil */
.top-nav,
.mobile-menu {
    display: none;
}

/* Transiciones para .mobile-menu */
.mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background-color: #002028;
    flex-direction: column;
    padding: 0 20px;
}

/* Cuando la clase .open está presente, expandimos para que se vea */
.mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Botón hamburguesa circular */
.nav-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #002028;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 4px;
}

/* Las 3 líneas internas */
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

@media (max-width: 768px) {
    .top-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #002028;
        color: #fff;
        padding: 10px 20px;
        height: 60px;
    }

    .nav-logo-img {
        height: 60px !important;
        width: auto;
        object-fit: contain;
    }

    .mobile-menu {
        display: flex;
    }

    .sidebar {
        display: none;
    }

    .container {
        display: block;
        height: auto;
    }

    .content {
        width: 100%;
    }
}

/* En pantallas mayores, ocultas la barra superior y muestras el sidebar */
@media (min-width: 769px) {
    .top-nav,
    .mobile-menu {
        display: none;
    }

    .sidebar {
        display: flex;
    }
}

/* ===== Footer responsive ===== */

.wallet-footer {
    background-color: #002028;
    color: #ffffff;
    padding: 16px 20px;
    margin-top: auto;
    font-size: 12px;
}

/* Contenedor general de logos */
.footer-logos {
    max-width: 1200px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Cada logo se escala proporcionalmente sin desbordar (desktop) */
.footer-logos img {
    flex: 1 1 20%;
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* La primera imagen será el doble de ancha que las demás (desktop, ya está correcto) */
.footer-logos img:first-child {
    flex: 2 1 40%;
    max-width: 400px;
}

/* Desktop: fila completa visible por defecto */
.footer-logos-desktop {
    display: flex;
}

/* Mobile: se activa en media query */
.footer-logos-mobile {
    display: none;
}

/* Imagen que ocupa fila completa en mobile */
.footer-logos-mobile .full-row {
    grid-column: 1 / -1;
}

/* Bloque inferior con texto y enlaces */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    color: #ffffff;
}

.footer-bottom ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.footer-bottom a {
    color: #d1d5db;
    text-decoration: none;
}

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

/* Responsive footer: ajustes intermedios */
@media (max-width: 992px) {
    .footer-logos img {
        max-width: 160px;
        flex: 1 1 30%;
    }

    .footer-logos img:first-child {
        flex: 2 1 60%;
        max-width: 320px;
    }
}

/* Mobile: usamos footer-logos-mobile y hacemos el primer logo claramente más grande */
@media (max-width: 768px) {
    .wallet-footer {
        padding: 12px;
        font-size: 11px;
    }

    .footer-logos-desktop {
        display: none;
    }

    .footer-logos-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        justify-items: center;
        gap: 12px;
        max-width: 100%;
        margin: 0 auto 12px auto;
    }

    .footer-logos-mobile img {
        width: 65%;
        max-width: 170px;
        height: auto;
    }

    /* Primer logo más grande en mobile */
    .footer-logos-mobile img:first-child {
        width: 95%;
        max-width: 260px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-logos-mobile img {
        width: 85%;
        max-width: 150px;
    }

    .footer-logos-mobile img:first-child {
        width: 100%;
        max-width: 260px;
    }
}
