/*
Theme Name: Velox
Theme URI: https://antodeveloping.com/velox-theme
Author: antodeveloping
Author URI: https://antodeveloping.com
Description: Tema WordPress minimalista, ultra-rápido, optimizado para AdSense y SEO. Blog general multi-nicho con modo oscuro, zonas de ads predefinidas y schema estructurado.
Version: 1.5.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: velox
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, dark-mode, wide-blocks
*/

/* =============================================
   VELOX THEME — CSS VARIABLES & RESET
   ============================================= */

:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f7f7f7;
  --c-surface: #f0f0f0;
  --c-border: #e0e0e0;
  --c-text: #1a1a1a;
  --c-text-muted: #666666;
  --c-accent: #e63946;
  --c-accent-hover: #c1121f;
  --c-link: #1d3557;
  --c-link-hover: #e63946;
  --c-heading: #111111;
  --c-card-bg: #ffffff;
  --c-card-shadow: 0 1px 4px rgba(0,0,0,.07);
  --c-card-shadow-hover: 0 4px 16px rgba(0,0,0,.12);

  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --gap: 1.5rem;
  --container: 1120px;
  --sidebar: 300px;
  --header-h: 60px;

  --t-fast: 150ms ease;
  --t-med: 250ms ease;
}

[data-theme="dark"] {
  --c-bg: #0f0f0f;
  --c-bg-alt: #171717;
  --c-surface: #222222;
  --c-border: #2e2e2e;
  --c-text: #e8e8e8;
  --c-text-muted: #888888;
  --c-link: #90caf9;
  --c-link-hover: #e63946;
  --c-heading: #f5f5f5;
  --c-card-bg: #1a1a1a;
  --c-card-shadow: 0 1px 4px rgba(0,0,0,.3);
  --c-card-shadow-hover: 0 4px 20px rgba(0,0,0,.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* main.js pone body.style.overflow='hidden' al abrir el menú móvil o el
     overlay de búsqueda. En desktop (scrollbar clásico, no overlay) eso hace
     desaparecer la scrollbar y TODO el contenido visible se corre unos 15-17px
     en el mismo frame — Chrome cuenta eso como layout shift para cada
     elemento en pantalla. "stable" reserva ese espacio siempre, así el ancho
     disponible no cambia al togglear overflow. */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  transition: background var(--t-med), color var(--t-med);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-link-hover); }
ul, ol { padding-left: 1.4em; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* =============================================
   LAYOUT
   ============================================= */

/* Box sizing y overflow ya declarados globalmente al inicio */
.velox-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

.velox-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 2.5rem;
  margin-top: 2rem;
  padding-bottom: 3rem;
  align-items: start;
}

.velox-wrap.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* Tablet: colapsar a 1 columna, sidebar debajo del contenido */
@media (max-width: 960px) {
  .velox-wrap {
    grid-template-columns: 1fr;
  }
  .velox-wrap main  { order: 1; }
  .velox-wrap aside { order: 2; }
}

/* =============================================
   HEADER
   ============================================= */

#velox-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--t-med);
}

.velox-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.velox-logo a {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--c-heading);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.velox-logo a span { color: var(--c-accent); }

.velox-logo img {
  height: 36px;
  width: auto;
}

/* NAV */
.velox-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  gap: .25rem;
}

.velox-nav ul li a {
  display: block;
  padding: .4rem .75rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--c-text);
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
}

.velox-nav ul li a:hover,
.velox-nav ul li.current-menu-item > a {
  background: var(--c-surface);
  color: var(--c-accent);
}

/* Dropdown */
.velox-nav ul li { position: relative; }
.velox-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-card-shadow-hover);
  flex-direction: column;
  min-width: 180px;
  padding: .4rem 0;
  gap: 0;
  z-index: 200;
}
.velox-nav ul li:hover > ul { display: flex; }
.velox-nav ul li ul li a { border-radius: 0; padding: .5rem 1rem; }

/* HEADER ACTIONS */
.velox-header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.velox-search-btn,
.velox-dark-toggle,
.velox-menu-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  transition: background var(--t-fast);
}

