/* ============================================================
   OFICIAL GEEK — homepage.css  (homepage only)
   Regras globais (cards, grid, badges, wrap) → design-system.css
   ============================================================ */

/* ── Fixes de elementos externos (Elementor/Swiper) ──────── */
.ui-e-wrp:not(#og-home .ui-e-wrp),
.swiper-slide:not(#og-home .swiper-slide),
.ui-e-item:not(#og-home .ui-e-item),
.ui-e-carousel:not(#og-home .ui-e-carousel),
.elementor-13:not(#og-home .elementor-13),
.e-floating-bars,
.e-floating-buttons,
[class*="e-floating"] {
  display: none !important;
}

/* ── Base da homepage ─────────────────────────────────────── */
#og-home { background: var(--og-bg); }
#og-home a { text-decoration: none; }

/* ── Ticker ───────────────────────────────────────────────── */
.ogc-ticker {
  background: var(--og-yellow);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px;
  overflow: hidden;
  width: 100%;
}
.ogc-ticker__label {
  flex-shrink: 0;
  background: var(--og-black);
  color: var(--og-yellow);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
}
.ogc-ticker__track { overflow: hidden; flex: 1; }
.ogc-ticker__belt {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ogcTicker 40s linear infinite;
  will-change: transform;
}
.ogc-ticker:hover .ogc-ticker__belt { animation-play-state: paused; }
.ogc-ticker__item {
  font-size: 11px;
  font-weight: 600;
  color: #111;
  padding: 0 18px 0 0;
  white-space: nowrap;
  transition: color .15s;
}
.ogc-ticker__item:hover { color: var(--og-black); text-decoration: underline; }
.ogc-ticker__dot { color: rgba(0,0,0,.35); padding-right: 18px; font-size: 10px; }
@keyframes ogcTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero ─────────────────────────────────────────────────── */
.ogc-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--og-dark);
  width: 100%;
}
.ogc-hero__main {
  position: relative;
  height: 420px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.ogc-hero__main-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .6s ease;
  background: #1a1a1a;
}
.ogc-hero__main:hover .ogc-hero__main-img { transform: scale(1.04); }
.ogc-hero__main-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.25) 55%, transparent 100%);
  pointer-events: none;
}
.ogc-hero__main-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 22px 20px;
  z-index: 2;
  /* Animação: info sobe ao carregar */
  animation: ogcHeroInfo .6s ease both;
}
.ogc-hero__main-title {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 6px;
}
.ogc-hero__main:hover .ogc-hero__main-title {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.4);
}
.ogc-hero__main-meta { color: #aaa; font-size: 11px; }

.ogc-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}
.ogc-hero__item {
  position: relative;
  height: 208px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.ogc-hero__item-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s ease;
  background: #1a1a1a;
}
.ogc-hero__item:hover .ogc-hero__item-img { transform: scale(1.06); }
.ogc-hero__item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, transparent 60%);
  pointer-events: none;
  transition: opacity .3s;
}
.ogc-hero__item:hover .ogc-hero__item-overlay { opacity: .7; }
.ogc-hero__item-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 9px 11px;
  z-index: 2;
}
.ogc-hero__item-title {
  display: block;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 5px;
  transition: text-decoration-color .15s;
}
.ogc-hero__item:hover .ogc-hero__item-title {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.4);
}

/* ── Section ──────────────────────────────────────────────── */
.ogc-section { padding: 28px 0; }

/* ── Two-column: featured + sidebar ──────────────────────── */
.ogc-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.ogc-featured {
  background: var(--og-surface);
  border-radius: var(--og-r-md);
  overflow: hidden;
  border: .5px solid var(--og-border);
  transition: box-shadow .25s;
}
.ogc-featured:hover { box-shadow: var(--og-shadow); }
.ogc-featured__img-wrap {
  height: 220px; overflow: hidden;
  display: block; background: #ddd;
}
.ogc-featured__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s ease;
}
.ogc-featured:hover .ogc-featured__img { transform: scale(1.03); }
.ogc-featured__img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #533483);
}
.ogc-featured__body { padding: 16px 18px 20px; }
.ogc-featured__title {
  display: block;
  font-size: 18px; font-weight: 700;
  line-height: 1.35;
  color: var(--og-text-1);
  margin: 8px 0 9px;
  transition: color .15s;
}
.ogc-featured__title:hover { color: var(--og-black); }
.ogc-featured__excerpt { font-size: 12px; line-height: 1.65; color: var(--og-text-muted); margin-bottom: 10px; }
.ogc-featured__meta { font-size: 11px; color: var(--og-text-muted); }

