/*
Theme Name: Atareao Theme
Theme URI: https://atareao.es
Author: Atareao
Author URI: https://atareao.es
Description: Tema minimalista, responsive y mobile-first enfocado en rapidez y simplicidad
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: atareao-theme
Tags: blog, education, responsive, mobile-first, minimal, fast, clean
*/
/* Contact Page Styles */
.atareao-contact-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    min-height: 60vh;
    background: transparent;
}
.atareao-contact-form {
    color: #222;
    padding: 0;
    width: 80%;
    border-radius: 16px;
    background: transparent;
    border: none;
    /* box-shadow removed */
}
.atareao-contact-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: #0073aa;
    letter-spacing: 0.5px;
}
.atareao-contact-form input,
.atareao-contact-form textarea {
    width: 100%;
    padding: 0.85rem;
    margin-bottom: 1.2rem;
    border: 1.5px solid #c3cfe2;
    border-radius: 8px;
    font-size: 1rem;
    background: #f7fafd;
    color: #222;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.atareao-contact-form input:focus,
.atareao-contact-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px #c3e6ff;
}
.atareao-contact-form button[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.atareao-contact-form button[type="submit"]:hover {
    background: var(--color-primary-700);
    box-shadow: 0 4px 16px var(--focus-ring);
}
.atareao-feedback-success,
.atareao-feedback-error {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,115,170,0.06);
}
.atareao-feedback-success {
    background: #e6f9ed;
    color: #1a7f37;
    border: 1px solid #b7e4c7;
}
.atareao-feedback-error {
    background: #ffe6e6;
    color: #b30000;
    border: 1px solid #ffb3b3;
}
.atareao-contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.atareao-page-entry-content {
    width: 80%;
    margin: 0 auto;
}
 
.atareao-contact-form input[type="number"]::-webkit-inner-spin-button,
.atareao-contact-form input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}
.atareao-contact-form input[type="text"],
.atareao-contact-form input[type="number"] {
    letter-spacing: 0.2px;
}

/* Style comment captcha like other inputs */
.comment-form-captcha input,
#atareao_comment_captcha {
    padding: 0.85rem;
    border: 1.5px solid #c3cfe2;
    border-radius: 8px;
    font-size: 1rem;
    background: #f7fafd;
    color: #222;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    width: auto;
    min-width: 6.5rem;
    display: inline-block;
    vertical-align: middle;
}
.comment-form-captcha input:focus,
#atareao_comment_captcha:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px #c3e6ff;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS para temas de color */
:root {
    --color-primary: #2563eb;
    --color-primary-700: #1d4ed8;
    --focus-ring: rgba(37,99,235,0.12);
    --color-secondary: #64748b;
    --color-text: #1e293b;
    --color-text-light: #475569;
    --color-background: #ffffff;
    --color-surface: #f8fafc;
    --color-border: #e2e8f0;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    --max-width: 900px;
    --spacing-unit: 1rem;
    --border-radius: 0.5rem;
    --transition: 0.2s ease;
    color-scheme: light;
}

/* ── Dark mode ── */
[data-theme="dark"] {
    --color-primary: #3b82f6;
    --color-secondary: #94a3b8;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-border: #334155;
    color-scheme: dark;
}


/* Contact form inputs in dark mode */
[data-theme="dark"] .atareao-contact-form input,
[data-theme="dark"] .atareao-contact-form textarea {
    background: #151617;
    color: #e6e6e6;
    border-color: #2a2a2a;
}

/* Front init page styles */
.front-init .init-row {
    padding: calc(var(--spacing-unit) * 1) 0;
}
.front-init .init-row--label {
    padding-top: calc(var(--spacing-unit) * 1);
    padding-bottom: 0;
}

.front-init .init-latest-heading {
    font-size: 1.1rem;
    margin: 0;
}
.front-init .init-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 6px 18px rgba(15,23,42,0.03);
}

.front-init .init-row--nav .init-inner,
.front-init .init-row--latest .init-inner,
.front-init .init-row--label .init-inner,
.front-init .init-row--more .init-inner {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 calc(var(--spacing-unit) * 0.5);
}
/* Remove outer row padding for the 'Más...' row */
.init-row--more {
    padding: 0;
}
.init-row--brand .init-logo {
    flex: 0 0 auto;
}
.init-row--brand .init-text {
    text-align: center;
}
.init-row--brand .site-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}
/* Brand row: two columns (logo + text) on desktop/tablet, stacked rows on mobile */
.init-row--brand .init-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    /* Brand inner should look like a card similar to .init-btn */
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15,23,42,0.04);
    padding: calc(var(--spacing-unit) * 0.75);
}
.init-row--brand .init-logo {
    justify-self: end;
}
.init-row--brand .init-text {
    justify-self: start;
    text-align: left;
}
.init-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

