/* ============================================================
   PROJETOS.CSS — Guilherme Carl · Portfolio Showcase
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg    : #080808;
    --s1    : #101010;
    --s2    : #161616;
    --s3    : #1c1c1c;
    --b1    : #1e1e1e;
    --b2    : #282828;
    --b3    : #333;
    --text  : #f0f0f0;
    --text2 : #999;
    --text3 : #555;
    --orange: #ff6b35;
    --ork   : #d95a28;
    --orl   : #ff8a5b;
    --sw    : 288px;
    --font  : 'Outfit', sans-serif;
}

html, body {
    height: 100%;
    background: #000;
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.app { display: flex; height: 100vh; overflow: hidden; }

/* ══ SIDEBAR ══ */
.sidebar {
    width: var(--sw);
    min-width: var(--sw);
    height: 100%;
    background: var(--s1);
    border-right: 1px solid var(--b1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.sb-head { padding: 18px 16px 14px; border-bottom: 1px solid var(--b1); flex-shrink: 0; }

.sb-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text3);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--b2);
    background: var(--s2);
    transition: all .2s;
    margin-bottom: 12px;
}
.sb-back:hover { color: var(--orange); border-color: rgba(255,107,53,.35); background: rgba(255,107,53,.06); }
.sb-back i { font-size: 9px; }

.sb-search { position: relative; }
.sb-search input {
    width: 100%;
    padding: 9px 12px 9px 32px;
    background: var(--s2);
    border: 1px solid var(--b2);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color .2s;
}
.sb-search input:focus { border-color: rgba(255,107,53,.5); }
.sb-search input::placeholder { color: var(--text3); }
.sb-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 11px; pointer-events: none; }

/* Categorias */
.sb-cats { padding: 12px 8px 0; flex-shrink: 0; }
.sb-cats-label { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text3); padding: 0 8px; margin-bottom: 6px; display: block; }
.cat-list { display: flex; flex-direction: column; gap: 1px; }
.cat-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 9px; border-radius: 7px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: var(--text2);
    transition: all .15s; border: 1px solid transparent;
    user-select: none; letter-spacing: .1px;
}
.cat-item:hover { background: var(--s2); color: var(--text); }
.cat-item.active { background: rgba(255,107,53,.08); color: var(--orange); border-color: rgba(255,107,53,.15); }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; opacity: .5; }
.cat-item.active .cat-dot, .cat-item:hover .cat-dot { opacity: 1; }
.cat-n { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--text3); background: var(--s2); padding: 2px 7px; border-radius: 20px; min-width: 22px; text-align: center; }
.cat-item.active .cat-n { background: rgba(255,107,53,.14); color: var(--orange); }

.sb-div   { height: 1px; background: var(--b1); margin: 8px 8px 4px; flex-shrink: 0; }
.sb-count { padding: 0 16px 5px; font-size: 11px; color: var(--text3); flex-shrink: 0; }
.sb-count b { color: var(--orange); font-weight: 600; }

.proj-list { flex: 1; overflow-y: auto; padding: 2px 6px 6px; }
.proj-list::-webkit-scrollbar { width: 3px; }
.proj-list::-webkit-scrollbar-track { background: transparent; }
.proj-list::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 3px; }
.proj-list::-webkit-scrollbar-thumb:hover { background: var(--orange); }

.pi {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 8px; border-radius: 9px; cursor: pointer;
    border: 1px solid transparent; transition: all .15s; margin-bottom: 2px;
}
.pi:hover { background: var(--s2); }
.pi.active { background: rgba(255,107,53,.07); border-color: rgba(255,107,53,.2); }
.pi-img { width: 48px; height: 32px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: var(--s3); border: 1px solid var(--b2); transition: border-color .15s; }
.pi.active .pi-img, .pi:hover .pi-img { border-color: rgba(255,107,53,.4); }
.pi-info { flex: 1; min-width: 0; }
.pi-nome { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.pi-tipo { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.pi-sk { height: 52px; border-radius: 9px; background: var(--s2); margin-bottom: 3px; animation: sk 1.5s ease infinite; }
@keyframes sk { 0%,100%{opacity:.4} 50%{opacity:.8} }

.sb-empty { padding: 24px 12px; text-align: center; color: var(--text3); font-size: 12px; }

/* ══ MAIN ══ */
.main { flex: 1; height: 100vh; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; position: relative; }

.empty-sc {
    height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 40px;
}
.empty-sc .ei { width: 68px; height: 68px; border-radius: 16px; background: var(--s2); border: 1px solid var(--b2); display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--text3); margin-bottom: 4px; }
.empty-sc h3 { font-size: 17px; font-weight: 600; color: var(--text2); }
.empty-sc p  { font-size: 13px; color: var(--text3); max-width: 240px; line-height: 1.6; }

/* ══ WELCOME SCREEN ══ */
.welcome-sc {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    overflow: hidden;
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 560px;
    border-radius: 14px;
    overflow: hidden;
    opacity: 0.4;
    filter: blur(1.5px);
    transition: all .4s ease;
}
.welcome-grid:hover { opacity: 0.65; filter: blur(0); }

.welcome-thumb {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    overflow: hidden;
    background: var(--s2);
}
.welcome-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.welcome-thumb:hover img { transform: scale(1.06); }

.welcome-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
    opacity: 0;
    transition: opacity .25s;
}
.welcome-thumb:hover .welcome-thumb-overlay { opacity: 1; }
.welcome-thumb-overlay span { font-size: 11px; font-weight: 600; color: #fff; font-family: var(--font); }

.welcome-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.welcome-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    background: var(--s2);
    border: 1px solid var(--b2);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--orange);
    margin-bottom: 4px;
}
.welcome-text h2 { font-size: 19px; font-weight: 700; color: var(--text); font-family: var(--font); }
.welcome-text p  { font-size: 13px; color: var(--text3); max-width: 300px; line-height: 1.7; }