.ogc-sidebar__title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--og-text-1);
  border-left: 3px solid var(--og-yellow);
  padding-left: 9px;
  margin: 0 0 12px;
}
.ogc-sidebar__item {
  display: flex; gap: 11px;
  padding: 10px 0;
  border-bottom: .5px solid var(--og-border);
  align-items: flex-start;
  text-decoration: none;
}
.ogc-sidebar__item:last-child { border-bottom: none; }
.ogc-sidebar__num {
  font-size: 22px; font-weight: 800;
  color: #ddd; line-height: 1;
  min-width: 28px; flex-shrink: 0;
}
.ogc-sidebar__info { flex: 1; }
.ogc-sidebar__item-title {
  display: block;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  color: var(--og-text-1);
  margin-top: 4px;
  transition: color .15s;
}
.ogc-sidebar__item:hover .ogc-sidebar__item-title {
  color: var(--og-black);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   ANIMAÇÕES
   ════════════════════════════════════════════════════════════ */

/* Keyframes */
@keyframes ogcHeroInfo {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ogcFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ogcFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ogcSlideLeft {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Estado inicial: elementos aguardam entrada na viewport */
.ogc-will-animate {
  opacity: 0;
  transform: translateY(18px);
  transition: none;
}

/* Quando entra na viewport o JS adiciona .ogc-in */
.ogc-will-animate.ogc-in {
  animation: ogcFadeUp .5s ease both;
}

/* Stagger para itens em grid */
.ogc-will-animate.ogc-in:nth-child(2) { animation-delay: .07s; }
.ogc-will-animate.ogc-in:nth-child(3) { animation-delay: .14s; }
.ogc-will-animate.ogc-in:nth-child(4) { animation-delay: .21s; }

/* Variante fade simples */
.ogc-will-fade.ogc-in {
  animation: ogcFadeIn .45s ease both;
}

/* Section headers deslizam da esquerda */
.ogc-section-hd.ogc-in {
  animation: ogcSlideLeft .4s ease both;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ogc-hero__main { height: 360px; }
  .ogc-hero__item { height: 178px; }
}
@media (max-width: 768px) {
  .ogc-hero { grid-template-columns: 1fr; }
  .ogc-hero__main { height: 300px; }
  .ogc-hero__grid { grid-template-columns: 1fr 1fr; }
  .ogc-hero__item { height: 160px; }
  .ogc-hero__item-title { font-size: 12px; }
  .ogc-two-col { grid-template-columns: 1fr; }
  .ogc-hero__main-title { font-size: 17px; }
  .ogc-section { padding: 20px 0; }
  .ogc-featured__img-wrap { height: 200px; }
  /* Sidebar "Mais lidos" recebe separador visual quando empilhada */
  .ogc-sidebar {
    border-top: 2px solid var(--og-yellow);
    padding-top: 20px;
    margin-top: 4px;
  }
}
@media (max-width: 480px) {
  .ogc-hero__main { height: 260px; }
  .ogc-hero__main-title { font-size: 15px; }
  .ogc-hero__grid { grid-template-columns: 1fr; }
  .ogc-hero__item { height: 180px; }
  .ogc-hero__item-title { font-size: 13px; }
  .ogc-section { padding: 16px 0; }
  .ogc-ticker { padding: 6px 12px; gap: 8px; }
  .ogc-ticker__label { display: none; }
}

/* Respeita preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .ogc-will-animate,
  .ogc-will-fade { opacity: 1 !important; transform: none !important; animation: none !important; }
  .ogc-hero__main-info { animation: none; }
}
