/*
Theme Name: WarezDL
Theme URI: https://wptheme.site/
Author: Jach
Author URI: https://wptheme.site/
Description: Tema para warez con diseño oscuro moderno, perfecto para sitios de descargas, entretenimiento, anime, series de TV y películas.
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: warezdl
Tags: entertainment, downloads, anime, movies, tv-shows, dark-theme, warez
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --card-bg: #1e1e1e;
    --accent-color: #e50914;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333;
    --hover-color: #2a2a2a;
}

html {
    width: 100%;
    overflow-x: hidden;
    min-height: 100%;
    background-color: #0a0a0a;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Ajuste del padding cuando hay admin bar */
body.admin-bar {
    padding-top: 112px;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 126px;
    }
}

body.menu-open,
body.search-open {
    overflow: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header Styles */
.site-header {
    background-color: var(--secondary-bg);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    border-bottom: 2px solid var(--accent-color);
}

/* Ajustes para cuando el usuario está logueado (admin bar) */
.admin-bar .site-header {
    top: 32px;
}

/* Admin bar en móvil (WordPress usa 46px en móvil) */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.site-branding {
    order: 1;
}

.main-navigation {
    order: 3;
    display: flex;
    margin-left: auto;
    margin-right: 0.5rem;
}

.header-search {
    order: 4;
    margin-left: 0;
}

.theme-toggle {
    order: 5;
    margin-left: 0.25rem;
}

.menu-toggle {
    order: 0;
    margin-right: 0.75rem;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background-color: var(--accent-color);
    color: var(--text-primary);
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.5rem;
    min-width: 200px;
}

.main-navigation li:hover .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 0.75rem 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 10000;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 4px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Header Search */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 0;
}


.search-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 201;
}

.search-toggle:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.search-toggle svg {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.search-toggle:hover svg {
    transform: rotate(90deg);
}

.search-toggle .search-icon {
    display: block;
}

.search-toggle .close-icon {
    display: none;
    position: absolute;
}

.header-search.search-active .search-toggle .search-icon {
    display: none;
}

.header-search.search-active .search-toggle .close-icon {
    display: block;
}

.search-form-container {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.search-form-container.active {
    opacity: 1;
    visibility: visible;
}

/* Botón de cerrar */
.search-form-container::before {
    content: '✕';
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.search-form-container::before:hover {
    background-color: var(--accent-color);
    transform: rotate(90deg);
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    width: 100%;
    max-width: 700px;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.search-form:focus-within {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.3);
}

.search-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: #fff;
    font-size: 1.5rem;
    outline: none;
}

.search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit {
    display: none;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 201;
}

.theme-toggle:hover {
    background-color: var(--accent-color);
    transform: scale(1.1) rotate(20deg);
}

.theme-toggle svg {
    transition: all 0.3s ease;
    position: absolute;
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.light-mode .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body.light-mode .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Light Mode Colors */
body.light-mode {
    --primary-bg: #f8f9fa;
    --secondary-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --accent-color: #e50914;
}

body.light-mode .site-header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-mode .slider-card-link,
body.light-mode .content-card,
body.light-mode .sidebar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .slider-card-link:hover,
body.light-mode .content-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.light-mode .search-field::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-mode .slider-card-image::before {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%);
}

body.light-mode .slider-card-link:hover .slider-card-image::before {
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.2));
}

body.light-mode .slider-nav-btn {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    color: #212529;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.light-mode .slider-nav-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

body.light-mode .slider-nav-btn:disabled {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.3);
}

body.light-mode .view-all-btn {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .view-all-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

body.light-mode .main-navigation a {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

body.light-mode .main-navigation a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

/* Light Mode Mobile Menu */
@media (max-width: 768px) {
    body.light-mode .main-navigation {
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    body.light-mode .main-navigation a {
        color: #212529;
        background-color: transparent;
        border: none;
        border-radius: 0;
    }
    
    body.light-mode .main-navigation a:hover {
        background-color: rgba(229, 9, 20, 0.1);
        color: var(--accent-color);
    }
    
    body.light-mode .main-navigation::before {
        background-color: rgba(0, 0, 0, 0.5);
    }
}

/* Hero Slider Light Mode */
body.light-mode .slider-card-title {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.95);
}

body.light-mode .slider-card-excerpt {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Sidebar Widgets Light Mode */
body.light-mode .sidebar {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

body.light-mode .sidebar h3 {
    color: #212529;
    border-bottom-color: #e0e0e0;
}

body.light-mode .sidebar-widget .content-card {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
}

body.light-mode .sidebar-widget .content-card:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

/* Hero Slider Carousel */
.hero-slider-carousel {
    margin-top: calc(80px + 2rem);
    margin-bottom: 2rem;
}

/* Sin margen extra cuando hay admin bar */
body.admin-bar .hero-slider-carousel {
    margin-top: 2rem;
}

.slider-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    box-sizing: border-box;
}

.slider-wrapper {
    overflow: hidden;
    position: relative;
    margin: 0;
}

.slider-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease-in-out;
}

.slider-card {
    flex: 0 0 calc(14.285% - 0.857rem);
    min-width: 0;
}

.slider-card-link {
    display: block;
    position: relative;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.slider-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.slider-card-image {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
    background-color: var(--secondary-bg);
}

.slider-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    z-index: 1;
    transition: background 0.3s ease;
}

.slider-card-link:hover .slider-card-image::before {
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
}

.slider-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--secondary-bg);
}

.slider-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1rem;
    z-index: 2;
    text-align: left;
}

.slider-card-title {
    font-size: 1.05rem;
    font-weight: 400;
    margin: 0;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.slider-card-excerpt {
    display: none;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.slider-nav-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.15);
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-nav-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
    background-color: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 2rem;
}

