/* ════════════════════════════════════════════════════════════
   TUTORIAIS — tutorials.css
   Prefixo: tut-
   ════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.tut-hero {
    background: #30493a;
    padding: 120px 5% 64px;
    position: relative;
    overflow: hidden;
}
.tut-hero::before {
    content: '';
    position: absolute; top: -180px; right: -180px;
    width: 500px; height: 500px; border-radius: 50%;
    background: rgba(74,155,111,0.08);
    pointer-events: none;
}
.tut-hero__inner {
    max-width: 860px; margin: 0 auto;
    position: relative; z-index: 1;
}
.tut-eyebrow {
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: #e1e4cb; margin-bottom: 14px;
}
.tut-hero__title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: #fff; font-weight: 700; line-height: 1.15;
    margin: 0;
}

/* ── Secção ── */
.tut-section {
    background: #f8f7f4;
    padding: 64px 5% 80px;
}
.tut-inner {
    max-width: 1100px; margin: 0 auto;
}

/* ── Grid 3 colunas ── */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Card ── */
.tut-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e4e9e6;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,60,46,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tut-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(26,60,46,0.12);
}

/* Thumbnail */
.tut-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e4e9e6;
    flex-shrink: 0;
}
.tut-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.tut-card:hover .tut-card__thumb img {
    transform: scale(1.04);
}
.tut-card__thumb-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e4e9e6, #d0ddd5);
}

/* Botão play */
.tut-card__play {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.tut-card__play svg circle {
    transition: fill 0.2s;
}
.tut-card:hover .tut-card__play svg circle {
    fill: rgba(48,73,58,0.85);
}

/* Corpo */
.tut-card__body {
    padding: 20px 22px 22px;
    display: flex; flex-direction: column;
    gap: 10px; flex: 1;
}
.tut-card__title {
    font-size: 1rem; font-weight: 600;
    color: #1a1f1c; line-height: 1.35;
    margin: 0;
}
.tut-card__desc {
    font-size: 0.875rem; color: #4a5450;
    line-height: 1.6; margin: 0; flex: 1;
}
.tut-card__link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.82rem; font-weight: 600;
    color: #2d6b4a;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: auto;
    transition: gap 0.2s;
}
.tut-card__link:hover { gap: 8px; }

/* Estado vazio */
.tut-empty {
    text-align: center; color: #4a5450;
    font-size: 1rem; padding: 48px 0;
}

/* ── Responsivo ── */
@media (max-width: 900px) {
    .tut-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 600px) {
    .tut-hero { padding: 100px 4% 48px; }
    .tut-section { padding: 48px 4% 60px; }
    .tut-grid { grid-template-columns: 1fr; gap: 18px; }
    .tut-card__body { padding: 16px 18px 18px; }
}

/* ════════════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════════════ */

/* Scroll lock quando lightbox está aberto */
body.tut-lb-open { overflow: hidden; }

.tut-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tut-lightbox[hidden] { display: none; }

/* Backdrop */
.tut-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 14, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

/* Caixa do vídeo */
.tut-lightbox__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    background: #0f2318;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: tutLbIn 0.22s ease;
}
@keyframes tutLbIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Header com título e botão fechar */
.tut-lightbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tut-lightbox__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tut-lightbox__close {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.tut-lightbox__close:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

/* Iframe 16:9 */
.tut-lightbox__video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.tut-lightbox__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Responsivo lightbox ── */
@media (max-width: 600px) {
    .tut-lightbox { padding: 12px; align-items: flex-end; }
    .tut-lightbox__box { border-radius: 14px 14px 0 0; max-width: 100%; }
}