.velox-search-btn:hover,
.velox-dark-toggle:hover { background: var(--c-border); }

.velox-menu-toggle { display: none; }

@media (max-width: 768px) {
  .velox-nav { display: none; }
  .velox-menu-toggle { display: flex; }
  .velox-nav.is-open {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: var(--c-bg);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 99;
  }
  .velox-nav.is-open ul { flex-direction: column; }
  .velox-nav.is-open ul li ul { position: static; border: none; box-shadow: none; padding-left: 1rem; }
  .velox-nav.is-open ul li:hover > ul { display: flex; }
}

/* SEARCH OVERLAY */
.velox-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.velox-search-overlay.is-open { display: flex; }
.velox-search-box {
  background: var(--c-bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  width: min(560px, 90vw);
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.velox-search-box form { display: flex; gap: .75rem; }
.velox-search-box input[type="search"] {
  flex: 1;
  padding: .7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
  font-family: inherit;
  font-size: 1rem;
}
.velox-search-box input[type="search"]:focus { outline: 2px solid var(--c-accent); border-color: transparent; }
.velox-search-box button[type="submit"] {
  padding: .7rem 1.2rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: background var(--t-fast);
}
.velox-search-box button[type="submit"]:hover { background: var(--c-accent-hover); }

/* =============================================
   HERO / FEATURED
   ============================================= */

.velox-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.velox-hero-main .velox-card { height: 100%; }
.velox-hero-sidebar { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 700px) {
  .velox-hero { grid-template-columns: 1fr; }
}

/* =============================================
   CARDS
   ============================================= */

.velox-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--c-card-shadow);
  transition: box-shadow var(--t-med), transform var(--t-med);
}

.velox-card:hover {
  box-shadow: var(--c-card-shadow-hover);
  transform: translateY(-2px);
}

.velox-card-img {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--c-surface);
}

.velox-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.velox-card:hover .velox-card-img img { transform: scale(1.04); }

.velox-card-body { padding: 1.1rem; }

.velox-card-cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .5rem;
}

.velox-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-heading);
  margin-bottom: .5rem;
}

.velox-card-title a { color: inherit; }
.velox-card-title a:hover { color: var(--c-accent); }

.velox-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--c-text-muted);
}

.velox-card-excerpt {
  font-size: .88rem;
  color: var(--c-text-muted);
  margin-top: .6rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Hero variant */
.velox-card-hero .velox-card-img { aspect-ratio: 16/10; }
.velox-card-hero .velox-card-body { padding: 1.4rem; }
.velox-card-hero .velox-card-title { font-size: 1.55rem; }

/* Card horizontal */
.velox-card-h {
  display: grid;
  grid-template-columns: 120px 1fr;
}
.velox-card-h .velox-card-img { aspect-ratio: 1; }
.velox-card-h .velox-card-title { font-size: .92rem; }
@media (max-width: 400px) {
  .velox-card-h {
    grid-template-columns: 80px 1fr;
    gap: .5rem;
  }
}

/* =============================================
   POST GRID
   ============================================= */

.velox-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .velox-posts-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}

.velox-section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-heading);
  border-left: 3px solid var(--c-accent);
  padding-left: .75rem;
  margin-bottom: 1.25rem;
}

/* =============================================
   AD ZONES
   ============================================= */

