/*
Theme Name: White Hat Flex News
Theme URI: https://whitehatmgmtllc.com/themes/white-hat-flex-news/
Author: White Hat Mgmt LLC
Author URI: https://whitehatmgmtllc.com/
Description: Tema de revista/noticias rápido y seguro. Portada por widgets de columnas de categoría, slider destacado, ticker de últimas noticias, colores por categoría y layouts con sidebar configurables. Sin jQuery, sin librerías externas: JavaScript nativo e iconos SVG. Compatible con la configuración de sitios que venían de un tema de revista clásico (mismas áreas de widgets y opciones).
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.9
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: white-hat-flex-news
Tags: news, blog, grid-layout, two-columns, right-sidebar, left-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   1. Reset y base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    background: #eee;
    word-wrap: break-word;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
figure { margin: 0; }
ul, ol { padding-left: 20px; }
a { color: #333; text-decoration: none; transition: color .2s, background .2s; }
a:hover { text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', system-ui, sans-serif;
    color: #2d2d2d;
    line-height: 1.3;
    margin: 0 0 10px;
    clear: both;
}
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
h4 { font-size: 15px; } h5 { font-size: 13px; } h6 { font-size: 12px; }
p { margin: 0 0 15px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
td, th { border: 1px solid #ddd; padding: 6px 10px; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
    border: 1px solid #ddd;
    padding: 7px 10px;
    color: #555;
    max-width: 100%;
    background: #fff;
}
button, input[type="button"], input[type="reset"], input[type="submit"] {
    border: 0;
    background: #2d2d2d;
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
}
blockquote {
    border-left: 4px solid #ddd;
    margin: 0 0 15px;
    padding: 10px 20px;
    color: #666;
    font-style: italic;
    background: #f7f7f7;
}
pre { background: #f4f4f4; padding: 12px; overflow: auto; max-width: 100%; }
code, kbd { background: #f4f4f4; padding: 2px 5px; }
embed, iframe, object, video { max-width: 100%; }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background: #f1f1f1;
    clip: auto !important;
    display: block;
    height: auto; width: auto;
    padding: 15px 23px 14px;
    left: 5px; top: 5px;
    z-index: 100000;
    text-decoration: none;
}
.skip-link { position: absolute; left: -9999px; }

.clearfix::after { content: ""; display: table; clear: both; }
.float-left { float: left; }
.float-right { float: right; }
.text-center { text-align: center; }

.wrapper { max-width: 1080px; margin: 0 auto; padding: 0 10px; }
.boxed-layout #page { max-width: 1100px; margin: 0 auto; background: transparent; }
.whfn-enable-box-shadow #page { box-shadow: 0 0 8px rgba(0,0,0,.2); }

/* Alineaciones clásicas de WP */
.alignleft { float: left; margin: 0 15px 10px 0; }
.alignright { float: right; margin: 0 0 10px 15px; }
.aligncenter { display: block; margin: 0 auto 15px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #777; text-align: center; padding: 4px 0; }
.sticky { display: block; }
.gallery-caption, .bypostauthor { display: block; }

/* Iconos SVG */
.whfn-icon {
    display: inline-block;
    width: 1em; height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
}

/* =========================================================
   2. Cabecera: barra superior + ticker
   ========================================================= */
.site-header { background: #fff; }
.top-header-section {
    background: #2d2d2d;
    color: #b5b5b5;
    font-size: 12px;
    overflow: hidden;
}
.top-header-section .header-latest-posts { line-height: 34px; height: 34px; overflow: hidden; }
.bn-title {
    background: #4db2ec;
    color: #fff;
    padding: 0 12px;
    display: inline-block;
    font-weight: 600;
    height: 34px;
}
.bn-wrapper { max-width: 62%; }
.bn-wrapper .bn-title { float: left; margin-right: 10px; }
.bn-wrapper ul.whfn-ticker {
    margin: 0; padding: 0;
    list-style: none;
    overflow: hidden;
    height: 34px;
}
.whfn-ticker .bn-content { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whfn-ticker .bn-content.active { display: block; animation: whfn-slide-up .45s ease; }
@keyframes whfn-slide-up { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.bn-content a { color: #b5b5b5; }
.right-header .socials a {
    color: #b5b5b5;
    display: inline-block;
    padding: 0 6px;
    line-height: 34px;
}

/* Branding: logo + banner */
.site-branding { padding: 20px 0; }
.site-logo img { max-height: 90px; width: auto; }
.site-title { font-size: 32px; margin: 0; }
.site-description { color: #888; margin: 0; }
.header-ainfo { max-width: 728px; text-align: right; }
.header-ainfo .widget { margin: 0; }
/* Posición del logo/banner según opción */
.right-logo-left-ainfo .site-logo { float: right; }
.right-logo-left-ainfo .header-ainfo { float: left; text-align: left; }
.center-logo-no-ainfo .site-logo { float: none; text-align: center; }
.center-logo-no-ainfo .header-ainfo { display: none; }

/* =========================================================
   3. Menú principal
   ========================================================= */
.main-navigation { background: #2d2d2d; position: relative; z-index: 999; }
.main-navigation.whfn-sticky-on { position: sticky; top: 0; }
.admin-bar .main-navigation.whfn-sticky-on { top: 32px; }
.header-main-menu { position: relative; }
.home-icon { float: left; }
.home-icon a { display: block; color: #fff; padding: 0 15px; line-height: 42px; font-size: 15px; }
.whfn-nav { float: left; }
.whfn-nav ul { margin: 0; padding: 0; list-style: none; }
.whfn-nav > ul > li, .whfn-nav > div > ul > li { float: left; position: relative; }
.whfn-nav li { position: relative; }
.whfn-nav a {
    display: block;
    color: #fff;
    padding: 0 14px;
    line-height: 42px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}
.whfn-nav ul ul {
    position: absolute;
    top: 100%; left: 0;
    background: #2d2d2d;
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s;
    z-index: 999;
}
.whfn-nav ul ul li { float: none; }
.whfn-nav ul ul a { line-height: 38px; text-transform: none; font-weight: 400; border-top: 1px solid rgba(255,255,255,.06); }
.whfn-nav ul ul ul { top: 0; left: 100%; }
.whfn-nav li:hover > ul, .whfn-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
.menu-extras { float: right; }
.menu-extras > a, .random-post a {
    display: inline-block;
    color: #fff;
    line-height: 42px;
    padding: 0 13px;
    font-size: 14px;
}
.random-post { float: right; }
.menu-search-toggle {
    display: none;
    position: absolute;
    right: 0; top: 100%;
    background: #2d2d2d;
    padding: 12px;
    z-index: 999;
}
.menu-search-toggle.open { display: block; }
.menu-toggle {
    display: none;
    background: none;
    color: #fff;
    font-size: 14px;
    padding: 0 14px;
    line-height: 42px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Formulario de búsqueda */
.search-block { display: flex; }
.search-block input[type="search"] { border: 0; padding: 8px 10px; min-width: 190px; }
.search-block button { padding: 8px 14px; background: #4db2ec; }

/* =========================================================
   4. Sección destacada: slider + laterales
   ========================================================= */
.content-wrapper { padding-top: 20px; }
.slider-feature-wrap { margin-bottom: 20px; }
.slider-section { float: left; width: 66%; position: relative; overflow: hidden; }
.whfn-slider { margin: 0; padding: 0; list-style: none; position: relative; }
.whfn-slider li { display: none; position: relative; margin: 0; }
.whfn-slider li.active { display: block; animation: whfn-fade .5s ease; }
@keyframes whfn-fade { from { opacity: .35; } to { opacity: 1; } }
.whfn-slider li > a { display: block; }
.whfn-slider img { width: 100%; height: auto; display: block; }
.slider-desc {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    padding: 40px 20px 15px;
    color: #fff;
}
.above-slider-details { font-size: 11px; margin-bottom: 4px; }
.above-slider-details a { color: #ddd; margin-right: 12px; }
.slide-title { font-size: 22px; font-weight: 700; color: #fff; font-family: 'Roboto', sans-serif; }
.slide-caption { font-size: 12px; color: #ddd; margin-top: 4px; }
.slider-desc .cat-links a { color: #fff; padding: 2px 8px; font-size: 11px; display: inline-block; margin-top: 6px; }
.whfn-slider-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.4);
    color: #fff;
    border: 0;
    width: 36px; height: 44px;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    padding: 0;
}
.whfn-slider-nav:hover { background: rgba(0,0,0,.7); }
.whfn-slider-prev { left: 0; }
.whfn-slider-next { right: 0; }

.besides-slider { float: right; width: 32.5%; }
.besides-slider-left, .besides-slider-right { width: 48.5%; float: left; }
.besides-slider-right { float: right; }
.beside-post { position: relative; margin-bottom: 11px; }
.beside-thumb { position: relative; overflow: hidden; }
.beside-thumb img { width: 100%; display: block; transition: transform .3s; }
.beside-post:hover .beside-thumb img { transform: scale(1.05); }
.beside-caption { padding: 6px 0; }
.beside-caption .post-title { font-size: 13px; margin: 0 0 3px; }
.beside-caption .post-title a { color: #2d2d2d; }
.beside-caption .post-date { font-size: 11px; color: #888; }
.beside-caption .post-date a { color: #888; margin-right: 8px; }

/* =========================================================
   5. Área de contenido y sidebar
   ========================================================= */
.site-content { background: #fff; padding: 20px 15px; }
.content-area { float: left; width: 67.5%; }
.right-sidebar .content-area { float: left; }
.right-sidebar .widget-area-main { float: right; }
.left-sidebar .content-area { float: right; }
.left-sidebar .widget-area-main { float: left; }
.no-sidebar .content-area, .full-width .content-area { float: none; width: 100%; }
.no-sidebar .widget-area-main, .full-width .widget-area-main { display: none; }
.widget-area-main { width: 30%; }
.both-sidebar .content-area { width: 48%; float: left; margin-left: 2%; }
.both-sidebar .widget-area-left { float: left; width: 24%; }
.both-sidebar .widget-area-main { float: right; width: 24%; }
.at-sticky-sidebar .widget-area-main > .whfn-sticky-inner { position: sticky; top: 56px; }

/* Widgets */
.widget { margin-bottom: 25px; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget ul li { padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.widget-title {
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 1px solid #4db2ec;
    margin-bottom: 15px;
    position: relative;
    line-height: 1;
    padding-bottom: 0;
}
.widget-title span {
    display: inline-block;
    border-bottom: 7px solid #4db2ec;
    padding: 0 12px 6px 0;
    margin-bottom: -4px;
}
.page-header .page-title {
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 1px solid #4db2ec;
    margin-bottom: 20px;
    line-height: 1;
}
.page-header .page-title span, .page-header .page-title { position: relative; }

/* Grid de posts (widget de columnas) */
.featured-entries-col { margin: 0; padding: 0; list-style: none; }
.featured-entries-col li.acme-col-3 {
    float: left;
    width: 31.63%;
    margin-right: 2.55%;
    margin-bottom: 18px;
}
.featured-entries-col li.acme-col-3:nth-of-type(3n) { margin-right: 0; }
.featured-entries-col li.featured-post-main { float: none; width: 100%; margin-right: 0; }
.widget-image { overflow: hidden; }
.widget-image img { width: 100%; display: block; transition: transform .3s; }
li:hover > .widget-image img { transform: scale(1.04); }
.blog-disable-image-zoom .widget-image img, .blog-disable-image-zoom li:hover > .widget-image img { transform: none; }
.no-image-widgets { background: #f2f2f2; padding: 30px 12px; text-align: center; }
.featured-desc { padding-top: 8px; }
.featured-desc .title { font-size: 15px; margin: 4px 0 6px; }
.featured-post-main .featured-desc .title { font-size: 20px; }
.featured-desc .details { color: #666; font-size: 12px; }
.above-entry-meta { font-size: 11px; color: #999; }
.above-entry-meta a { color: #999; }
.above-entry-meta span { margin-right: 10px; }
.below-entry-meta { margin-top: 7px; }
.cat-links a {
    background: #4db2ec;
    color: #fff;
    display: inline-block;
    padding: 2px 9px;
    font-size: 11px;
    margin: 0 4px 4px 0;
}
.cat-links a:hover { background: #2d2d2d; }

/* Layout 2 del widget de columnas */
.sm-col-post-type-2 .featured-post-main { float: left !important; width: 48.5% !important; }
.sm-col-post-type-2-beside { float: right; width: 48.5%; }
.sm-col-post-type-2-beside li.acme-col-3 { float: none; width: 100%; margin-right: 0; display: flex; gap: 12px; }
.sm-col-post-type-2-beside li.acme-col-3 .widget-image { flex: 0 0 40%; }

/* =========================================================
   6. Listado de entradas (blog/archivo) y entrada única
   ========================================================= */
article.post, article.page, article.hentry { margin-bottom: 30px; }
.entry-header .entry-title { font-size: 24px; margin-bottom: 8px; }
.entry-header .entry-title a { color: #2d2d2d; }
.entry-meta { font-size: 11px; color: #999; margin-bottom: 12px; }
.entry-meta a { color: #999; }
.entry-meta > span { margin-right: 12px; }
.post-thumb-wrapper { margin-bottom: 14px; overflow: hidden; }
.post-thumb-wrapper img { transition: transform .3s; display: block; }
article:hover .post-thumb-wrapper img { transform: scale(1.03); }
.blog-disable-image-zoom article:hover .post-thumb-wrapper img { transform: none; }
/* listado con imagen a la izquierda */
.archive-left-image .post-thumb-wrapper { float: left; width: 40%; margin: 0 18px 8px 0; }
.entry-content { font-size: 14px; }
.entry-content a { color: #4db2ec; }
.entry-content a:hover { text-decoration: underline; }
.read-more {
    display: inline-block;
    background: #4db2ec;
    color: #fff !important;
    padding: 5px 14px;
    font-size: 12px;
    margin-top: 8px;
}
.read-more:hover { background: #2d2d2d; text-decoration: none !important; }
.entry-footer { font-size: 12px; color: #888; margin-top: 12px; }
.entry-footer > span { margin-right: 14px; }
.page-links { clear: both; margin: 15px 0; }

/* Navegación entre páginas */
.posts-navigation .nav-links, .post-navigation .nav-links { overflow: hidden; padding: 12px 0; }
.nav-previous { float: left; max-width: 48%; }
.nav-next { float: right; max-width: 48%; text-align: right; }
.nav-links a { color: #4db2ec; font-weight: 600; }
.pagination .page-numbers {
    display: inline-block;
    padding: 5px 11px;
    background: #f2f2f2;
    color: #444;
    margin-right: 4px;
}
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: #4db2ec; color: #fff; }

/* Posts relacionados */
.related-articles-wrapper { margin-top: 25px; }
.related-posts { margin: 0; padding: 0; list-style: none; }
.related-posts li { float: left; width: 31.63%; margin-right: 2.55%; }
.related-posts li:nth-of-type(3n) { margin-right: 0; }
.related-posts .title { font-size: 13px; }

/* Migas de pan */
.breadcrumbs { background: #fff; padding: 10px 15px; margin-bottom: 15px; font-size: 12px; }
.breadcrumb { background: #4db2ec; color: #fff; padding: 3px 10px; margin-right: 10px; display: inline-block; }
#whfn-breadcrumbs { display: inline; }
#whfn-breadcrumbs a { color: #666; }
#whfn-breadcrumbs .sep { margin: 0 6px; color: #bbb; }

/* =========================================================
   7. Comentarios
   ========================================================= */
.comments-area { margin-top: 30px; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list li { margin-bottom: 18px; }
.comment-list .children { list-style: none; margin-left: 40px; padding: 0; }
.comment-body { background: #f9f9f9; padding: 14px; }
.comment-author img { float: left; margin-right: 12px; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-meta { font-size: 11px; color: #999; margin: 3px 0 8px; }
.comment-meta a { color: #999; }
.reply { font-size: 12px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 3px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea { width: 100%; }
.comment-form .form-submit input { background: #4db2ec; }

/* =========================================================
   8. Pie de página
   ========================================================= */
.site-footer { background: #212121; color: #aaa; margin-top: 25px; }
.site-footer a { color: #ccc; }
.site-footer a:hover { color: #fff; }
#footer-top { padding: 30px 0 10px; }
.footer-columns { display: flex; flex-wrap: wrap; gap: 3%; }
.footer-sidebar.acme-col-3 { flex: 1 1 30%; min-width: 220px; }
.site-footer .widget-title { color: #fff; border-color: rgba(255,255,255,.15); }
.site-footer .widget ul li { border-color: rgba(255,255,255,.08); }
.footer-copyright { background: #1a1a1a; padding: 14px 10px; font-size: 12px; }
.footer-copyright p { margin: 0 0 4px; }
.site-info { font-size: 11px; color: #777; }
.site-info a { color: #999; }

/* =========================================================
   9. Responsive
   ========================================================= */
@media (max-width: 980px) {
    .content-area, .widget-area-main, .widget-area-left,
    .both-sidebar .content-area, .both-sidebar .widget-area-main { float: none; width: 100%; margin-left: 0; }
    .slider-section, .besides-slider { float: none; width: 100%; margin-bottom: 15px; }
    .bn-wrapper { max-width: 55%; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; float: left; }
    .whfn-nav { display: none; float: none; width: 100%; }
    .whfn-nav.open { display: block; }
    .whfn-nav > ul > li, .whfn-nav > div > ul > li { float: none; }
    .whfn-nav ul ul { position: static; opacity: 1; visibility: visible; transform: none; min-width: 0; padding-left: 15px; }
    .home-icon { display: none; }
    .site-logo, .header-ainfo { float: none !important; text-align: center; max-width: 100%; }
    .header-ainfo { margin-top: 12px; }
    .featured-entries-col li.acme-col-3, .related-posts li { width: 48.5%; margin-right: 3%; }
    .featured-entries-col li.acme-col-3:nth-of-type(3n), .related-posts li:nth-of-type(3n) { margin-right: 3%; }
    .featured-entries-col li.acme-col-3:nth-of-type(2n), .related-posts li:nth-of-type(2n) { margin-right: 0; }
    .sm-col-post-type-2 .featured-post-main, .sm-col-post-type-2-beside { float: none !important; width: 100% !important; }
    .top-header-section .header-latest-posts.bn-title-date { display: none; }
    .bn-wrapper { max-width: 100%; float: none; }
    .right-header { display: none; }
    .archive-left-image .post-thumb-wrapper { float: none; width: 100%; margin-right: 0; }
}
@media (max-width: 480px) {
    .featured-entries-col li.acme-col-3, .related-posts li { float: none; width: 100%; margin-right: 0; }
    .besides-slider-left, .besides-slider-right { float: none; width: 100%; }
    .slide-title { font-size: 16px; }
}

/* Impresión */
@media print {
    .top-header-section, .main-navigation, .widget-area-main, .site-footer, .slider-feature-wrap { display: none; }
    .content-area { width: 100%; float: none; }
}
