/*
Theme Name: JDinPlay
Theme URI: https://www.jdinplay.com.br
Author: JDinPlay
Description: Block Theme (FSE) espelhando o portal JDinPlay construído originalmente em React/Vite. Identidade Navy & Gold, tipografia Rajdhani + Inter, layout estilo IGN/GameSpot.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jdinplay
*/

/* ============================================================
   1. Tokens (espelham src/index.css do Lovable)
   ============================================================ */
:root {
  --jd-navy:            #2F4256;
  --jd-navy-dark:       #1B2533;
  --jd-navy-deep:       #0F1722;
  --jd-gold:            #E8B33A;
  --jd-bg:              #F7F8FA;
  --jd-fg:              #1E2733;
  --jd-card:            #FFFFFF;
  --jd-muted:           #EFF1F4;
  --jd-muted-fg:        #727A85;
  --jd-border:          #DDE2E8;
  --jd-radius:          0.5rem;
  --jd-shadow-sm:       0 1px 2px rgba(15,23,34,.06), 0 1px 3px rgba(15,23,34,.05);
  --jd-shadow-md:       0 4px 12px rgba(15,23,34,.08);
  --jd-container:       1320px;
  --jd-font-heading:    'Rajdhani', system-ui, sans-serif;
  --jd-font-body:       'Inter', system-ui, sans-serif;
}

html.dark, body.dark, [data-theme="dark"] {
  --jd-bg:        #0F1722;
  --jd-fg:        #E5E9F0;
  --jd-card:      #1B2533;
  --jd-muted:     #1F2A38;
  --jd-muted-fg:  #8A93A1;
  --jd-border:    #2A3645;
}

/* ============================================================
   2. Base
   ============================================================ */
body {
  font-family: var(--jd-font-body);
  background: var(--jd-bg);
  color: var(--jd-fg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--jd-font-heading); font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--jd-gold); }

.jd-container { max-width: var(--jd-container); margin: 0 auto; padding: 0 1rem; }

.jd-section-title {
  font-family: var(--jd-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-left: 1rem;
  border-left: 4px solid var(--jd-gold);
}

/* ============================================================
   3. Header (parts/header.html)
   ============================================================ */
.jd-header {
  background: var(--jd-navy);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.jd-header__inner { display: flex; align-items: center; justify-content: space-between; height: 7rem; }
.jd-header__logo img { height: 64px; width: auto; }
.jd-nav { display: none; gap: .25rem; align-items: center; }
@media (min-width: 768px) { .jd-nav { display: flex; } }
.jd-nav a {
  padding: .5rem .75rem;
  font-family: var(--jd-font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .875rem;
  letter-spacing: .03em;
}
.jd-nav a:hover { color: var(--jd-gold); }

.jd-header__actions button {
  background: transparent; border: 0; color: inherit;
  padding: .5rem; cursor: pointer;
}
.jd-header__actions button:hover { color: var(--jd-gold); }

/* ============================================================
   4. Hero
   ============================================================ */
.jd-hero { position: relative; border-radius: var(--jd-radius); overflow: hidden; }
.jd-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; min-height: 280px; transition: transform .5s ease; }
.jd-hero:hover img { transform: scale(1.05); }
.jd-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,34,.95), rgba(15,23,34,.4) 50%, transparent);
}
.jd-hero__content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem; color: #fff;
}
@media (min-width: 768px) { .jd-hero__content { padding: 2rem; } }
.jd-tag {
  display: inline-block;
  background: var(--jd-gold); color: var(--jd-navy-deep);
  font-family: var(--jd-font-heading);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: .25rem;
}
.jd-hero__title { font-size: clamp(1.5rem, 3.5vw, 2.5rem); line-height: 1.1; max-width: 48rem; margin: .75rem 0 .5rem; }

/* ============================================================
   5. News card
   ============================================================ */
