/*
Theme Name: Stereo Redención
Theme URI: https://stereoredencion.org
Author: Stereo Redención
Author URI: https://stereoredencion.org
Description: Tema personalizado moderno y responsivo para Radio Stereo Redención 98.5 FM Matagalpa. Basado en el diseño institucional clásico con optimización moderna para dispositivos móviles, PHP 8+, compatibilidad con Gutenberg y estándares de WordPress.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
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: stereoredencion
Tags: radio, magazine, two-columns, right-sidebar, custom-menu, featured-images, responsive-layout
*/

/* -------------------------------------------------------------
   01. VARIABLES & RESET
------------------------------------------------------------- */
:root {
    --color-bg-global: #315ca6;
    --color-primary: #2367a3;
    --color-primary-hover: #1b4f7d;
    --color-dark: #222222;
    --color-text: #555555;
    --color-text-light: #777777;
    --color-border: #e2e2e2;
    --color-border-dark: #cccccc;
    --color-bg-card: #ffffff;
    --color-nav-bg: #29343f;
    --color-nav-hover: #1e262e;
    --font-heading: 'Kameron', Georgia, serif;
    --font-body: 'Varela', Arial, sans-serif;
    --max-width: 980px;
    --box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--color-bg-global);
    background-attachment: fixed;
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    word-wrap: break-word;
}

/* -------------------------------------------------------------
   02. TYPOGRAPHY
------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
    margin-bottom: 14px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

a:hover, a:focus {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* -------------------------------------------------------------
   03. LAYOUT CONTAINER (.wrap)
------------------------------------------------------------- */
.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    background-color: var(--color-bg-card);
    box-shadow: var(--box-shadow);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cf::after, .clear::after {
    content: "";
    display: table;
    clear: both;
}

/* -------------------------------------------------------------
   04. TOP NAVIGATION BAR (#top-nav)
------------------------------------------------------------- */
#top-nav {
    background-color: #f7f7f7;
    border-bottom: 1px solid var(--color-border);
    padding: 6px 15px;
    font-size: 11px;
}

#top-nav .top-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    margin: 0;
    padding: 0;
}

#top-nav .top-menu li a {
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

#top-nav .top-menu li a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* -------------------------------------------------------------
   05. HEADER & LOGO (#header)
------------------------------------------------------------- */
#header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border-bottom: 1px solid #ededed;
}

#logo {
    display: inline-block;
    max-width: 100%;
}

#logo img {
    max-height: 95px;
    width: auto;
    object-fit: contain;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 26px;
    margin: 0;
}

.site-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.site-description {
    font-size: 12px;
    color: var(--color-text-light);
    margin: 4px 0 0;
}

#header-widgets {
    display: flex;
    align-items: center;
}

/* -------------------------------------------------------------
   06. MAIN NAVIGATION BAR (#nav)
------------------------------------------------------------- */
.nav-wrapper {
    background-color: var(--color-nav-bg);
    position: relative;
    border-top: 2px solid var(--color-primary);
}

.nav-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 15px;
    padding: 12px 18px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    align-items: center;
    justify-content: space-between;
}

.nav-toggle-btn .hamburger-icon {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    position: relative;
    vertical-align: middle;
}

.nav-toggle-btn .hamburger-icon::before,
.nav-toggle-btn .hamburger-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #ffffff;
    left: 0;
}

.nav-toggle-btn .hamburger-icon::before { top: -6px; }
.nav-toggle-btn .hamburger-icon::after { bottom: -6px; }

#nav {
    list-style: none;
    margin: 0;
    padding: 0 10px;
    display: flex;
    flex-wrap: wrap;
    background-color: var(--color-nav-bg);
}

#nav > li {
    position: relative;
}

#nav > li > a {
    display: block;
    padding: 12px 14px;
    color: #f1f1f1;
    font-family: var(--font-heading);
    font-size: 14px;
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, color 0.2s;
}

#nav > li:first-child > a {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

#nav > li > a:hover,
#nav > li.current-menu-item > a,
#nav > li.current_page_item > a {
    background-color: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
}

/* Submenús */
#nav ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #212830;
    min-width: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    border-top: 2px solid var(--color-primary);
}

