/* =========================================
   VARIABLES & CONFIGURACIÓN
   ========================================= */
:root {
    --stratford-blue: #1f2a44;
    --stratford-red: #e63946;
    --stratford-white: #ffffff;
    --bg-light: #f8f9fa;
}

.testimonial-section {
    padding: 90px 0;
    
    /* --- FONDO ATMÓSFERA --- */
    background-color: #ffffff;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(31, 42, 68, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, rgba(230, 57, 70, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(31, 42, 68, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(230, 57, 70, 0.06) 0%, transparent 45%);
    background-attachment: scroll;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--stratford-blue) 0%, var(--stratford-red) 100%);
    opacity: 0.9;
}

.container-fluid {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* =========================================
   HEADER (ALINEACIÓN FLEXBOX)
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenedor Flex para alinear libros y título perfectamente */
.title-wrapper {
    display: flex; /* Esto hace la magia de la alineación */
    align-items: center; /* Centra verticalmente los libros con el texto */
    justify-content: center;
    gap: 20px; /* Distancia exacta entre libros y texto ("no tan pegados") */
    position: relative;
    width: 100%;
    flex-wrap: wrap; /* Permite que se acomoden si la pantalla es muy pequeña */
}

.title {
    font-size: 2.8rem;
    color: var(--stratford-blue);
    font-weight: 800;
    text-transform: uppercase;
    margin: 0; /* Sin márgenes extraños que desalineen */
    line-height: 1.1;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    text-align: center;
}

.title .highlight {
    color: var(--stratford-red);
    position: relative;
    display: inline-block;
}

.title .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(230, 57, 70, 0.15);
    z-index: -1;
    border-radius: 4px;
}

.subtitle {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #555;
    font-weight: 400;
    max-width: 700px;
}

/* --- LIBROS FLOTANTES (FLEX ITEMS) --- */
.floating-book {
    position: relative; /* Ya no es absolute, ahora respeta el flujo */
    width: 65px; /* Tamaño ideal escritorio */
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 8px 8px rgba(31, 42, 68, 0.15));
    flex-shrink: 0; /* Evita que se aplasten */
}

/* Animaciones espejo */
.book-left {
    animation: floatLeft 4s ease-in-out infinite;
}

.book-right {
    animation: floatRight 4s ease-in-out infinite;
    animation-delay: 0.5s; 
}

/* =========================================
   GRID GALERÍA
   ========================================= */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: flex-start;
}

/* =========================================
   TARJETA GENERAL
   ========================================= */
.card-stratford {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(31, 42, 68, 0.1);
    width: 300px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.5);
}

.card-stratford:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(31, 42, 68, 0.25);
}

.card-top-accent {
    height: 6px;
    background: var(--stratford-red);
    width: 100%;
}

/* =========================================
   TARJETAS DE TEXTO
   ========================================= */
.text-card {
    padding-bottom: 25px;
}

.avatar-holder {
    width: 90px;
    height: 90px;
    margin: 30px auto 10px;
    border-radius: 50%;
    padding: 4px;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 2px solid #f8f9fa;
}

.avatar-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.card-body {
    padding: 0 25px;
    text-align: center;
}

.quote-symbol {
    font-size: 3rem;
    color: #e2e8f0;
    line-height: 1;
    font-family: serif;
    margin-bottom: -10px;
}

.card-body p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.student-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--stratford-blue);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

/* --- ICONOS DECORATIVOS (GRANDES) --- */
.mini-icon {
    height: 50px; /* Tamaño grande fijo */
    width: auto;
    margin-top: 10px;
    opacity: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
    transition: transform 0.3s;
}

.card-stratford:hover .mini-icon {
    transform: scale(1.1) rotate(5deg);
}

/* =========================================
   TARJETAS DE VIDEO
   ========================================= */
.video-card {
    background: #000;
    border: 1px solid #eee;
}

.video-screen {
    width: 100%;
    height: 320px;
    background: #0a0a0a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-screen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-footer-video {
    background: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #f0f0f0;
}

.play-icon-deco {
    width: 40px;
    height: 40px;
    background: var(--stratford-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding-left: 3px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}

.video-text h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--stratford-blue);
    font-weight: 700;
}

.video-text p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #718096;
}

/* =========================================
   ANIMACIONES
   ========================================= */
@keyframes floatLeft {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
}

@keyframes floatRight {
    0%, 100% { transform: translateY(0) rotate(10deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* =========================================
   RESPONSIVE (CELULAR)
   ========================================= */
@media (max-width: 768px) {
    .testimonial-section { padding: 60px 0; }
    
    /* En celular, reducimos el gap para que quepan */
    .title-wrapper {
        gap: 10px; 
    }

    .title { 
        font-size: 1.6rem; /* Letra ajustada */
    }
    
    /* Libros visibles pero más pequeños */
    .floating-book { 
        width: 40px; 
        display: block; /* Aseguramos que se vean */
    }

    /* Grid en columna */
    .card-stratford {
        width: 100%;
        max-width: 320px;
    }
}