/*
 * CMS Games public theme
 * Professional responsive gaming portal UI.
 */

:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #d0d5dd;
  --soft: #f2f4f7;
  --paper: #ffffff;
  --brand: #2563eb;
  --brand-2: #14b8a6;
  --accent: #f59e0b;
  --success: #16a34a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 12px 28px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.14);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --container: 1220px;
  --font-primary: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gradient-accent: linear-gradient(135deg, #2563eb, #14b8a6);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(208, 213, 221, 0.7);
  backdrop-filter: blur(16px);
}

.header-container {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}

.brand-mark,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--gradient-accent);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: var(--shadow-sm);
}

.brand-copy strong,
.footer-brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand-copy small,
.footer-brand p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.logo { width: 56px; height: 56px; object-fit: contain; }

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.94rem;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--soft);
  color: var(--brand);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form { width: min(34vw, 360px); }

.search-container {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.search-input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 0;
  outline: 0;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
}

.search-btn,
.btn-primary,
.btn-secondary,
.btn-search-all {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 0;
  padding: 0 16px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.search-btn,
.btn-primary {
  color: var(--white);
  background: var(--brand);
}

.btn-secondary {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.search-btn:hover,
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.nav-toggle { display: none; }

.hero-section {
  padding: 48px 0 32px;
}

.hero-grid {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(16, 24, 40, 0.92), rgba(37, 99, 235, 0.82)),
    linear-gradient(135deg, #101828, #2563eb);
  box-shadow: var(--shadow-lg);
}

.eyebrow,
.section-kicker,
.post-label {
  color: var(--brand-2);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 12px 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-see-all {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--brand);
  white-space: nowrap;
}

.section-see-all:hover { text-decoration: underline; }

.stat-card,
.hero-feature,
.widget,
.post-card,
.empty-state,
.Custompage {
  border: 1px solid rgba(208, 213, 221, 0.85);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.stat-card,
.hero-feature {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.stat-card strong {
  color: var(--brand);
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.9;
}

.stat-card span,
.hero-feature span { color: var(--muted); font-weight: 700; }
.hero-feature strong { margin-top: 10px; font-size: 1.4rem; line-height: 1.2; }

.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  padding: 18px 0 56px;
}

.posts-header {
  margin-bottom: 18px;
}

.posts-header h1,
.posts-header h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.posts-header p { max-width: 760px; margin: 0; color: var(--muted); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.post-card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-media-link { display: block; text-decoration: none; }

.post-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--gradient-accent);
}

.post-placeholder {
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 800;
}

.post-content { padding: 16px; }

.post-title {
  margin: 6px 0;
  font-size: 1.06rem;
  line-height: 1.28;
}

.post-title a { text-decoration: none; }
.post-title a:hover { color: var(--brand); }

.post-excerpt { margin: 0; color: var(--muted); font-size: 0.94rem; }

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 96px;
}

.widget { padding: 18px; }

.widget-header h3,
.widget-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.post-meta:last-child { margin-bottom: 0; }

.widget-link {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 650;
}

.widget-link:hover { color: var(--brand); }

.widget-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.feature-list .widget-list-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.tag-cloud,
.popular-searches-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-item,
.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.tag-cloud-item:hover,
.search-tag:hover {
  background: #dbeafe;
  color: var(--brand);
}

.widget-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.btn-search-all {
  width: 100%;
  margin-top: 14px;
  color: var(--white);
  background: var(--ink);
}

.muted { color: var(--muted); margin: 0; }

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--gradient-accent);
  color: var(--white);
  font-weight: 800;
}

.empty-state h3 { margin: 0 0 8px; font-size: 1.5rem; }
.empty-state p { max-width: 560px; margin: 0 auto 18px; color: var(--muted); }

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.pagination-link {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  font-weight: 750;
}

.pagination-link.active,
.pagination-link:hover {
  border-color: var(--brand);
  color: var(--white);
  background: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px 0;
}

