/*
Theme Name: Yivapp Televitos
Theme URI: https://televitos.com
Description: Tema de Televitos: réplica ligera del diseño de televitos.com, sin Divi ni plugins. Tipografías propias (sin servicios externos).
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 8.1
Author: YIVAPP.COM SpA
Author URI: https://yivapp.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yivapp-televitos
*/

:root {
    --bg: #f7f4f4;
    --ink: #000;
    --muted: #707070;
    --red: #f90000;
    --dark: #2b2e30;
    --link: #4aa3e8;
    --wrap: 1080px;
    --gutter: 24px;
    --font: 'Open Sans', Arial, Helvetica, sans-serif;
    --font-body: 'Abel', 'Open Sans', Arial, sans-serif;
    --font-sys: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;
    --font-serif: 'Minion Pro', 'Times New Roman', Times, 'Liberation Serif', serif;
    --font-mono: 'Anonymous Pro', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
ul { margin: 0; padding: 0; list-style: none; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.screen-reader-text:focus { clip: auto; width: auto; height: auto; background: #fff; padding: 8px 12px; z-index: 100; }

.tv-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Botones ---------- */
.tv-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: .02em;
    padding: 9px 12px; border: 2px solid var(--red); border-radius: 3px; cursor: pointer;
}
.tv-btn--solid { background: var(--red); color: #fff; }
.tv-btn--solid:hover { background: #c40000; border-color: #c40000; color: #fff; }
.tv-btn--outline { background: transparent; color: var(--red); }
.tv-btn--outline:hover { background: var(--red); color: #fff; }

/* ---------- Cabecera ---------- */
.tv-header { background: var(--bg); position: relative; z-index: 20; }
.tv-topbar { background: #eeecec; padding: 12px 0 10px; }
.tv-topbar__in { display: flex; justify-content: space-between; align-items: center; }
.tv-brandrow { position: relative; display: flex; justify-content: center; align-items: center; padding-top: 18px; padding-bottom: 6px; }
.tv-logo img { width: 320px; }
.tv-social { position: absolute; right: var(--gutter); top: 14px; display: flex; gap: 6px; }
.tv-social a { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #000; color: #fff; }
.tv-social a:hover { background: var(--red); color: #fff; }
.tv-nav { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 4px; padding-bottom: 18px; }
.tv-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; }
.tv-menu a { font: 600 13px/1 var(--font); text-transform: uppercase; padding: 8px 0; display: block; }
.tv-menu .current-menu-item > a, .tv-menu .current_page_item > a, .tv-menu a:hover { color: var(--red); }
.tv-search-toggle { background: none; border: 0; color: var(--red); cursor: pointer; padding: 0; line-height: 0; }
.tv-search-panel { display: none; padding-bottom: 16px; }
.search-open .tv-search-panel { display: block; }
.tv-searchform { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.tv-searchform input { flex: 1; font: inherit; padding: 9px 12px; border: 2px solid #000; border-radius: 3px; background: #fff; }
.tv-burger { display: none; }

/* ---------- Secciones ---------- */
.tv-main { min-height: 50vh; padding-bottom: 40px; }
.tv-section { padding: 36px 0 0; }
.tv-section + .tv-section { margin-top: 44px; border-top: 4px solid #000; }
.tv-section__title { font: 700 26px/1.2 var(--font); color: #2b2e30; margin: 0 0 22px; }
.tv-more { text-align: right; margin: 36px 0 28px; font: 600 13px/1 var(--font); text-transform: uppercase; }
.tv-more a { display: inline-flex; align-items: center; gap: 6px; }
.tv-more__dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; line-height: 1; padding-bottom: 2px; }

.tv-grid { display: grid; gap: 40px 5.55%; align-items: start; }
.tv-grid > * { min-width: 0; }
.tv-grid--feature { grid-template-columns: repeat(4, 1fr); }
.tv-grid--feature > .tv-grid__lead,
.tv-grid--feature > .tv-card--feature { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.tv-grid--feature-side { grid-template-columns: repeat(4, 1fr); grid-template-rows: auto 1fr; }
.tv-grid--feature-side > .tv-card--feature { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.tv-grid--feature-side > .tv-card--small:nth-child(2) { grid-column: 3; grid-row: 1; }
.tv-grid--feature-side > .tv-card--small:nth-child(3) { grid-column: 3; grid-row: 2; align-self: end; }
.tv-grid--feature-side > .tv-promo { grid-column: 4; grid-row: 1 / span 2; }
.tv-grid--compact { grid-template-columns: repeat(3, 1fr); gap: 24px 5.55%; }

.tv-promo { display: block; }
.tv-promo--below { margin-top: 24px; }

/* ---------- Portadillas (peliculas, series, tecnovitos, t-plus, eventos) ---------- */
.tv-section__title--serif { font: 400 28px/1.2 'Abril Fatface', Georgia, serif; color: #2b2e30; }
.tv-section--mixed, .tv-section--cols, .tv-section--duo { padding-top: 40px; }
.tv-section--cols.tv-section--inline { padding-top: 0; }
.tv-section + .tv-section--cols:not(:has(.tv-section__title)) { border-top: 0; margin-top: 0; }
.tv-section--cols .tv-section__title, .tv-section--duo .tv-section__title { font: 700 24px/1.2 var(--font); margin-bottom: 18px; }
.tv-section--cols .tv-section__title--serif { font: 400 28px/1.2 'Abril Fatface', Georgia, serif; }

.tv-mixed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 5.55%; align-items: start; }
.tv-mixed__cards { display: grid; gap: 40px; align-content: start; }
.tv-mixed--narrow .tv-mixed__cards { grid-column: 1; }
.tv-mixed--narrow .tv-mixed__list { grid-column: 2 / span 2; }
.tv-mixed--narrow .tv-promo { grid-column: 4; }
.tv-mixed--wide .tv-mixed__cards { grid-column: 1 / span 2; }
.tv-mixed--wide .tv-mixed__list { grid-column: 3 / span 2; }
.tv-mixed__list { display: grid; }
.tv-mixed--narrow .tv-card--feature .tv-card__title { font-size: 15px; }
.tv-mixed--narrow .tv-card--feature .tv-card__excerpt { font-size: 15px; }

.tv-card--line { padding: 6px 0 26px; }
.tv-card--line .tv-card__body { padding: 0 0 12px; border-bottom: 1px solid #c8c6c6; }
.tv-card--line .tv-card__title { font-size: 16px; }
.tv-card--line .tv-card__by { font-size: 13px; margin-top: 10px; }

.tv-cols { display: grid; gap: 28px 5.55%; align-items: stretch; }
.tv-cols--4 { grid-template-columns: repeat(4, 1fr); }
.tv-cols--2 { grid-template-columns: repeat(2, 1fr); }
.tv-card--col { display: flex; flex-direction: column; }
.tv-card--col .tv-card__body { padding: 14px 0 18px; flex: 1; border-bottom: 3px solid var(--red); }
.tv-card--col .tv-card__title { font-size: 16px; }

.tv-duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 5.55%; }
.tv-duo__group .tv-section--cols { padding-top: 0; }

/* Tipografía y espaciado propios de las portadillas (medidas del sitio original) */
.tv-portadilla .tv-section + .tv-section { margin-top: 70px; }
.tv-portadilla .tv-section--mixed { border-top: 0; margin-top: 0; padding-top: 54px; }
.tv-portadilla .tv-grid { row-gap: 60px; }
.tv-portadilla .tv-card__title { font: 700 20px/1.4 var(--font-sys); color: #222; }
.tv-portadilla .tv-card--col .tv-card__title { font-size: 19px; }
.tv-portadilla .tv-card__by { font: italic 300 15px/1.4 var(--font-sys); color: var(--muted); margin-top: 12px; }
.tv-portadilla .tv-card__excerpt { font: 300 17px/1.4 var(--font-sys); color: #000; }
.tv-portadilla .tv-card--feature .tv-card__body,
.tv-portadilla .tv-card--small .tv-card__body { padding-top: 28px; }
.tv-portadilla .tv-mixed__cards { gap: 58px; }
.tv-portadilla .tv-mixed .tv-card__excerpt { font: 400 17px/1.4 var(--font-serif); color: #333; }
.tv-portadilla .tv-mixed--narrow .tv-card--feature .tv-card__title { font-size: 19px; }
.tv-portadilla .tv-mixed--narrow .tv-card--feature .tv-card__excerpt { font-size: 16px; line-height: 1.5; }
.tv-portadilla .tv-card--line { padding: 0 0 58px; }
.tv-portadilla .tv-card--line .tv-card__body { padding: 0 0 14px; border-bottom: 1px dotted #8a8a8a; }
.tv-portadilla .tv-card--line .tv-card__title { font-size: 17px; line-height: 1.35; }
.tv-portadilla .tv-card--line .tv-card__by { font: italic 400 15px/1.4 var(--font-serif); margin-top: 12px; }

/* ---------- Tarjetas ---------- */
.tv-card { margin: 0; }
.tv-card__img { display: block; overflow: hidden; background: #ddd; aspect-ratio: 16 / 9; }
.tv-card__img img { width: 100%; height: 100%; object-fit: cover; }
.tv-card__title { font: 700 17px/1.35 var(--font); }
.tv-card__by { font: italic 400 15px/1.4 var(--font-mono); color: var(--muted); margin: 8px 0 0; }
.tv-card__by a { color: inherit; }
.tv-card__cat { font: 600 14px/1.4 var(--font-mono); text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.tv-card__cat a:hover { color: var(--red); }
.tv-card__excerpt { font: 400 17px/1.45 var(--font-body); margin-top: 10px; }
.tv-card__excerpt p { margin: 0; }

.tv-card--feature .tv-card__body,
.tv-card--small .tv-card__body { padding: 16px 0 14px; border-bottom: 3px solid var(--red); }
.tv-card--small .tv-card__title { font-size: 15px; }
.tv-card--small .tv-card__by { font-size: 13px; }
.tv-card--small .tv-card__body { padding-top: 14px; }

.tv-card--compact { display: grid; grid-template-columns: 5fr 6fr; gap: 16px; align-items: start; }
.tv-card--compact .tv-card__title { font-size: 15px; }
.tv-card--compact .tv-card__cat { font-size: 13px; text-transform: none; font-style: italic; font-weight: 400; }
.tv-card--compact:not(:has(.tv-card__img)) { grid-template-columns: 1fr; }

.tv-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 5.55%; }
.tv-list .tv-card { margin-bottom: 8px; }
.tv-list .tv-card__title { font-size: 16px; }

.nav-links, .page-numbers { display: flex; gap: 8px; justify-content: center; margin: 40px 0 0; flex-wrap: wrap; }
.page-numbers li { list-style: none; }
.page-numbers { font: 600 14px var(--font); }
a.page-numbers, span.page-numbers { padding: 6px 12px; border: 2px solid #000; border-radius: 3px; }
.page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
ul.page-numbers a, ul.page-numbers span { padding: 6px 12px; border: 2px solid #000; border-radius: 3px; display: block; }
ul.page-numbers .current { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Artículo ---------- */
.tv-wrap--article { max-width: calc(780px + 2 * var(--gutter)); }
.tv-article { padding-top: 36px; }
.tv-article__title { font: 800 36px/1.2 var(--font); margin: 6px 0 10px; }
.tv-article__head { padding-bottom: 18px; border-bottom: 3px solid var(--red); margin-bottom: 24px; }
.tv-article__img { margin: 0 0 28px; }
.tv-article__img img { width: 100%; }
.tv-content { font: 400 20px/1.6 var(--font-body); }
.tv-content a { color: var(--red); text-decoration: underline; }
.tv-content h2, .tv-content h3 { font-family: var(--font); margin: 1.6em 0 .6em; }
.tv-content blockquote { border-left: 4px solid var(--red); margin: 1.5em 0; padding: 0 0 0 20px; font-style: italic; }
.tv-content figure { margin: 1.5em 0; }
.tv-content figcaption { font: italic 14px var(--font-mono); color: var(--muted); }
.tv-content iframe, .tv-content video { max-width: 100%; }
.tv-tags { font: 14px var(--font-mono); color: var(--muted); margin-top: 32px; }
.tv-tags a { margin-right: 8px; }
.tv-comments { margin: 48px 0; }
.tv-comments__title { font: 700 22px var(--font); margin-bottom: 16px; }
.tv-comments__list { list-style: none; padding: 0; }
.tv-comments__list li { margin-bottom: 20px; }
.tv-comments input[type="text"], .tv-comments input[type="email"], .tv-comments input[type="url"], .tv-comments textarea {
    width: 100%; font: inherit; padding: 9px 12px; border: 2px solid #000; border-radius: 3px; background: #fff;
}
.tv-comments input[type="submit"] { font: 600 12px var(--font); text-transform: uppercase; background: var(--red); color: #fff; border: 0; padding: 11px 16px; border-radius: 3px; cursor: pointer; }
.tv-404 { padding: 60px var(--gutter); }

/* ---------- Pie ---------- */
.tv-footer { background: var(--dark); color: #cfd2d4; padding: 40px 0 18px; margin-top: 40px; }
.tv-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; align-items: start; }
.tv-logo--footer img { width: 170px; filter: brightness(0) invert(1); }
.tv-tagline { font: italic 14px var(--font-mono); margin: 4px 0 14px; color: #fff; }
.tv-footer-menu li { margin: 4px 0; font-size: 13px; }
.tv-footer-menu a { color: var(--link); }
.tv-footer-menu a:hover { color: #fff; }
.tv-footer__cta { text-align: center; padding-top: 14px; }
.tv-footer__contact { margin: 0; text-align: right; font: italic 700 13px/1.5 var(--font); color: #fff; padding-top: 14px; }
.tv-footer__contact a { color: #fff; text-decoration: underline; }
.tv-copy { margin: 28px 0 0; font-size: 12px; color: #7c8083; }

/* ---------- Resultados de búsqueda ---------- */
.tv-search { width: 80%; max-width: 1080px; margin: 0 auto; padding: 88px 0 20px; }
.tv-search__grid { display: flex; align-items: flex-start; gap: 5.5%; }
.tv-search__col { flex: 1 1 0; min-width: 0; }
.tv-result { margin: 0 0 60px; min-height: 400px; background: #fff; padding-bottom: 20px; word-wrap: break-word; }
.tv-result__img { display: block; overflow: hidden; margin-bottom: 30px; aspect-ratio: 8 / 5; background: #ddd; }
.tv-result__img img { width: 100%; height: 100%; object-fit: cover; vertical-align: bottom; }
.tv-result__title, .tv-result__excerpt { padding: 0 20px; }
.tv-result__title { margin: 0 0 12px; font: 400 25px/1.4 var(--font-sys); color: #000; }
.tv-result__title a { color: inherit; transition: color .3s ease; }
.tv-result:hover .tv-result__title a { color: var(--red); }
.tv-result__excerpt, .tv-result__excerpt p { margin: 0; font: 400 17px/1.4 var(--font-serif); color: #000; }
.tv-search .nav-links, .tv-search .page-numbers { margin-top: 20px; }

/* ---------- Tablet / móvil ---------- */
@media (max-width: 980px) {
    :root { --gutter: 20px; }
    .tv-topbar { display: none; }
    .tv-header { position: sticky; top: 0; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
    .admin-bar .tv-header { top: 46px; }
    .tv-brandrow { justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
    .tv-logo img { width: 130px; }
    .tv-logo--footer img { width: 170px; }
    .tv-social { display: none; }
    .tv-burger { display: grid; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
    .tv-burger span { display: block; width: 24px; height: 2px; background: #000; }
    .tv-nav { display: none; flex-direction: column; align-items: stretch; padding-bottom: 14px; background: #fff; }
    .menu-open .tv-nav { display: flex; }
    .tv-menu { flex-direction: column; gap: 0; }
    .tv-menu a { padding: 12px 0; border-top: 1px solid #eee; }
    .tv-search-toggle { align-self: flex-start; padding: 8px 0; }

    .tv-section__title { font-size: 24px; }
    .tv-search { width: auto; padding: 40px var(--gutter) 20px; }
    .tv-result { min-height: 0; margin-bottom: 42px; }
    .tv-grid--feature, .tv-grid--feature-side { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
    .tv-grid--feature > .tv-grid__lead,
    .tv-grid--feature > .tv-card--feature,
    .tv-grid--feature-side > .tv-card--feature { grid-column: 1 / -1; grid-row: auto; }
    .tv-grid--feature-side > .tv-card--small:nth-child(2),
    .tv-grid--feature-side > .tv-card--small:nth-child(3) { grid-column: auto; grid-row: auto; align-self: start; }
    .tv-grid--feature-side > .tv-promo { grid-column: 1 / -1; grid-row: auto; max-width: 360px; margin: 0 auto; }
    .tv-grid--compact { grid-template-columns: 1fr; }
    .tv-grid--feature { grid-template-columns: 1fr 1fr; }
    .tv-mixed { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
    .tv-mixed--narrow .tv-mixed__cards, .tv-mixed--wide .tv-mixed__cards { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 24px; }
    .tv-mixed--narrow .tv-mixed__list, .tv-mixed--wide .tv-mixed__list { grid-column: 1 / -1; }
    .tv-mixed--narrow .tv-promo { grid-column: 1 / -1; max-width: 360px; margin: 0 auto; }
    .tv-cols--4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .tv-portadilla .tv-card__title { font-size: 17px; }
    .tv-portadilla .tv-mixed__cards { gap: 24px; }
    .tv-portadilla .tv-card--line { padding-bottom: 24px; }
    .tv-duo { grid-template-columns: 1fr; gap: 32px; }
    .tv-list { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
    .tv-footer__grid { grid-template-columns: 1fr; }
    .tv-footer__cta, .tv-footer__contact { text-align: left; padding-top: 0; }
    .tv-article__title { font-size: 28px; }
}
@media (max-width: 520px) {
    .tv-list { grid-template-columns: 1fr; }
    .tv-search__grid { flex-direction: column; gap: 0; }
    .tv-search__col { width: 100%; flex: none; }
    .tv-result__title { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
    .tv-card__img img { transition: transform .3s ease; }
    .tv-card__img:hover img { transform: scale(1.03); }
}