.next-btn {
    right: 2rem;
}

/* Main Content */
.site-main {
    width: 100%;
    margin: 0 auto;
}

.site-content {
    width: 100%;
}

.content-section {
    margin-bottom: 4rem;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 400;
}

.category-description {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.search-results-count {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Mobile Category/Archive Description */
@media (max-width: 768px) {
    .category-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .search-results-count {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .category-description {
        font-size: 0.85rem;
    }
    
    .search-results-count {
        font-size: 0.8rem;
    }
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    margin: 0 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.no-results .search-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Mobile No Results */
@media (max-width: 768px) {
    .no-results {
        padding: 2rem 1.5rem;
        margin: 0 0.75rem;
        border-radius: 6px;
    }
    
    .no-results h3 {
        font-size: 1.3rem;
    }
    
    .no-results p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .no-results {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
    
    .no-results h3 {
        font-size: 1.1rem;
    }
    
    .no-results p {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
}

.view-all-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-all-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.card-image {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.25rem;
    text-align: center;
}

.card-title {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.genre-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-primary);
}

/* Sidebar */
.sidebar {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 90px;
}

/* Ajuste del sidebar cuando hay admin bar */
.admin-bar .sidebar {
    top: 122px;
}

@media screen and (max-width: 782px) {
    .admin-bar .sidebar {
        top: 136px;
    }
}

.sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.recent-posts-list {
    list-style: none;
}

.recent-post-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item:hover {
    padding-left: 0.5rem;
}

.recent-post-item a {
    display: block;
    color: var(--text-primary);
}

.recent-post-item .post-title {
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.recent-post-item .post-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sidebar Widgets */
.sidebar-widget {
    margin-bottom: 2.5rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

/* Widget Grids - Use content-card styles */
.recent-posts-grid,
.category-posts-grid,
.popular-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Widget content-card adjustments for sidebar */
.sidebar-widget .content-card {
    background-color: var(--card-bg);
}

.sidebar-widget .card-title {
    font-size: 0.85rem;
}

.sidebar-widget .card-content {
    padding: 0.75rem;
}

/* Custom Categories and Tags Widgets */
.custom-categories-widget,
.custom-tags-widget {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
}

.categories-list,
.tags-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.category-item,
.tag-item {
    border-bottom: 1px solid var(--border-color);
}

.category-item:nth-last-child(-n+2),
.tag-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.category-link,
.tag-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-link:hover,
.tag-link:hover {
    color: var(--accent-color);
    padding-left: 0.75rem;
}

.category-icon,
.tag-icon {
    color: var(--accent-color);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.category-link:hover .category-icon,
.tag-link:hover .tag-icon {
    transform: translateX(3px);
}

.category-name,
.tag-name {
    flex: 1;
}

.category-count,
.tag-count {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: auto;
}

/* Light Mode Styles */
body.light-mode .custom-categories-widget,
body.light-mode .custom-tags-widget {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
}

body.light-mode .category-item,
body.light-mode .tag-item {
    border-bottom-color: #e0e0e0;
}

body.light-mode .category-link,
body.light-mode .tag-link {
    color: #1a1a1a;
}

body.light-mode .category-link:hover,
body.light-mode .tag-link:hover {
    color: var(--accent-color);
    background-color: rgba(229, 9, 20, 0.05);
}

body.light-mode .category-count,
body.light-mode .tag-count {
    color: #666666;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-list,
    .tags-list {
        grid-template-columns: 1fr;
    }
    
    .category-item,
    .tag-item {
        border-bottom: 1px solid var(--border-color);
    }
    
    .category-item:last-child,
    .tag-item:last-child {
        border-bottom: none;
    }
}


/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 3rem auto 0;
    padding: 0 2rem 4rem;
    box-sizing: border-box;
}

/* Ad Containers */
.sidebar-ad {
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar-ad iframe,
.sidebar-ad ins,
.sidebar-ad > div {
    max-width: 100%;
    margin: 0 auto;
    display: inline-block;
}

.post-ad-container {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
}

.post-ad-container.ad-before-content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.post-ad-container iframe,
.post-ad-container ins,
.post-ad-container > div {
    margin: 0 auto;
    max-width: 100%;
    display: inline-block;
}

.ad-before-content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.ad-after-content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-ad-container {
    margin: 3rem auto;
    text-align: center;
    max-width: 100%;
}

.section-ad-container iframe,
.section-ad-container ins,
.section-ad-container > div {
    margin: 0 auto;
    max-width: 100%;
    display: inline-block;
}

.comment-ad-container {
    margin: 2rem auto;
    text-align: center;
    list-style: none;
}

.comment-ad-container iframe,
.comment-ad-container ins,
.comment-ad-container > div {
    margin: 0 auto;
    max-width: 100%;
    display: inline-block;
}

/* Responsive ads */
@media (max-width: 768px) {
    .sidebar-ad iframe,
    .sidebar-ad ins,
    .post-ad-container iframe,
    .post-ad-container ins,
    .section-ad-container iframe,
    .section-ad-container ins,
    .comment-ad-container iframe,
    .comment-ad-container ins {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Footer */
.site-footer {
    background-color: var(--secondary-bg);
    border-top: 2px solid var(--accent-color);
    padding: 3rem 0 1.5rem;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Cuando hay menú de footer, usar layout horizontal */
.footer-content:has(.footer-navigation) {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Alinear copyright a la izquierda cuando hay menú */
.footer-content:has(.footer-navigation) p {
    text-align: left;
}

/* Footer Navigation */
.footer-navigation {
    display: flex;
    align-items: center;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .content-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .slider-card {
        flex: 0 0 calc(20% - 0.8rem);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 4rem;
    }
    
    .sidebar {
        position: static;
    }
    
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .slider-card {
        flex: 0 0 calc(33.333% - 0.67rem);
    }
    
    .slider-card-title {
        font-size: 0.95rem;
    }
    
    .prev-btn {
        left: 1rem;
    }
    
    .next-btn {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Header and Navigation */
    .site-header {
        position: static;
        top: auto;
    }
    
    body.admin-bar .site-header {
        position: static;
        top: auto;
    }
    
    .site-main {
        margin-top: 0;
    }
    
    body.admin-bar .site-main {
        margin-top: 0;
    }
    
    body,
    body.admin-bar {
        padding-top: 0;
    }
    
    .header-container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .site-header {
        position: relative;
    }
    
    .main-navigation {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 0;
        background: linear-gradient(180deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
        opacity: 0;
    }
    
    body:not(.admin-bar) .main-navigation {
        top: 60px;
    }
    
    body.admin-bar .main-navigation {
        top: 106px;
    }
    
    .main-navigation.active {
        max-height: 500px;
        opacity: 1;
        overflow-y: auto;
    }
    
    /* Overlay cuando el menú está abierto */
    .main-navigation::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        backdrop-filter: blur(4px);
        z-index: -1;
    }
    
    .main-navigation.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 1.25rem 2rem;
        border-bottom: 1px solid transparent;
        border-radius: 0;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .main-navigation a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background-color: var(--accent-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .main-navigation a:hover::before,
    .main-navigation a.current-menu-item::before {
        transform: scaleY(1);
    }
    
    .main-navigation a:hover {
        background-color: rgba(229, 9, 20, 0.1);
        padding-left: 2.5rem;
        color: var(--accent-color);
    }
    
    .main-navigation li {
        opacity: 0;
        transform: translateY(-10px);
    }
    
    .main-navigation.active li {
        animation: slideDownMenu 0.4s ease forwards;
    }
    
    .main-navigation.active li:nth-child(1) { animation-delay: 0.1s; }
    .main-navigation.active li:nth-child(2) { animation-delay: 0.15s; }
    .main-navigation.active li:nth-child(3) { animation-delay: 0.2s; }
    .main-navigation.active li:nth-child(4) { animation-delay: 0.25s; }
    .main-navigation.active li:nth-child(5) { animation-delay: 0.3s; }
    .main-navigation.active li:nth-child(6) { animation-delay: 0.35s; }
    
    @keyframes slideDownMenu {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .site-logo {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    
    .menu-toggle {
        margin-right: 0.5rem;
    }
    
    .header-search {
        margin-left: auto;
        margin-right: 0.25rem;
    }
    
    .theme-toggle {
        margin-left: 0.25rem;
    }
    
    .search-toggle,
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    
    .search-toggle svg,
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .search-form-container {
        padding: 1rem;
    }
    
    .search-form-container::before {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .search-form {
        max-width: 100%;
        padding: 0.75rem 1.5rem;
        border-radius: 40px;
    }
    
    .search-field {
        font-size: 1.2rem;
        padding: 0.5rem;
    }
    
    /* Sidebar Widgets - 2 columns on mobile */
    .sidebar .recent-posts-grid,
    .sidebar .category-posts-grid,
    .sidebar .popular-posts-grid,
    .recent-posts-grid,
    .category-posts-grid,
    .popular-posts-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
        width: 100%;
    }
    
    .sidebar {
        padding: 1.5rem;
        position: static;
        top: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Force sidebar widgets to use 2 column grid */
    .sidebar .sidebar-widget {
        width: 100%;
    }
    
    .sidebar .recent-posts-grid .content-card,
    .sidebar .category-posts-grid .content-card,
    .sidebar .popular-posts-grid .content-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    
    .sidebar-widget {
        margin-bottom: 2rem;
    }
    
    .sidebar-widget .card-title {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .sidebar-widget .card-content {
        padding: 0.5rem;
    }
    
    /* Hero Slider */
    .slider-container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .slider-card-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .slider-card-content {
        padding: 1rem 0.75rem;
    }
    
    .slider-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .prev-btn {
        left: 0.5rem;
    }
    
    .next-btn {
        right: 0.5rem;
    }
    
    /* Content Sections */
    .content-section {
        padding: 0 1rem;
        margin-bottom: 3rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        flex: 1;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .view-all-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    /* Content Grid - 3 columns on mobile */
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .content-card {
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
    }
    
    .card-content {
        padding: 0.75rem 0.5rem;
    }
    
    .card-title {
        font-size: 0.85rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    /* Two Column Layout */
    .two-column-layout {
        gap: 2rem;
        padding: 0 0 2rem;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Footer */
    .site-footer {
        padding: 2rem 0 1rem;
        margin-bottom: 0 !important;
        width: 100%;
    }
    
    .footer-content {
        padding: 0 1rem;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content:has(.footer-navigation) {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-content:has(.footer-navigation) p {
        text-align: center;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    /* Header */
    .header-container {
        padding: 0 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    .site-logo {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    .search-toggle,
    .theme-toggle {
        width: 28px;
        height: 28px;
    }
    
    .search-toggle svg,
    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }
    
    /* Content */
    .site-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .content-section {
        padding: 0 0.75rem;
        margin-bottom: 2.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .section-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
        line-height: 1.2;
        margin: 0;
    }
    
    .view-all-btn {
        padding: 0.35rem 0.85rem;
        font-size: 0.8rem;
    }
    
    /* Hero Slider */
    .hero-slider-carousel {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .slider-container {
        padding: 0 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    .slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .slider-card-title {
        font-size: 0.85rem;
    }
    
    .slider-card-content {
        padding: 0.75rem 0.5rem;
    }
    
    .slider-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    .prev-btn {
        left: 0.25rem;
    }
    
    .next-btn {
        right: 0.25rem;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }
    
    /* Content Grid - 2 columns on very small screens */
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .content-card {
        border-radius: 4px;
        width: 100%;
        max-width: 100%;
    }
    
    .card-content {
        padding: 0.5rem 0.35rem;
    }
    
    .card-title {
        font-size: 0.75rem;
        line-height: 1.25;
    }
    
    /* Sidebar Widgets - 2 columns maintained */
    .sidebar {
        padding: 1rem;
    }
    
    .sidebar h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1.5rem;
    }
    
    .sidebar .recent-posts-grid,
    .sidebar .category-posts-grid,
    .sidebar .popular-posts-grid,
    .recent-posts-grid,
    .category-posts-grid,
    .popular-posts-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
        width: 100%;
    }
    
    .sidebar .recent-posts-grid .content-card,
    .sidebar .category-posts-grid .content-card,
    .sidebar .popular-posts-grid .content-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    
    .sidebar-widget .card-title {
        font-size: 0.75rem;
    }
    
    .sidebar-widget .card-content {
        padding: 0.4rem;
    }
    
    /* Two Column Layout */
    .two-column-layout {
        gap: 1.5rem;
        padding: 0 0 1.5rem;
        margin-bottom: 0;
    }
    
    /* Footer */
    .site-footer {
        padding: 1.5rem 0 1rem;
        margin-bottom: 0 !important;
    }
    
    .footer-content {
        padding: 0 0.75rem;
        margin-bottom: 0;
    }
    
    .footer-content p {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
}

/* Single Post Styles */
.single-post {
    max-width: none;
    width: 100%;
    margin: 0;
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
}

.single-post .post-thumbnail {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.single-post .entry-header {
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.single-post .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.single-post .post-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single-post .entry-content {
    padding: 2rem;
    line-height: 1.8;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post .entry-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.single-post .entry-footer {
    padding: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Old single post styles - kept for compatibility but overridden by new styles */

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-navigation a {
    display: block;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    background-color: var(--hover-color);
    transform: translateY(-4px);
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    display: block;
    font-weight: 400;
    font-size: 1.1rem;
}

/* 404 Error Page */
.error-404-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.error-404-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.error-404-hero {
    text-align: center;
    padding: 2rem 0;
}

.error-404-title {
    font-size: 10rem;
    font-weight: 400;
    color: var(--accent-color);
    margin: 0;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
}

.error-404-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.error-404-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.error-404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 400;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.error-404-btn.primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.error-404-btn.primary:hover {
    background-color: #c40812;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.error-404-btn.secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.error-404-btn.secondary:hover {
    background-color: var(--secondary-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.error-404-search {
    max-width: 500px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.error-404-search.active {
    max-height: 200px;
    opacity: 1;
    margin-top: 2rem;
}

.error-404-search h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .error-404-title {
        font-size: 6rem;
    }
    
    .error-404-subtitle {
        font-size: 1.5rem;
    }
    
    .error-404-text {
        font-size: 1rem;
    }
    
    .error-404-actions {
        flex-direction: column;
    }
    
    .error-404-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Single Post */
.single-post-main,
.single-post-main.site-main,
main.single-post-main {
    width: 100% !important;
    max-width: none !important;
    background-color: var(--primary-bg);
    padding: 0 !important;
    margin: 0 !important;
}

.single-post-article,
article.single-post-article,
.single-post-article.post,
.single-post-article.type-post {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Post Header */
.single-post-header {
    width: 100%;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 3rem;
}

.single-post-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    box-sizing: border-box;
}

.single-post-featured-image {
    flex-shrink: 0;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.single-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-header-info {
    flex: 1;
    padding-top: 1rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.post-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.post-date svg {
    color: var(--accent-color);
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--accent-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-badge:hover {
    background-color: #c40812;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

/* Post Content */
.single-post-content-wrapper {
    width: 100%;
}

.single-post-content {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.single-post-content ul,
.single-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.single-post-content li {
    margin-bottom: 0.75rem;
}

.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.page-links-title {
    font-weight: 400;
    margin-right: 0.5rem;
}

.page-links span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-bg);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.page-links span:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Post Tags Section */
.single-post-tags-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.single-post-tags-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #ff6b6b, var(--accent-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tags-section-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tags-section-title svg {
    color: var(--accent-color);
    animation: tagIconPulse 2s ease-in-out infinite;
}

@keyframes tagIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.post-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.post-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.post-tag:hover::before {
    left: 100%;
}

.post-tag:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c70812 100%);
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.6), 0 0 20px rgba(229, 9, 20, 0.3);
}

.tag-icon {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.post-tag:hover .tag-icon {
    color: #ffffff;
    transform: rotate(360deg);
}

.tag-name {
    transition: all 0.3s ease;
}

.tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: var(--secondary-bg);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.post-tag:hover .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.1);
}

/* Light Mode Adjustments for Tags */
body.light-mode .single-post-tags-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-color: #e0e0e0;
}

body.light-mode .post-tag {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .post-tag:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
}

body.light-mode .tag-icon {
    color: var(--accent-color);
}

body.light-mode .post-tag:hover .tag-icon {
    color: #ffffff;
}

body.light-mode .tag-name {
    color: #212529;
}

body.light-mode .post-tag:hover .tag-name {
    color: #ffffff;
}

body.light-mode .tag-count {
    background: #f0f0f0;
    color: #666;
}

body.light-mode .post-tag:hover .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.light-mode .related-posts-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Related Posts Section */
.related-posts-section {
    margin-bottom: 3rem;
    width: 100%;
    overflow: visible;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Related Posts Slider */
.related-slider-container {
    position: relative;
    padding: 0;
}

.related-slider-wrapper {
    overflow: hidden;
    position: relative;
    margin: 0;
}

.related-slider-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease-in-out;
}

.related-slider-container .slider-card {
    flex: 0 0 calc(25% - 0.75rem);
    min-width: 0;
}

.related-slider-container .prev-btn {
    left: 0;
}

.related-slider-container .next-btn {
    right: 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    grid-auto-rows: auto;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .single-post-header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .single-post-featured-image {
        width: 250px;
    }
    
    .single-post-title {
        font-size: 2rem;
    }
    
    .single-post-meta {
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .related-slider-container .slider-card {
        flex: 0 0 calc(33.333% - 0.67rem);
    }
}

@media (max-width: 768px) {
    /* Páginas en móvil - simplificado */
    .two-column-layout {
        padding: 0 1rem 4rem;
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 1.5rem;
    }
    
    .page-comments {
        padding: 1.5rem;
    }
    
    .sidebar {
        padding: 1.5rem 1rem;
    }
    
    .single-post-header-container {
        max-width: 100%;
        padding: 1.5rem 0.5rem;
    }
    
    .single-post-featured-image {
        width: 180px;
    }
    
    .single-post-title {
        font-size: 1.5rem;
    }
    
    .single-post-content {
        padding: 1.5rem 0.75rem;
        border-radius: 4px;
    }
    
    .single-post-tags-section {
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    .related-posts-section {
        padding: 1.5rem;
        border-radius: 8px;
    }
    
    .tags-section-title {
        font-size: 1.2rem;
    }
    
    .post-tags-container {
        gap: 0.75rem;
    }
    
    .post-tag {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .tag-icon {
        font-size: 1rem;
    }
    
    .tag-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .related-slider-container .slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .related-slider-container .slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Pagination */
.pagination {
    margin: 3rem 0;
    text-align: center;
    padding: 0 1rem;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Mobile Pagination */
@media (max-width: 768px) {
    .pagination {
        margin: 2rem 0;
        padding: 0 0.75rem;
    }
    
    .pagination a,
    .pagination .current {
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .pagination {
        margin: 1.5rem 0;
    }
    
    .pagination .nav-links {
        gap: 0.35rem;
    }
    
    .pagination a,
    .pagination .current {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
        min-width: 36px;
    }
}

/* Tag Archive Styles */
.section-header h2 .tag-hash {
    color: var(--accent-color);
    font-size: 1.1em;
    font-weight: 400;
    margin-right: 0.25rem;
    animation: hashPulse 2s ease-in-out infinite;
}

@keyframes hashPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.tag-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 1.25rem;
    background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 400;
    border-radius: 25px;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.tag-count-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.tag-count-badge:hover::before {
    left: 100%;
}

.tag-count-badge:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
    background: linear-gradient(135deg, #ff6b6b, var(--accent-color));
}

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.no-posts-message svg {
    color: var(--accent-color);
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.no-posts-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Light Mode Adjustments for Tag Archive */
body.light-mode .tag-count-badge {
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.25);
}

body.light-mode .tag-count-badge:hover {
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
}

body.light-mode .no-posts-message {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive for Tag Archive */
@media (max-width: 768px) {
    .tag-count-badge {
        min-width: 40px;
        height: 40px;
        padding: 0 1rem;
        font-size: 1.1rem;
        border-radius: 20px;
    }
}

/* Archive Description */
.archive-description {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Page Styles */
.page-article {
    width: 100%;
}

.page-article .content-section {
    margin-bottom: 0;
    padding: 0;
}

/* Page without sidebar - full width */
.page .two-column-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
}

.page .two-column-layout:not(:has(aside.sidebar)) {
    grid-template-columns: 1fr;
}

.page .two-column-layout:not(:has(aside.sidebar)) .site-content {
    max-width: 100%;
}

.page-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.page-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.page-content h3 {
    font-size: 1.5rem;
}

.page-content h4 {
    font-size: 1.2rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-content ul,
.page-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.75rem;
}

.page-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--secondary-bg);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    font-style: italic;
    color: var(--text-secondary);
}

.page-content a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.page-content a:hover {
    color: #ff6b6b;
    text-decoration: none;
}

.page-comments {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Page Ad Containers */
.page-ad-container {
    margin: 2rem 0;
    text-align: center;
    overflow: hidden;
}

.page-ad-container.ad-before-content {
    margin-bottom: 2rem;
}

.page-ad-container.ad-after-content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Light Mode Adjustments for Pages */
body.light-mode .page-content,
body.light-mode .page-comments {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .page-content blockquote {
    background: #f8f9fa;
}

/* Responsive for Pages */
@media (max-width: 1024px) {
    .page .two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 1.5rem;
        border-radius: 6px;
    }
    
    .page-content h2 {
        font-size: 1.5rem;
        margin: 1.5rem 0 0.75rem;
    }
    
    .page-content h3 {
        font-size: 1.3rem;
        margin: 1.5rem 0 0.75rem;
    }
    
    .page-content h4 {
        font-size: 1.1rem;
        margin: 1.25rem 0 0.75rem;
    }
    
    .page-content p {
        margin-bottom: 1.25rem;
        font-size: 1rem;
    }
    
    .page-content ul,
    .page-content ol {
        padding-left: 1.5rem;
        margin: 1.25rem 0;
    }
    
    .page-content blockquote {
        padding: 1rem 1.25rem;
        margin: 1.5rem 0;
        font-size: 0.95rem;
    }
    
    .page-content img {
        margin: 1.5rem 0;
        border-radius: 6px;
    }
    
    .page-comments {
        padding: 1.5rem;
        border-radius: 6px;
    }
    
    .page-featured-image {
        margin-bottom: 1.5rem;
        border-radius: 6px;
    }
    
    .page .two-column-layout {
        gap: 1.5rem;
    }
    
    /* Page ad containers */
    .page-ad-container {
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .two-column-layout {
        padding: 0 0.75rem 4rem;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .page-comments {
        padding: 1rem;
    }
    
    .sidebar {
        padding: 1rem 0.75rem;
    }
    
    .page-content h2 {
        font-size: 1.3rem;
        margin: 1.25rem 0 0.5rem;
        padding-bottom: 0.4rem;
    }
    
    .page-content h3 {
        font-size: 1.15rem;
        margin: 1.25rem 0 0.5rem;
    }
    
    .page-content h4 {
        font-size: 1rem;
        margin: 1rem 0 0.5rem;
    }
    
    .page-content p {
        margin-bottom: 1rem;
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .page-content ul,
    .page-content ol {
        padding-left: 1.25rem;
        margin: 1rem 0;
        font-size: 0.95rem;
    }
    
    .page-content li {
        margin-bottom: 0.5rem;
    }
    
    .page-content blockquote {
        padding: 0.875rem 1rem;
        margin: 1.25rem 0;
        font-size: 0.9rem;
        border-left-width: 3px;
    }
    
    .page-content img {
        margin: 1.25rem 0;
        border-radius: 4px;
    }
    
    .page-comments {
        padding: 1rem;
        border-radius: 4px;
        margin-bottom: 1.5rem;
    }
    
    .page-featured-image {
        margin-bottom: 1rem;
        border-radius: 4px;
    }
    
    .page .two-column-layout {
        gap: 1rem;
    }
    
    /* Page ad containers */
    .page-ad-container {
        margin: 1rem 0;
        padding: 0.5rem;
    }
    
    /* Page title */
    .page-title-section h2 {
        font-size: 1.5rem;
        padding: 1rem;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
}

.no-results h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .single-post .entry-title {
        font-size: 1.8rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .post-navigation a {
        padding: 1.25rem;
    }
    
    .post-navigation .nav-subtitle {
        font-size: 0.8rem;
    }
    
    .post-navigation .nav-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .single-post .entry-title {
        font-size: 1.5rem;
    }
    
    .post-navigation {
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .post-navigation a {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .post-navigation .nav-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .post-navigation .nav-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
}

/* Simple Single Post Template Styles */
.single-post-simple {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-post-simple .two-column-layout {
    margin-top: 0 !important;
}

.single-post-content-simple {
    padding: 3rem !important;
    margin-top: 0 !important;
}

.single-post-header-simple-inline {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.single-post-title-simple {
    font-size: 2.2rem;
    font-weight: 400;
    margin: 0 auto 1.5rem auto;
    color: var(--text-primary);
    line-height: 1.3;
    text-align: center;
    max-width: 800px;
}

.single-post-meta-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.single-post-featured-image-simple {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.single-post-featured-image-simple img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

/* Responsive for Simple Template */
@media (max-width: 1024px) {
    .single-post-title-simple {
        font-size: 2rem;
    }
    
    .single-post-featured-image-simple {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .single-post-content-simple {
        padding: 2rem 1.5rem !important;
    }
    
    .single-post-title-simple {
        font-size: 1.6rem;
    }
    
    .single-post-meta-simple {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .single-post-featured-image-simple {
        max-width: 250px;
    }
    
    .single-post-header-simple-inline {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .single-post-content-simple {
        padding: 1.5rem 1rem !important;
    }
    
    .single-post-title-simple {
        font-size: 1.4rem;
    }
    
    .single-post-meta-simple {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .single-post-featured-image-simple {
        max-width: 220px;
    }
}

/* ========================================
   DEFAULT TEMPLATE WITH HERO BACKGROUND
   ======================================== */
.single-post-default {
    margin: 0;
    padding: 0;
}

.single-post-hero-section {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: blur(0px);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.4) 70%,
        transparent 100%
    );
}

.hero-content-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-poster-wrapper {
    flex-shrink: 0;
    width: 180px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.hero-poster-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-info-wrapper {
    flex: 1;
    color: #ffffff;
}

.hero-post-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.hero-post-meta span {
    font-size: 0.95rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.meta-date svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
}

.meta-category {
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.single-post-default .two-column-layout {
    margin-top: 0;
}

/* Responsive for Default Template */
@media (max-width: 1024px) {
    .single-post-hero-section {
        height: 320px;
    }
    
    .hero-content-container {
        padding: 2rem 1.5rem;
    }
    
    .hero-poster-wrapper {
        width: 160px;
    }
    
    .hero-post-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .single-post-hero-section {
        height: 280px;
    }
    
    .hero-content-container {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
        justify-content: center;
    }
    
    .hero-poster-wrapper {
        width: 140px;
    }
    
    .hero-info-wrapper {
        text-align: center;
    }
    
    .hero-post-title {
        font-size: 1.5rem;
    }
    
    .hero-post-meta {
        justify-content: center;
    }
    
    .hero-overlay {
        background: linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.7) 0%, 
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}

@media (max-width: 480px) {
    .single-post-hero-section {
        height: 250px;
    }
    
    .hero-content-container {
        padding: 1rem;
    }
    
    .hero-poster-wrapper {
        width: 120px;
    }
    
    .hero-post-title {
        font-size: 1.25rem;
    }
    
    .hero-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   HERO TEMPLATE - FULL WIDTH
   ======================================== */
.single-post-hero {
    margin: 0;
    padding: 0;
}

.single-post-hero .two-column-layout {
    margin-top: 0;
}

.hero-full-section {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.hero-full-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-full-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.85) 30%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
}

.hero-full-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.hero-full-poster {
    flex-shrink: 0;
    width: 260px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8);
}

.hero-full-poster-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-full-info {
    flex: 1;
    color: #ffffff;
}

.hero-full-title {
    font-size: 3.5rem;
    font-weight: 400;
    margin: 0 0 1.25rem 0;
    color: #ffffff;
    line-height: 1;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9);
    letter-spacing: -0.02em;
}

.hero-full-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

.hero-meta-date {
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.hero-meta-date svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.9));
}

.hero-meta-category {
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

/* Responsive for Hero Template */
@media (max-width: 1200px) {
    .hero-full-section {
        height: 380px;
    }
    
    .hero-full-poster {
        width: 240px;
    }
    
    .hero-full-title {
        font-size: 3rem;
    }
}

@media (max-width: 1024px) {
    .hero-full-section {
        height: 350px;
    }
    
    .hero-full-content {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .hero-full-poster {
        width: 220px;
    }
    
    .hero-full-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-full-section {
        height: 300px;
    }
    
    .hero-full-content {
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .hero-full-poster {
        width: 160px;
    }
    
    .hero-full-info {
        text-align: center;
    }
    
    .hero-full-title {
        font-size: 2rem;
    }
    
    .hero-full-meta {
        justify-content: center;
    }
    
    .hero-full-overlay {
        background: linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.75) 0%, 
            rgba(0, 0, 0, 0.85) 100%
        );
    }
}

@media (max-width: 480px) {
    .hero-full-section {
        height: 240px;
    }
    
    .hero-full-content {
        padding: 1rem;
    }
    
    .hero-full-poster {
        width: 130px;
    }
    
    .hero-full-title {
        font-size: 1.5rem;
    }
    
    .hero-meta-item {
        font-size: 0.85rem;
    }
    
    .hero-full-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   MOBILE IMPROVEMENTS FOR COMMENTS
   ======================================== */
@media (max-width: 768px) {
    .comments-area {
        margin-top: 3rem;
        padding: 1.5rem;
        border-radius: 6px;
    }
    
    .comments-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }
    
    .comment-list .comment {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 6px;
    }
    
    .comment-list .children {
        margin-left: 1rem;
    }
    
    .comment-author {
        gap: 0.75rem;
    }
    
    .comment-author img {
        width: 40px;
        height: 40px;
    }
    
    .comment-metadata {
        font-size: 0.8rem;
    }
    
    .comment-content {
        font-size: 0.95rem;
    }
    
    .comment-reply-link {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }
    
    .comment-form {
        margin-top: 2rem;
    }
    
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        padding: 0.65rem;
        font-size: 0.95rem;
    }
    
    .comment-form textarea {
        min-height: 120px;
    }
}

@media (max-width: 480px) {
    .comments-area {
        margin-top: 2rem;
        padding: 1rem;
    }
    
    .comments-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    .comment-list .comment {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 4px;
    }
    
    .comment-list .children {
        margin-left: 0.5rem;
    }
    
    .comment-author {
        gap: 0.5rem;
    }
    
    .comment-author img {
        width: 36px;
        height: 36px;
    }
    
    .comment-metadata {
        font-size: 0.75rem;
    }
    
    .comment-content {
        font-size: 0.9rem;
    }
    
    .comment-reply-link {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .comment-form {
        margin-top: 1.5rem;
    }
    
    .comment-form label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .comment-form textarea {
        min-height: 100px;
    }
    
    .no-comments {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
    
    .comment-ad-container {
        margin: 1.5rem 0;
        padding: 1rem;
    }
}

/* ========================================
   EXTRA SMALL DEVICES (360px and below)
   ======================================== */
@media (max-width: 360px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .site-logo {
        font-size: 1.1rem;
    }
    
    .search-toggle,
    .theme-toggle {
        width: 26px;
        height: 26px;
    }
    
    .content-section {
        padding: 0 0.5rem;
        margin-bottom: 2rem;
    }
    
    .section-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
        line-height: 1.2;
        margin: 0;
    }
    
    .view-all-btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .content-grid {
        gap: 0.4rem;
    }
    
    .card-content {
        padding: 0.4rem 0.25rem;
    }
    
    .card-title {
        font-size: 0.7rem;
    }
    
    .sidebar {
        padding: 0.75rem;
    }
    
    .sidebar h3 {
        font-size: 1rem;
    }
    
    .sidebar .recent-posts-grid,
    .sidebar .category-posts-grid,
    .sidebar .popular-posts-grid,
    .recent-posts-grid,
    .category-posts-grid,
    .popular-posts-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem;
        width: 100%;
    }
    
    .sidebar .recent-posts-grid .content-card,
    .sidebar .category-posts-grid .content-card,
    .sidebar .popular-posts-grid .content-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    
    .sidebar-widget .card-title {
        font-size: 0.7rem;
    }
    
    .sidebar-widget .card-content {
        padding: 0.35rem;
    }
    
    .slider-container {
        padding: 0 0.5rem;
    }
    
    .slider-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    .pagination a,
    .pagination .current {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
        min-width: 32px;
    }
}

/* ========================================
   MOBILE TOUCH IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
    /* Fix white space after footer */
    html,
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        background-color: var(--primary-bg) !important;
    }
    
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .site-main {
        flex: 1;
    }
    
    .site-footer {
        margin-bottom: 0 !important;
        padding-bottom: 1rem !important;
        border-top-color: transparent !important;
    }
    
    /* Eliminar cualquier espacio después del footer */
    .site-footer::after {
        content: '';
        display: block;
        height: 0;
        margin: 0;
        padding: 0;
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better touch targets */
    a, button, input[type="submit"], .content-card {
        -webkit-tap-highlight-color: rgba(229, 9, 20, 0.2);
    }
    
    /* Prevent text selection on double-tap */
    .slider-nav-btn,
    .menu-toggle,
    .search-toggle,
    .theme-toggle,
    .view-all-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Improve scrolling performance */
    .slider-track,
    .related-slider-track {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better focus states for accessibility */
    a:focus,
    button:focus,
    input:focus,
    textarea:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
    
    /* Optimize images for mobile */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider-carousel {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .single-post-hero-section {
        height: 250px;
    }
    
    .hero-full-section {
        height: 280px;
    }
    
    .site-header {
        position: sticky;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .post-navigation,
    .comments-area,
    .slider-nav-btn,
    .view-all-btn,
    .search-toggle,
    .theme-toggle,
    .menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .site-content {
        max-width: 100%;
    }
    
    .content-card,
    .single-post-content,
    .page-content {
        page-break-inside: avoid;
    }
}

/* ========================================
   COMMENTS DARK MODE OVERRIDE
   ======================================== */
/* Comentarios principales en modo oscuro (sin clase light-mode) - fondo gris oscuro */
body:not(.light-mode) .comment-list > li.comment {
    background-color: #2a2a2a !important;
}

body:not(.light-mode) .comment-list .comment-body .comment-author .fn,
body:not(.light-mode) .comment-list .comment-body .comment-author .fn a {
    color: #ffffff !important;
}

body:not(.light-mode) .comment-list > li.comment .comment-content,
body:not(.light-mode) .comment-list > li.comment .comment-content p {
    color: #ffffff !important;
}

body:not(.light-mode) .comment-list .comment-metadata,
body:not(.light-mode) .comment-list .comment-metadata a {
    color: #e50914 !important;
}

/* Respuestas anidadas en modo oscuro - fondo claro con texto negro para resaltar */
body:not(.light-mode) .comment-list .children .comment {
    background-color: #f5f5f5 !important;
}

body:not(.light-mode) .comment-list .children .comment .comment-body .comment-author .fn,
body:not(.light-mode) .comment-list .children .comment .comment-body .comment-author .fn a {
    color: #000000 !important;
}

body:not(.light-mode) .comment-list .children .comment .comment-content,
body:not(.light-mode) .comment-list .children .comment .comment-content p {
    color: #000000 !important;
}

body:not(.light-mode) .comment-list .children .comment .comment-metadata,
body:not(.light-mode) .comment-list .children .comment .comment-metadata a {
    color: #e50914 !important;
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: #c40812;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* Modo claro - ajustar sombra */
body.light-mode .scroll-to-top {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode .scroll-to-top:hover {
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   FIX DEFINITIVO PARA PÁGINAS EN MÓVIL
   ======================================== */
@media (max-width: 768px) {
    /* Asegurar que las páginas no se vean cortadas */
    body.page .two-column-layout,
    .page .two-column-layout {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem 2rem;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    body.page .site-content,
    .page .site-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    body.page .page-article,
    .page .page-article {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    body.page .content-section,
    .page .content-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    body.page .page-content,
    .page .page-content {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 0;
        margin: 0;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    body.page .page-content > *,
    .page .page-content > * {
        max-width: 100%;
    }
    
    body.page .page-comments,
    .page .page-comments {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    body.page .sidebar,
    .page .sidebar {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
        margin: 1.5rem 0 0 0;
        box-sizing: border-box;
    }
    
    body.page .page-featured-image,
    .page .page-featured-image {
        width: 100%;
        max-width: 100%;
        margin: 0 0 1.5rem 0;
    }
    
    body.page .page-ad-container,
    .page .page-ad-container {
        width: 100%;
        max-width: 100%;
        margin: 1rem 0;
    }
    
    /* Asegurar que imágenes no se salgan */
    body.page img,
    .page img {
        max-width: 100%;
        height: auto;
    }
    
    /* Asegurar que tablas sean responsive */
    body.page table,
    .page table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
    
    /* Títulos de páginas específicos para móvil */
    body.page .section-header,
    .page .section-header {
        margin-bottom: 1.25rem !important;
        padding-bottom: 0.75rem !important;
        border-bottom: 2px solid var(--border-color) !important;
    }
    
    body.page .section-header h2,
    .page .section-header h2 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Sidebar específico para páginas en móvil */
    body.page .sidebar-widget h3,
    .page .sidebar-widget h3 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
}

@media (max-width: 480px) {
    body.page .two-column-layout,
    .page .two-column-layout {
        padding: 0 0.75rem 1.5rem;
    }
    
    body.page .page-content,
    .page .page-content {
        padding: 1rem 0;
    }
    
    body.page .page-comments,
    .page .page-comments {
        padding: 1rem;
    }
    
    body.page .sidebar,
    .page .sidebar {
        padding: 1rem 0.75rem;
    }
    
    /* Títulos más pequeños para pantallas muy pequeñas */
    body.page .section-header h2,
    .page .section-header h2 {
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
    }
    
    body.page .sidebar-widget h3,
    .page .sidebar-widget h3 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.4rem !important;
    }
}

/* ========================================
   CORRECCIÓN ESPECÍFICA PARA TÍTULOS DE PÁGINAS EN MÓVIL
   ======================================== */
@media (max-width: 768px) {
    /* Títulos principales de páginas - sobrescribir todos los estilos anteriores */
    .section-header h2 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin: 0 0 0.5rem 0 !important;
        padding: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        font-weight: 500 !important;
        color: var(--text-primary) !important;
    }
    
    .section-header {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 2px solid var(--border-color) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* Sidebar títulos - sobrescribir todos los estilos anteriores */
    .sidebar-widget h3 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1.2rem !important;
        padding-bottom: 0.7rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        font-weight: 500 !important;
        color: var(--text-primary) !important;
        border-bottom: 2px solid var(--border-color) !important;
    }
}

@media (max-width: 480px) {
    /* Títulos para pantallas muy pequeñas */
    .section-header h2 {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin: 0 0 0.4rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 1.2rem !important;
        padding-bottom: 0.8rem !important;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
    }
}
