/*
Theme Name: Comando MMA
Theme URI: https://comandomma.com
Author: Comando MMA
Description: Tema personalizado y ligero para Comando MMA.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: comandomma
*/

/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
    --red:         #DC1823;
    --red-dark:    #b8141d;
    --black:       #111111;
    --dark:        #222222;
    --gray-dark:   #444444;
    --gray:        #666666;
    --gray-mid:    #999999;
    --gray-light:  #cccccc;
    --border:      #e8e8e8;
    --bg-light:    #f5f5f5;
    --white:       #ffffff;
    --footer-mid:  #2a2a2a;
    --footer-dark: #111111;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-h: 'Oswald', var(--font);

    --wrap: 1200px;
    --gap:  20px;
    --r:    3px;
    --sh:   0 2px 10px rgba(0,0,0,.1);
    --t:    .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); font-size: .9375rem; line-height: 1.65; color: var(--dark); background: #f0f0f0; -webkit-font-smoothing: antialiased; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--red); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--red-dark); }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-h); font-weight: 700; line-height: 1.25; color: var(--black); }

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only    { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ==========================================================================
   HEADER — 3 niveles
   ========================================================================== */

/* Nivel 1: barra fina blanca — Twitter + buscador */
.header-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.header-topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    gap: 12px;
}
.topbar-social { display: flex; gap: 8px; align-items: center; }
.topbar-social a {
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: color var(--t);
}
.topbar-social a:hover { color: var(--red); }

.topbar-search { display: flex; align-items: center; gap: 0; }
.topbar-search form { display: flex; }
.topbar-search input {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--r) 0 0 var(--r);
    font-size: .8rem;
    outline: none;
    width: 180px;
    transition: border-color var(--t);
}
.topbar-search input:focus { border-color: var(--red); }
.topbar-search button {
    height: 26px;
    padding: 0 10px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 0 var(--r) var(--r) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Nivel 2: barra blanca con logo centrado */
.header-logo-bar {
    background: var(--white);
    padding: 14px 0 12px;
}
.header-logo-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-logo a { display: flex; align-items: center; }
.site-logo img { height: 60px; width: auto; }
.site-logo .text-logo {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--black);
    line-height: 1;
}
.site-logo .text-logo em {
    color: var(--red);
    font-style: normal;
}

/* Nivel 3: barra roja con navegación */
.header-nav-bar {
    background: var(--red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.header-nav-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   NAVEGACIÓN
   ========================================================================== */
.main-nav { flex: 1; }
.main-nav ul { display: flex; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 13px 15px;
    font-family: var(--font-h);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255,255,255,.92);
    white-space: nowrap;
    transition: background var(--t);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a {
    background: rgba(0,0,0,.25);
    color: var(--white);
}
.main-nav > ul > li.menu-item-has-children > a::after {
    content: '▾';
    font-size: .65rem;
}
/* Submenu */
.main-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--black);
    box-shadow: var(--sh);
    flex-direction: column;
    display: none;
    z-index: 999;
    border-top: 3px solid var(--red);
}
.main-nav ul ul li a {
    display: block;
    padding: 10px 16px;
    font-size: .83rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: background var(--t), color var(--t);
}
.main-nav ul ul li:last-child a { border-bottom: none; }
.main-nav ul ul li a:hover { background: var(--red); color: var(--white); }
.main-nav ul li:hover > ul { display: flex; }

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--white); }

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.site-main    { padding: 24px 0 48px; }
.layout-grid  { display: grid; grid-template-columns: 1fr 300px; gap: var(--gap); align-items: start; }
.layout-full  { max-width: 860px; margin: 0 auto; }

/* ==========================================================================
   FEATURED MAGAZINE GRID
   ========================================================================== */
.featured-block { margin-bottom: 28px; }

/* Grid superior: 1 grande izquierda + 2 pequeños apilados derecha */
.featured-top {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 4px;
    margin-bottom: 4px;
}
.featured-right { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }

/* Fila inferior: 3 iguales */
.featured-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