/* Specific override: when the element has both .init-inner and .init-buttons
   ensure it renders as grid (higher specificity than .front-init .init-inner) */
.front-init .init-inner.init-buttons,
.front-init .init-row--nav .init-inner {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    align-items: stretch;
}

/* Front page: make the three main buttons appear as cards (grid layout) */
.front-init .init-buttons {
    align-items: stretch;
    justify-items: stretch;
}
.front-init .init-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 0.625rem;
    height: 70px; /* reduced height (half) */
    width: 100%;
    max-width: none;
    flex: none;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(15,23,42,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Styles for the 'Más...' button below latest posts */
.init-row--more .init-inner {
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 1);
    padding-bottom: calc(var(--spacing-unit) * 0.5);
    background: transparent;
}
.init-more-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}
.init-more-btn:hover {
    background: var(--color-primary-700);
}
.front-init .init-btn:hover,
.front-init .init-btn:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(15,23,42,0.08);
    background: color-mix(in srgb, var(--color-surface) 85%, var(--color-primary) 15%);
}
.front-init .init-btn:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 4px;
}

/* Ensure good contrast for link text when card backgrounds are used */
.front-init .init-btn {
    color: inherit;
}

/* Icon and label inside the card */
.init-btn__icon {
    display: inline-block;
    margin-right: 0.6rem;
    color: var(--color-primary);
    line-height: 0;
}
.init-btn__icon svg {
    width: 24px;
    height: 24px;
}
.init-btn__label {
    display: inline-block;
    font-size: 1.1rem;
    margin: 0;
}

/* Make the cards full-width on narrow screens and let height adapt */
@media (max-width: 768px) {
    .front-init .init-buttons {
        flex-direction: column;
        width: 100%;
    }
    .front-init .init-btn {
        max-width: none;
        flex: 1 1 auto;
        height: auto;
        padding: 0.45rem 0.5rem;
    }
    .init-btn__icon svg {
        width: 36px;
        height: 36px;
    }
}
.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.5rem;
    width: 100%;
}
.latest-card {
    display: flex;
    gap: 0.375rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.375rem;
    border-radius: var(--border-radius);
}
.latest-thumb img {
    width: 120px;
    height: auto;
    display: block;
    border-radius: 6px;
}
.latest-body .latest-title {
    margin: 0 0 0.25rem 0;
}
.latest-excerpt {
    color: var(--color-text-light);
}