.footer-menu {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-link {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 650;
}

.footer-link:hover { color: var(--brand); }
.footer-credits { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.9rem; }

.Custompage {
  padding: 32px;
  margin-top: 32px;
  margin-bottom: 48px;
}

/* Dentro de la grilla de post.php (contenido + sidebar), el margin-top de
   arriba hacia que el articulo empezara mas abajo que el sidebar - las
   tarjetas .widget del sidebar no tienen margin-top, asi que se veian
   desalineadas. Aqui es el unico lugar donde .Custompage convive con un
   sidebar; en 404.php y tags.php sigue solo, sin grilla, y ahi si necesita
   ese margen para separarse del header. */
.main-content .Custompage {
  margin-top: 0;
}

.Custompage h1 { margin-top: 0; }

.breadcrumb-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb-nav a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.Apost {
  color: var(--ink-2);
}

.Apost h2,
.Apost h3 {
  color: var(--ink);
  line-height: 1.2;
}

.comment-form {
  display: grid;
  gap: 12px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
}

.form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}

textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

.alert {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:not(.sr-only) {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
}

@media (max-width: 1040px) {
  .header-container {
    grid-template-columns: 1fr auto;
  }

  .header-center {
    order: 3;
    grid-column: 1 / -1;
    display: none;
  }

  .header-center:has(.nav-menu.active) { display: block; }

  .nav-menu {
    display: none;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 0 12px;
  }

  .nav-menu.active { display: flex; }
  .nav-toggle { display: inline-flex; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); font-weight: 750; }
  .search-form { width: min(48vw, 360px); }
  .main-content { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 760px) {
  .container { width: min(100% - 12px, var(--container)); }
  .header-container { min-height: auto; padding: 10px 0; gap: 10px; }
  .brand-copy small { display: none; }
  .header-right { grid-column: 1 / -1; width: 100%; }
  .search-form { flex: 1; width: auto; }
  .search-input { height: 40px; padding: 0 10px; }
  .search-btn { min-height: 40px; padding: 0 12px; }
  .nav-toggle {
    width: 44px;
    min-width: 44px;
    min-height: 40px;
    padding: 0;
    position: relative;
    font-size: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 1;
  }
  .nav-toggle::before {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
    box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
  }
  .header-center {
    width: 100%;
    padding-top: 2px;
  }
  .nav-menu {
    overflow: visible;
    gap: 8px;
    padding: 8px 0 4px;
  }
  .nav-menu.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-menu li {
    min-width: 0;
  }
  .nav-link {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    background: var(--paper);
  }
  .hero-section { padding: 22px 0 18px; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 28px; }
  .hero-copy h1 { font-size: clamp(2.2rem, 13vw, 3.6rem); }
  .main-content { padding-top: 0; gap: 16px; }
  .Custompage {
    margin-top: 12px;
    margin-bottom: 24px;
    padding: 16px 4px;
    border-radius: var(--radius);
  }
  .Custompage h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.05;
    margin-bottom: 18px;
  }
  .breadcrumb-nav {
    margin-bottom: 12px;
    padding-inline: 4px;
  }
  .Apost .lzg-word-search-post {
    gap: .9rem;
  }
  .Apost .lzg-word-search-game {
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: .7rem;
  }
  .Apost .lzg-ws-heading {
    padding-inline: 4px;
  }
  .Apost .lzg-ws-heading h3 {
    font-size: 1.35rem;
    line-height: 1.15;
  }
  .Apost .lzg-ws-heading p {
    font-size: .98rem;
    line-height: 1.45;
  }
  .Apost .lzg-ws-controls,
  .Apost .lzg-ws-tabs {
    width: 100%;
  }
  .Apost .lzg-ws-layout {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .Apost .lzg-ws-words,
  .Apost .lzg-ws-description,
  .post-share-box,
  .widget {
    padding: 12px;
  }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-menu { justify-content: flex-start; }
}