#nav li:hover > ul.sub-menu {
    display: block;
}

#nav ul.sub-menu li a {
    display: block;
    padding: 9px 15px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: var(--font-heading);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

#nav ul.sub-menu li a:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    padding-left: 18px;
}

/* -------------------------------------------------------------
   07. MAIN CONTENT AREA (#main, #content, #sidebar)
------------------------------------------------------------- */
#main {
    display: flex;
    flex: 1 0 auto;
    padding: 18px 20px;
    gap: 24px;
    background-color: #ffffff;
}

#content {
    flex: 1 1 630px;
    min-width: 0;
}

#sidebar {
    flex: 0 0 300px;
    min-width: 0;
}

/* -------------------------------------------------------------
   08. FEATURED SLIDER (#slider)
------------------------------------------------------------- */
.slider-container {
    position: relative;
    margin-bottom: 24px;
    background-color: #111111;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-radius: 2px;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.slide-item.active {
    opacity: 1;
    visibility: visible;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 12px 18px;
    z-index: 5;
}

.slide-caption .post-category {
    display: inline-block;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 7px;
    text-transform: uppercase;
    margin-bottom: 5px;
    border-radius: 2px;
}

.slide-caption h2 {
    font-size: 17px;
    margin: 0 0 4px;
    line-height: 1.3;
}

.slide-caption h2 a {
    color: #ffffff;
    text-decoration: none;
}

.slide-caption h2 a:hover {
    color: #8ec1ef;
}

.slide-caption p {
    font-size: 12px;
    margin: 0;
    color: #cccccc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Controles del Slider */
.slider-nav {
    position: absolute;
    bottom: 12px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 6px;
}

.slider-nav .dot {
    width: 11px;
    height: 11px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-nav .dot.active {
    background: #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

/* -------------------------------------------------------------
   09. POSTS LIST & RECENT POSTS WIDGET
------------------------------------------------------------- */
.widget-title {
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.widget-title h3 {
    margin: 0;
    font-size: 18px;
    color: #222222;
    font-family: var(--font-heading);
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list li {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dotted var(--color-border);
}

.post-list li:first-child {
    padding-top: 0;
}

.post-list li:last-child {
    border-bottom: none;
}

.post-list .post-thumb {
    flex: 0 0 140px;
    height: 140px;
    overflow: hidden;
    border: 1px solid #ddd;
    padding: 2px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.post-list .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-list .post-thumb:hover img {
    transform: scale(1.05);
}

.post-list .post-body {
    flex: 1;
    min-width: 0;
}

.post-badge-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.hot-badge {
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 2px;
    text-transform: uppercase;
}

.post-category {
    font-size: 11px;
    font-weight: bold;
    color: var(--color-primary);
    text-transform: uppercase;
}

.post-body h2 {
    font-size: 16px;
    margin: 0 0 6px;
    line-height: 1.35;
}

.post-body h2 a {
    color: #333333;
    text-decoration: none;
}

.post-body h2 a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-meta {
    font-size: 11px;
    color: #999999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.separator-short {
    width: 25px;
    height: 1px;
    background: #ddd;
    margin: 6px 0;
}

.post-body p {
    font-size: 12px;
    line-height: 1.55;
    color: #666666;
    margin: 0;
}

.widget-more {
    text-align: right;
    padding-top: 10px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: bold;
}

.widget-more a {
    color: var(--color-primary);
}

/* -------------------------------------------------------------
   10. SINGLE POST & PAGE CONTENT
------------------------------------------------------------- */
.breadcrumbs {
    font-size: 11px;
    color: #888888;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.breadcrumbs a {
    color: var(--color-primary);
}

.post-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.entry-featured-img {
    margin-bottom: 18px;
    border: 1px solid #e0e0e0;
    padding: 3px;
    background: #fff;
}

.entry-content {
    font-size: 13px;
    line-height: 1.7;
    color: #444444;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content h2 { font-size: 20px; margin-top: 20px; }
.entry-content h3 { font-size: 17px; margin-top: 16px; }

.entry-content iframe {
    max-width: 100%;
}

.entry-content figure {
    margin: 16px 0;
}

.post-tags {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #eeeeee;
    font-size: 12px;
}

/* Paginación */
.pagination, .navigation.pagination {
    margin: 24px 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pagination .page-numbers, .nav-links .page-numbers {
    padding: 5px 12px;
    border: 1px solid #d5d5d5;
    background: #fdfdfd;
    color: #555555;
    text-decoration: none;
    border-radius: 2px;
    font-family: var(--font-heading);
}

.pagination .current, .nav-links .current {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.pagination a:hover, .nav-links a:hover {
    background: #f0f0f0;
}

/* -------------------------------------------------------------
   11. SIDEBAR & WIDGETS
------------------------------------------------------------- */
#sidebar .widget {
    margin-bottom: 24px;
    background: #fcfcfc;
    border: 1px solid #e5e5e5;
    padding: 14px 16px;
    border-radius: 2px;
}

#sidebar .widget-title {
    border-bottom: 2px solid var(--color-primary);
    margin: -14px -16px 12px -16px;
    padding: 10px 16px;
    background: #f5f5f5;
}

#sidebar .widget-title h3 {
    font-size: 15px;
    margin: 0;
}

/* Buscador */
.searchform {
    display: flex;
    width: 100%;
}

.searchform input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #cccccc;
    font-size: 12px;
    font-family: var(--font-body);
    outline: none;
    border-radius: 2px 0 0 2px;
}

.searchform input[type="submit"] {
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-family: var(--font-heading);
    cursor: pointer;
    border-radius: 0 2px 2px 0;
    transition: background 0.15s;
}

.searchform input[type="submit"]:hover {
    background: var(--color-primary-hover);
}

/* Reproductores / Iframes en Widget */
.radio-player-frame, .chat-box-frame {
    width: 100%;
    border: none;
    overflow: hidden;
    display: block;
}

.radio-player-frame {
    height: 105px;
}

.chat-box-frame {
    height: 160px;
}

/* Listas en sidebar */
#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar ul li {
    padding: 6px 0;
    border-bottom: 1px dotted #e2e2e2;
    font-size: 12px;
}

#sidebar ul li:last-child {
    border-bottom: none;
}

#sidebar ul li a {
    color: #444444;
}

#sidebar ul li a:hover {
    color: var(--color-primary);
}

/* -------------------------------------------------------------
   12. FOOTER (#footer)
------------------------------------------------------------- */
#footer {
    background-color: #212932;
    color: #b5b5b5;
    padding: 16px 20px;
    font-size: 11px;
    border-top: 3px solid var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

#footer a {
    color: #d1d1d1;
    text-decoration: none;
}

#footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

#footer .footer-left {
    font-family: var(--font-heading);
    font-size: 12px;
}

#footer .footer-right ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
}

/* -------------------------------------------------------------
   13. COMMENTS
------------------------------------------------------------- */
#comments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.comment-list .comment {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-size: 12px;
}

.comment-form input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    font-family: var(--font-heading);
    border-radius: 2px;
}

/* -------------------------------------------------------------
   14. RESPONSIVE DESIGN (MEDIA QUERIES)
------------------------------------------------------------- */
@media (max-width: 860px) {
    #main {
        flex-direction: column;
        padding: 15px;
    }

    #content {
        flex: 1 1 100%;
    }

    #sidebar {
        flex: 1 1 100%;
        margin-top: 15px;
    }

    #header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .nav-toggle-btn {
        display: flex;
    }

    #nav {
        display: none;
        flex-direction: column;
        padding: 0;
    }

    #nav.is-active {
        display: flex;
    }

    #nav > li > a {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 15px;
    }

    #nav ul.sub-menu {
        position: static;
        box-shadow: none;
        background-color: #171c22;
        padding-left: 15px;
    }

    .slider-wrapper {
        height: 240px;
    }

    .slide-caption h2 {
        font-size: 15px;
    }

    #footer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    #footer .footer-right ul {
        justify-content: center;
    }

    #top-nav .top-menu {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .post-list li {
        flex-direction: column;
        gap: 10px;
    }

    .post-list .post-thumb {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
    }

    .slider-wrapper {
        height: 200px;
    }

    .slide-caption {
        padding: 8px 12px;
    }

    .slide-caption p {
        display: none;
    }
}