/* Responsive adjustments for front page */
@media (max-width: 768px) {
    .front-init .init-inner {
        flex-direction: column;
        text-align: center;
    }

    .init-buttons {
        width: 100%;
    }

    .init-btn {
        width: 100%;
        display: inline-block;
    }

    /* Force buttons to stack into a single column on small screens (<=768px) */
    .front-init .init-buttons,
    .front-init .init-inner.init-buttons,
    .front-init .init-row--nav .init-inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
    /* On small screens let buttons wrap and use auto height */
    .front-init .init-btn {
        flex-direction: row;
        height: auto;
        padding: 0.45rem 0.5rem;
    }

    .latest-card {
        flex-direction: column;
        align-items: center;
    }

    .latest-thumb img {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .init-row--brand .site-title {
        font-size: 1.5rem;
    }

    .latest-grid {
        grid-template-columns: 1fr;
    }
    /* Mobile: brand row stacks into two rows */
    .init-row--brand .init-inner {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        text-align: center;
    }
    .init-row--brand .init-logo {
        justify-self: center;
    }
    .init-row--brand .init-text {
        justify-self: center;
        text-align: center;
    }

    /* Mobile: show buttons as single column (three rows) */
    .front-init .init-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .front-init .init-btn {
        height: auto;
        padding: 0.45rem 0.5rem;
    }
}

/* Labels color for contact and comment forms in dark mode */
[data-theme="dark"] .atareao-contact-form label,
[data-theme="dark"] .comment-form label {
    color: #f1f5f9;
}

/* Labels color for contact and comment forms in light mode */
[data-theme="light"] .atareao-contact-form label,
[data-theme="light"] .comment-form label {
    color: #1e293b;
}

/* Theme-switch transitions on the elements that actually paint the page */
body,
.site-header,
.nav-search-box,
article,
.site-footer {
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

/* Tipografía base */
body {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout principal */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────
   SITE HEADER
   ───────────────────────────────────────── */
.site-header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 0.625rem var(--spacing-unit);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Dark theme: make header background match the footer surface */
[data-theme="dark"] .site-header {
    background-color: var(--color-surface);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* ─── LEFT: branding ─── */
.site-branding {
    display: flex;
    align-items: center;
}

.site-branding-link {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.site-branding-link:hover .site-name-main {
    color: var(--color-primary);
}

.site-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

/* If WordPress custom logo is set it renders an <a> with an <img> inside */
.site-logo .custom-logo-link {
    display: block;
    line-height: 0;
}

.site-logo .custom-logo,
.site-logo-fallback svg {
    width: 40px;
    height: 40px;
    display: block;
}

.site-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    margin-left: 10px;
}

.site-name-main,
.site-name-sub {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--transition);
    letter-spacing: 0;
}

/* ─── RIGHT: navigation ─── */
.main-navigation {
    flex-shrink: 0;
}

.main-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

/* Shared look for links and search button */
.nav-link,
.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.6rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-label {
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.nav-link:hover,
.nav-btn:hover,
.nav-link.is-active {
    background-color: var(--color-primary);
    color: #fff;
}

.nav-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

/* ─── Search dropdown ─── */
.nav-item--search {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-search-box {
    left: 50% !important;
    right: auto !important;
    width: 90vw !important;
    min-width: 0 !important;
    max-width: 320px !important;
    transform: translateX(-50%) translateY(-6px) !important;
    position: absolute;
    top: calc(100% + 0.5rem);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

/* Show on hover of the search item (desktop) */
.nav-item--search:hover .nav-search-box,
.nav-item--search:focus-within .nav-search-box,
.nav-item--search.search-open .nav-search-box {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-search-box form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.25rem;
}

.nav-search-input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--border-radius) - 2px);
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    line-height: 1.4;
    outline: none;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition);
}

.nav-search-input:focus {
    border-color: var(--color-primary);
}

.nav-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    border-radius: calc(var(--border-radius) - 2px);
    color: #fff;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    transition: opacity var(--transition);
    flex-shrink: 0;
}

.nav-search-submit:hover {
    opacity: 0.85;
}

.nav-search-submit svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

/* ─── Theme toggle icon swap ─── */
/* Light mode → show moon, hide sun */
:root .theme-icon-light,
[data-theme="light"] .theme-icon-light {
    display: none;
}

:root .theme-icon-dark,
[data-theme="light"] .theme-icon-dark {
    display: flex;
}

/* Dark mode → show sun, hide moon */
[data-theme="dark"] .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: flex;
}

/* ─── Responsive: hide labels on mobile ─── */
@media (max-width: 599px) {
    .nav-label {
        display: none;
    }

    .nav-link,
    .nav-btn {
        padding: 0.45rem;
    }

    .nav-search-box {
        left: 50% !important;
        right: auto !important;
        width: 90vw !important;
        min-width: 0 !important;
        max-width: 320px !important;
        transform: translateX(-50%) translateY(-6px) !important;
    }
}

/* Contenido principal */
.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-unit);
}

/* Grid de posts */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 1.5);
}

/* Podcasts: 1 columna en móvil, 2 en tablet, 3 en escritorio */
.posts-grid-podcast {
    margin-left: auto;
    margin-right: auto;
}

.podcast-card[data-url] {
    cursor: pointer;
}

/* Cabecera del archivo de podcasts */
.post-type-archive-podcast .page-header,
.post-type-archive-tutorial .page-header,
.post-type-archive-aplicacion .page-header,
.post-type-archive-software .page-header,
.search-results .page-header,
.home .page-header,
.blog .page-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Remove border for intro box */
.search-results .archive-intro,
.home .archive-intro,
.blog .archive-intro {
    border-bottom: 1px solid var(--color-border);
    box-shadow: none;
    margin-bottom: 0;
}

.podcast-archive-intro,
.archive-intro {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 1);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.5);
}

.podcast-archive-intro p,
.archive-intro p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted, var(--color-text));
}