.welcome-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 7px 16px;
    background: rgba(255,107,53,.07);
    border: 1px solid rgba(255,107,53,.18);
    border-radius: 50px;
    font-size: 11px; font-weight: 600;
    color: var(--orange);
    font-family: var(--font);
    animation: hint-pulse 2.5s ease infinite;
}
@keyframes hint-pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* ══ SLIDE SECTION ══ */
.slide-section {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 420px;
    max-height: 860px;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.slide-section::after { display: none; }

/* Dots ficam dentro do slide ainda */

#slideMedia {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
#slideMedia::-webkit-scrollbar { display: none; }

.slide-img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: contain;
    object-position: top center;
    display: block;
    transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
}
.slide-img.fade-exit  { opacity: 0; transform: scale(1.02); }
.slide-img.fade-enter { opacity: 0; transform: scale(.98); }
.slide-img.fade-in    { opacity: 1; transform: scale(1); }

.slide-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ══ CONTROLES — setas + ver detalhes (fora do slide) ══ */
.slide-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 0;
    flex-shrink: 0;
    background: var(--bg);
}

/* Setas */
.sc-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.85);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}
.sc-arrow:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 18px rgba(255,107,53,.45);
}

/* Botão Ver Detalhes — entre as setas */
.sc-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,107,53,.4);
    border-radius: 50px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
}
.sc-info i { font-size: 13px; color: var(--orange); transition: color .25s; }
.sc-info:hover {
    background: var(--orange);
    border-color: var(--orange);
    box-shadow: 0 6px 22px rgba(255,107,53,.5);
}
.sc-info:hover i { color: #fff; }

/* Dots */
.slide-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 5px;
    align-items: center;
}
.sd {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,.3); cursor: pointer;
    transition: all .3s; border: none; padding: 0;
}
.sd.active { background: var(--orange); width: 16px; border-radius: 8px; }

/* Setas antigas — desabilitadas */
.s-arrow { display: none !important; }

/* ══ HAMBURGUER MOBILE — design igual ao menu-toggle do index ══ */
.mob-hamburger {
    display: none;
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 20;
    /* mesmo estilo do .menu-toggle do index */
    width: 45px;
    height: 45px;
    background: #0a0a0a;
    border: 2px solid #ff6b35;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all .3s ease;
    padding: 0;
}
.mob-hamburger:hover { background: #ff6b35; }
.mob-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    transition: all .3s ease;
    border-radius: 2px;
}
.mob-hamburger.active { background: #ff6b35; }
.mob-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.mob-hamburger.active span:nth-child(2) { opacity: 0; }
.mob-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ══ DRAWER DE DETALHES ══ */
.drawer-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none;
    transition: opacity .35s cubic-bezier(.4,0,.2,1);
}
.drawer-overlay.show { opacity: 1; pointer-events: all; }

.drawer {
    position: fixed; top: 0; right: 0; z-index: 201;
    width: min(620px, 100vw);
    height: 100vh;
    background: var(--s1);
    border-left: 1px solid var(--b2);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.16,1,.3,1);
    overflow: hidden;
}
.drawer.show { transform: translateX(0); }

.drawer-thumb {
    width: 100%; height: 200px; object-fit: cover;
    object-position: top; flex-shrink: 0; display: block;
    filter: brightness(.85);
}
.drawer-thumb-wrap { position: relative; flex-shrink: 0; }
.drawer-thumb-gradient {
    position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
    background: linear-gradient(to top, var(--s1) 0%, transparent 100%);
    pointer-events: none;
}
.drawer-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; z-index: 5;
}
.drawer-close:hover { background: #e74c3c; border-color: #e74c3c; }

.drawer-body { flex: 1; overflow-y: auto; padding: 0 28px 32px; }
.drawer-body::-webkit-scrollbar { width: 4px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--b3); border-radius: 3px; }

