/* --- 1. RESET Y CONTROL DE PANTALLA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Evita la línea blanca lateral */
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

/* --- 2. SECCIÓN PRINCIPAL --- */
.tech-library {
    background-color: #ffffff;
    padding: 10px 0 !important;
    width: 100%;
}


/* --- 3. PÁRRAFO ALARGADO Y JUSTIFICADO --- */
.p {
    text-align: justify;
    text-justify: inter-word;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    color: #4a5568;
    line-height: 1.7;
    width: 100%;
    max-width: 95%; 
    padding: 0 1px; /* Los 15px de seguridad */
    margin: 40px auto 10px auto;
}

/* --- 4. CONTENEDORES DE TARJETAS --- */
.tech-card-wrapper {
    perspective: 1200px;
    width: 100%;
    max-width: 520px;   
    height: 420px;      
    /* Cambiamos el margin para asegurar separación lateral */
    margin: 20px auto; 
    /* Añadimos un padding interno para que no se toquen en tablets */
    padding: 0 15px;
}

.tech-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 2px solid rgba(34, 211, 238, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tech-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.6);
    border-color: rgba(34, 211, 238, 0.8);
}
.C{
  margin: 0 auto;
  size: 1rem;
}
/* --- 5. ELEMENTOS DE DISEÑO INTERNO --- */

.shine-line {
    position: absolute;
    top: 33%; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
    animation: shine 2s infinite;
    opacity: 0;
}

.tech-card:hover .shine-line { opacity: 1; }

@keyframes shine {
    0% { transform: translateY(-50px); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(200px); opacity: 0; }
}

.card-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 25px;
    
}

.icon-container {
    width: 75px; height: 75px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.6);
    border: 2px solid #22d3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: 0.5s;
}

.icon-container i { font-size: 30px; color: #ffffff; }

.tech-card:hover .icon-container {
    transform: scale(1.15) rotate(360deg);
    background: rgba(34, 211, 238, 0.2);
}

.card-title {
    color: #22d3ee;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
}

.card-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    max-width: 260px;
}

.btn-tech {
    padding: 12px 25px;
    border-radius: 30px;
    border: 2px solid #22d3ee;
    color: #22d3ee;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-tech:hover {
    background: #22d3ee;
    color: #1e293b;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.circuit-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
  pointer-events: none;
}

/* --- CONFIGURACIÓN DE LA SECCIÓN RENDICIÓN --- */
.rendicion-cuentas-section {
    background-color: #ffffff;
    padding: 60px 0;
}

.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: 1.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;
}

/* --- 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 {
    padding: 10px 20px;
    background: #1e40af;
    color: white !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    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;
}

/* --- 6. BREAKPOINTS (RESPONSIVIDAD TOTAL) --- */

/* Pantallas Grandes (Escritorio) */
@media (min-width: 1200px) {
    .p {
        max-width: 1100px;
        border-left: 5px solid #1e3a8a;
        padding-left: 30px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablets e iPads (991px a 768px) */
@media (max-width: 991px) {
    .tech-card-wrapper { 
        height: 400px; 
        max-width: 340px; 
    }
    .rendicion-grid {
        gap: 40px 20px;
        padding: 0 20px;
    }
    #informacion {
        margin: 2% 5% 5% 5% !important; /* Ajuste margen lateral para tablets */
    }
}

/* Celulares (iPhone, Android) */
@media (max-width: 576px) {
    .tech-library { padding: 20px 0; }
    
    .p { 
        padding: 0 15px; 
        margin-top: 20px;
        margin-bottom: 30px; 
        font-size: 0.95rem;
        text-align: justify;
    }
    
    .tech-card-wrapper { 
        max-width: 90%; 
        height: 360px; 
        margin: 10px auto 30px auto;
    }
    
    .card-title { font-size: 1.2rem; letter-spacing: 1px; }
    .card-description { font-size: 0.85rem; padding: 0 10px; }
    .icon-container { width: 60px; height: 60px; }
    .icon-container i { font-size: 24px; }

    /* Ajustes específicos para los libros en móvil */
    .rendicion-cuentas-section { padding: 30px 0; }
    .rendicion-grid { 
        grid-template-columns: 1fr; /* Un solo libro por fila en móviles pequeños */
        gap: 50px; 
    }
    .book-container {
        width: 180px; /* Un poco más pequeño para evitar desbordes */
        height: 250px;
    }
    .year-label {
        font-size: 1rem;
    }
}