@media (max-width: 767px) {
    .podcast-archive-intro,
    .archive-intro {
        display: none;
    }

    .site-main {
        padding: var(--spacing-unit);
    }

    article {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Navegación de temporadas */
.page-navigation {
    max-width: 100%;
    margin: calc(var(--spacing-unit) * 1) auto;
    padding: calc(var(--spacing-unit) * 0.75);
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.5);
}

.page-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.page-col {
    display: flex;
    align-items: center;
}

.page-col-prev {
    justify-content: flex-start;
}

.page-col-center {
    justify-content: center;
    flex-direction: column;
    gap: 0.15rem;
}

.page-col-next {
    justify-content: flex-end;
}

.current-page {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    background: var(--color-background);
    border-radius: var(--border-radius);
    border: 2px solid var(--color-primary);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: background var(--transition), transform var(--transition);
}

.page-btn:hover {
    /* hover handled by unified utilities at end of file */
}

.page-btn.disabled {
    background: var(--color-border);
    color: var(--color-text-light);
    cursor: not-allowed;
    pointer-events: none;
}

.season-dropdown,
.page-dropdown {
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
    background: var(--color-background);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.season-dropdown:hover,
.season-dropdown:focus,
.page-dropdown:hover,
.page-dropdown:focus {
    background: var(--color-primary);
    color: white;
    outline: none;
}

.season-info {
    margin-top: 0.4rem;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    font-style: italic;
    text-align: center;
}

/* Artículos */
article {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.5);
    transition: transform var(--transition), box-shadow var(--transition);
}

article:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 28px rgba(0,0,0,0.7);
}

.entry-header {
    margin-bottom: var(--spacing-unit);
}

/* Entry header share buttons */
.entry-share {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.entry-share .share-label {
    font-size: 0.875rem;
    color: var(--color-text-light);
}
.entry-share .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.entry-share .share-btn:hover { transform: translateY(-2px); }
.entry-share .share-btn .social-icon img { width: 18px; height: 18px; }

/* Slight spacing on mobile */
@media (max-width: 599px) {
    .entry-share { gap: 0.4rem; }
}

.entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.entry-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.entry-title a:hover {
    color: var(--color-primary);
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--color-text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--color-text);
    word-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

/* Responsive embeds — iframes, YouTube, Vimeo, etc. */
.entry-content iframe,
.entry-content embed,
.entry-content object {
    max-width: 100%;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
}

.video-responsive iframe,
.video-responsive embed,
.video-responsive object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.entry-content p {
    margin-bottom: 1.25rem;
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color var(--transition);
}

.entry-content a:hover {
    color: var(--color-secondary, var(--color-primary-700));
}

.entry-content strong,
.entry-content b {
    font-weight: 700;
    color: var(--color-text);
}

.entry-content em,
.entry-content i {
    font-style: italic;
}

/* Headings inside content */
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content h5,
.entry-content h6 { font-size: 1rem; }

/* Lists */
.entry-content ul,
.entry-content ol {
    padding-left: 1.6rem;
    margin-bottom: 1.25rem;
}

.entry-content li {
    margin-bottom: 0.4rem;
    line-height: 1.75;
}

.entry-content ul li { list-style: disc; }
.entry-content ol li { list-style: decimal; }

/* Blockquote */
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-surface);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--color-text-light);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Horizontal rule */
.entry-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Bloques de código WordPress */
.wp-block-code,
pre[class*="language-"],
pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
    tab-size: 4;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-code code,
pre code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    white-space: inherit;
}

/* Inline code */
:not(pre) > code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    padding: 0.15em 0.4em;
    color: var(--color-text);
    word-break: break-word;
}

/* Imágenes responsive globales */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Miniaturas de posts */
.post-thumbnail {
    margin-bottom: var(--spacing-unit);
    overflow: hidden;
    border-radius: var(--border-radius);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-thumbnail a:hover img {
    transform: scale(1.05);
}

/* Alineaciones de imágenes de WordPress */
.alignleft {
    float: left;
    margin: 0 var(--spacing-unit) var(--spacing-unit) 0;
    max-width: 50%;
}

.alignright {
    float: right;
    margin: 0 0 var(--spacing-unit) var(--spacing-unit);
    max-width: 50%;
}

/* ========================================
   Layout especial para podcasts en archivo
   ======================================== */

.podcast-archive-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.podcast-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: visible;
    border-radius: var(--border-radius);
    position: relative;
}

.podcast-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform var(--transition);
    display: block;
}

.podcast-thumbnail a:hover img {
    transform: scale(1.05);
}

/* Badge sobre la imagen (solo visible ≤400px) */
.episode-number-overlay {
    display: none;
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.podcast-info {
    flex: 1;
    min-width: 0;
}

.podcast-info .entry-header {
    margin-bottom: 0;
}

.podcast-header-row {
    margin-bottom: 0;
}

.podcast-left-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.podcast-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: visible;
}

.podcast-title-row .entry-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podcast-title-row .toggle-player-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.podcast-date {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.episode-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
    line-height: 1;
}

.podcast-description {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
    width: 100%;
}