/* Artículo featured genérico */
.feat-item {
    position: relative;
    overflow: hidden;
    display: block;
    background: #333;
}
.feat-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.feat-item:hover img { transform: scale(1.04); }

/* Alturas */
.featured-top .feat-item         { aspect-ratio: 16/9; }
.featured-top .feat-main         { aspect-ratio: unset; min-height: 320px; }
.featured-right .feat-item       { min-height: 158px; aspect-ratio: unset; }
.featured-bottom .feat-item      { aspect-ratio: 16/9; min-height: 160px; }

/* Overlay degradado */
.feat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
    pointer-events: none;
}
/* Overlay ligeramente más oscuro para los pequeños */
.featured-right .feat-overlay,
.featured-bottom .feat-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.feat-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 14px 16px;
    color: var(--white);
}
.feat-main .feat-content { padding: 22px 24px; }

.feat-cats { display: flex; gap: 5px; margin-bottom: 7px; flex-wrap: wrap; }
.feat-cats a {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    background: var(--red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 2px;
}
.feat-cats a:hover { background: var(--red-dark); color: var(--white); }

.feat-title {
    font-family: var(--font-h);
    font-weight: 700;
    line-height: 1.25;
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    margin-bottom: 6px;
}
.feat-main .feat-title   { font-size: clamp(1.1rem, 2vw, 1.5rem); }
.featured-right .feat-title { font-size: .9rem; }
.featured-bottom .feat-title { font-size: .88rem; }

.feat-title a { color: inherit; }
.feat-title a:hover { color: rgba(255,255,255,.85); }

.feat-date { font-size: .72rem; color: rgba(255,255,255,.7); }

/* ==========================================================================
   ARTICLE CARDS (grid de noticias)
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

.post-card {
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    transition: box-shadow var(--t);
}
.post-card:hover { box-shadow: var(--sh); }

.post-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-light);
    display: block;
}
.post-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-thumb .no-thumb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: var(--white);
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 900;
}

.post-card-body { padding: 14px 14px 0; }

.post-card-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.post-card-cats a {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--red);
    background: #fdecea;
    padding: 2px 7px;
    border-radius: 2px;
    transition: background var(--t), color var(--t);
}
.post-card-cats a:hover { background: var(--red); color: var(--white); }

.post-card-title {
    font-family: var(--font-h);
    font-size: .97rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}
.post-card-title a { color: var(--black); }
.post-card-title a:hover { color: var(--red); }

.post-card-meta {
    font-size: .76rem;
    color: var(--gray-mid);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.post-card-meta a { color: var(--gray-mid); }
.post-card-meta a:hover { color: var(--red); }

.post-card-excerpt {
    font-size: .84rem;
    color: var(--gray);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 14px;
}

/* ==========================================================================
   ARCHIVE — lista de artículos
   ========================================================================== */
.posts-list { display: flex; flex-direction: column; gap: var(--gap); }

.posts-list .post-card {
    display: grid;
    grid-template-columns: 200px 1fr;
}
.posts-list .post-card-thumb {
    aspect-ratio: unset;
    min-height: 140px;
}
.posts-list .post-card-body { padding: 14px; }

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: .84rem;
    font-weight: 600;
    color: var(--gray-dark);
    background: var(--white);
    transition: all var(--t);
}
.pagination a:hover, .pagination .current {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.widget-area { display: flex; flex-direction: column; gap: 20px; }

.widget {
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Título: fondo rojo, texto blanco */
.widget-title {
    background: var(--red);
    color: var(--white);
    font-family: var(--font-h);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 14px;
    display: block;
}

.widget-content { padding: 12px 14px; }

/* Categorías */
.widget-cats ul { display: flex; flex-direction: column; }
.widget-cats li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: .85rem;
    color: var(--gray-dark);
    border-bottom: 1px solid var(--border);
    transition: color var(--t);
}
.widget-cats li:last-child a { border-bottom: none; }
.widget-cats li a:hover { color: var(--red); }
.widget-cats .cat-count {
    font-size: .72rem;
    background: var(--bg-light);
    color: var(--gray-mid);
    padding: 1px 7px;
    border-radius: 10px;
}

/* Posts recientes en sidebar */
.widget-posts ul { display: flex; flex-direction: column; }
.widget-posts li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.widget-posts li:last-child { border-bottom: none; }
.widget-posts .rp-thumb {
    flex-shrink: 0;
    width: 68px;
    height: 52px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--bg-light);
}
.widget-posts .rp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-posts .rp-info { flex: 1; min-width: 0; }
.widget-posts .rp-title {
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.widget-posts .rp-title a { color: var(--dark); }
.widget-posts .rp-title a:hover { color: var(--red); }
.widget-posts .rp-date { font-size: .7rem; color: var(--gray-mid); }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-cloud a {
    display: inline-block;
    padding: 3px 9px;
    font-size: .76rem !important;
    background: var(--bg-light);
    color: var(--gray-dark);
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: all var(--t);
}
.tag-cloud a:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: .8rem;
    color: var(--gray);
}
.breadcrumbs a { color: var(--gray); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs span { margin: 0 5px; color: var(--gray-light); }

/* ==========================================================================
   ARCHIVE HEADER
   ========================================================================== */
.archive-header {
    background: var(--black);
    color: var(--white);
    padding: 18px 22px;
    border-radius: var(--r);
    margin-bottom: 22px;
    border-left: 5px solid var(--red);
}
.archive-header h1 { color: var(--white); font-size: 1.3rem; margin-bottom: 4px; }
.archive-header .archive-desc { font-size: .83rem; color: rgba(255,255,255,.6); margin: 0; }

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.single-post-header { margin-bottom: 24px; }

.single-post-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.single-post-cats a {
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--red);
    color: var(--white);
    padding: 3px 9px;
    border-radius: 2px;
}

