/*
Theme Name: Noticias Argentina
Theme URI: https://noticiasargentina.com.ar
Author: Agencia San Nicolás
Description: Tema personalizado para Noticias Argentina – Portal de Política y Economía.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: noticias-argentina
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Paleta principal */
    --purple:        #652d90;
    --purple-dark:   #3B1A6A;
    --purple-mid:    #8B4BB8;
    --purple-soft:   #EDE7F6;
    --purple-pale:   #F5F2FB;   /* fondo menú nav */
    --purple-muted:  #C9B3E0;

    /* Cromática oscura del header/footer */
    --hdr-dark:      #2E1F48;   /* ticker + footer */
    --topbar-bg:     #3B1A6A;   /* fila 1 */

    /* Contenido */
    --bg:            #EDEAF4;
    --surface:       #FFFFFF;
    --text:          #1A1523;
    --text-2:        #6B6178;
    --text-3:        #9A8FAA;
    --border:        rgba(90,40,140,0.10);

    /* Sombras de cards */
    --shadow-card:   0 2px 10px rgba(60,20,100,0.09);
    --shadow-hover:  0 6px 20px rgba(60,20,100,0.16);

    /* Tipografía */
    --font-ui:       -apple-system, 'Segoe UI', system-ui, Arial, sans-serif;
    --font-serif:    Georgia, 'Times New Roman', serif;

    /* Radio */
    --r:             10px;
    --r-sm:          6px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-ui); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--purple); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =========================================================
   FULL WIDTH HELPERS
   ========================================================= */
.full-width { width: 100%; }
.container  { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* =========================================================
   FILA 1 — TOPBAR  (violeta oscuro, texto claro, fina)
   ========================================================= */
.topbar {
    width: 100%;
    background: var(--topbar-bg);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-date {
    font-size: 11px;
    color: #C4B3D8;
    letter-spacing: 0.02em;
}
.topbar-links { display: flex; gap: 0; }
.topbar-links a {
    font-size: 11px;
    color: #B0A0C8;
    padding: 0 10px;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: color 0.15s;
    letter-spacing: 0.01em;
}
.topbar-links a:first-child { border-left: 1px solid rgba(255,255,255,0.12); }
.topbar-links a:hover { color: #EDE6F7; }

/* =========================================================
   FILA 2 — LOGO  (fondo blanco)
   ========================================================= */
.header-logo-row {
    width: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(90,40,140,0.08);
}
.header-logo-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
}
.logo-link { display: inline-block; line-height: 0; }
.site-logo-img {
    height: 60px;
    width: auto;
    display: block;
}
/* WordPress custom logo wrapper */
.custom-logo-link img { height: 60px; width: auto; }

/* =========================================================
   FILA 3 — MENÚ PRINCIPAL  (violeta muy claro, texto negro)
   ========================================================= */
.main-nav-row {
    width: 100%;
    background: var(--purple-pale);
    border-bottom: 2px solid var(--purple-muted);
}
.main-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

#main-menu { display: flex; }
#main-menu li { position: relative; }

#main-menu > li > a {
    display: block;
    padding: 12px 15px;
    color: #1A1523;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
#main-menu > li > a:hover,
#main-menu > li.current-menu-item > a,
#main-menu > li.current-menu-ancestor > a {
    color: var(--purple);
    border-bottom-color: var(--purple);
}

/* Dropdown */
#main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    min-width: 210px;
    border-top: 2px solid var(--purple);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    box-shadow: 0 6px 20px rgba(60,20,100,0.14);
    z-index: 200;
}
#main-menu li:hover > .sub-menu { display: block; }
#main-menu .sub-menu a {
    display: block;
    padding: 9px 16px;
    font-size: 12px;
    color: var(--text);
    border-bottom: 1px solid rgba(90,40,140,0.06);
    transition: background 0.12s;
}
#main-menu .sub-menu a:hover { background: var(--purple-soft); color: var(--purple); }

/* Hamburguesa (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    margin-right: 12px;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s;
}

/* =========================================================
   TICKER
   ========================================================= */