.podcast-description p {
    margin: 0;
}

.podcast-meta {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.podcast-meta .duration {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Botón para desplegar reproductor */
.toggle-player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), transform var(--transition);
}

.toggle-player-btn:hover {
    /* hover handled by unified utilities at end of file */
}

.toggle-player-btn:active {
    transform: translateY(0);
}

.toggle-player-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Reproductor en vista individual */
.podcast-player {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.podcast-player audio {
    display: block;
    width: 100%;
}

/* Contenedor del reproductor */
.podcast-player-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.podcast-player-wrapper {
    max-width: 100%;
}

.podcast-audio {
    display: block;
    width: 100%;
}

/* Controles simples del reproductor */
.simple-podcast-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.podcast-play-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.podcast-play-btn:hover {
    /* hover handled by unified utilities at end of file */
}

.podcast-play-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.podcast-play-btn[data-playing="true"] .dashicons-controls-play {
    display: none;
}

.podcast-play-btn[data-playing="true"]::after {
    content: '\f522';
    font-family: dashicons;
    font-size: 20px;
    line-height: 1;
}

.podcast-progress {
    flex: 1;
    min-width: 0;
}

.podcast-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.podcast-progress-bar:hover {
    height: 8px;
}

.podcast-progress-filled {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.1s linear;
}

.podcast-time-display {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    font-variant-numeric: tabular-nums;
    min-width: 85px;
}

/* Remover estilos de hover para podcasts en vista de archivo */
.podcast-archive-layout ~ .entry-content,
.podcast-archive-layout ~ .entry-footer {
    display: none;
}

/* Responsive para podcasts */
@media (max-width: 640px) {
    .posts-grid,
    .posts-grid-podcast {
        gap: 1rem;
        padding: 0;
    }
    
    article {
        padding: 1rem;
    }
    
    .podcast-archive-layout {
        gap: 0.75rem;
    }
    
    .podcast-thumbnail {
        width: 64px;
        height: 64px;
    }
    
    .podcast-thumbnail img {
        width: 64px;
        height: 64px;
    }
    
    .podcast-header-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .podcast-title-row {
        gap: 0.375rem;
    }
    
    .podcast-date {
        font-size: 0.75rem;
    }
    
    .episode-number {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
        min-width: 28px;
    }
    
    .podcast-title-row .entry-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .podcast-description {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .podcast-description p {
        margin: 0;
    }
    
    .podcast-meta {
        font-size: 0.75rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .toggle-player-btn {
        width: 32px;
        height: 32px;
    }
    
    .toggle-player-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .podcast-player-container {
        padding: 0.75rem;
    }
    
    .simple-podcast-controls {
        gap: 0.75rem;
    }
    
    .podcast-play-btn {
        width: 40px;
        height: 40px;
    }
    
    .podcast-play-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .podcast-time-display {
        font-size: 0.75rem;
        min-width: 75px;
    }
}

/* ========================================
   Navegación anterior / siguiente
   ======================================== */
.post-navigation {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.5);
    margin: calc(var(--spacing-unit) * 2) 0;
    overflow: hidden;
}

.post-navigation .nav-links {
    display: flex;
    gap: 0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.post-navigation .nav-previous {
    border-right: 1px solid var(--color-border);
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
    height: 100%;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.post-navigation .nav-next a {
    justify-content: flex-end;
    text-align: right;
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.post-navigation .nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    transition: background var(--transition), transform var(--transition);
}

.post-navigation .nav-previous a:hover .nav-arrow {
    background: var(--color-primary);
    transform: translateX(-3px);
}

.post-navigation .nav-next a:hover .nav-arrow {
    background: var(--color-primary);
    transform: translateX(3px);
}

.post-navigation .nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.post-navigation .nav-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    opacity: 0.8;
}

.post-navigation .nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-navigation .nav-title .chapter-number-badge {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-right: 0;
}

.post-navigation .nav-desc {
    font-size: 0.78rem;
    color: var(--color-text-light);
    opacity: 0.85;
    display: block;
    margin-top: 0.2rem;
}

@media (max-width: 767px) {
    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-previous {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .post-navigation .nav-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 400px) {
    article {
        padding: 0.75rem;
        border-radius: 0;
    }
    
    .site-main {
        padding: var(--spacing-unit);
    }
    
    /* Badge sobre la imagen, activo en este breakpoint */
    .episode-number-overlay {
        display: inline-flex;
    }
    
    /* Layout sigue siendo fila, thumbnail compacto */
    .podcast-archive-layout {
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .podcast-thumbnail {
        width: 64px;
        height: 64px;
    }
    
    .podcast-thumbnail img {
        width: 64px;
        height: 64px;
    }
    
    /* Título + botón en la misma fila */
    .podcast-title-row {
        flex-wrap: nowrap;
        gap: 0.375rem;
    }
    
    .podcast-title-row .entry-title {
        font-size: 0.9375rem;
        line-height: 1.35;
    }
    
    .podcast-date {
        font-size: 0.6875rem;
    }
    
    .toggle-player-btn {
        width: 30px;
        height: 30px;
    }
    
    .toggle-player-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .podcast-description {
        font-size: 0.8125rem;
    }
    
    .podcast-meta {
        font-size: 0.6875rem;
        gap: 0.5rem;
    }
    
    .simple-podcast-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .podcast-play-btn {
        width: 36px;
        height: 36px;
    }
    
    .podcast-time-display {
        font-size: 0.6875rem;
        min-width: 60px;
    }
    
    .page-navigation {
        padding: 0.75rem;
    }
    
    .page-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .season-dropdown,
    .page-dropdown {
        font-size: 0.875rem;
        max-width: 130px;
    }
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-unit);
}

.alignfull,
.alignwide {
    max-width: 100%;
}

/* WordPress galleries */
.wp-block-gallery,
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-unit);
}

.wp-block-gallery img,
.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Picture element support */
picture {
    display: block;
}

picture img {
    width: 100%;
    height: auto;
}

/* Figuras con caption */
figure {
    margin: 0 0 var(--spacing-unit) 0;
}

figcaption {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* Avatar images */
.avatar {
    border-radius: 50%;
    vertical-align: middle;
}

.entry-footer {
    margin-top: var(--spacing-unit);
    padding-top: calc(var(--spacing-unit) * 1);
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
}

/* Taxonomías */
.post-categories,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.post-categories a,
.post-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-background);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.post-categories a:hover,
.post-tags a:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Botones */
.btn,
.more-link,
.wp-block-button__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover,
.more-link:hover,
.wp-block-button__link:hover {
    /* hover handled by unified utilities at end of file */
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: calc(var(--spacing-unit) * 2);
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.pagination a:hover,
.pagination .current {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Footer */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-unit);
    margin-top: calc(var(--spacing-unit) * 1);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Footer layout: three columns on desktop/tablet, stacked on mobile */
.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}
.footer-flex {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: calc(var(--spacing-unit) * 1);
}
.footer-col {
    flex: 1 1 0;
}
.footer-col h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li {
    margin: 0.25rem 0;
}
.footer-links a {
    color: var(--color-text-light);
}

/* Keep icon and label on a single line */
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Make each list item appear on its own row */
.footer-links li {
    display: block;
    margin: 0.25rem 0;
}

/* size nav-style icons used in footer (podcast icon) */
.footer-links a .nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.footer-links a .nav-icon svg {
    width: 18px;
    height: 18px;
}

.footer-links a .social-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.footer-links a .social-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}
.footer-links a .social-label {
.micro-icon {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
}
.micro-icon svg {
    width: 12px;
    height: 12px;
    display: block;
    fill: currentColor;
}
    vertical-align: middle;
}
/* Ensure external SVG images display nicely */
.social-icon svg {
    width: 18px;
    height: 18px;
    display: inline-block;
    object-fit: contain;
}
.social-icon.cc>svg{
    width: 48px;
    height: 24px;
}

.svg-icon {
    display: inline-block;
  width: 24px;   /* Se ajusta al tamaño del texto */
  height: 24px;
  fill: currentColor; /* El icono tomará el color del texto que lo rodea */
  vertical-align: middle;
}

[data-theme="dark"] .social-icon svg{
    filter: brightness(0) invert(1);
}

/* Small screens: stack columns */
@media (max-width: 767px) {
    .footer-flex {
        display: block;
    }
    .footer-col {
        margin-bottom: calc(var(--spacing-unit) * 1);
    }
}

/* Creative Commons icon in footer: constrain to sensible maximum */
.footer-logo-license .icon-cc-by,
.footer-logo-license img {
    max-width: 100px;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* Responsive - Tablet */
@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Podcasts: 2 columnas en tablet */
    .posts-grid-podcast {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-header-inner {
        flex-wrap: nowrap;
    }
    
    .main-navigation {
        width: auto;
    }
    
    .entry-title {
        font-size: 1.75rem;
    }
    
    /* Imágenes alineadas en tablets */
    .alignleft {
        max-width: 40%;
    }
    
    .alignright {
        max-width: 40%;
    }
    
    /* Gallery más columnas */
    .wp-block-gallery,
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Podcasts: 2 columnas en escritorio (mismo layout que tablet) */
    .posts-grid-podcast {
        grid-template-columns: repeat(2, 1fr);
    }

    .entry-title {
        font-size: 2rem;
    }
    
    /* Imágenes alineadas en desktop */
    .alignleft {
        max-width: 35%;
    }
    
    .alignright {
        max-width: 35%;
    }
    
    /* Gallery en desktop */
    .wp-block-gallery,
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Utilidades */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

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

/* Accesibilidad */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--color-primary-700);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Modo oscuro — gestionado por [data-theme="dark"] + JS toggle */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-text: #f1f5f9;
        --color-text-light: #cbd5e1;
        --color-background: #151617;
        --color-surface: #1d1f21;
        --color-border: #334155;
    }
}

