/*
Theme Name: FerroNews
Theme URI: https://ferronews.com
Author: Red de medios Durán
Description: Tema pop y farándula con videos virales (Reels/TikTok) y fact-checking del entretenimiento para ferronews.com.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ferronews
Tags: entertainment, news, pop-culture, video, virals, magazine, dark-header
*/

/* ==========================================================================
   1. Variables
   ========================================================================== */
:root {
	--fn-magenta: #E6007E;
	--fn-magenta-dark: #C2006A;
	--fn-magenta-soft: #FDE8F3;
	--fn-yellow: #FFE600;
	--fn-purple: #7B2FF7;
	--fn-orange: #FF6A3D;
	--fn-dark: #111116;
	--fn-dark-card: #1B1B22;
	--fn-bg: #FAF9FC;
	--fn-card: #FFFFFF;
	--fn-border: #E8E6ED;
	--fn-text: #17161F;
	--fn-muted: #6B6878;
	--fn-radius: 14px;
	--fn-radius-sm: 8px;
	--fn-shadow: 0 4px 20px rgba(17, 17, 22, .06);
	--fn-shadow-hover: 0 10px 30px rgba(230, 0, 126, .15);
	--fn-font-display: "Montserrat", "Poppins", system-ui, sans-serif;
	--fn-font-body: "Inter", system-ui, -apple-system, sans-serif;
	--fn-container: 1240px;
	--fn-gap: 24px;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--fn-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--fn-text);
	background: var(--fn-bg);
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--fn-magenta); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--fn-magenta-dark); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--fn-font-display);
	font-weight: 800;
	line-height: 1.2;
	color: var(--fn-dark);
	margin: 0 0 .5em;
	letter-spacing: -.02em;
}
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.fn-container { width: 100%; max-width: var(--fn-container); margin: 0 auto; padding: 0 20px; }
.fn-card { background: var(--fn-card); border-radius: var(--fn-radius); box-shadow: var(--fn-shadow); }

/* ==========================================================================
   3. Header & Navigation (Dark & Pop)
   ========================================================================== */
.fn-header { background: var(--fn-dark); color: #fff; position: sticky; top: 0; z-index: 90; }
.admin-bar .fn-header { top: 32px; }
.fn-header .fn-container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.fn-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--fn-font-display); font-size: 28px; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.fn-logo span.fn-logo-accent { color: var(--fn-magenta); }
.fn-logo-star { width: 32px; height: 32px; fill: var(--fn-yellow); }

.fn-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.fn-nav a { color: #E0DEE6; font-family: var(--fn-font-display); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.fn-nav a:hover, .fn-nav .current-menu-item > a { color: var(--fn-yellow); }

.fn-header__actions { display: flex; align-items: center; gap: 12px; }
.fn-btn-live {
	background: linear-gradient(90deg, var(--fn-magenta), var(--fn-orange));
	color: #fff; font-family: var(--fn-font-display); font-weight: 800; font-size: 13px;
	padding: 8px 16px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
	display: inline-flex; align-items: center; gap: 6px;
}
.fn-btn-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: fn-pulse 1.2s infinite; }
@keyframes fn-pulse { 0% { opacity: 1; } 50% { opacity: .3; } 100% { opacity: 1; } }