.single-post-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--black);
    margin-bottom: 14px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .8rem;
    color: var(--gray);
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}
.single-post-meta a { color: var(--gray); }
.single-post-meta a:hover { color: var(--red); }

.single-post-featured { margin-bottom: 24px; border-radius: var(--r); overflow: hidden; }
.single-post-featured img { width: 100%; height: auto; max-height: 500px; object-fit: cover; }

.entry-content {
    font-size: .95rem;
    line-height: 1.78;
    color: var(--dark);
    background: var(--white);
    padding: 28px;
    border-radius: var(--r);
}
.entry-content h2 { font-size: 1.4rem; margin: 1.8em 0 .7em; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.entry-content h3 { font-size: 1.15rem; margin: 1.6em 0 .6em; }
.entry-content p { margin-bottom: 1.3em; }
.entry-content ul, .entry-content ol { list-style: revert; margin: 0 0 1.3em 1.5em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 4px solid var(--red); background: #fdecea; font-style: italic; color: var(--gray-dark); }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: var(--r); margin: 1.4em auto; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .88rem; }
.entry-content th { background: var(--black); color: var(--white); padding: 9px 13px; text-align: left; font-family: var(--font-h); font-size: .82rem; text-transform: uppercase; }
.entry-content td { padding: 9px 13px; border-bottom: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg-light); }

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.post-tags .tags-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--gray-dark); }
.post-tags a {
    display: inline-block;
    padding: 3px 9px;
    font-size: .76rem;
    background: var(--bg-light);
    color: var(--gray-dark);
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: all var(--t);
}
.post-tags a:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.post-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: var(--r);
    border: 1px solid var(--border);
}
.post-share .share-label { font-size: .82rem; font-weight: 700; text-transform: uppercase; color: var(--gray-dark); }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--r);
    font-size: .78rem;
    font-weight: 600;
    color: var(--white);
    transition: opacity var(--t);
}
.share-btn:hover { opacity: .85; color: var(--white); }
.share-btn.twitter  { background: #1DA1F2; }
.share-btn.facebook { background: #1877F2; }
.share-btn.whatsapp { background: #25D366; }

/* Author box */
.author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--r);
    margin-top: 28px;
}
.author-avatar { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid var(--red); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info .author-name { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.author-info .author-name a { color: var(--black); }
.author-info .author-name a:hover { color: var(--red); }
.author-info .author-bio { font-size: .84rem; color: var(--gray); margin: 0; }

/* Related posts */
.related-posts { margin-top: 40px; }
.related-posts .section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.related-posts .section-title h2 { font-family: var(--font-h); font-size: 1rem; font-weight: 700; text-transform: uppercase; }
.related-posts .section-title::before { content: ''; display: block; width: 4px; height: 20px; background: var(--red); border-radius: 2px; flex-shrink: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Comments */
.comments-section { margin-top: 40px; padding-top: 32px; border-top: 2px solid var(--border); }
.comments-section .section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.comments-section .section-title h2 { font-family: var(--font-h); font-size: 1rem; font-weight: 700; text-transform: uppercase; }
.comments-section .section-title::before { content: ''; display: block; width: 4px; height: 20px; background: var(--red); border-radius: 2px; flex-shrink: 0; }

.comment-list { display: flex; flex-direction: column; }
.comment { padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author-name { font-weight: 700; font-size: .88rem; color: var(--black); }
.comment-date { font-size: .75rem; color: var(--gray-mid); }
.comment-body { font-size: .88rem; color: var(--gray-dark); padding-left: 52px; }
.comment-reply-link { display: inline-block; margin-top: 6px; font-size: .75rem; font-weight: 600; color: var(--gray-mid); text-transform: uppercase; }
.comment-reply-link:hover { color: var(--red); }

.comment-respond { margin-top: 28px; padding: 22px; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--r); }
.comment-respond h3 { margin-bottom: 18px; font-size: 1rem; font-family: var(--font-h); text-transform: uppercase; }
.comment-form-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.comment-form-comment { margin-bottom: 12px; }
.comment-form-fields label,
.comment-form-comment label { display: block; font-size: .79rem; font-weight: 600; color: var(--gray-dark); margin-bottom: 4px; text-transform: uppercase; }
.comment-form-fields input,
.comment-form-comment textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--white); font-size: .88rem; color: var(--dark); transition: border-color var(--t); }
.comment-form-fields input:focus,
.comment-form-comment textarea:focus { outline: none; border-color: var(--red); }
.comment-form-comment textarea { min-height: 110px; resize: vertical; }
.comment-form-submit button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; background: var(--red); color: var(--white); border: none; border-radius: var(--r); font-family: var(--font-h); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; transition: background var(--t); }
.comment-form-submit button:hover { background: var(--red-dark); }

/* ==========================================================================
   SEARCH / 404
   ========================================================================== */
.search-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 2px solid var(--border); }
.search-header h1 { font-size: 1.3rem; margin-bottom: 4px; }
.search-header p { font-size: .84rem; color: var(--gray); margin: 0 0 12px; }