.drawer-niche {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase; padding: 4px 11px;
    border-radius: 20px; border: 1px solid; margin-bottom: 8px;
}
.drawer-title {
    font-size: clamp(20px, 2.5vw, 30px);
    font-weight: 800; color: var(--text);
    line-height: 1.15; letter-spacing: -.4px; margin-bottom: 6px;
}
.drawer-sub { font-size: 13px; color: var(--text2); line-height: 1.65; margin-bottom: 20px; }

.dr-metrics { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.dr-metric {
    flex: 1; min-width: 90px;
    padding: 11px 14px; background: var(--s2);
    border: 1px solid var(--b2); border-radius: 10px;
    display: flex; flex-direction: column; gap: 3px;
    transition: border-color .2s;
}
.dr-metric:hover { border-color: rgba(255,107,53,.2); }
.dr-m-label { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3); }
.dr-m-value { font-size: 14px; font-weight: 700; color: var(--text); }

.dr-block { background: var(--s2); border: 1px solid var(--b1); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.dr-block-title { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }

.feat-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feat-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: rgba(240,240,240,.75); line-height: 1.4; }
.feat-list li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 5px; box-shadow: 0 0 4px rgba(255,107,53,.5); }

.stags { display: flex; flex-wrap: wrap; gap: 6px; }
.stag { padding: 5px 11px; background: var(--s3); border: 1px solid var(--b2); border-radius: 20px; font-size: 11px; font-weight: 500; color: var(--text2); display: flex; align-items: center; gap: 5px; transition: all .18s; }
.stag:hover { border-color: rgba(255,107,53,.35); color: var(--orange); }
.stag i { font-size: 11px; color: var(--orange); }

.desc-block { font-size: 13px; color: var(--text3); line-height: 1.75; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--b1); }

.btn-solid {
    padding: 11px 20px; background: var(--orange); color: #fff;
    border: none; border-radius: 50px; font-size: 13px; font-weight: 700;
    font-family: var(--font); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; gap: 7px;
    transition: all .2s; text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 20px rgba(255,107,53,.4);
}
.btn-solid:hover { background: var(--orl); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,107,53,.5); }

.btn-outline {
    padding: 11px 18px; background: transparent; color: var(--text2);
    border: 1px solid var(--b2); border-radius: 50px; font-size: 13px; font-weight: 500;
    font-family: var(--font); cursor: pointer; display: inline-flex;
    align-items: center; gap: 7px; transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn-outline:hover { border-color: rgba(255,107,53,.4); color: var(--orange); }

.dr-cta { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Transição troca de projeto */
.main.sw #sc { opacity: 0; transform: translateY(8px); transition: opacity .22s, transform .22s; }

/* sc ocupa 100% do main */
#sc { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.mob-bar { display: none; }
.ov { display: none; position: fixed; inset: 0; z-index: 49; background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }

/* ══ MOBILE ══ */
@media (max-width: 860px) {
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100vh;
        z-index: 50; transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    .sidebar.open { transform: translateX(0); }
    .ov.on { display: block; }
    .drawer { width: 100vw; }
    .drawer-thumb { height: 160px; }
    .drawer-body { padding: 0 18px 24px; }
    .dr-cta { padding: 14px 18px; }

    .slide-section {
        height: 56vw;
        min-height: 220px;
        max-height: 72vh;
    }
    .slide-section::after { display: none; }
    #slideMedia { flex: none; height: 100%; overflow: hidden; }
    .slide-img { object-position: center center; height: 100%; object-fit: cover; }

    #sc {
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .mob-hamburger { display: flex; }

    /* Controles mobile */
    .slide-controls { gap: 10px; padding: 10px 0; }
    .sc-arrow { width: 36px; height: 36px; font-size: 11px; }
    .sc-info { padding: 8px 14px; font-size: 11px; }

    .slide-dots { bottom: 8px; }

    .welcome-sc { padding: 20px 16px; gap: 18px; }
    .welcome-grid { max-width: 100%; }
    .welcome-hint { display: none; }
    .welcome-text h2 { font-size: 16px; }
    .welcome-text p { font-size: 12px; }
}

@media (max-width: 480px) {
    .slide-section { height: 62vw; min-height: 190px; max-height: 52vh; }
    .sc-info span { display: none; } /* só ícone no mobile pequeno */
    .sc-info { padding: 10px 14px; }
    .welcome-grid { grid-template-columns: repeat(2, 1fr); }
}