.fn-icon-btn { background: rgba(255,255,255,.08); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fn-icon-btn:hover { background: var(--fn-magenta); }
.fn-menu-toggle { display: none; }

/* Sub-header de Tendencias (#hashtags) */
.fn-trends-bar { background: #1C1C24; color: #BBB7C7; font-size: 13px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.fn-trends-bar .fn-container { display: flex; align-items: center; gap: 16px; overflow-x: auto; white-space: nowrap; }
.fn-trends-title { color: var(--fn-yellow); font-family: var(--fn-font-display); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; flex: none; }
.fn-trends-pills { display: flex; gap: 10px; }
.fn-trend-pill { background: rgba(255,255,255,.06); color: #fff; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.fn-trend-pill:hover { background: var(--fn-magenta); color: #fff; }

/* ==========================================================================
   4. Estantería de VIDEOS VIRALES (Reels / TikTok vertical shelf)
   ========================================================================== */
.fn-virals-shelf { padding: 24px 0 16px; }
.fn-virals-title {
	font-family: var(--fn-font-display); font-size: 15px; font-weight: 900; text-transform: uppercase;
	letter-spacing: .06em; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--fn-dark);
}
.fn-virals-title .fn-icon-fire { color: var(--fn-magenta); }
.fn-virals-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.fn-viral-card {
	flex: 0 0 150px; aspect-ratio: 9 / 16; position: relative; border-radius: 14px; overflow: hidden;
	scroll-snap-align: start; box-shadow: var(--fn-shadow); transition: transform .25s ease, box-shadow .25s ease;
	background: #000;
}
.fn-viral-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--fn-shadow-hover); }
.fn-viral-card img { width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.fn-viral-card__gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.85) 100%); }
.fn-viral-card__play {
	position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
	background: rgba(230,0,126,.9); color: #fff; display: flex; align-items: center; justify-content: center;
}
.fn-viral-card__views {
	position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
	color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.fn-viral-card__title {
	position: absolute; bottom: 10px; left: 10px; right: 10px; color: #fff; font-size: 12px;
	font-weight: 700; line-height: 1.25; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ==========================================================================
   5. Badges & Chips (Fact-checking de entretenimiento)
   ========================================================================== */
.fn-badge {
	display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px;
	font-family: var(--fn-font-display); font-size: 11px; font-weight: 900; letter-spacing: .06em;
	text-transform: uppercase; color: #fff;
}
.fn-badge--confirmado { background: var(--fn-magenta); color: #fff; }
.fn-badge--verificado { background: var(--fn-purple); color: #fff; }
.fn-badge--exclusiva { background: var(--fn-yellow); color: var(--fn-dark); }
.fn-badge--desmentido { background: #E53935; color: #fff; }
.fn-badge--rumor { background: #8E24AA; color: #fff; }

/* ==========================================================================
   6. Hero & Grid de Portada
   ========================================================================== */
.fn-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-bottom: 32px; }
.fn-hero-main {
	position: relative; border-radius: var(--fn-radius); overflow: hidden; min-height: 440px;
	display: flex; flex-direction: column; justify-content: flex-end; padding: 36px; color: #fff;
	background: #111;
}
.fn-hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: transform .4s ease; }
.fn-hero-main:hover img { transform: scale(1.03); }
.fn-hero-main__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(17,17,22,.9) 85%); }
.fn-hero-main__content { position: relative; z-index: 2; }
.fn-hero-main__title { font-size: clamp(26px, 2.8vw, 36px); color: #fff; margin: 10px 0; }
.fn-hero-main__title a { color: #fff; }
.fn-hero-main__title a:hover { color: var(--fn-yellow); }

.fn-hero-side { display: flex; flex-direction: column; gap: 20px; }
.fn-hero-secondary {
	position: relative; border-radius: var(--fn-radius); overflow: hidden; flex: 1; min-height: 200px;
	display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; color: #fff;
}
.fn-hero-secondary img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fn-hero-secondary__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(17,17,22,.88) 100%); }
.fn-hero-secondary__content { position: relative; z-index: 2; }
.fn-hero-secondary__title { font-size: 18px; color: #fff; margin: 6px 0 0; }
.fn-hero-secondary__title a { color: #fff; }

/* Grid de Artículos */
.fn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.fn-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fn-post-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.fn-post-card:hover { transform: translateY(-4px); box-shadow: var(--fn-shadow-hover); }
.fn-post-card__media { position: relative; aspect-ratio: 16 / 10; background: #E8E6ED; overflow: hidden; }
.fn-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.fn-post-card__media .fn-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.fn-post-card__body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.fn-post-card__cat { color: var(--fn-magenta); font-family: var(--fn-font-display); font-size: 12px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.fn-post-card__title { font-size: 18px; margin: 0 0 10px; }
.fn-post-card__title a { color: var(--fn-dark); }
.fn-post-card__title a:hover { color: var(--fn-magenta); }
.fn-post-card__excerpt { font-size: 14px; color: var(--fn-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   7. Widgets Especiales de Farándula (Sidebar)
   ========================================================================== */
.fn-widget { padding: 24px; margin-bottom: 24px; }
.fn-widget-title { font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }

/* Top 10 Virales */
.fn-top-virals { list-style: none; padding: 0; margin: 0; counter-reset: fn-counter; }
.fn-top-viral-item { counter-increment: fn-counter; display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--fn-border); }
.fn-top-viral-item:last-child { border-bottom: 0; }
.fn-top-viral-item::before { content: counter(fn-counter, decimal-leading-zero); font-family: var(--fn-font-display); font-size: 24px; font-weight: 900; color: var(--fn-magenta); flex: none; width: 34px; }
.fn-top-viral-info h4 { font-size: 14px; margin: 0 0 4px; }
.fn-top-viral-info h4 a { color: var(--fn-dark); }
.fn-top-viral-views { font-size: 12px; font-weight: 700; color: var(--fn-purple); }

/* Módulo "¿Qué se dice vs. Qué está confirmado?" */
.fn-fact-check-widget { background: linear-gradient(135deg, #1C1C24, #282836); color: #fff; border-radius: var(--fn-radius); padding: 22px; }
.fn-fact-check-widget h3 { color: var(--fn-yellow); font-size: 16px; margin-bottom: 14px; }
.fn-fact-box { background: rgba(255,255,255,.05); border-radius: 8px; padding: 12px; margin-bottom: 12px; font-size: 13px; }
.fn-fact-box strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.fn-fact-box--rumor { border-left: 3px solid #E53935; }
.fn-fact-box--rumor strong { color: #FF8A80; }
.fn-fact-box--fact { border-left: 3px solid #00E676; }
.fn-fact-box--fact strong { color: #69F0AE; }

/* ==========================================================================
   8. Artículo Single (Farándula & Espectáculos)
   ========================================================================== */
.fn-article { padding: 36px 44px; margin-bottom: 32px; }
.fn-article__chips { display: flex; gap: 8px; margin-bottom: 16px; }
.fn-article__title { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.18; margin-bottom: 16px; }
.fn-article__lead { font-size: 20px; font-weight: 500; line-height: 1.5; color: #434050; margin-bottom: 24px; }
.fn-byline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 0; border-top: 1px solid var(--fn-border); border-bottom: 1px solid var(--fn-border); margin-bottom: 24px; }
.fn-author-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.fn-author-meta img { width: 44px; height: 44px; border-radius: 50%; }

/* Social Share Pop */
.fn-share-bar { display: flex; gap: 10px; align-items: center; }
.fn-share-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
	border-radius: 50%; color: #fff; font-size: 14px;
}
.fn-share-btn--wa { background: #25D366; }
.fn-share-btn--tt { background: #000; }
.fn-share-btn--ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }
.fn-share-btn--x { background: #111; }

/* El Dato Verificado */
.fn-dato-verificado {
	background: var(--fn-magenta-soft); border: 2px dashed var(--fn-magenta);
	border-radius: var(--fn-radius); padding: 22px 26px; margin: 32px 0;
}
.fn-dato-verificado h4 { color: var(--fn-magenta-dark); font-size: 16px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }

/* Barra de Reacciones Emoji */
.fn-reactions { background: #F3F1F8; border-radius: 999px; padding: 8px 16px; display: inline-flex; align-items: center; gap: 16px; margin: 28px 0; }
.fn-reaction-btn { background: transparent; border: 0; font-size: 20px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--fn-dark); transition: transform .15s ease; }
.fn-reaction-btn:hover { transform: scale(1.25); }
.fn-reaction-btn.is-reacted { color: var(--fn-magenta); }
.fn-reaction-btn.is-reacted span { color: var(--fn-magenta-dark); }
.fn-reactions-block { margin-top: 36px; border-top: 1px solid var(--fn-border); padding-top: 20px; }
.fn-reactions-label { font-size: 13px; font-weight: 800; text-transform: uppercase; display: block; margin-bottom: 10px; }

/* Barra fija inferior móvil */
.fn-mobile-sticky-bar { display: none; }

/* ==========================================================================
   8b. Contenido del articulo, estados vacios y menu movil
   ========================================================================== */
.fn-entry-content { font-size: 18px; line-height: 1.75; color: #282733; }
.fn-entry-content > *:first-child { margin-top: 0; }
.fn-entry-content p { margin: 0 0 20px; }
.fn-entry-content h2 { font-size: 26px; margin: 34px 0 12px; }
.fn-entry-content h3 { font-size: 21px; margin: 28px 0 10px; }
.fn-entry-content a { text-decoration: underline; }
.fn-entry-content blockquote { margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--fn-magenta); background: var(--fn-magenta-soft); border-radius: 0 var(--fn-radius-sm) var(--fn-radius-sm) 0; }
.fn-entry-content img { border-radius: var(--fn-radius-sm); }

.fn-widget-empty { color: var(--fn-muted); font-size: 14px; margin: 0; }
.fn-virals-empty { color: var(--fn-muted); font-size: 14px; margin: 0; padding: 8px 0 4px; }
.fn-fact-box--rumor a, .fn-fact-box--fact a { color: inherit; text-decoration: underline; }

.fn-copy-msg { display: block; font-size: 10px; font-weight: 700; color: var(--fn-magenta); margin-top: 2px; }
.fn-share-btn { position: relative; }
button.fn-share-btn { font-family: inherit; font-size: inherit; line-height: inherit; }

.fn-header { position: relative; }
.fn-nav.is-open { display: flex; }

/* ==========================================================================
   9. Publicidad & Responsive
   ========================================================================== */
.fn-ad { background: #EDEBF2; border: 1px dashed #D0CBD9; border-radius: var(--fn-radius-sm); text-align: center; padding: 20px; margin: 24px auto; max-width: 728px; }
.fn-ad--box { max-width: 300px; min-height: 250px; }

@media (max-width: 900px) {
	.fn-nav { display: none; }
	.fn-menu-toggle { display: inline-flex; }
	/* Menu desplegado en movil */
	.fn-nav.is-open {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--fn-dark);
		padding: 8px 20px 18px;
		box-shadow: 0 18px 34px rgba(0, 0, 0, .32);
		z-index: 40;
		border-top: 1px solid rgba(255, 255, 255, .08);
	}
	.fn-nav.is-open ul { flex-direction: column; gap: 0; width: 100%; }
	.fn-nav.is-open li { width: 100%; }
	.fn-nav.is-open a {
		display: block;
		padding: 13px 0;
		color: #fff;
		font-size: 15px;
		font-weight: 700;
		border-bottom: 1px solid rgba(255, 255, 255, .07);
	}
	.fn-nav.is-open li:last-child a { border-bottom: 0; }
	.fn-hero { grid-template-columns: 1fr; }
	.fn-layout { grid-template-columns: 1fr; }
	.fn-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.fn-article { padding: 24px 20px; }
}

@media (max-width: 600px) {
	.fn-grid-3 { grid-template-columns: 1fr; }
	.fn-viral-card { flex: 0 0 130px; }
	/* El header debe caber entero: logo, EN VIVO y menu. */
	.fn-header .fn-container { gap: 10px; }
	.fn-logo { font-size: 21px; gap: 7px; }
	.fn-logo-star { width: 24px; height: 24px; }
	.fn-header__actions { gap: 8px; }
	.fn-btn-live { font-size: 11px; padding: 9px 11px; }
	.fn-icon-btn { width: 36px; height: 36px; }
	.single .fn-mobile-sticky-bar {
		display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
		background: #fff; padding: 10px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.1);
		gap: 12px; justify-content: space-between; align-items: center;
	}
	.single .fn-mobile-sticky-bar a { flex: 1; text-align: center; padding: 10px; border-radius: 8px; font-weight: 800; color: #fff; font-size: 13px; }
	.single .fn-mobile-sticky-bar .is-wa { background: #25D366; }
	.single .fn-mobile-sticky-bar .is-tt { background: #000; }
	body.single { padding-bottom: 64px; }
}

@media (max-width: 400px) {
	/* En pantallas muy estrechas el boton EN VIVO cede el sitio al menu. */
	.fn-btn-live { display: none; }
	.fn-logo { font-size: 19px; }
}
