.containerb {
    background-color: white;
    color: #1e3a8a;          /* El mismo azul del libro para el texto */
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;         /* Tamaño del año */
    padding: 1px 25px;      /* Espacio interno del recuadro */
    border-radius: 8px;      /* Bordes redondeados pepa */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Sombra para que resalte sobre el azul */
    text-align: center;
    transform: translateZ(20px); /* Efecto de relieve sobre la tapa */
    border: 2px solid #cbd5e1;   /* Un borde finito muy elegante */
}


.rendicion-cuentas-section {
    background-color: #ffffff;
    padding: 60px 0;
}

.rendicion-cuentas{
    background-color: #ffffff;
    /* Aumentamos el espacio de abajo (120px) respecto al de arriba (80px) */
    padding: 5px 0 50px 0; 
    
    /* Una sombra interna sutil que "desvanece" la sección al llegar al footer */
    box-shadow: inset 0 -30px 30px -30px rgba(0,0,0,0.05);
    
    position: relative;
}
.p {
/* --- TIPOGRAFÍA Y TEXTO --- */
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.1rem;
    color: #1e293b;            
    line-height: 1.8;           /* 1.8 es el estándar de oro para lectura cómoda */
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: 0.3px;      /* Un toque de aire entre letras */

    /* --- ESTRUCTURA Y MÁRGENES --- */
    width: 100%;
    max-width: 1000px;           /* Limitar el ancho hace que sea más fácil de leer */
    margin: 30px auto;          /* Centrado con buena separación arriba y abajo */
    
    /* --- EL ACENTO VISUAL (LA LÍNEA) --- */
    border-left: 6px solid #1e40af;
    
    /* --- PADDING (ESPACIADO INTERNO) --- */
    padding: 10px 0 10px 35px; 
    
    /* --- TOQUE EXTRA: Sombra suave para profundidad --- */
    background: linear-gradient(to right, #f8fafc, transparent); 
    border-radius: 0 8px 8px 0;
}
.C{
  margin: auto;
  size: 1rem;
}
.D{
left: 650px;
 margin-bottom: 20px;
 
 
}
.rendicion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px 40px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- TÍTULOS AZUL POTENTE --- */
.year-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #1e40af; /* Azul solicitado */
    text-transform: uppercase;
    margin-bottom: 20px;
    text-align: center;
}

/* --- EL LIBRO (TAMAÑO GRANDE) --- */
.book-container {
    position: relative;
    width: 210px;  
    height: 290px; 
    perspective: 1500px;
    transform-style: preserve-3d;
    margin-top: 0;
}
.LB3 {
  margin-left: 80PX;
}

/* --- HOJA INTERNA --- */
.hoja-interna {
    position: absolute;
    width: 96%;
    height: 96%;
    top: 2%;
    left: 2%;
    background: #cf6262;
    background: linear-gradient(90deg, #e5e7eb 0%, #ffffff 12%, #ffffff 100%);
    box-shadow: inset 5px 0 15px rgba(0,0,0,0.1);
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    
}

.btn-visitar, .btn-descargar {
    /* CAMBIO CLAVE: Esto los vuelve cajas que ocupan espacio */
    display: flex; 
    align-items: center;
    justify-content: center;
    
    /* CAMBIO CLAVE: Al tener un ancho fijo, se apilan perfecto */
    width: 160px; 
    height: 45px;
    
    padding: 0; /* Quitamos el padding lateral para que el width mande */
    background: #1e40af;
    color: white !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 6px;
    
    /* Tus animaciones se quedan igual */
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease;
}

/* --- TAPA DEL LIBRO --- */
.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e3a8a; /* Azul marino de base */
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    z-index: 2;
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px 8px 8px 3px;
    box-shadow: 10px 10px 25px rgba(0,0,0,0.3);
    
    /* CENTRADO DE LA IMAGEN PEQUEÑA */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Espacio para que la imagen no toque los bordes */
}