.breaking-news {
    width: 100%;
    background: var(--hdr-dark);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.breaking-label {
    background: var(--purple);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 16px;
    white-space: nowrap;
    flex-shrink: 0;
}
.breaking-ticker {
    flex: 1;
    position: relative;
    height: 34px;
    overflow: hidden;
    margin: 0 16px;
}
.ticker-item {
    position: absolute;
    top: 50%; transform: translateY(-50%) translateX(20px);
    font-size: 12px;
    color: #C9B3E0;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    white-space: nowrap;
    pointer-events: none;
}
.ticker-item.active {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}
.ticker-item a { color: inherit; }
.ticker-item a:hover { color: #EDE6F7; }

/* =========================================================
   AD BANNER — HEADER (WP Quads zona 1)
   ========================================================= */
.ad-header-banner {
    width: 100%;
    background: #FFFFFF;
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(90,40,140,0.06);
}
.ad-label { font-size: 9px; color: #CCC; font-family: var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }

/* =========================================================
   HERO
   ========================================================= */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 3px;
    background: var(--hdr-dark);
}
.hero-main {
    grid-column: 1;
    grid-row: 1 / 3;
    position: relative;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    overflow: hidden;
    background: #2d1057;
}
.hero-main .hero-thumb {
    position: absolute; inset: 0;
    object-fit: cover; width: 100%; height: 100%; opacity: 0.5;
}
.hero-main .hero-no-thumb {
    position: absolute; inset: 0;
    background: #3a1f5c;
}
.hero-main .hero-no-thumb::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(-35deg, rgba(101,45,144,0.18) 0px, rgba(101,45,144,0.18) 1px, transparent 1px, transparent 30px);
}
.hero-main .hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; height: 80%;
    background: linear-gradient(to top, rgba(10,5,20,0.96) 0%, transparent 100%);
}
.hero-content { position: relative; z-index: 2; }