.search-form-inline { display: flex; max-width: 480px; }
.search-form-inline input { flex: 1; padding: 9px 12px; border: 2px solid var(--border); border-right: none; border-radius: var(--r) 0 0 var(--r); font-size: .88rem; outline: none; transition: border-color var(--t); }
.search-form-inline input:focus { border-color: var(--red); }
.search-form-inline button { padding: 9px 16px; background: var(--red); color: var(--white); border: none; border-radius: 0 var(--r) var(--r) 0; font-weight: 700; cursor: pointer; transition: background var(--t); }
.search-form-inline button:hover { background: var(--red-dark); }

.error-404 { text-align: center; padding: 60px 20px; }
.error-404 .error-number { font-family: var(--font-h); font-size: clamp(5rem, 14vw, 9rem); font-weight: 900; color: var(--red); line-height: 1; margin-bottom: 14px; }
.error-404 h1 { font-size: 1.5rem; margin-bottom: 10px; }
.error-404 p { color: var(--gray); max-width: 400px; margin: 0 auto 22px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; background: var(--red); color: var(--white); border-radius: var(--r); font-family: var(--font-h); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; transition: background var(--t); }
.btn:hover { background: var(--red-dark); color: var(--white); }

/* ==========================================================================
   FOOTER — 2 tonos
   ========================================================================== */

