/* ── Manuais page — estilo moderno combinando com o layout do site ──── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.manuals-hero {
    position: relative;
    background: var(--brand, #0d0f5e);
    overflow: hidden;
}
.manuals-hero__img {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.manuals-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.manuals-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,15,94,.82) 40%, rgba(0,168,232,.45));
}
.manuals-hero__content {
    position: relative;
    z-index: 1;
    padding: 72px 0 60px;
    text-align: center;
}
.manuals-hero__title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: -.02em;
    line-height: 1.1;
    text-transform: uppercase;
}
.manuals-hero__intro {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255,255,255,.8);
    margin: 0;
    max-width: 600px;
    margin-inline: auto;
    line-height: 1.5;
}

/* ── Tab navigation ─────────────────────────────────────────────────── */
.manuals-nav-wrap {
    background: #fff;
    border-bottom: 2px solid #e8eaf2;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(13,15,94,.08);
}
.manuals-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 0;
    flex-wrap: wrap;
}
.manuals-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--brand, #0d0f5e);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
    letter-spacing: .01em;
}
.manuals-tab:hover {
    background: rgba(253,66,159,.1);
    border-color: rgba(253,66,159,.3);
}
.manuals-tab.is-active {
    background:#FD429F;
    color: #fff;
    border-color:#ffb2d8;
}

/* ── Main content ────────────────────────────────────────────────────── */
.manuals-main {
    padding: 48px 0 80px;
    background: #f7f8fc;
    min-height: 400px;
}

/* ── Section titles ─────────────────────────────────────────────────── */
.manuals-section-title {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 900;
    color: var(--brand, #0d0f5e);
    text-transform: uppercase;
    letter-spacing: -.01em;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--brand-2, #00a8e8);
    display: inline-block;
}

/* ── Manuals grid ────────────────────────────────────────────────────── */
.manuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 16px;
}

/* ── Manual card — A4 portrait com overlay no hover ─────────────────── */
.manual-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 210 / 297;   /* proporção A4 portrait */
    box-shadow: 0 4px 20px rgba(13,15,94,.12);
    cursor: default;
    transition: box-shadow .25s, transform .25s;
}
.manual-card:hover {
    box-shadow: 0 16px 40px rgba(13,15,94,.22);
    transform: translateY(-4px);
}