/* ==========================================================================
   Comentarios
   ========================================================================== */

.comments-area {
    margin-top: calc(var(--spacing-unit) * 2);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.5);
    padding: calc(var(--spacing-unit) * 1.5);
}

.comments-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

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

.comment-list .comment {
    margin-bottom: 0;
    padding: 0.75rem 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
}

.comment-list .comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-list .children {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 0;
}

.comment-body {
    position: relative;
}

.comment-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Avatar wrapper: real gravatar layered over initials circle */
.comment-avatar-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.comment-avatar-initials {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    user-select: none;
}

.comment-avatar-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Name + date stacked vertically */
.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.comment-author .fn {
    font-style: normal;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
}

.comment-author a {
    color: var(--color-primary);
    text-decoration: none;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-metadata {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--color-text-light);
    line-height: 1.2;
}

.comment-metadata a {
    color: var(--color-text-light);
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--color-primary);
}

.comment-metadata time {
    font-style: italic;
}

.edit-link {
    margin-left: 0.4rem;
}

.comment-awaiting-moderation {
    padding: 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-size: 0.875rem;
}

.comment-content {
    margin: 0.3rem 0 0.4rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.comment-content p {
    margin-bottom: 0.4rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 0.3rem;
}

.reply a {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: transparent;
    color: var(--color-primary);
    text-decoration: none;
    border: 1px solid var(--color-primary);
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.reply a:hover {
    background: var(--color-secondary);
}

/* Navegación de comentarios */
.comment-navigation {
    margin: 2rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.comment-navigation a {
    padding: 0.75rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
}

.comment-navigation a:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.no-comments {
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
}

/* Formulario de comentarios */
.comment-respond {
    margin-top: calc(var(--spacing-unit) * 1);
    padding-top: calc(var(--spacing-unit) * 1);
    border-top: 1px solid var(--color-border);
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form-author  { order: 1; }
.comment-form-comment { order: 2; }
.comment-form .form-submit { order: 3; }

/* Ensure captcha appears after the comment textarea and before the submit button */
.comment-form .comment-form-captcha { order: 2; }
/* Spacing adjustments between comment textarea, captcha and submit */
.comment-form-comment {
    margin-bottom: 0.75rem; /* space after comment textarea */
}
.comment-form .comment-form-captcha {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.comment-form p {
    margin-bottom: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.comment-form .required {
    color: #dc2626;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-background);
    transition: var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* Override captcha input styles to match other inputs (placed after .comment-form rules) */
.comment-form #atareao_comment_captcha,
.comment-form .comment-form-captcha input {
    width: auto;
    min-width: 6.5rem;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-background);
    color: var(--color-text);
    box-shadow: none;
}
.comment-form #atareao_comment_captcha:focus,
.comment-form .comment-form-captcha input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.comment-form .submit,
.comment-form button[type="submit"] {
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.comment-form .submit:hover,
.comment-form button[type="submit"]:hover {
    /* hover handled by unified utilities at end of file */
}

.comment-form .submit:active,
.comment-form button[type="submit"]:active {
    transform: translateY(1px);
}

/* Cancel reply button styling to match responder link/button color */
#atareao-cancel-reply {
    padding: 5px;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.5rem;
}

#atareao-cancel-reply:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Comentarios anidados */
.comment-list .children .comment {
    background: transparent;
    border-bottom: 1px solid var(--color-border);
}

.comment-list .children .comment:last-child {
    border-bottom: none;
}

/* Responsive para comentarios */
@media (max-width: 768px) {
    .comment-list .children {
        margin-left: 1rem;
    }
    
    .comments-area {
        margin-top: calc(var(--spacing-unit) * 1);
        padding: var(--spacing-unit);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .comment-respond {
        border-radius: 0;
    }
    
    .comments-title {
        font-size: 1.5rem;
    }
    
    .comment-meta {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .comment-navigation {
        flex-direction: column;
    }
    
    .comment-navigation a {
        text-align: center;
    }
    
    /* Navegación de temporadas responsive */
    .page-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .page-controls {
        gap: 0.5rem;
    }
    
    .page-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .current-page {
        text-align: center;
    }
    
    .season-dropdown,
    .page-dropdown {
        max-width: 160px;
    }
}

/* ========================================
   Estilos de código (Terminal Ubuntu)
   ======================================== */

/* Código inline */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: #f1f5f9;
    color: #c7254e;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

/* Bloques de código - Estilo terminal Ubuntu */
pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    background: #300a24; /* Morado oscuro de Ubuntu */
    color: #ffffff;
    padding: calc(32px + 0.75rem) 1.5rem 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid #1a0510;
}

/* Efecto de barra de título de terminal */
pre::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(to bottom, #3c0a2a, #2a0820);
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid #1a0510;
}

/* Botones de terminal (decorativos) */
pre::after {
    content: '';
    display: block;
    position: absolute;
    top: 12px;
    left: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ee5f57;
    box-shadow: 
        20px 0 0 #f5bd4f,
        40px 0 0 #61c554;
}

/* Código dentro de pre */
pre code {
    display: block;
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
    margin-top: 0;
    overflow-x: auto;
}

/* Scrollbar personalizado para bloques de código */
pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Sintaxis básica de colores para terminal */
pre code .comment {
    color: #78b9e6;
    font-style: italic;
}

pre code .keyword,
pre code .command {
    color: #78e08f;
    font-weight: bold;
}

pre code .string {
    color: #f3a683;
}

pre code .number {
    color: #e77f67;
}

pre code .operator {
    color: #f5cd79;
}

/* Prompt de terminal (si se usa) */
pre code .prompt {
    color: #78e08f;
    font-weight: bold;
}

pre code .prompt::before {
    content: '$ ';
    color: #78e08f;
}

/* Responsive */
@media (max-width: 768px) {
    pre {
        padding: 1rem;
        font-size: 0.8125rem;
        margin: 1rem -1rem; /* Sangría negativa en móvil */
        border-radius: 0;
    }
    
    pre::before {
        height: 28px;
    }
    
    pre::after {
        top: 10px;
        left: 10px;
        width: 10px;
        height: 10px;
        box-shadow: 
            16px 0 0 #f5bd4f,
            32px 0 0 #61c554;
    }
    
    pre code {
        margin-top: 28px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    code {
        background: #1e293b;
        color: #f472b6;
        border-color: #334155;
    }
    
    /* Pre ya tiene colores oscuros, solo ajustar ligeramente */
    pre {
        background: #1a0510;
        border-color: #0a0005;
    }
    
    pre::before {
        background: linear-gradient(to bottom, #2a0820, #1a0510);
    }
}

/* ========================================
   Botón flotante "Volver arriba"
   ======================================= */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    /* hover handled by unified utilities at end of file */
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ==================================================
   Utilities & Simplifications (unify primary actions)
   - Consolidate button/link hover/focus into single place
   - Improve focus styles and respect reduced-motion
   ================================================== */

/* Unified primary action look (keeps existing visual design) */
.btn,
.more-link,
.wp-block-button__link,
.page-btn,
.toggle-player-btn,
.podcast-play-btn,
.comment-form .submit,
.comment-form button[type="submit"],
.back-to-top {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover,
.more-link:hover,
.wp-block-button__link:hover,
.page-btn:hover,
.toggle-player-btn:hover,
.podcast-play-btn:hover,
.comment-form .submit:hover,
.comment-form button[type="submit"]:hover,
.back-to-top:hover {
    background: var(--color-primary-700);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--focus-ring);
}

/* Keep focus visible and accessible */
.btn:focus,
.more-link:focus,
.wp-block-button__link:focus,
.page-btn:focus,
.toggle-player-btn:focus,
.podcast-play-btn:focus,
.comment-form .submit:focus,
.comment-form button[type="submit"]:focus,
.back-to-top:focus {
    outline: 2px solid var(--color-primary-700);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--focus-ring);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .more-link,
    .wp-block-button__link,
    .page-btn,
    .toggle-player-btn,
    .podcast-play-btn,
    .comment-form .submit,
    .comment-form button[type="submit"],
    .back-to-top {
        transition: none !important;
    }
}


.back-to-top .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    
    .back-to-top .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}