/* Zona widgets: #2a2a2a */
.site-footer {
    background: var(--footer-mid);
    color: #aaa;
    padding: 40px 0 36px;
}

.footer-logo-area {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo-area img { height: 56px; width: auto; margin: 0 auto; }
.footer-logo-area .text-logo {
    font-family: var(--font-h);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--white);
    text-transform: uppercase;
}
.footer-logo-area .text-logo em { color: var(--red); font-style: normal; }

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 0;
}

.footer-widget h3 {
    font-family: var(--font-h);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--white);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.footer-widget ul { display: flex; flex-direction: column; }
.footer-widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: .84rem;
    color: #aaa;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: color var(--t);
}
.footer-widget ul li:last-child a { border-bottom: none; }
.footer-widget ul li a:hover { color: var(--red); }
.footer-widget ul li a .count { font-size: .7rem; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 10px; color: #888; }

.footer-tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.footer-tag-cloud a { display: inline-block; padding: 3px 9px; font-size: .76rem; background: rgba(255,255,255,.07); color: #aaa; border: 1px solid rgba(255,255,255,.1); border-radius: 2px; transition: all var(--t); }
.footer-tag-cloud a:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* Barra inferior: #111 */
.footer-bottom {
    background: var(--footer-dark);
    border-top: 3px solid var(--red);
    padding: 14px 0;
}
.footer-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-copyright { font-size: .79rem; color: rgba(255,255,255,.42); }

.footer-social { display: flex; gap: 8px; }
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #aaa;
    transition: background var(--t), color var(--t);
}
.footer-social a:hover { background: var(--red); color: var(--white); }

/* ==========================================================================
   WORDPRESS CORE CLASSES
   ========================================================================== */
.wp-caption { max-width: 100%; margin-bottom: 1.4em; }
.wp-caption-text { font-size: .8rem; color: var(--gray); text-align: center; margin-top: 5px; font-style: italic; }
.alignleft  { float: left;  margin: 0 18px 10px 0; }
.alignright { float: right; margin: 0 0 10px 18px; }
.aligncenter { display: block; margin: 0 auto 10px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .layout-grid { grid-template-columns: 1fr 260px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .layout-grid { grid-template-columns: 1fr; }
    .widget-area { display: grid; grid-template-columns: repeat(2, 1fr); }
    .footer-widgets { grid-template-columns: repeat(2, 1fr); }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--black);
        border-top: 2px solid var(--red);
        box-shadow: var(--sh);
        z-index: 999;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav > ul > li > a { padding: 12px 18px; }
    .main-nav ul ul { position: static; box-shadow: none; border-top: none; display: flex; background: #1a1a1a; }
    .main-nav ul ul li a { padding-left: 32px; }
    .main-nav ul li:hover > ul { display: flex; }
    .menu-toggle { display: flex; }

    .featured-top { grid-template-columns: 1fr 1fr; }
    .featured-right { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; }
    .featured-right .feat-item { min-height: 130px; }
    .featured-top .feat-main { min-height: 220px; }
}

@media (max-width: 640px) {
    .posts-grid { grid-template-columns: 1fr; }
    .posts-list .post-card { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr; }
    .widget-area { grid-template-columns: 1fr; }
    .comment-form-fields { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; }
    .comment-body { padding-left: 0; }
    .footer-bottom .container { flex-direction: column; text-align: center; }

    .featured-top { grid-template-columns: 1fr; }
    .featured-right { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr; }
    .featured-top .feat-main { min-height: 200px; aspect-ratio: 16/9; }
    .featured-right .feat-item { min-height: 110px; aspect-ratio: 16/9; }
    .featured-bottom { grid-template-columns: repeat(2, 1fr); }

    .topbar-search input { width: 120px; }
    .header-logo-bar { padding: 10px 0; }
    .site-logo .text-logo { font-size: 1.6rem; }
}

@media (max-width: 400px) {
    .featured-bottom { grid-template-columns: 1fr; }
}