.jd-card {
  background: var(--jd-card);
  border-radius: var(--jd-radius);
  overflow: hidden;
  box-shadow: var(--jd-shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
  display: block;
}
.jd-card:hover { box-shadow: var(--jd-shadow-md); }
.jd-card__media { aspect-ratio: 16/9; overflow: hidden; }
.jd-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.jd-card:hover .jd-card__media img { transform: scale(1.05); }
.jd-card__body { padding: 1rem; }
.jd-card__title { font-size: 1.125rem; line-height: 1.25; margin: .5rem 0; }
.jd-card:hover .jd-card__title { color: var(--jd-gold); }
.jd-card__excerpt { font-size: .875rem; color: var(--jd-muted-fg); }
.jd-card__meta { display: flex; gap: .5rem; font-size: .75rem; color: var(--jd-muted-fg); margin-top: .75rem; }

.jd-card--small .jd-card__title { font-size: .95rem; }
.jd-card--horizontal { display: flex; gap: 1rem; background: transparent; box-shadow: none; }
.jd-card--horizontal .jd-card__media { flex: 0 0 7rem; height: 5rem; aspect-ratio: auto; border-radius: .375rem; }
.jd-card--horizontal .jd-card__body { padding: 0; }

/* ============================================================
   6. Sidebar
   ============================================================ */
.jd-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.jd-widget { background: var(--jd-card); border-radius: var(--jd-radius); padding: 1.25rem; box-shadow: var(--jd-shadow-sm); }
.jd-taglist { display: flex; flex-wrap: wrap; gap: .5rem; }
.jd-taglist a {
  background: var(--jd-muted); color: var(--jd-fg);
  font-size: .8rem; padding: .35rem .65rem; border-radius: .375rem;
}
.jd-taglist a:hover { background: var(--jd-gold); color: var(--jd-navy-deep); }

.jd-ad-slot {
  border: 2px dashed var(--jd-border);
  height: 16rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--jd-muted-fg);
  font-family: var(--jd-font-heading);
  text-transform: uppercase;
  border-radius: var(--jd-radius);
}

/* ============================================================
   7. Layout grid (home, archive, single)
   ============================================================ */
.jd-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem 0; }
@media (min-width: 1024px) { .jd-layout { grid-template-columns: 2fr 1fr; } }

.jd-grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .jd-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.jd-grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .jd-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   8. Single (post)
   ============================================================ */
.jd-post__title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .5rem 0 1rem; }
.jd-post__meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; color: var(--jd-muted-fg); margin-bottom: 1.5rem; }
.jd-post__cover { aspect-ratio: 16/9; border-radius: var(--jd-radius); overflow: hidden; margin-bottom: 2rem; }
.jd-post__cover img { width: 100%; height: 100%; object-fit: cover; }
.jd-post__content { font-size: 1.05rem; line-height: 1.75; }
.jd-post__content h2 { margin: 2rem 0 .75rem; font-size: 1.5rem; }
.jd-post__content p  { margin-bottom: 1rem; }
.jd-post__content a  { color: var(--jd-gold); }

/* ============================================================
   9. Footer
   ============================================================ */
.jd-footer { background: var(--jd-navy); color: #fff; margin-top: 3rem; }
.jd-footer__grid { display: grid; gap: 2rem; padding: 2.5rem 0; grid-template-columns: 1fr; }
@media (min-width: 768px) { .jd-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.jd-footer h3 { color: var(--jd-gold); text-transform: uppercase; font-size: 1.125rem; margin-bottom: 1rem; }
.jd-footer ul { list-style: none; padding: 0; margin: 0; gap: .5rem; font-size: .9rem; }
.jd-footer__social { display: flex; flex-wrap: wrap; gap: .75rem; }
.jd-footer__social a { padding: .5rem; background: rgba(255,255,255,.08); border-radius: .375rem; }
.jd-footer__social a:hover { background: var(--jd-gold); color: var(--jd-navy-deep); }
.jd-footer__copy { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 1.5rem 0; font-size: .85rem; opacity: .6; }