/* --- AJUSTE DE IMAGEN (PEQUEÑA Y PEPA) --- */
.book-cover img {
    width: 80%;       /* Tamaño reducido para que no ocupe toda la tapa */
    height: auto;
    max-height: 70%;  /* Evita que se estire demasiado */
    object-fit: contain; /* Mantiene la proporción original */
    border-radius: 5px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6)); /* Sombra para que resalte */
    background: white; /* Opcional: fondo blanco tras el logo si son transparentes */
    padding: 5px;
}

/* Lomo lateral */
.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 100%;
    background: rgba(0,0,0,0.2);
}

/* --- EFECTOS HOVER --- */
.rendicion-item:hover .book-cover {
    transform: rotateY(-155deg);
}

.rendicion-item:hover .btn-visitar {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.btn-visitar:hover {
    background: #1d4ed8;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.5);
}

/* Sombra en el suelo */
.book-container::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 10%;
    width: 80%;
    height: 15px;
    background: rgba(0,0,0,0.1);
    filter: blur(10px);
    border-radius: 50%;
    z-index: -1;
}

/* --- ESTILO PORTADA CON AÑO --- */
.containerb {
    background-color: white;
    color: #1e3a8a;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-align: center;
    border: 1px solid #cbd5e1;
}

/* --- ALINEACIÓN DE TÍTULOS --- */
.year-label {
    min-height: 60px; /* Clave para que los 3 libros estén a la misma altura */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 25px;
}




