﻿/* ============================================
   CODEXY HUB COMERCIAL — NETFLIX STYLE CSS
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #070c1c;
  --bg2:        #0a0f1e;
  --bg3:        #0d1426;
  --surface:    rgba(255,255,255,0.04);
  --border:     rgba(255,255,255,0.08);
  --blue:       #0055ff;
  --blue-l:     #2277ff;
  --blue-xl:    #5599ff;
  --navy:       #001233;
  --purple:     #5b21b6;
  --green:      #10b981;
  --orange:     #f59e0b;
  --red:        #ef4444;
  --white:      #ffffff;
  --g100:       #f1f5f9;
  --g300:       #cbd5e1;
  --g400:       #94a3b8;
  --g500:       #64748b;
  --g600:       #475569;
  --g700:       #334155;
  --g800:       #1e293b;
  --g900:       #0f172a;
  --r:          8px;
  --r2:         12px;
  --r3:         16px;
  --r4:         24px;
  --rfull:      9999px;
  --ease:       0.28s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }
body { font-family: "Inter", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--white); overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* HEADER */
.header { position: fixed; inset: 0 0 auto; z-index: 900; transition: background var(--ease), box-shadow var(--ease); }
.header--solid { background: rgba(11,15,26,0.95); backdrop-filter: blur(16px); box-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.header__inner { max-width: 1440px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; gap: 32px; }
.header__logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Logo real da Codexy */
.logo__img { height: 22px; width: auto; filter: brightness(0) invert(1); display: block; flex-shrink: 0; }
.logo__sub { font-size: 10px; font-weight: 700; color: var(--blue-xl); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; border-left: 1px solid var(--border); padding-left: 10px; margin-left: 2px; }
/* Legado (mantido para compatibilidade) */
.logo__icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; letter-spacing: -1px; box-shadow: 0 4px 14px rgba(37,99,235,0.45); }
.logo__text { line-height: 1.2; }
.logo__brand { display: block; font-size: 17px; font-weight: 800; }
.header__nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link { padding: 7px 16px; border-radius: var(--rfull); font-size: 14px; font-weight: 500; color: var(--g400); transition: color var(--ease), background var(--ease); }
.nav__link:hover { color: var(--white); background: var(--surface); }

.header__search { position: relative; }
.search__toggle { background: none; border: none; cursor: pointer; color: var(--g400); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; transition: color var(--ease); }
.search__toggle:hover { color: var(--white); }
.search__toggle svg { width: 20px; height: 20px; }
.search__field { display: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rfull); padding: 8px 14px 8px 38px; width: 280px; align-items: center; gap: 8px; }
.search__field.open { display: flex; }
.search__field svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--g500); pointer-events: none; }
.search__field input { flex: 1; background: none; border: none; color: var(--white); font-size: 14px; font-family: inherit; outline: none; }
.search__field input::placeholder { color: var(--g600); }
.search__field button { background: none; border: none; color: var(--g500); cursor: pointer; font-size: 14px; line-height: 1; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; }
.mobile__nav { display: none; flex-direction: column; padding: 12px 24px 20px; gap: 4px; background: rgba(11,15,26,0.98); border-top: 1px solid var(--border); }
.mobile__nav.open { display: flex; }
.mobile__nav .nav__link { padding: 12px 16px; }
@media (max-width: 768px) { .header__inner { padding: 14px 20px; } .header__nav { display: none; } .header__search { margin-left: auto; } .burger { display: flex; margin-left: 8px; } .logo__sub { display: none; } .logo__img { height: 26px; } }