.velox-ad {
  display: block;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.velox-ad-label {
  position: absolute;
  top: 4px; left: 8px;
  font-size: .65rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  pointer-events: none;
}

/* Ad sizes */
.velox-ad-leaderboard { min-height: 90px; width: 100%; margin: 1rem 0; }
@media (max-width: 767px) {
  .velox-ad-leaderboard { min-height: 50px; }
  .velox-ad-sidebar { width: 100%; min-height: 100px; }
  .velox-ad-rectangle { min-height: 200px; }
  .velox-ad ins.adsbygoogle { width: 100% !important; max-width: 100% !important; }
}
.velox-ad-rectangle  { min-height: 250px; width: 100%; }
.velox-ad-sidebar    { min-height: 250px; width: 300px; max-width: 100%; }
.velox-ad-in-article { min-height: 250px; width: 100%; max-width: 580px; margin: 1.5rem auto; }
.velox-ad-sticky {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

/* =============================================
   SIDEBAR
   ============================================= */

.velox-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (max-width: 960px) {
  .velox-sidebar {
    width: 100%;
    max-width: 100%;
  }
  .velox-sidebar .velox-ad,
  .velox-sidebar ins.adsbygoogle {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.velox-widget {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.velox-widget-title {
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--c-border);
}

/* Recent posts in sidebar */
.velox-recent-posts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.velox-recent-posts li { display: flex; gap: .75rem; align-items: flex-start; }
.velox-recent-posts li img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.velox-recent-posts li a { font-size: .85rem; font-weight: 600; color: var(--c-heading); line-height: 1.35; }
.velox-recent-posts li a:hover { color: var(--c-accent); }
.velox-recent-posts .post-date { font-size: .72rem; color: var(--c-text-muted); display: block; margin-top: .2rem; }

/* =============================================
   SINGLE POST
   ============================================= */

.velox-single-header { margin-bottom: 2rem; }
.velox-single-header .velox-card-cat { font-size: .8rem; }
.velox-single-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-heading);
  margin: .6rem 0 1rem;
}

.velox-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .82rem;
  color: var(--c-text-muted);
  align-items: center;
}

.velox-author-mini { display: flex; align-items: center; gap: .5rem; }
.velox-author-mini img { width: 32px; height: 32px; border-radius: 50%; }

.velox-reading-time::before { content: "·"; margin-right: .5rem; }

.velox-featured-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/7;
  background: var(--c-surface);
  margin-bottom: 2rem;
}
.velox-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* CONTENT */
.velox-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--c-text);
}

.velox-content h2, .velox-content h3, .velox-content h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--c-heading);
  margin: 2rem 0 .8rem;
  line-height: 1.25;
}

.velox-content h2 { font-size: 1.55rem; }
.velox-content h3 { font-size: 1.25rem; }
.velox-content h4 { font-size: 1.05rem; }

.velox-content p { margin-bottom: 1.3rem; }

.velox-content a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

.velox-content blockquote {
  border-left: 3px solid var(--c-accent);
  margin: 1.5rem 0;
  padding: .8rem 1.2rem;
  background: var(--c-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--c-text-muted);
}

.velox-content code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--c-surface);
  padding: .15em .4em;
  border-radius: 4px;
}

.velox-content pre {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: var(--font-mono);
  font-size: .87rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.velox-content ul, .velox-content ol { margin-bottom: 1.3rem; }
.velox-content li { margin-bottom: .4rem; }

.velox-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.velox-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 1.5rem 0;
}
.velox-content th, .velox-content td {
  padding: .65rem .9rem;
  border: 1px solid var(--c-border);
  text-align: left;
}
.velox-content th { background: var(--c-surface); font-weight: 700; font-family: var(--font-sans); }
.velox-content tr:hover td { background: var(--c-bg-alt); }

/* TAGS */
.velox-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.velox-tag {
  display: inline-block;
  padding: .3rem .75rem;
  background: var(--c-surface);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.velox-tag:hover { background: var(--c-accent); color: #fff; }

/* AUTHOR BOX */
.velox-author-box {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  margin: 2.5rem 0;
}

.velox-author-box img { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.velox-author-box-name { font-weight: 700; font-size: 1rem; color: var(--c-heading); margin-bottom: .3rem; }
.velox-author-box-bio { font-size: .88rem; color: var(--c-text-muted); line-height: 1.5; }

/* =============================================
   RELATED POSTS
   ============================================= */

.velox-related { margin-top: 3rem; }

/* =============================================
   COMMENTS
   ============================================= */

.velox-comments { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--c-border); }
.comment-author { font-weight: 700; font-size: .9rem; }
.comment-author img { width: 40px; height: 40px; border-radius: 50%; float: left; margin-right: .75rem; }
.comment-meta { font-size: .78rem; color: var(--c-text-muted); margin-bottom: .5rem; }
.comment-content { font-size: .93rem; }
.comment-reply-link { font-size: .78rem; font-weight: 600; color: var(--c-accent); }

/* Comment form */
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: .65rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text);
  font-family: inherit;
  font-size: .9rem;
  margin-bottom: 1rem;
  transition: border-color var(--t-fast);
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--c-accent); }
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .submit {
  background: var(--c-accent);
  color: #fff;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  transition: background var(--t-fast);
}
.comment-form .submit:hover { background: var(--c-accent-hover); }

