/* ============================================================
   ESTILOS BASE - TIPOGRAFÍA STANDARD
   ============================================================ */
body {
    font-family: "Nunito", Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.table-header{
    text-align: center;
}

/* ============================================================
   MEMORIA — MODERN CSS  (redesign)
   ============================================================ */

/* ----- Animación de entrada ----- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.memoria-financial-col:nth-child(1) .memoria-financial-card {
    animation: fadeInUp 0.6s ease both;
}

.memoria-financial-col:nth-child(2) .memoria-financial-card {
    animation: fadeInUp 0.6s 0.15s ease both;
}

/* ----- Fila de sub-encabezado (tab-important) ----- */
.memoria-financial-col .table-resumen tr td.tab-important {
    background: linear-gradient(90deg, #031d56 0%, #062b7e 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 10px !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ----- Base de página ----- */
.memoria-page,
.memoria-page .bg-secondary-color,
.memoria-page .content-wrapper {
    background: #F1F6FA !important;
}

.memoria-page .coope-module {
    margin: 0;
}

/* ----- Hero section ----- */
.memoria-hero-section {
    position: relative;
    padding-top: 108px;
    padding-bottom: 12px;
}

.memoria-title-wrap {
    padding-top: 32px;
    padding-bottom: 24px;
}

.memoria-main-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 4px 24px rgba(54, 164, 21, 0.25);
}

/* ============================================================
   SECCIONES Y LAYOUT (ESTILO SERVICIOS FULL WIDTH)
   ============================================================ */
/* ============================================================
   SECCIONES Y LAYOUT (ESTILO SERVICIOS FULL WIDTH)
   ============================================================ */
.memoria-tabs-section {
    position: relative !important;
    z-index: 10;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin-top: 0 !important;
    padding: 15px 0 !important;
}

.memoria-tabs-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.memoria-tabs-list {
    display: flex !important;
    background: #F1F6FA !important;
    padding: 6px !important;
    border-radius: 16px !important;
    justify-content: space-between !important;
    align-items: center !important;
    overflow-x: auto !important;
    scrollbar-width: none;
}

.year-tab-btn {
    flex: 1 !important;
    min-width: 100px !important;
    padding: 12px 10px !important;
    border-radius: 12px !important;
    border: none !important;
    background: transparent !important;
    color: #64748b !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}

.year-tab-btn i {
    font-size: 1rem !important;
    opacity: 0.7;
}

.year-tab-btn.slide-active {
    background: #ffffff !important;
    color: #0F52BA !important;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.12) !important;
    transform: scale(1.02);
}

.year-tab-btn.slide-active i {
    opacity: 1;
    color: #0F52BA !important;
}

.year-tab-btn::after {
    display: none !important;
}

/* Visor Section */
.memoria-viewer-section {
    padding: 20px 0 30px !important;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0f7ff 100%) !important;
    position: relative;
}

.premium-card-viewer {
    padding: 0 !important; /* El padding se maneja internamente */
    overflow: hidden;
}

.internal-tabs {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative;
}

.internal-tabs .memoria-tabs-list {
    background: #f8fafc !important;
    border-radius: 12px !important;
    flex: 1 !important;
    display: flex !important;
    overflow-x: hidden !important; 
    scroll-behavior: smooth !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.internal-tabs .memoria-tabs-list::-webkit-scrollbar {
    display: none;
}

/* Botones de navegación de pestañas */
.tabs-nav-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(15, 82, 186, 0.1) !important;
    background: #ffffff !important;
    color: #0F52BA !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}

.tabs-nav-btn:hover {
    background: #0F52BA !important;
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(15, 82, 186, 0.2) !important;
    transform: scale(1.05);
}

.tabs-nav-btn i {
    font-size: 0.8rem !important;
}

.memoria-main-viewer-wrapper {
    position: relative;
    padding: 0 20px 10px;
}

/* Swiper overrides */
.memoria-swiper {
    overflow: visible !important;
    height: auto !important;
}

.swiper-slide {
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.viewer-tablet-frame {
    background: #ffffff;
    border-radius: 30px;
    padding: 12px;
    box-shadow: 
        0 30px 70px rgba(15, 82, 186, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    transition: transform 0.4s ease;
}

.viewer-tablet-frame::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    z-index: 2;
}

.viewer-tablet-frame iframe {
    border-radius: 12px;
    width: 100%;
    height: 280px;
    border: none;
    background: #f8fafc;
    display: block;
}

/* Navegación Swiper */
.memoria-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F52BA;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(15, 82, 186, 0.1);
}

.memoria-nav-btn:hover {
    background: #0F52BA !important;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 25px rgba(15, 82, 186, 0.3);
}

.memoria-nav-btn.prev { left: 10px; }
.memoria-nav-btn.next { right: 10px; }

/* Botón Descarga Premium */
.download-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.memoria-download-btn {
    background: linear-gradient(135deg, #0F52BA 0%, #06398a 100%) !important;
    padding: 12px 28px !important;
    border-radius: 100px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
    box-shadow: 0 15px 35px rgba(15, 82, 186, 0.25) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.memoria-download-btn span {
    font-size: 17px !important;
    letter-spacing: 0.01em;
}

.memoria-download-btn i:first-child {
    font-size: 20px;
}

.memoria-download-btn .arrow-mini {
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.memoria-download-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 45px rgba(15, 82, 186, 0.4) !important;
}

.memoria-download-btn:hover .arrow-mini {
    transform: translateX(5px);
    opacity: 1;
}

.memoria-download-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(15, 82, 186, 0.42) !important;
    color: #ffffff !important;
}

.memoria-download-btn svg {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
}

.memoria-download-btn span {
    margin: 0 !important;
    transform: none !important;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.memoria-download-btn span::before,
.memoria-download-btn span::after {
    display: none !important;
    content: none !important;
}

/* ============================================================
   SECCIÓN FINANCIERA
   ============================================================ */
.memoria-financial-section {
    padding-top: 0;
    padding-bottom: 0;
}

.memoria-financial-row {
    margin-top: 0;
}

.memoria-financial-row .memoria-financial-col {
    padding-left: 20px;
    padding-right: 20px;
}

.memoria-page .micoope-footer {
    margin-top: 0;
    position: relative;
    z-index: 2;
}

.memoria-financial-col {
    padding-top: 0;
}

.memoria-financial-col.medium-padding80 {
    padding-top: 28px;
    padding-bottom: 32px;
}

/* ----- Tarjeta financiera ----- */
.memoria-financial-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 24px;
    padding: 15px 15px 10px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memoria-financial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12) !important;
}

/* ----- Textos de cabecera de tarjeta ----- */
.memoria-financial-col .heading-title {
    margin-bottom: 12px;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0F52BA !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
}

.memoria-financial-col .c-white {
    color: #334155 !important; /* Slate 700 para mejor lectura */
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 4px;
}

.memoria-financial-col p i {
    color: #64748b !important; /* Slate 500 */
    font-size: 13px;
    display: block;
    margin-top: 5px;
}

/* ============================================================
   TABLA RESUMEN — Overrides
   ============================================================ */
.memoria-financial-col .table-resumen {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 20px 40px rgba(3, 18, 51, 0.28),
        0 4px 8px rgba(0, 0, 0, 0.12);
    margin-top: 16px;
    /* custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #36A415 #eef4ff;
}

.memoria-financial-col .table-resumen::-webkit-scrollbar {
    height: 5px;
}

.memoria-financial-col .table-resumen::-webkit-scrollbar-track {
    background: #eef4ff;
}

.memoria-financial-col .table-resumen::-webkit-scrollbar-thumb {
    background: #36A415;
    border-radius: 4px;
}

/* Encabezado verde con gradiente */
.memoria-financial-col .table-resumen th {
    background: linear-gradient(135deg, #2e9f10 0%, #1a7a08 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 13px 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

/* Celdas de datos */
.memoria-financial-col .table-resumen td {
    color: #1a2e4a;
    font-size: 10.5px;
    font-weight: 500;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.18s ease;
}

/* Zebra suave en filas impares */
.memoria-financial-col .table-resumen tbody tr:nth-child(odd):not(.negativo):not(.negativo-variant) {
    background: #f5f9ff;
}

.memoria-financial-col .table-resumen tbody tr:nth-child(even):not(.negativo):not(.negativo-variant) {
    background: #ffffff;
}

/* Hover en filas normales */
.memoria-financial-col .table-resumen tbody tr:not(.negativo):not(.negativo-variant):hover td {
    background: #e8f3ff !important;
}

/* ----- Fila negativo (totales / resumen) ----- */
.memoria-financial-col .table-resumen tr.negativo td {
    background: linear-gradient(90deg, #d4f0c8 0%, #c0e9b0 100%) !important;
    color: #0d3d01;
    font-weight: 700;
    border-bottom: 1px solid rgba(54, 164, 21, 0.2);
}

.memoria-financial-col .table-resumen tr.negativo:hover td {
    background: linear-gradient(90deg, #c2ecb5 0%, #afe8a0 100%) !important;
}

/* ----- Fila negativo-variant (gastos) ----- */
.memoria-financial-col .table-resumen tr.negativo-variant td {
    background: #fff8f0 !important;
    color: #5a2800;
    border-left: 3px solid #f4a444;
    font-weight: 600;
}

.memoria-financial-col .table-resumen tr.negativo-variant:hover td {
    background: #ffeedd !important;
}

/* Alineación columna de monto */
.memoria-financial-col .table-resumen tr td:last-child {
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .memoria-hero-section {
        padding-top: 96px;
    }

    .memoria-years-col {
        margin-bottom: 16px;
    }

    .memoria-viewer-col .memoria-swiper {
        padding: 8px;
        max-width: 100%;
    }

    .memoria-viewer-col iframe {
        height: 480px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .memoria-hero-section {
        padding-top: 88px;
        padding-bottom: 8px;
    }

    .memoria-title-wrap {
        padding-top: 26px;
        padding-bottom: 24px;
    }

    .memoria-main-title {
        font-size: 1.85rem;
    }

    .memoria-viewer-col .memoria-swiper {
        padding: 6px;
        max-width: 100%;
        border-radius: 16px;
    }

    .memoria-viewer-col iframe {
        height: 380px;
        width: 100%;
        max-width: 100%;
    }

    .memoria-financial-col .table-resumen {
        border-radius: 14px;
    }

    .memoria-financial-card {
        padding: 18px 14px 14px;
        border-radius: 18px;
    }

    .memoria-financial-row .memoria-financial-col {
        padding-left: 12px;
        padding-right: 12px;
    }

    .memoria-financial-col.medium-padding80 {
        padding-top: 18px;
        padding-bottom: 18px;
    }
    
    .memoria-years-col {
        border-radius: 10px !important;
    }
    
    .edu-style-tabs {
        gap: 0 !important;
    }
    
    .edu-style-tabs .slides-item {
        padding: 14px 8px !important;
        min-width: 70px !important;
    }
    
    .memoria-download-btn {
        padding: 14px 24px !important;
        font-size: 14px !important;
    }
}
