:root{
  --bg:#0a0a0f;
  --panel:#111118;
  --panel2:#171720;
  --line:rgba(255,255,255,.10);
  --muted:#a2a2b0;
  --text:#f7f7fb;
  --violet:#8c5cff;
  --pink:#ff3c8e;
  --orange:#ff8a3d;
  --green:#00d6a3;
  --shadow:0 26px 80px rgba(0,0,0,.40);
  --radius:24px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--bg)}
body{
  margin:0;background:
  radial-gradient(circle at 7% 0%,rgba(140,92,255,.11),transparent 30%),
  radial-gradient(circle at 94% 16%,rgba(255,60,142,.08),transparent 28%),
  var(--bg);
  color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  min-height:100vh;
}
button,input,select{font:inherit}
button,a{touch-action:manipulation}
a{color:inherit}
.noise{position:fixed;inset:0;pointer-events:none;opacity:.04;z-index:9999;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E")
}
.topbar{
  position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:14px clamp(16px,4vw,52px);background:rgba(10,10,15,.76);
  border-bottom:1px solid var(--line);backdrop-filter:blur(18px)
}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none}
.brand-mark{
  display:grid;place-items:center;width:44px;height:44px;border-radius:13px;font-weight:1000;font-size:21px;
  background:linear-gradient(135deg,var(--violet),var(--pink),var(--orange));box-shadow:0 0 36px rgba(255,60,142,.25)
}
.brand strong{display:block;font-size:17px;letter-spacing:.2px}.brand small{display:block;color:#888897;font-size:8px;letter-spacing:1.8px;margin-top:2px}
.top-actions{display:flex;align-items:center;gap:8px}.network-badge{font-size:11px;padding:7px 9px;border:1px solid rgba(0,214,163,.25);color:#7ff1d5;border-radius:99px;background:rgba(0,214,163,.08)}
.network-badge.offline{color:#ff9f9f;border-color:rgba(255,80,80,.25);background:rgba(255,80,80,.08)}
.ghost-btn,.board-btn,.clear-btn,.icon-btn{border:1px solid var(--line);color:#eee;background:rgba(255,255,255,.04);cursor:pointer}
.ghost-btn,.board-btn,.clear-btn{padding:10px 13px;border-radius:13px}.board-btn span{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;margin-left:4px;border-radius:99px;background:#fff;color:#111;font-size:11px;font-weight:900}
main{overflow:hidden}
.hero{
  min-height:540px;display:grid;align-content:center;justify-items:center;position:relative;padding:82px 18px 44px;text-align:center
}
.hero-copy{max-width:900px;position:relative;z-index:2}.eyebrow,.section-kicker{font-size:11px;font-weight:900;letter-spacing:2.4px;color:#bca8ff}
.hero h1{font-size:clamp(43px,7.5vw,92px);line-height:.94;letter-spacing:-4px;margin:18px 0 22px;font-weight:950}
.hero h1 span{background:linear-gradient(90deg,#cdbdff,#ff76b2,#ffab6f);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-copy p{font-size:clamp(16px,2.1vw,21px);line-height:1.55;color:var(--muted);max-width:720px;margin:0 auto}
.hero-glow{position:absolute;border-radius:50%;filter:blur(80px);opacity:.22;pointer-events:none}.hero-glow-a{width:440px;height:440px;background:var(--violet);left:-190px;top:30px}.hero-glow-b{width:360px;height:360px;background:var(--pink);right:-140px;bottom:-40px}
.search-shell{
  width:min(1080px,100%);position:relative;z-index:3;margin-top:38px;padding:12px;border:1px solid rgba(255,255,255,.14);
  background:rgba(20,20,29,.70);border-radius:28px;box-shadow:var(--shadow);backdrop-filter:blur(20px)
}
.search-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;background:#0e0e15;border:1px solid var(--line);border-radius:18px;padding:7px}
.search-icon{font-size:30px;color:#777;line-height:1;margin-left:10px;transform:rotate(-15deg)}
.search-row input{width:100%;border:0;outline:0;background:transparent;color:#fff;font-size:17px;padding:14px 6px;min-width:0}
.search-row input::placeholder{color:#6f6f7d}.search-btn{border:0;border-radius:13px;padding:14px 22px;color:#fff;font-weight:900;cursor:pointer;background:linear-gradient(135deg,var(--violet),var(--pink));box-shadow:0 10px 30px rgba(140,92,255,.2)}
.quick-categories{display:flex;gap:7px;overflow:auto;padding:10px 3px 2px;scrollbar-width:none}.quick-categories::-webkit-scrollbar{display:none}
.quick-categories button{white-space:nowrap;border:1px solid var(--line);border-radius:999px;color:#d8d8e3;background:rgba(255,255,255,.035);padding:9px 12px;cursor:pointer;font-size:12px}
.quick-categories button:hover{background:rgba(140,92,255,.13);border-color:rgba(140,92,255,.35)}
.toolbar-wrap{max-width:1500px;margin:0 auto;padding:0 24px}.toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:18px;border:1px solid var(--line);background:rgba(17,17,24,.68);border-radius:20px}
.toolbar label{display:grid;gap:6px;min-width:145px}.toolbar label span{font-size:10px;color:#858595;text-transform:uppercase;letter-spacing:1.2px;font-weight:800}
.toolbar select{appearance:none;border:1px solid var(--line);background:#0f0f16;color:#eee;border-radius:12px;padding:11px 34px 11px 11px;outline:none;background-image:linear-gradient(45deg,transparent 50%,#777 50%),linear-gradient(135deg,#777 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.clear-btn{margin-left:auto}.results-section{max-width:1500px;margin:0 auto;padding:64px 24px}.results-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}
.results-head h2,.value-section h2{font-size:clamp(26px,4vw,44px);letter-spacing:-1.5px;margin:8px 0 0}
.results-meta{text-align:right;color:#8c8c9b;font-size:13px}.results-meta span{display:block}.quota{font-size:10px;margin-top:5px}
.media-grid{columns:4 280px;column-gap:14px}
.media-card{position:relative;break-inside:avoid;margin:0 0 14px;border-radius:18px;overflow:hidden;background:var(--panel);border:1px solid var(--line);cursor:pointer;transform:translateZ(0)}
.media-card:hover .media-img{transform:scale(1.025)}.media-card:hover .card-overlay{opacity:1}
.media-img{display:block;width:100%;height:auto;min-height:160px;object-fit:cover;transition:transform .35s ease;background:#16161e}
.card-overlay{position:absolute;inset:0;background:linear-gradient(180deg,transparent 48%,rgba(0,0,0,.92));opacity:.88;transition:.25s}
.card-top{position:absolute;top:10px;left:10px;right:10px;display:flex;justify-content:space-between;align-items:center}.media-type{padding:6px 8px;border-radius:99px;background:rgba(0,0,0,.62);backdrop-filter:blur(10px);font-size:9px;font-weight:900;letter-spacing:1px}
.favorite-btn{width:34px;height:34px;border:1px solid rgba(255,255,255,.2);border-radius:50%;background:rgba(0,0,0,.5);color:#fff;cursor:pointer;font-size:16px}.favorite-btn.saved{background:#fff;color:#ff377f}
.card-bottom{position:absolute;left:12px;right:12px;bottom:11px}.card-title{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-credit{font-size:10px;color:#c7c7cf;margin-top:4px}.play-badge{position:absolute;inset:0;margin:auto;width:56px;height:56px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.88);color:#111;font-size:20px;padding-left:3px;box-shadow:0 10px 35px rgba(0,0,0,.3)}
.loading{display:flex;justify-content:center;gap:8px;padding:60px}.loading span{width:11px;height:11px;border-radius:50%;background:#a58aff;animation:bounce .85s infinite alternate}.loading span:nth-child(2){animation-delay:.15s}.loading span:nth-child(3){animation-delay:.3s}@keyframes bounce{to{transform:translateY(-12px);opacity:.35}}
.empty-state{text-align:center;border:1px dashed var(--line);border-radius:24px;padding:70px 20px;color:#9b9baa}.empty-state div{font-size:50px}.empty-state h3{color:#fff;margin:12px 0 4px}
.load-more-wrap{text-align:center;padding-top:30px}.load-more{border:1px solid rgba(140,92,255,.4);background:rgba(140,92,255,.1);color:#ddd;border-radius:15px;padding:14px 24px;font-weight:900;cursor:pointer}
.value-section{max-width:1500px;margin:0 auto 80px;padding:48px 24px}.value-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:30px}.value-grid article{padding:26px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.015))}.value-grid b{font-size:12px;color:#a98fff}.value-grid h3{font-size:24px;margin:28px 0 8px}.value-grid p{margin:0;color:#9e9eab;line-height:1.55}
.board-drawer{position:fixed;z-index:90;right:0;top:0;height:100dvh;width:min(470px,94vw);background:#111118;border-left:1px solid var(--line);box-shadow:-30px 0 80px rgba(0,0,0,.45);transform:translateX(105%);transition:.3s ease;padding:22px;display:flex;flex-direction:column}
.board-drawer.open{transform:none}.drawer-overlay{position:fixed;z-index:80;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);opacity:0;pointer-events:none;transition:.3s}.drawer-overlay.show{opacity:1;pointer-events:auto}
.drawer-head{display:flex;justify-content:space-between;gap:14px;align-items:start}.drawer-head h2{font-size:32px;margin:5px 0}.icon-btn{width:40px;height:40px;border-radius:12px;font-size:28px}.drawer-note{font-size:12px;color:#8f8f9d;margin-top:0}
.board-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;overflow:auto;padding:6px 1px 16px;flex:1}.board-item{position:relative;border-radius:13px;overflow:hidden;aspect-ratio:1;background:#20202a}.board-item img{width:100%;height:100%;object-fit:cover}.board-item button{position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff}
.drawer-actions{display:grid;gap:8px;padding-top:12px;border-top:1px solid var(--line)}.primary-wide,.danger-wide,.primary-btn,.pexels-btn{border:0;border-radius:13px;padding:13px 16px;font-weight:900;cursor:pointer;text-align:center;text-decoration:none}.primary-wide,.primary-btn{background:linear-gradient(135deg,var(--violet),var(--pink));color:#fff}.danger-wide{background:transparent;color:#ff8a9e;border:1px solid rgba(255,100,120,.23)}
.preview-dialog{width:min(1100px,94vw);max-height:92dvh;padding:0;border:1px solid rgba(255,255,255,.15);border-radius:25px;background:#111118;color:#fff;box-shadow:0 40px 130px rgba(0,0,0,.65);overflow:hidden}.preview-dialog::backdrop{background:rgba(0,0,0,.78);backdrop-filter:blur(8px)}
.preview-close{position:absolute;z-index:5;right:13px;top:13px;width:42px;height:42px;border:1px solid rgba(255,255,255,.2);border-radius:50%;background:rgba(0,0,0,.7);color:#fff;font-size:25px}
.preview-media{height:min(64vh,690px);background:#07070b;display:grid;place-items:center}.preview-media img,.preview-media video{width:100%;height:100%;object-fit:contain}.preview-info{display:flex;justify-content:space-between;align-items:end;gap:20px;padding:20px}.preview-info h2{font-size:20px;margin:8px 0 6px;max-width:650px}.preview-info p{margin:0;color:#a6a6b2;font-size:12px}.pill{display:inline-block;font-size:9px;letter-spacing:1px;font-weight:900;padding:6px 8px;border-radius:99px;background:rgba(140,92,255,.16);color:#cbbcff}.preview-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:end}.pexels-btn{background:#fff;color:#111}.preview-actions .ghost-btn{padding:13px 16px}
.toast{position:fixed;z-index:120;left:50%;bottom:25px;transform:translate(-50%,25px);background:#f8f8fb;color:#111;padding:11px 15px;border-radius:13px;font-weight:800;font-size:12px;opacity:0;pointer-events:none;transition:.25s;box-shadow:0 18px 60px rgba(0,0,0,.45)}.toast.show{opacity:1;transform:translate(-50%,0)}
footer{border-top:1px solid var(--line);padding:34px clamp(20px,4vw,52px);display:flex;justify-content:space-between;gap:20px;color:#8e8e9b;font-size:12px}footer strong{color:#fff;font-size:16px}footer p{margin:5px 0;max-width:520px}.pexels-credit{text-align:right}.pexels-credit a{color:#fff;font-weight:900}
@media(max-width:760px){
  .topbar{padding:10px 12px}.brand small{display:none}.network-badge{display:none}.ghost-btn{display:none}.board-btn{padding:9px 10px}
  .hero{min-height:auto;padding:65px 14px 34px}.hero h1{letter-spacing:-2.6px}.hero-copy p{font-size:15px}.search-shell{margin-top:28px;padding:8px;border-radius:21px}.search-row{grid-template-columns:auto 1fr}.search-btn{grid-column:1/-1}.search-icon{font-size:25px}.quick-categories{padding-top:8px}
  .toolbar-wrap,.results-section,.value-section{padding-left:13px;padding-right:13px}.toolbar{padding:12px;gap:8px}.toolbar label{min-width:calc(50% - 4px);flex:1}.clear-btn{width:100%;margin-left:0}
  .results-section{padding-top:44px}.results-head{align-items:start}.results-meta{font-size:11px}.media-grid{columns:2 150px;column-gap:8px}.media-card{margin-bottom:8px;border-radius:13px}.card-bottom{left:8px;right:8px;bottom:8px}.card-title{font-size:11px}.card-credit{font-size:9px}.favorite-btn{width:31px;height:31px}
  .value-grid{grid-template-columns:1fr}.value-grid article{padding:20px}.preview-info{display:grid;padding:15px}.preview-actions{justify-content:start}.preview-dialog{width:96vw}.preview-media{height:58vh}
  footer{display:grid}.pexels-credit{text-align:left}.value-section{margin-bottom:35px}
}

@media (max-width: 760px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 48px 14px 28px;
    text-align: left;
  }

  .hero-copy,
  .search-shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(38px, 11vw, 52px);
    line-height: .98;
    letter-spacing: -2px;
    overflow-wrap: anywhere;
  }

  .search-shell {
    box-sizing: border-box;
  }

  .search-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .search-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .quick-categories {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar label,
  .toolbar select {
    width: 100%;
    min-width: 0;
  }

  .clear-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .toolbar-wrap,
  .results-section,
  .value-section {
    width: 100%;
    max-width: 100%;
    padding-left: 13px;
    padding-right: 13px;
  }

  .media-grid {
    columns: 2;
    column-gap: 8px;
  }
}

#apiQuota {
    display: none !important;
}

/* Resultados mais próximos do título */
.results-head {
    margin-bottom: 10px !important;
}

@media (max-width: 760px) {
    .results-head {
        margin-bottom: 7px !important;
    }
}


/* Resultados mais próximos do título */
.results-head {
    margin-bottom: 10px !important;
}

@media (max-width: 760px) {
    .results-head {
        margin-bottom: 3px !important;
    }
}


/* Remove animação de carregamento */
#loading {
    display: none !important;
}


/* HERO COM LOGO VISUALLAB */
.hero-logo-wrap {
    width: min(760px, 92vw);
    margin: 0 auto;
    padding: 8px;
    border-radius: 30px;
    background:
        linear-gradient(#101017, #101017) padding-box,
        linear-gradient(120deg, #8c5cff, #ff3c8e, #ff8a3d, #8c5cff) border-box;
    border: 3px solid transparent;
    box-shadow:
        0 20px 70px rgba(0,0,0,.50),
        0 0 35px rgba(140,92,255,.20),
        0 0 55px rgba(255,60,142,.12);
    overflow: hidden;
    position: relative;
}

.hero-logo-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 26px;
    pointer-events: none;
    box-shadow: inset 0 0 35px rgba(255,255,255,.06);
}

.hero-logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 21px;
}

@media (max-width: 760px) {
    .hero-logo-wrap {
        width: 100%;
        max-width: 100%;
        padding: 5px;
        border-width: 2px;
        border-radius: 22px;
    }

    .hero-logo {
        width: 100%;
        max-height: 280px;
        border-radius: 17px;
    }
}


/* HERO 50% MENOR */

.hero-logo-wrap {
    width: min(380px, 46vw) !important;
}

.hero-logo {
    max-height: 210px !important;
}

.hero h1 {
    font-size: clamp(22px, 3.75vw, 46px) !important;
    line-height: 1 !important;
}

@media (max-width: 760px) {
    .hero-logo-wrap {
        width: 50% !important;
        max-width: 220px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-logo {
        max-height: 140px !important;
    }

    .hero h1 {
        font-size: 24px !important;
        line-height: 1.05 !important;
        letter-spacing: -1px !important;
    }
}


/* HERO MAIS PARA CIMA */
.hero {
    min-height: auto !important;
    padding-top: 22px !important;
    padding-bottom: 24px !important;
}

.hero-logo-wrap {
    margin-top: 0 !important;
}

.hero h1 {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
}

.search-shell {
    margin-top: 16px !important;
}

@media (max-width: 760px) {
    .hero {
        padding-top: 14px !important;
        padding-bottom: 18px !important;
    }

    .hero h1 {
        margin-top: 8px !important;
        margin-bottom: 10px !important;
    }

    .search-shell {
        margin-top: 12px !important;
    }
}


/* RESULTADOS maior e mais destacado */
.results-head .section-kicker {
    font-size: 18px !important;
    letter-spacing: 2.8px !important;
    font-weight: 1000 !important;
}

@media (max-width: 760px) {
    .results-head .section-kicker {
        font-size: 16px !important;
    }
}


/* Scroll da busca para antes de RESULTADOS */
.results-section {
    scroll-margin-top: 95px !important;
}

@media (max-width: 760px) {
    .results-section {
        scroll-margin-top: 80px !important;
    }
}


/* =========================================
   RESULTADOS MAIS ORGANIZADOS
   ========================================= */

.media-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 15px !important;
    columns: unset !important;
    width: 100%;
}

.media-card {
    width: 100%;
    margin: 0 !important;
    break-inside: auto !important;
    border-radius: 18px !important;
    overflow: hidden;
    background: #111118;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 8px 25px rgba(0,0,0,.20);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(140,92,255,.40);
    box-shadow:
        0 16px 40px rgba(0,0,0,.35),
        0 0 22px rgba(140,92,255,.10);
}

.media-img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    min-height: 0 !important;
}

.card-overlay {
    background:
        linear-gradient(
            to bottom,
            transparent 45%,
            rgba(0,0,0,.25) 65%,
            rgba(0,0,0,.92) 100%
        ) !important;
}

.card-bottom {
    left: 13px !important;
    right: 13px !important;
    bottom: 12px !important;
}

.card-title {
    font-size: 13px !important;
    font-weight: 800;
}

.card-credit {
    font-size: 10px !important;
    opacity: .85;
}

.results-head {
    margin-bottom: 13px !important;
}


/* =========================================
   BOTÃO VOLTAR AO TOPO
   ========================================= */

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 150;

    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(140,92,255,.95),
            rgba(255,60,142,.95)
        );

    color: white;
    font-size: 27px;
    font-weight: 900;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.9);

    box-shadow:
        0 12px 35px rgba(0,0,0,.40),
        0 0 25px rgba(140,92,255,.25);

    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .25s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
}


/* TABLET */
@media (max-width: 1100px) {
    .media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}


/* CELULAR */
@media (max-width: 760px) {

    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .media-card {
        border-radius: 14px !important;
    }

    .media-img {
        aspect-ratio: 1 / 1;
    }

    .card-title {
        font-size: 11px !important;
    }

    .card-credit {
        font-size: 9px !important;
    }

    .back-to-top {
        width: 47px;
        height: 47px;
        right: 14px;
        bottom: 18px;
        font-size: 24px;
    }
}


/* PREVIEW - MOSTRAR CONTEÚDO INTEIRO */
.preview-dialog {
    width: min(1100px, 96vw) !important;
    max-height: 94vh !important;
    overflow: auto !important;
}

.preview-media {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 75vh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #050508 !important;
    overflow: hidden !important;
}

.preview-media img,
.preview-media video {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 75vh !important;

    object-fit: contain !important;
    object-position: center center !important;
}

/* CELULAR */
@media (max-width: 760px) {

    .preview-dialog {
        width: 96vw !important;
        max-height: 94vh !important;
    }

    .preview-media {
        max-height: 68vh !important;
    }

    .preview-media img,
    .preview-media video {
        max-width: 100% !important;
        max-height: 68vh !important;
        object-fit: contain !important;
    }
}


/* Toolbar simplificada: Tipo + Formato */
.toolbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr auto !important;
    align-items: end !important;
}

.toolbar label {
    width: 100% !important;
}

.toolbar select {
    width: 100% !important;
}

@media (max-width: 760px) {
    .toolbar {
        grid-template-columns: 1fr 1fr !important;
    }

    .clear-btn {
        grid-column: 1 / -1 !important;
    }
}


/* =========================================
   TABLET HORIZONTAL
   Não altera celular nem tablet vertical
   ========================================= */

@media (min-width: 761px) and (max-width: 1366px) and (orientation: landscape) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    main,
    .hero,
    .toolbar-wrap,
    .results-section {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .hero-logo-wrap {
        max-width: 320px !important;
        width: 32vw !important;
    }

    .hero h1 {
        max-width: 850px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .search-shell {
        width: min(900px, calc(100vw - 48px)) !important;
        max-width: calc(100vw - 48px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .toolbar-wrap {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .toolbar {
        width: 100% !important;
        grid-template-columns: 1fr 1fr auto !important;
        box-sizing: border-box !important;
    }

    .results-section {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .results-head {
        width: 100% !important;
        max-width: 100% !important;
    }

    .media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 12px !important;
    }

    .media-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .media-img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .preview-dialog {
        width: min(1000px, 92vw) !important;
        max-width: 92vw !important;
    }
}


/* Carregar mais alinhado à esquerda */
.load-more-wrap {
    text-align: left !important;
}

.load-more {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* TABLET VERTICAL - LOGO ALINHADO À ESQUERDA */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {

    .hero-logo-wrap {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

}


/* TABLET VERTICAL - FORÇA LOGO À ESQUERDA */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {

    .hero .hero-logo-wrap {
        justify-self: start !important;
        align-self: start !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        transform: none !important;
    }

}


/* TABLET VERTICAL - LOGO VISUALLAB REALMENTE À ESQUERDA */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {

    .hero {
        grid-template-columns: 100% !important;
    }

    .hero > .hero-logo-wrap {
        justify-self: start !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: translateX(0) !important;
        position: relative !important;
        left: 0 !important;
    }

}


/* TABLET VERTICAL - LOGO À ESQUERDA */
@media (min-width: 600px) and (max-width: 1100px) and (orientation: portrait) {

    .hero .hero-logo-wrap,
    .hero > .hero-logo-wrap {
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-self: start !important;
        align-self: start !important;
        left: 0 !important;
        transform: none !important;
    }

}