/* =============================================
   PAGINATION
   ============================================= */

.velox-pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.velox-pagination a,
.velox-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  transition: background var(--t-fast), color var(--t-fast);
}

.velox-pagination a:hover,
.velox-pagination .current {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* =============================================
   BREADCRUMBS
   ============================================= */

.velox-breadcrumbs {
  font-size: .8rem;
  color: var(--c-text-muted);
  padding: .6rem 0;
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
.velox-breadcrumbs a { color: var(--c-text-muted); }
.velox-breadcrumbs a:hover { color: var(--c-accent); }
.velox-breadcrumbs span.sep { opacity: .5; }

/* =============================================
   READING PROGRESS BAR
   ============================================= */

#velox-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--c-accent);
  z-index: 9999;
  width: 0%;
  transition: width .1s linear;
}

/* =============================================
   FOOTER
   ============================================= */

#velox-footer {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  margin-top: 3rem;
  padding: 2.5rem 0 1rem;
}

.velox-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .velox-footer-grid { grid-template-columns: 1fr; }
}

.velox-footer-brand .velox-logo { margin-bottom: .75rem; }
.velox-footer-brand p { font-size: .85rem; color: var(--c-text-muted); max-width: 260px; }

.velox-footer-col h4 {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-text-muted);
  margin-bottom: .85rem;
}

.velox-footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.velox-footer-col ul li a { font-size: .88rem; color: var(--c-text-muted); transition: color var(--t-fast); }
.velox-footer-col ul li a:hover { color: var(--c-accent); }

.velox-footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--c-text-muted);
  flex-wrap: wrap;
  gap: .75rem;
}

.velox-footer-nav { display: flex; gap: 1rem; }
.velox-footer-nav a { color: var(--c-text-muted); }
.velox-footer-nav a:hover { color: var(--c-accent); }

/* =============================================
   SKIP LINK / ACCESSIBILITY
   ============================================= */

.skip-link {
  position: absolute;
  top: -999px;
  left: -999px;
  padding: .5rem 1rem;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius);
  z-index: 9999;
}
.skip-link:focus { top: .75rem; left: .75rem; }

/* =============================================
   UTILITIES
   ============================================= */

.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.text-muted { color: var(--c-text-muted); }
.text-accent { color: var(--c-accent); }




/* ═══════════════════════════════════════════════════════════════════════════
   HOME GRID — 3 columnas responsive
   ═══════════════════════════════════════════════════════════════════════════ */

/* Wrapper general del home grid */
.velox-home-grid-wrap {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}
@media (max-width: 520px) {
    .velox-home-grid-wrap {
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }
}

/* Grid de una fila */
.velox-hgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* Card */
.velox-hgrid-item {
    display: flex;
    flex-direction: column;
    min-width: 0; /* evita overflow en grid */
}

.velox-hgrid-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    gap: .6rem;
    height: 100%;
}

/* Imagen */
.velox-hgrid-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-surface);
    flex-shrink: 0;
}
.velox-hgrid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.velox-hgrid-link:hover .velox-hgrid-thumb img {
    transform: scale(1.04);
}
.velox-hgrid-nothumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--c-surface);
}

/* Título */
.velox-hgrid-title {
    font-family: var(--font-sans);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--c-heading);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.velox-hgrid-link:hover .velox-hgrid-title {
    color: var(--c-accent);
}

/* Sin posts */
.velox-no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--c-text-muted);
}

