/* ==========================================================
   FLIPBOOKS.CSS
   Mobile First - Optimizado Android + iOS + Desktop
   ========================================================== */

/* -------------------
   RESET + BASE
------------------- */
body {
    margin: 0;
    padding: 0;
    background: #f3f5f4;
    font-family: "Inter", Arial, sans-serif;
    color: #1a1a1a;
    -webkit-tap-highlight-color: transparent;
}

/* Contenedor global */
.container {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 14px;
}

/* -------------------
   HEADER - estilo app
------------------- */
.header-hero {
    background: linear-gradient(135deg, #1f332a, #2d4d3e);
    padding: 28px 20px;
    text-align: center;
    color: white;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.header-hero h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.header-hero p {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}

/* =====================
   LOGOS CENTROS
===================== */

.cu-logos {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* IMPORTANTE: tamaño controlado */
.cu-logos img {
    width: 100%;
    max-width: 220px;   /* ← aquí está el control real */
    height: auto;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: transform .2s ease;
}

.cu-logos a:active img {
    transform: scale(0.97);
}

/* -------------------
   PDF FRAME
------------------- */
.pdf-wrap {
    width: 100%;
    margin-top: 20px;
}

.pdf-frame {
    width: 100%;
    height: 60vh;
    border: none;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: white;
}

/* -------------------
   BOTONES (Sticky Mobile)
------------------- */
.controls {
    position: sticky;
    bottom: 0;
    background: #ffffffee;
    backdrop-filter: blur(10px);
    padding: 14px;
    display: flex;
    gap: 14px;
    justify-content: space-around;
    border-top: 1px solid #ddd;
    z-index: 999;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.08);
}

.btn {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    background: #243c32;
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    transition: background .2s ease, transform .1s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn:hover {
    background: #182820;
}

.btn.secondary {
    background: #7d877f;
}

.btn.secondary:hover {
    background: #626a64;
}

/* -------------------
   TITULOS
------------------- */
h2 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #1d2d25;
}

/* -------------------
   VIDEOS GRID
------------------- */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

/* Tarjetas tipo app */
.video-card {
    background: white;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn .4s ease;
}

/* IMPORTANTE: NO usar transform aquí en móvil */
.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c4238;
}

/* Videos grandes y premium */
.video-card iframe,
.video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 260px;
    border-radius: 18px;
    background: #000;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* -------------------
   BOTÓN FULLSCREEN
------------------- */
.fullscreen-btn {
    display: block;
    margin-top: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #2a7b5f, #3aa884);
    color: #fff;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
    transition: transform .15s ease;
}

.fullscreen-btn:active {
    transform: scale(0.97);
}

/* -------------------
   TEXTOS AUXILIARES
------------------- */
.muted {
    color: #6e6e6e;
    font-size: 14px;
    text-align: center;
}

/* -------------------
   ANIMACIONES SEGURAS
------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* -------------------
   FIX ANDROID IFRAME TOUCH
------------------- */
@media (max-width: 900px) {
    .video-card {
        transform: none !important;
        animation: fadeIn .4s ease;
    }
}

/* -------------------
   DESKTOP OPTIMIZADO
------------------- */
@media (min-width: 800px) {

    .pdf-frame {
        height: 80vh;
    }

    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-card iframe,
    .video-card video {
        min-height: 280px;
    }

    .controls {
        position: static;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        margin-top: 18px;
        background: transparent;
    }

    .btn {
        max-width: 220px;
    }
}