/* HERO */
.hero { position: relative; height: 85vh; min-height: 560px; max-height: 800px; display: flex; align-items: flex-end; overflow: hidden; }
.hero__backdrop { position: absolute; inset: 0; background: linear-gradient(135deg, #040916 0%, #060d20 45%, #090519 100%); transition: background 0.6s ease; }
.hero__backdrop::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 20% 40%, rgba(0,85,255,0.3) 0%, transparent 70%), radial-gradient(ellipse 50% 50% at 80% 20%, rgba(0,85,255,0.12) 0%, transparent 70%), radial-gradient(ellipse 40% 40% at 60% 80%, rgba(91,33,182,0.12) 0%, transparent 70%); }
.hero__backdrop::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,85,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,85,255,0.06) 1px, transparent 1px); background-size: 50px 50px; mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%); }
.hero__overlay { position: absolute; inset: 0; z-index: 4; background: linear-gradient(to right, rgba(7,12,28,0.92) 0%, rgba(7,12,28,0.55) 55%, rgba(7,12,28,0.1) 100%), linear-gradient(to top, var(--bg) 0%, transparent 35%); }
.hero__content { position: relative; z-index: 5; max-width: 640px; padding: 0 40px 80px; animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(0,85,255,0.12); border: 1px solid rgba(0,85,255,0.35); border-radius: var(--rfull); font-size: 12px; font-weight: 700; color: var(--blue-xl); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 20px; animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both 0.1s; }
.hero__title { font-size: clamp(32px, 5vw, 56px); font-weight: 900; line-height: 1.1; margin-bottom: 18px; animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both 0.2s; }
.hero__title span { background: linear-gradient(135deg, #2277ff, #5599ff, #99bbff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__desc { font-size: clamp(14px, 1.8vw, 17px); color: var(--g300); margin-bottom: 32px; max-width: 520px; animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both 0.32s; }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both 0.44s; }
.hbtn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--rfull); font-size: 15px; font-weight: 700; cursor: pointer; border: none; transition: transform var(--ease), box-shadow var(--ease), background var(--ease); }
.hbtn svg { width: 18px; height: 18px; }
.hbtn--primary { background: var(--blue); color: #fff; box-shadow: 0 4px 20px rgba(0,85,255,0.4); }
.hbtn--primary:hover { transform: scale(1.03) translateY(-1px); box-shadow: 0 8px 30px rgba(0,85,255,0.55); background: var(--blue-l); }
.hbtn--ghost { background: rgba(255,255,255,0.14); color: var(--white); backdrop-filter: blur(8px); }
.hbtn--ghost:hover { background: rgba(255,255,255,0.22); transform: scale(1.03); }
.hero__stats { position: absolute; bottom: 32px; right: 40px; z-index: 5; display: flex; align-items: center; background: rgba(7,12,28,0.7); border: 1px solid rgba(0,85,255,0.2); border-radius: var(--r3); padding: 16px 28px; backdrop-filter: blur(20px); animation: cxy-slide-up 0.9s cubic-bezier(0.22,1,0.36,1) both 0.6s; box-shadow: 0 0 0 1px rgba(0,85,255,0.05), inset 0 1px 0 rgba(255,255,255,0.05); }
.hstat { text-align: center; padding: 0 20px; }
.hstat span { display: block; font-size: 28px; font-weight: 900; color: var(--white); line-height: 1; margin-bottom: 4px; }
.hstat label { font-size: 11px; color: var(--blue-xl); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.hstat__div { width: 1px; height: 36px; background: rgba(0,85,255,0.25); }
@media (max-width: 768px) { .hero__content { padding: 0 20px 130px; } .hero__stats { right: 50%; transform: translateX(50%); bottom: 20px; padding: 12px 18px; } .hstat { padding: 0 12px; } .hstat span { font-size: 20px; } }

/* CATALOG ROWS */
.catalog { padding: 0 0 60px; position: relative; z-index: 1; }
.cat-row { padding: 20px 0 10px; margin-bottom: 8px; }
.cat-row__head { display: flex; align-items: center; justify-content: space-between; padding: 0 40px; margin-bottom: 16px; }
.cat-row__title { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: color var(--ease); }
.cat-row__title:hover { color: var(--g300); }
.cat-row__icon { width: 32px; height: 32px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cat-row__count { font-size: 12px; font-weight: 600; color: var(--g500); margin-left: 6px; }
.cat-row__see-all { font-size: 13px; font-weight: 600; color: var(--blue-l); opacity: 0; transition: opacity var(--ease); }
.cat-row:hover .cat-row__see-all { opacity: 1; }
.cat-row__slider-wrap { position: relative; }
.cat-row__slider { display: flex; gap: 12px; padding: 8px 40px 16px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.cat-row__slider::-webkit-scrollbar { display: none; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 44px; height: 80px; background: rgba(11,15,26,0.85); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--white); opacity: 0; transition: opacity var(--ease), background var(--ease); backdrop-filter: blur(4px); }
.slider-arrow svg { width: 22px; height: 22px; }
.slider-arrow--left { left: 0; border-radius: 0 var(--r) var(--r) 0; }
.slider-arrow--right { right: 0; border-radius: var(--r) 0 0 var(--r); }
.cat-row__slider-wrap:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: rgba(37,99,235,0.7); }

/* CARD */
.item-card { flex-shrink: 0; position: relative; cursor: pointer; border-radius: var(--r2); overflow: visible; transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1); z-index: 1; }
.item-card--pdf { width: 160px; }
.item-card--pdf .card__cover { width: 160px; height: 220px; }
.item-card--video { width: 240px; }
.item-card--video .card__cover { width: 240px; height: 135px; }
.card__cover { border-radius: var(--r2); overflow: hidden; position: relative; box-shadow: 0 4px 20px rgba(0,0,0,0.5); transition: box-shadow var(--ease); }
.card__cover-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 16px; }
.card__cover-icon { font-size: 48px; margin-bottom: 12px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)); transition: transform var(--ease); }
.item-card--pdf .card__cover-icon { font-size: 52px; }
.item-card--video .card__cover-icon { font-size: 42px; }
.card__cover-title { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.3; color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.8); padding: 0 4px; }
.item-card--video .card__cover-title { font-size: 12px; }
.card__type-badge { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 7px; border-radius: var(--rfull); backdrop-filter: blur(6px); }
.card__type-badge--pdf { background: rgba(239,68,68,0.8); color: #fff; }
.card__type-badge--video { background: rgba(37,99,235,0.85); color: #fff; }
.card__play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--ease); background: rgba(0,0,0,0.25); }
.card__play-btn { width: 48px; height: 48px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; transform: scale(0.8); transition: transform var(--ease); }
.card__play-btn svg { width: 20px; height: 20px; fill: var(--g900); margin-left: 2px; }
.card__info { position: absolute; left: 50%; transform: translateX(-50%); width: calc(100% + 40px); background: var(--bg3); border: 1px solid rgba(255,255,255,0.1); border-top: none; border-radius: 0 0 var(--r2) var(--r2); padding: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; box-shadow: 0 16px 40px rgba(0,0,0,0.7); z-index: 20; }
.card__info-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--white); line-height: 1.3; }
.card__info-desc { font-size: 11px; color: var(--g400); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__info-meta { font-size: 11px; color: var(--g600); margin-bottom: 12px; }
.card__info-actions { display: flex; gap: 6px; }
.cibtn { flex: 1; padding: 7px 10px; border-radius: var(--r); font-size: 11px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; transition: filter var(--ease), transform var(--ease); text-decoration: none; font-family: inherit; }
.cibtn svg { width: 13px; height: 13px; }
.cibtn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.cibtn--view { background: var(--blue); color: #fff; }
.cibtn--play { background: var(--white); color: var(--g900); }
.cibtn--dl { background: rgba(16,185,129,0.2); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.item-card:hover { transform: scale(1.08) translateY(-6px); z-index: 50; }
.item-card:hover .card__cover { box-shadow: 0 14px 40px rgba(0,0,0,0.7); }
.item-card:hover .card__cover-icon { transform: scale(1.1); }
.item-card:hover .card__play-overlay { opacity: 1; }
.item-card:hover .card__play-btn { transform: scale(1); }
.item-card:hover .card__info { opacity: 1; pointer-events: all; }
.card__label { margin-top: 8px; padding: 0 2px; font-size: 12px; font-weight: 600; color: var(--g300); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.item-card--video .card__label { max-width: 240px; }

/* FLOATING ORBS (Codexy aesthetic) */
.hero__orbs { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.forb { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.forb--1 { width: 380px; height: 380px; background: rgba(0,85,255,0.18); top: -8%; left: -6%; animation: cxy-forb 12s ease-in-out infinite; }
.forb--2 { width: 260px; height: 260px; background: rgba(0,85,255,0.1); top: 15%; right: -3%; animation: cxy-forb 15s ease-in-out infinite 2.5s; }
.forb--3 { width: 220px; height: 220px; background: rgba(91,33,182,0.12); bottom: 5%; left: 10%; animation: cxy-forb 13s ease-in-out infinite 5s; }
.forb--4 { width: 180px; height: 180px; background: rgba(0,85,255,0.07); bottom: 25%; right: 15%; animation: cxy-forb 10s ease-in-out infinite 1.5s; }

/* ORBITAL SPHERE (desktop) */
.hero__orb-wrap { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: 340px; height: 340px; z-index: 5; pointer-events: none; display: none; }
@media (min-width: 1280px) { .hero__orb-wrap { display: block; } }
.hero__orb { position: relative; width: 240px; height: 240px; margin: 50px auto; }
.hero__orb-glow { position: absolute; inset: -32px; border-radius: 50%; background: radial-gradient(circle, rgba(0,85,255,0.28) 0%, transparent 70%); animation: cxy-orb-pulse 3.5s ease-in-out infinite; pointer-events: none; }
.hero__orb-body { position: relative; width: 100%; height: 100%; border-radius: 50%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(24px); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 60px rgba(0,85,255,0.08), 0 0 60px rgba(0,85,255,0.15); }
.hero__orb-core { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, #0055ff 0%, #001a5c 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(0,85,255,0.6); }
.hero__orb-core svg { width: 38px; height: 38px; stroke: #fff; }
.hero__orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(0,85,255,0.28); }
.hero__orb-ring--1 { animation: cxy-rotate 22s linear infinite; }
.hero__orb-ring--2 { inset: 24px; border-color: rgba(0,85,255,0.15); animation: cxy-rotate 16s linear infinite reverse; }
.hero__float-card { position: absolute; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(12px); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.hero__float-card--1 { width: 52px; height: 52px; top: 0; left: 0; animation: cxy-float 7s ease-in-out infinite; }
.hero__float-card--2 { width: 62px; height: 62px; top: -8px; right: -14px; animation: cxy-float 9s ease-in-out infinite 1.2s; }
.hero__float-card--3 { width: 46px; height: 46px; bottom: -4px; left: 24px; animation: cxy-float 8s ease-in-out infinite 2.5s; }
.search__overlay { display: none; position: fixed; inset: 72px 0 0; z-index: 800; background: rgba(11,15,26,0.97); backdrop-filter: blur(12px); padding: 32px 40px; overflow-y: auto; }
.search__overlay.open { display: block; }
.search__results { max-width: 1000px; margin: 0 auto; }
.search__results-title { font-size: 13px; font-weight: 700; color: var(--g500); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 20px; }
.search__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.search__item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 14px; cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.search__item:hover { border-color: var(--blue-l); background: rgba(37,99,235,0.08); }
.search__item-thumb { width: 52px; height: 52px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.search__item-info { min-width: 0; }
.search__item-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.search__item-cat { font-size: 12px; color: var(--g500); }
.search__empty { text-align: center; padding: 60px 0; color: var(--g600); font-size: 16px; }

/* ABOUT */
.about { background: var(--bg2); border-top: 1px solid var(--border); }
.about__inner { max-width: 1200px; margin: 0 auto; padding: 100px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about__text h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin-bottom: 20px; margin-top: 14px; }
.about__text p { color: var(--g400); font-size: 16px; margin-bottom: 14px; }
.about__text strong { color: var(--white); }
.about__checks { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--g300); }
.check__icon { width: 22px; height: 22px; background: rgba(37,99,235,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue-l); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.pill { display: inline-block; padding: 5px 14px; background: rgba(37,99,235,0.15); border: 1px solid rgba(37,99,235,0.3); border-radius: var(--rfull); font-size: 12px; font-weight: 700; color: var(--blue-xl); text-transform: uppercase; letter-spacing: 0.5px; }
.about__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { padding: 22px; border-radius: var(--r3); border: 1px solid var(--border); transition: transform var(--ease); }
.tile:hover { transform: translateY(-3px); }
.tile__icon { font-size: 28px; margin-bottom: 12px; }
.tile h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tile p { font-size: 13px; color: var(--g500); line-height: 1.5; }
.tile--blue { background: rgba(37,99,235,0.07); border-color: rgba(37,99,235,0.2); }
.tile--purple { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.2); }
.tile--green { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.2); }
.tile--orange { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.2); }
@media (max-width: 900px) { .about__inner { grid-template-columns: 1fr; gap: 48px; padding: 70px 24px; } }
@media (max-width: 480px) { .about__tiles { grid-template-columns: 1fr; } }

/* FOOTER */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 36px 24px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.footer__logo .logo__img { height: 24px; filter: brightness(0) invert(1); opacity: 0.7; }
.footer__inner p { font-size: 13px; color: var(--g600); }
.footer__domain { font-size: 12px; color: var(--blue-l); }

/* MODAL */
.modal { position: fixed; inset: 0; z-index: 2000; background: rgba(5,8,20,0.88); backdrop-filter: blur(16px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal.open { opacity: 1; pointer-events: all; }
.modal__box { background: var(--bg2); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r4); width: 100%; max-width: 1050px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; transform: scale(0.95) translateY(16px); transition: transform 0.3s ease; box-shadow: 0 30px 80px rgba(0,0,0,0.8); }
.modal.open .modal__box { transform: scale(1) translateY(0); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 16px; }
.modal__meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.modal__type-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; border-radius: var(--rfull); flex-shrink: 0; }
.modal__type-badge--pdf { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.modal__type-badge--video { background: rgba(37,99,235,0.2); color: var(--blue-xl); border: 1px solid rgba(37,99,235,0.3); }
.modal__meta h3 { font-size: 17px; font-weight: 700; }
.modal__meta span { display: block; font-size: 12px; color: var(--g500); margin-top: 2px; }
.modal__head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mbtn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--r); font-size: 13px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: filter var(--ease), transform var(--ease); text-decoration: none; }
.mbtn svg { width: 15px; height: 15px; }
.mbtn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.mbtn--green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.mbtn--close { background: rgba(255,255,255,0.06); color: var(--g400); border: 1px solid var(--border); padding: 8px 12px; }
.mbtn--close:hover { background: rgba(239,68,68,0.15); color: #f87171; border-color: rgba(239,68,68,0.3); }
.modal__body { flex: 1; overflow: hidden; background: #000; }
.modal__body iframe { width: 100%; height: 100%; min-height: 520px; border: none; }
@media (max-width: 600px) { .modal { padding: 0; align-items: flex-end; } .modal__box { border-radius: var(--r3) var(--r3) 0 0; max-height: 94vh; } .modal__head { flex-direction: column; align-items: flex-start; padding: 14px 16px; gap: 10px; } .modal__head-actions { width: 100%; gap: 8px; } .mbtn--green { flex: 1; justify-content: center; } .modal__body iframe { min-height: 60vh; } }

/* TOAST */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--bg3); border: 1px solid rgba(37,99,235,0.4); border-radius: var(--rfull); padding: 11px 22px; font-size: 14px; font-weight: 600; color: var(--white); z-index: 3000; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 8px 30px rgba(0,0,0,0.5); white-space: nowrap; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .cat-row__head { padding: 0 24px; }
  .cat-row__slider { padding: 8px 24px 16px; }
  .slider-arrow { display: none; }
}
@media (max-width: 768px) {
  .cat-row__head { padding: 0 16px; }
  .cat-row__title { font-size: 16px; }
  .cat-row__see-all { opacity: 1; font-size: 12px; }
  .cat-row__slider { padding: 8px 16px 16px; }
  /* Search field expands full-width when open on mobile */
  .search__field.open { position: fixed; top: 60px; left: 0; right: 0; width: 100%; transform: none; border-radius: 0; border-left: none; border-right: none; border-top: none; padding: 12px 16px 12px 44px; z-index: 950; }
  /* Search overlay starts below search field */
  .search__overlay { inset: 108px 0 0; padding: 20px 16px; }
  /* Search grid single column */
  .search__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { min-height: 100svh; }
  .hero__content { padding: 0 20px 130px; }
  .hero__stats { right: 50%; transform: translateX(50%); bottom: 16px; padding: 10px 14px; }
  .hstat { padding: 0 10px; }
  .hstat span { font-size: 18px; }
  .hstat label { font-size: 9px; }
  .hstat__div { height: 26px; }
}
@media (max-width: 480px) {
  .item-card--pdf { width: 140px; }
  .item-card--pdf .card__cover { width: 140px; height: 196px; }
  .item-card--video { width: 200px; }
  .item-card--video .card__cover { width: 200px; height: 113px; }
  .card__cover-icon { font-size: 38px; }
  .item-card--pdf .card__cover-icon { font-size: 42px; }
}
/* Touch devices: disable hover card info (tap opens viewer directly) */
@media (hover: none) {
  .item-card:hover { transform: scale(1.02) translateY(-2px); }
  .item-card:hover .card__info { opacity: 0; pointer-events: none; }
  .item-card:hover .card__cover { box-shadow: 0 6px 24px rgba(0,0,0,0.5); }
}

/* ── KEYFRAMES (Codexy animations) ── */
@keyframes cxy-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}
@keyframes cxy-forb {
  0%, 100% { transform: translate(0, 0); }
  25%       { transform: translate(24px, -28px); }
  50%       { transform: translate(-16px, 16px); }
  75%       { transform: translate(12px, 24px); }
}
@keyframes cxy-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes cxy-orb-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.85; transform: scale(1.06); }
}
@keyframes cxy-slide-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