/* Fundo — preenche 100% */
.manual-card__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.manual-card__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.manual-card__bg--placeholder {
    background: linear-gradient(145deg, var(--brand, #0d0f5e) 0%, #1a2a80 60%, var(--brand-2, #00a8e8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.manual-card--video .manual-card__bg--placeholder {
    background: linear-gradient(145deg, #0d2040 0%, #1a3a6e 60%, var(--brand-2, #00a8e8) 100%);
}

/* Faixa de título sempre visível (parte inferior) */
.manual-card__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 32px 16px 14px;
    background: linear-gradient(to top, rgba(13,15,94,.9) 40%, transparent);
    transition: opacity .25s;
}
.manual-card__footer span {
    display: block;
    color: #fff;
    font-size: clamp(.78rem, 1.2vw, .92rem);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.manual-card:hover .manual-card__footer {
    opacity: 0;
}

/* Overlay — aparece no hover */
.manual-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;   /* acima do footer */
    background: linear-gradient(160deg, rgba(13,15,94,.93) 0%, rgba(0,168,232,.85) 100%);
    opacity: 0;
    transition: opacity .25s ease;
    text-align: center;
}
.manual-card:hover .manual-card__overlay {
    opacity: 1;
}
/* Conteúdo do overlay ancorado na base via absolute */
.manual-card__overlay-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 14px 20px;
    background: linear-gradient(to top, rgba(0,40,120,.98) 0%, rgba(0,80,180,.85) 60%, transparent 100%);
}
.manual-card__overlay h3 {
    color: #fff;
    font-size: clamp(.82rem, 1.3vw, .98rem);
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.manual-card__overlay p {
    color: rgba(255,255,255,.82);
    font-size: clamp(.72rem, 1vw, .84rem);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Ícone central no hover (PDF / Play) ────────────────────────────── */
.manual-card__hover-icon {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.75);
    z-index: 3;
    pointer-events: none;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s;
    opacity: 0;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.5));
}
.manual-card:hover .manual-card__hover-icon {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ── CTA button (dentro do overlay) ─────────────────────────────────── */
.btn-manual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    background: #fff;
    color: var(--brand, #0d0f5e);
    font-weight: 800;
    font-size: .84rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background .18s, color .18s, transform .1s;
    letter-spacing: .01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-manual:hover {
    background: var(--accent, #ffd400);
    color: var(--brand, #0d0f5e);
    transform: scale(1.04);
}
.btn-manual--na {
    background: rgba(255,255,255,.25);
    color: rgba(255,255,255,.7);
    cursor: default;
    pointer-events: none;
    font-size: .78rem;
}
.btn-manual--na:hover {
    background: rgba(255,255,255,.25);
    color: rgba(255,255,255,.7);
    transform: none;
}

/* ── Type badge (canto superior direito — play ou PDF) ───────────────── */
.manual-card__play-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    line-height: 0;
    transition: transform .2s, opacity .2s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

/* Botão "Assista já" — variante vídeo */
.btn-manual--video {
    background: var(--brand-2, #00a8e8);
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.btn-manual--video:hover {
    background: #fff;
    color: var(--brand, #0d0f5e);
}

/* ── Modal de vídeo ──────────────────────────────────────────────────── */
.vmodal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.vmodal[hidden] { display: none; }

.vmodal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 40, .88);
    backdrop-filter: blur(4px);
}
.vmodal__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    background: #0d0f2a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: vmodal-in .22s ease;
}
@keyframes vmodal-in {
    from { opacity: 0; transform: scale(.93) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.vmodal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s;
}
.vmodal__close:hover { background: rgba(255,255,255,.3); }
.vmodal__title {
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    font-weight: 600;
    padding: 12px 52px 12px 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}
.vmodal__frame {
    aspect-ratio: 16 / 9;
    background: #000;
}
.vmodal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ── Videos section ─────────────────────────────────────────────────── */
.manuals-videos-section {
    margin-top: 52px;
    padding-top: 40px;
    border-top: 2px solid #e4e7f2;
}
.manuals-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.manual-video-card {
    background: #fff;
    border: 1px solid #e4e7f2;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(13,15,94,.07);
    transition: box-shadow .2s, transform .2s;
}
.manual-video-card:hover {
    box-shadow: 0 12px 36px rgba(13,15,94,.13);
    transform: translateY(-3px);
}
.manual-video-frame {
    aspect-ratio: 16 / 9;
    background: var(--brand, #0d0f5e);
}
.manual-video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.manual-video-card__title {
    padding: 14px 16px;
    margin: 0;
    font-weight: 700;
    font-size: .9rem;
    color: var(--brand, #0d0f5e);
    text-align: center;
    line-height: 1.35;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.manuals-empty {
    text-align: center;
    padding: 64px 24px;
    color: #aaa;
}
.manuals-empty span {
    display: block;
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: .5;
}
.manuals-empty p {
    font-size: 1rem;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .manuals-hero__content { padding: 48px 0 40px; }
    .manuals-tabs { gap: 6px; padding: 10px 0; }
    .manuals-tab { padding: 9px 18px; font-size: .88rem; }
    .manuals-main { padding: 32px 0 56px; }
    .manuals-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .manuals-videos-grid { grid-template-columns: 1fr; }
    .manuals-section-title { font-size: 1.1rem; }
    .manual-card__overlay h3 { font-size: .82rem; }
    .manual-card__overlay p { -webkit-line-clamp: 2; }
    .btn-manual { padding: 8px 16px; font-size: .8rem; }
}