/* Paginación */
.velox-hgrid-pag {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
}
.velox-hgrid-pag .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 .6rem;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.velox-hgrid-pag .page-numbers:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}
.velox-hgrid-pag .page-numbers.current {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
    pointer-events: none;
}
.velox-hgrid-pag .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    pointer-events: none;
    letter-spacing: .1em;
}

/* Responsive hgrid */
@media (max-width: 1024px) {
  .velox-hgrid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .velox-hgrid-thumb {
    aspect-ratio: 16 / 9;
  }
}

/* Banner mid-grid (entre fila 1 y fila 2) */
.velox-hgrid-mid-ad {
  margin: .5rem 0 1.25rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flow-root;
}
.velox-hgrid-mid-ad .velox-ad-lazy,
.velox-hgrid-mid-ad ins.adsbygoogle {
  max-width: 100% !important;
  width: 100% !important;
}
.velox-hgrid-mid-ad:empty {
  display: none;
  margin: 0;
}
.velox-hgrid-mid-ad .velox-ad {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}
.velox-hgrid-mid-ad ins.adsbygoogle {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}
@media (max-width: 520px) {
  .velox-hgrid-mid-ad {
    margin: .25rem 0 1rem;
  }
}

/* Zonas de anuncios en articulo */
.velox-ad-after-image {
    margin: 1.5rem 0;
    text-align: center;
    width: 100%;
}
.velox-ad-after-share {
    margin: 1.5rem 0;
    text-align: center;
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}

/* content-visibility removido — causaba orden incorrecto en mobile */

/* =============================================
   FRONT PAGE — CATEGORY TILES + VIEW-ALL
   (antes vivían como estilos inline en front-page.php)
   ============================================= */

.velox-cat-section { margin: 2rem 0; }

.velox-cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}

.velox-cat-tile {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition: transform var(--t-med), box-shadow var(--t-med);
}

.velox-cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}

.velox-cat-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
}

.velox-cat-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: .75rem;
}

.velox-cat-tile-name {
  font-weight: 800;
  font-size: .92rem;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.velox-cat-tile-count {
  font-size: .72rem;
  color: rgba(255, 255, 255, .8);
  margin-top: .2rem;
}

.velox-view-all {
  text-align: center;
  margin-top: 1.75rem;
}

.velox-btn {
  display: inline-block;
  padding: .7rem 2rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  transition: background var(--t-fast);
}

.velox-btn:hover {
  background: var(--c-accent-hover);
  color: #fff;
}

/* =============================================
   POST NAV GRID
   ============================================= */

.velox-post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.velox-post-nav-item {
  padding: 1rem;
  text-decoration: none;
  display: block;
}

.velox-post-nav-item--next {
  text-align: right;
}

.velox-post-nav-label {
  font-size: .75rem;
  color: var(--c-text-muted);
  display: block;
}

.velox-post-nav-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--c-heading);
  margin-top: .3rem;
}

/* =============================================
   NO RESULTS
   ============================================= */

.velox-no-results {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--c-text-muted);
}

.velox-no-results-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.velox-no-results-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--c-heading);
  margin-bottom: .5rem;
}

.velox-no-results-desc {
  max-width: 420px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.velox-no-results-btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  transition: background var(--t-fast);
}

.velox-no-results-btn:hover {
  background: var(--c-accent-hover);
  color: #fff;
}

/* =============================================
   WIDGET RECENT POSTS
   ============================================= */

.velox-recent-post-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.velox-recent-post-img-wrap {
  flex-shrink: 0;
}

.velox-recent-post-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
}

.velox-recent-post-body {
  min-width: 0;
}

.velox-recent-post-cat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: block;
  margin-bottom: .15rem;
}

.velox-recent-post-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-heading);
  line-height: 1.35;
  display: block;
  transition: color var(--t-fast);
}

.velox-recent-post-title:hover {
  color: var(--c-accent);
}

.velox-recent-post-meta {
  display: flex;
  gap: .6rem;
  margin-top: .25rem;
  font-size: .72rem;
  color: var(--c-text-muted);
}