/* --- ESTILOS DEL MODAL --- */
.modal-pdf {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.modal-contenido {
    position: relative;
    margin: 2vh auto;
    width: 90%;
    max-width: 1100px;
    height: 95vh;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    background: #1e40af;
    padding: 12px 20px;
    color: white;
    display: flex;
    justify-content: flex-end;
}

.cerrar-modal {
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

.modal-body { height: calc(100% - 48px); }
#pdfFrame { width: 100%; height: 100%; }

/* EL CONTENEDOR - Forzamos el apilado vertical */
.botones-container {
    display: flex !important;
    flex-direction: row !important; /* <--- ESTO LOS PONE UNO ARRIBA DEL OTRO */
    justify-content: center;           /* Los centra de arriba a abajo */
    align-items: center;               /* Los centra de izquierda a derecha */
    gap: 15px;                         /* Espacio de separación entre los dos */
    width: 100%;
    height: 100%;
}

/* --- GRILLA Y CONTENEDORES --- */
.rendicion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px 40px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.book-container {
    position: relative;
    width: 210px;
    height: 290px;
    perspective: 1500px;
}

/* --- HOJA INTERNA Y BOTONES APILADOS --- */
.hoja-interna {
    position: absolute;
    width: 96%; height: 96%;
    top: 2%; left: 2%;
    background: linear-gradient(90deg, #e5e7eb 0%, #ffffff 12%, #ffffff 100%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botones-container {
    display: flex !important;
    flex-direction: column !important; /* <--- CORRECCIÓN: DE ROW A COLUMN */
    gap: 15px;                         /* Espacio entre botón arriba y abajo */
    width: 100%;
    align-items: center;               /* Centra los botones horizontalmente */
}

/* --- ESTILO DE LOS BOTONES --- */
.btn-visitar, .btn-descargar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;           /* Ancho fijo para que se vean iguales */
    height: 42px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    color: white !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.btn-visitar { background-color: #1e40af; }
.btn-descargar { background-color: #f6303a; }

/* --- ANIMACIONES HOVER --- */
.rendicion-item:hover .book-cover { transform: rotateY(-155deg); }

.rendicion-item:hover .btn-visitar,
.rendicion-item:hover .btn-descargar {
    opacity: 1;
    transform: translateY(0);
}
.rendicion-item:hover .btn-descargar { transition-delay: 0.1s; }

/* --- TAPA DEL LIBRO Y AÑO --- */
.book-cover {
    position: absolute;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    z-index: 2;
    transform-origin: left;
    transition: transform 0.8s ease;
    display: flex; align-items: center; justify-content: center;
    border-radius: 3px 8px 8px 3px;
}

.containerb {
    background: white;
    color: #1e3a8a;
    font-weight: 900;
    font-size: 2rem;
    padding: 10px 20px;
    border-radius: 6px;
}

/* --- ESTILOS DEL MODAL --- */
.modal-pdf {
    display: none; position: fixed; z-index: 99999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
}
.modal-contenido {
    background: white; margin: 2vh auto; width: 95%; max-width: 1100px; height: 95vh;
    border-radius: 10px; overflow: hidden;
}
.modal-header { background: #1e40af; padding: 15px; color: white; text-align: right; }
.cerrar-modal { cursor: pointer; font-weight: bold; }
.modal-body { height: calc(100% - 50px); }
#pdfFrame { width: 100%; height: 100%; }



/* ---------- MÓVILES (hasta 768px) ---------- */
@media (max-width: 768px) {

    /* SECCIONES */
    .rendicion-cuentas-section,
    .rendicion-cuentas {
        padding: 30px 0;
    }

    /* GRID */
    .rendicion-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 15px;
    }

    /* ITEM */
    .rendicion-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* TÍTULO AÑO */
    .year-label {
        font-size: 0.85rem;
        min-height: auto;
        margin-bottom: 15px;
    }

    /* LIBRO */
    .book-container {
        width: 180px;
        height: 260px;
        margin: 0 auto;
    }

    .book-cover {
        padding: 15px;
    }

    .book-cover img {
        width: 85%;
        max-height: 65%;
    }

    /* AÑO EN PORTADA */
    .containerb {
        font-size: 1.5rem;
        padding: 8px 16px;
    }

    /* TEXTO */
    .p {
        font-size: 1rem;
        line-height: 1.7;
        padding: 10px 0 10px 25px;
        margin: 20px auto;
    }

    /* BOTONES */
    .botones-container {
        flex-direction: column;
        gap: 12px;
    }

    .btn-visitar,
    .btn-descargar {
        width: 140px;
        height: 40px;
        font-size: 0.75rem;
    }

    /* MODAL */
    .modal-contenido {
        width: 95%;
        height: 92vh;
    }
}

/* ---------- TABLETS (769px a 1024px) ---------- */
@media (min-width: 769px) and (max-width: 1024px) {

    .rendicion-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
        padding: 0 30px;
    }

    .book-container {
        width: 200px;
        height: 280px;
    }

    .containerb {
        font-size: 1.8rem;
    }

    .p {
        font-size: 1.05rem;
    }

    .btn-visitar,
    .btn-descargar {
        width: 150px;
        height: 42px;
    }
}

/* ---------- LAPTOPS Y DESKTOP (1025px a 1399px) ---------- */
@media (min-width: 1025px) and (max-width: 1399px) {

    .rendicion-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 60px 40px;
    }

    .book-container {
        width: 210px;
        height: 290px;
    }
}

/* ---------- PANTALLAS GRANDES (1400px+) ---------- */
@media (min-width: 1400px) {

    .rendicion-grid {
        gap: 80px 60px;
        max-width: 1400px;
    }

    .book-container {
        width: 230px;
        height: 310px;
    }

    .containerb {
        font-size: 2.1rem;
    }

    .p {
        max-width: 1100px;
    }
}

/* ---------- AGREGADO: PANTALLAS EXTRA PEQUEÑAS (XS) ---------- */
@media (max-width: 400px) {
    .book-container {
        width: 150px; /* Reducción extra para evitar cortes */
        height: 220px;
    }
    
    .containerb {
        font-size: 1.2rem;
        padding: 6px 12px;
    }
    
    .btn-visitar, .btn-descargar {
        width: 120px;
        height: 36px;
        font-size: 0.7rem;
    }
    
    .p {
        padding-left: 15px; /* Menos espacio lateral para ganar texto */
        font-size: 0.9rem;
    }
}
@media (max-width: 768px) {
    .rendicion-item {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .book-container {
        margin: 0 auto !important;
    }
    .D{
        left: auto !important;
        margin-bottom: 20px;
    } 
    .hero-title {
        font-size: 1rem !important;
    }     
}