.cat-badge {
    display: inline-block;
    background: var(--purple);
    color: #fff;
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 3px;
    margin-bottom: 10px;
}
.hero-main h2 {
    color: #EDE6F7;
    font-size: 22px; font-weight: 700; line-height: 1.28;
    margin-bottom: 8px;
    font-family: var(--font-serif);
}
.hero-main h2 a { color: inherit; }
.hero-main h2 a:hover { color: #C9B3E0; }
.hero-meta { color: #7B6D94; font-size: 11px; }

.hero-secondary {
    background: #231740;
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 7px; justify-content: center;
    border-left: 2px solid #3D2760;
    min-height: 170px;
}
.sec-cat { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--purple-mid); }
.hero-secondary h3 { color: #DDD5EC; font-size: 14px; line-height: 1.35; font-weight: 600; font-family: var(--font-serif); }
.hero-secondary h3 a { color: inherit; }
.hero-secondary h3 a:hover { color: #C9B3E0; }
.sec-meta { font-size: 10px; color: #5B5070; }

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
.site-main { padding: 24px 0; }
.content-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 22px;
}
.section-heading {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--purple);
    margin-bottom: 16px;
}
.section-heading::before {
    content: '';
    display: block; width: 3px; height: 15px;
    background: var(--purple); border-radius: 2px;
}

/* =========================================================
   NEWS GRID (cards verticales 2 columnas)
   ========================================================= */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.news-card {
    background: var(--surface);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.nc-thumb {
    height: 130px;
    background: var(--purple-soft);
    overflow: hidden; flex-shrink: 0; position: relative;
}
.nc-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.news-card:hover .nc-thumb img { transform: scale(1.04); }
.nc-thumb-placeholder {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, #DDD3F0, #DDD3F0 3px, var(--purple-soft) 3px, var(--purple-soft) 16px);
    opacity: 0.6;
}
.nc-body { padding: 13px 14px 15px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.nc-cat { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--purple); }
.nc-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--text); font-family: var(--font-serif); flex: 1; }
.nc-title a { color: inherit; }
.nc-title a:hover { color: var(--purple); }
.nc-excerpt { font-size: 11.5px; color: var(--text-2); line-height: 1.45; }
.nc-date { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* Ad slot between cards */
.ad-grid-slot {
    grid-column: span 2;
    background: var(--surface);
    border-radius: var(--r-sm);
    border: 1.5px dashed var(--purple-muted);
    text-align: center;
    padding: 14px;
    font-size: 9.5px; color: var(--purple-muted);
    font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar-widget {
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.sidebar-widget .section-heading { margin-bottom: 12px; }

.trending-list li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--purple-soft);
}
.trending-list li:last-child { border-bottom: none; }
.trend-num { font-size: 20px; font-weight: 800; color: var(--purple-muted); line-height: 1; flex-shrink: 0; width: 24px; }
.trend-text { font-size: 12.5px; line-height: 1.35; color: var(--text); font-family: var(--font-serif); }
.trend-text a { color: inherit; }
.trend-text a:hover { color: var(--purple); }

.cat-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.cat-pill {
    background: var(--purple-soft); color: var(--purple);
    font-size: 10.5px; font-weight: 600;
    padding: 5px 12px; border-radius: 20px;
    transition: background 0.15s, color 0.15s;
}
.cat-pill:hover { background: var(--purple); color: #fff; }

/* Sidebar ad */
.sidebar-ad-widget {
    border-radius: var(--r);
    border: 1.5px dashed var(--purple-muted);
    background: var(--surface);
    text-align: center;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 9.5px; color: var(--purple-muted);
    font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

/* =========================================================
   SINGLE ARTICLE
   ========================================================= */
.single-header { margin-bottom: 20px; }
.single-header h1 { font-size: 28px; font-weight: 700; line-height: 1.22; margin: 10px 0; font-family: var(--font-serif); }
.single-meta { font-size: 12px; color: var(--text-2); padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.single-featured { margin-bottom: 20px; border-radius: var(--r); overflow: hidden; }
.single-featured img { width: 100%; max-height: 500px; object-fit: cover; }
.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2 { font-size: 21px; margin: 1.5em 0 0.6em; }
.entry-content h3 { font-size: 18px; margin: 1.2em 0 0.5em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.5em; }
.entry-content blockquote { border-left: 4px solid var(--purple); padding: 12px 20px; background: var(--purple-soft); margin: 1.5em 0; font-style: italic; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.entry-content img { margin: 1.2em 0; border-radius: var(--r-sm); }

/* =========================================================
   ARCHIVE
   ========================================================= */
.archive-header { padding: 16px 0; border-bottom: 2px solid var(--purple); margin-bottom: 20px; }
.archive-header h1 { font-size: 22px; font-weight: 700; color: var(--purple-dark); }
.archive-header p { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 20px 0; }
.pagination .page-numbers {
    font-size: 13px; font-weight: 600;
    padding: 7px 13px; border: 1px solid var(--border);
    background: var(--surface); border-radius: var(--r-sm);
    color: var(--text-2); transition: all 0.15s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current { background: var(--purple); color: #fff; border-color: var(--purple); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer-ad-bar {
    width: 100%;
    background: #fff;
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.site-footer {
    width: 100%;
    background: var(--hdr-dark);
    border-top: 3px solid var(--purple);
}
.footer-widgets {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 32px; padding: 32px 24px 24px;
}
.footer-widget h4 {
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--purple-mid);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: 8px; margin-bottom: 14px;
}
.footer-widget ul li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.footer-widget ul li a { font-size: 12.5px; color: #8A7AA0; transition: color 0.15s; }
.footer-widget ul li a:hover { color: #DDD5EC; }
.footer-widget p { font-size: 12px; color: #7A6A90; line-height: 1.7; }

.footer-bottom {
    max-width: 1280px; margin: 0 auto;
    background: rgba(0,0,0,0.2);
    padding: 14px 24px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: #5B5070;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-bottom a { color: #7B6D94; margin-left: 14px; }
.footer-bottom a:hover { color: #C9B3E0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .content-row { grid-template-columns: 1fr 260px; }
}
@media (max-width: 860px) {
    .content-row { grid-template-columns: 1fr; }
    .hero-section { grid-template-columns: 1fr; }
    .hero-main { grid-row: auto; min-height: 280px; }
    .footer-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; }
    .ad-grid-slot { grid-column: span 1; }
    .menu-toggle { display: flex; }
    #main-menu { display: none; flex-direction: column; width: 100%; padding-bottom: 8px; }
    #main-menu.open { display: flex; }
    #main-menu > li > a { padding: 10px 0; border-bottom: 1px solid rgba(90,40,140,0.12); }
    .footer-widgets { grid-template-columns: 1fr; gap: 20px; }
    .hero-main h2 { font-size: 18px; }
    .topbar-date { font-size: 10px; }
}

/* =========================================================
   UTILS
   ========================================================= */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
