/*
Theme Name: Gay Chile Theme
Theme URI: https://example.com/gay-chile-theme
Description: Tema personalizado para medio de comunicación de la comunidad gay en Chile. Diseño moderno, limpio y con acentos arcoíris.
Author: Antigravity
Version: 6.8
Text Domain: gay-chile-theme
*/

:root {
    /* Colors */
    --c-bg: #ffffff;
    /* Light gray background */
    --c-text: #1a1a1a;
    --c-text-light: #666;
    --c-border: #e0e0e0;
    /* Darkened for better visibility */
    --c-card-bg: #ffffff;

    /* Rainbow Palette */
    --r-red: #E84B4B;
    --r-orange: #F48C42;
    --r-yellow: #F4D03F;
    --r-yellow-dark: #b09500;
    /* Consistent dark yellow for text/borders */
    --r-green: #2ECC71;
    --r-blue: #3498DB;
    --r-violet: #9B59B6;

    /* Spacing */
    --gap: 20px;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Encode Sans', sans-serif;
    color: var(--c-text);
    background-color: var(--c-bg);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--r-orange);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Rainbow Decoration */
.rainbow-border-top {
    height: 4px;
    background: linear-gradient(to right,
            var(--r-red) 0%, var(--r-red) 16.6%,
            var(--r-orange) 16.6%, var(--r-orange) 33.2%,
            var(--r-yellow) 33.2%, var(--r-yellow) 49.8%,
            var(--r-green) 49.8%, var(--r-green) 66.4%,
            var(--r-blue) 66.4%, var(--r-blue) 83%,
            var(--r-violet) 83%, var(--r-violet) 100%);
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--c-border);
    padding: 10px 0 0 0;
    margin-bottom: 0;
    /* Align with nav wrapper */
    background: white;
}

/* Row 1: Logo + Banner */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
    max-width: 350px;
    /* Increased to avoid tagline wrapping */
}



.site-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin: 0;
}

.custom-logo-link img {
    max-height: 80px;
    width: auto;
    display: block;
}

.site-description {
    font-size: 0.65rem;
    color: var(--c-text-light);
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.04em;
    display: block;
    white-space: nowrap;
    /* Force one line */
}

.header-banner {
    width: 800px;
    height: 90px;
    background-color: #f0f0f0;
    color: #999;
    max-width: 100%;
    flex-shrink: 1;
    /* Allow it to shrink on smaller screens if needed */
}

.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Row 2: Nav + Search Wrapper */
.header-nav-wrapper {
    /* Full width border */
    width: 100%;
    background-color: white;
    position: sticky;
    /* Restored Sticky */
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

/* Rainbow border behavior controls */
.header-nav-wrapper::before {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    /* Default height */
    background: linear-gradient(to right,
            var(--r-red) 0%, var(--r-red) 16.6%,
            var(--r-orange) 16.6%, var(--r-orange) 33.2%,
            var(--r-yellow) 33.2%, var(--r-yellow) 49.8%,
            var(--r-green) 49.8%, var(--r-green) 66.4%,
            var(--r-blue) 66.4%, var(--r-blue) 83%,
            var(--r-violet) 83%, var(--r-violet) 100%);
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s;
}

.header-nav-wrapper.is-sticky::before {
    opacity: 1;
    /* Visible when sticky */
}

.header-nav-wrapper.is-sticky {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-top-color: transparent;
}

.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 5px;
    /* Reduced to 5px as requested */
    padding-bottom: 15px;
}

.nav-left-group {
    display: flex;
    align-items: center;
}

/* Sticky Logo */
.sticky-logo {
    display: none;
    margin-right: 10px;
    /* Reduced to 10px to keep nav very close */
}

.sticky-logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
    border-radius: 4px;
    object-fit: contain;
}

.sticky-site-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--c-text);
    white-space: nowrap;
}

/* Show logo when sticky */
.header-nav-wrapper.is-sticky .sticky-logo {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav ul li a {
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    position: relative;
    padding-bottom: 5px;
    color: var(--c-text);
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Rainbow hover effect for nav */
/* Nav Hover Effect (Flat Colors, No Gradient) */
.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: transparent;
    transition: width 0.3s;
}

/* Specific colors for each nav item (match underline and text) */
/* Specific colors for each nav item (match underline and text) */
.main-nav li:nth-child(1) a::after {
    background-color: var(--r-red);
}

.main-nav li:nth-child(1) a:hover,
.main-nav li:nth-child(1).current-menu-item a {
    color: var(--r-red) !important;
}

.main-nav li:nth-child(1).current-menu-item a::after {
    width: 100%;
}

.main-nav li:nth-child(2) a::after {
    background-color: var(--r-orange);
}

.main-nav li:nth-child(2) a:hover,
.main-nav li:nth-child(2).current-menu-item a {
    color: var(--r-orange) !important;
}

.main-nav li:nth-child(2).current-menu-item a::after {
    width: 100%;
}

.main-nav li:nth-child(3) a::after {
    background-color: var(--r-yellow);
}

.main-nav li:nth-child(3) a:hover,
.main-nav li:nth-child(3).current-menu-item a {
    color: var(--r-yellow-dark) !important;
}

.main-nav li:nth-child(3).current-menu-item a::after {
    width: 100%;
}

.main-nav li:nth-child(4) a::after {
    background-color: var(--r-green);
}

.main-nav li:nth-child(4) a:hover,
.main-nav li:nth-child(4).current-menu-item a {
    color: var(--r-green) !important;
}

.main-nav li:nth-child(4).current-menu-item a::after {
    width: 100%;
}

.main-nav li:nth-child(5) a::after {
    background-color: var(--r-blue);
}

.main-nav li:nth-child(5) a:hover,
.main-nav li:nth-child(5).current-menu-item a {
    color: var(--r-blue) !important;
}

.main-nav li:nth-child(5).current-menu-item a::after {
    width: 100%;
}

.main-nav li:nth-child(6) a::after {
    background-color: var(--r-violet);
}

.main-nav li:nth-child(6) a:hover,
.main-nav li:nth-child(6).current-menu-item a {
    color: var(--r-violet) !important;
}

.main-nav li:nth-child(6).current-menu-item a::after {
    width: 100%;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* Global Form Elements Style (Orange Search Box Theme) */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
    border: 2px solid var(--r-orange);
    padding: 8px 15px;
    border-radius: 30px;
    background-color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: box-shadow 0.2s;
    width: 100%;
}

input:focus,
textarea:focus {
    box-shadow: 0 0 8px rgba(244, 140, 66, 0.2);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link {
    background-color: var(--r-orange);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover {
    background-color: var(--r-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* Base style for search-bar container */
.search-bar {
    display: flex;
    border: 2px solid var(--r-orange);
    padding: 0 15px;
    border-radius: 30px;
    background-color: #fff;
    height: 38px;
    align-items: center;
    width: 200px;
}

.search-bar form {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-bar input {
    border: none !important;
    /* Override global for header box */
    padding: 0;
    width: 100%;
    border-radius: 0;
}

.search-bar button {
    display: none;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* Content 75%, Sidebar 25% */
    gap: 40px;
    margin-bottom: 60px;
}

/* Hero Complex Layout (Boxed + Side Nav) */
.hero-container-wrapper {
    margin-bottom: 50px;
}

.hero-complex-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    /* 70% 30% split approx */
    gap: 0;
    background-color: #fafafa;
    height: 500px;
    border: 1px solid var(--c-border);
    border-radius: 5px;
    overflow: hidden;
}

/* Main Display Stage */
.hero-main-stage {
    position: relative;
    height: 100%;
    overflow: hidden;
    background-color: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex !important;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide-image-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-slide-content-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.hero-slide-content-inner {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
    width: 100%;
    padding: 40px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Category Chips */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: white;
    text-shadow: none;
    position: relative;
    z-index: 10;
}

.cat-red {
    background-color: var(--r-red);
}

.cat-orange {
    background-color: var(--r-orange);
}

.cat-yellow {
    background-color: var(--r-yellow);
    color: #333;
}

.cat-green {
    background-color: var(--r-green);
}

.cat-blue {
    background-color: var(--r-blue);
}

.cat-violet {
    background-color: var(--r-violet);
}

.hero-slide-content-inner h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.1;
}

.hero-slide-content-inner h2 a {
    color: white;
}

.hero-side-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background-color: white;
    border-left: 1px solid var(--c-border);
}

.nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--c-border);
    transition: background-color 0.2s;
    position: relative;
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item:hover {
    background-color: #f0f0f0;
}

.nav-item.active {
    background-color: #f8f9fa;
}

/* Specific Rainbow Colors for Nav Items (Flat Color, Right Side) */
.nav-item::before {
    content: '';
    position: absolute;
    right: 0;
    /* Moved to right */
    left: auto;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: transparent;
    transition: background-color 0.2s;
}

.nav-item:nth-child(1).active::before {
    background-color: var(--r-red);
}

.nav-item:nth-child(2).active::before {
    background-color: var(--r-orange);
}

.nav-item:nth-child(3).active::before {
    background-color: var(--r-yellow);
}

.nav-item:nth-child(4).active::before {
    background-color: var(--r-green);
}

.nav-item:nth-child(5).active::before {
    background-color: var(--r-blue);
}

.nav-text h5 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--c-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Sections */
.category-section {
    margin-bottom: 40px;
    padding-top: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    /* Space below line */
    border-bottom: 4px solid #ddd;
    /* Matched to 4px */
    padding-bottom: 10px;
    /* Space above line - matched to entry-header style */
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Header Color Modifiers - Full Width Line */
.header-red {
    border-bottom-color: var(--r-red);
}

.header-orange {
    border-bottom-color: var(--r-orange);
}

.header-yellow {
    border-bottom-color: var(--r-yellow);
}

.header-green {
    border-bottom-color: var(--r-green);
}

.header-blue {
    border-bottom-color: var(--r-blue);
}

.header-violet {
    border-bottom-color: var(--r-violet);
}

.view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-text-light);
    margin-bottom: 5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.std-card .card-img {
    height: 180px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}

.std-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Sidebar */
.sidebar-col .widget {
    margin-bottom: 40px;
}

.sidebar-col .widget-title {
    border-top: 4px solid var(--r-yellow);
    padding-top: 15px;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    width: 100%;
}

/* Sidebar Detail Styling */
.sidebar-recent-list {
    list-style: none;
    padding: 0;
}

.sidebar-recent-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--c-border);
    align-items: center;
    transition: transform 0.2s;
}

.sidebar-recent-item:last-child {
    border-bottom: none;
}

.sidebar-recent-item:hover {
    transform: translateX(5px);
}

.sidebar-thumb {
    flex: 0 0 70px;
}

.sidebar-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f0f0f0;
}

.sidebar-info {
    flex: 1;
}

.sidebar-item-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    display: block;
    margin-bottom: 4px;
    color: var(--c-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-item-title:hover {
    color: var(--r-orange);
}

.sidebar-info .post-date {
    font-size: 0.8rem;
    color: var(--c-text-light);
    font-weight: 500;
}

/* Banner/Ad Placeholder Premium Style */
.sidebar-ad {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px dashed #ccc;
    color: #888;
    position: relative;
    overflow: hidden;
}

.sidebar-ad span {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    z-index: 2;
}

.sidebar-ad::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 140, 66, 0.05) 0%, transparent 70%);
}

/* In-content Ad Banner */
.ad-banner-single {
    margin: 30px 0 40px;
    background: #f8f8f8;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-banner-single .ad-label {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    font-weight: 700;
}

.ad-banner-single img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Sidebar Rainbow Cycle (On border-top) */
.sidebar-col .widget:nth-child(1) .widget-title {
    border-top-color: var(--r-red);
}

.sidebar-col .widget:nth-child(2) .widget-title {
    border-top-color: var(--r-orange);
}

.sidebar-col .widget:nth-child(3) .widget-title {
    border-top-color: var(--r-yellow);
}

.sidebar-col .widget:nth-child(4) .widget-title {
    border-top-color: var(--r-green);
}

.sidebar-col .widget:nth-child(5) .widget-title {
    border-top-color: var(--r-blue);
}

.sidebar-col .widget:nth-child(6) .widget-title {
    border-top-color: var(--r-violet);
}


/* Homogenize All Sidebar Lists */
.sidebar-col .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-col .widget ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Sutil line color */
    transition: padding-left 0.2s ease;
}

.sidebar-col .widget ul li:last-child {
    border-bottom: none;
}

.sidebar-col .widget ul li:hover {
    padding-left: 5px;
}

.sidebar-col .widget ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--c-text);
    line-height: 1.4;
    display: block;
}

.sidebar-col .widget ul li a:hover {
    color: var(--r-orange);
}

/* Specific adjustment for our custom recent list to avoid double padding/borders */
.sidebar-recent-item {
    display: flex;
    gap: 15px;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
    align-items: center;
    transition: transform 0.2s;
}

.sidebar-recent-item:last-child {
    border-bottom: none !important;
}



.recent-posts ul {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 15px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 10px;
}

.banner-widget {
    height: 250px;
    width: 100%;
}

/* Footer */
.site-footer {
    background-color: #f9f9f9;
    padding: 60px 0 0;
    border-top: 1px solid var(--c-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col h5,
.footer-widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--c-text);
    font-weight: 700;
}

.footer-col ul,
.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li,
.footer-widget li {
    margin-bottom: 10px;
    color: var(--c-text-light);
}

.footer-col a,
.footer-widget a {
    color: var(--c-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover,
.footer-widget a:hover {
    color: var(--r-orange);
}

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget:last-child {
    margin-bottom: 0;
}

.rainbow-border-bottom {
    height: 8px;
    background: linear-gradient(to right,
            var(--r-red) 0%, var(--r-red) 16.6%,
            var(--r-orange) 16.6%, var(--r-orange) 33.2%,
            var(--r-yellow) 33.2%, var(--r-yellow) 49.8%,
            var(--r-green) 49.8%, var(--r-green) 66.4%,
            var(--r-blue) 66.4%, var(--r-blue) 83%,
            var(--r-violet) 83%, var(--r-violet) 100%);
}

/* ===========================
   Single Post Styles
   =========================== */

.single-article {
    margin-bottom: 60px;
    background: #fff;
    /* Ensure white bg if needed */
}

.entry-header {
    margin-bottom: 15px;
    border-bottom-width: 4px;
    border-bottom-style: solid;
    padding-bottom: 10px;
}

.entry-header .category-tag {
    margin-bottom: 15px;
    font-size: 0.85rem;
    padding: 6px 16px;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 5px;
    color: var(--c-text);
}

.entry-meta {
    font-size: 0.95rem;
    color: var(--c-text-light);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.entry-meta span {
    margin-right: 15px;
}

.entry-thumbnail {
    margin-bottom: 40px;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    /* Border radius applied via utility class or directly here if preferred */
    border-radius: 5px;
}

/* Content Typography */
.entry-content {
    font-size: 1.15rem;
    /* Larger for readability */
    line-height: 1.8;
    color: #333;
    padding: 0 5px;
}

.entry-content p {
    margin-bottom: 25px;
    text-align: justify;
}

.entry-content a {
    color: var(--r-orange);
    text-decoration: underline;
    font-weight: 600;
}

.entry-content a:hover {
    color: var(--r-blue);
    text-decoration: none;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--c-text);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 1.8rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content blockquote {
    border-left: 5px solid var(--r-yellow);
    /* Default accent */
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    font-size: 1.3rem;
}

/* Responsive Iframe Styles */
.entry-content iframe,
.entry-content object,
.entry-content embed {
    max-width: 100%;
    display: block;
    margin-bottom: 30px;
    border-radius: 8px;
    border: none;
}

/* Specific 16:9 aspect ratio ONLY for Video Embeds to prevent distortion of other iframes */
.entry-content .wp-block-embed-youtube iframe,
.entry-content .wp-block-embed-vimeo iframe,
.entry-content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtu.be"],
.entry-content iframe[src*="vimeo.com"] {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}

/* Explicit fallback for older WordPress embed wrappers */
.wp-block-embed {
    margin: 30px 0;
    width: 100% !important;
}

/* Entry Footer */
.entry-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: none;
    /* Removed line */
    background: none !important;
    /* Force remove any background */
    box-shadow: none !important;
}

/* Explicitly target all category background classes when on footer to remove them */
.entry-footer.cat-red,
.entry-footer.cat-orange,
.entry-footer.cat-yellow,
.entry-footer.cat-green,
.entry-footer.cat-blue,
.entry-footer.cat-violet {
    background: transparent !important;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    /* Space between label and chips, and between chips */
}

.tags-label {
    font-weight: 800;
    color: var(--c-text);
    margin-right: 15px;
    font-size: 1rem;
}

.tags-links a {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: none;
    text-decoration: none;
    margin: 5px 0;
    transition: all 0.2s ease-in-out;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    color: var(--c-text);
}

.tags-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Dynamic Tag Colors based on Wrapper Class */
.entry-footer.cat-red .tags-links a {
    background-color: rgba(232, 75, 75, 0.1);
    border-color: var(--r-red);
    color: var(--r-red);
}

.entry-footer.cat-red .tags-links a:hover {
    background-color: var(--r-red);
    color: white;
}

.entry-footer.cat-orange .tags-links a {
    background-color: rgba(244, 140, 66, 0.1);
    border-color: var(--r-orange);
    color: var(--r-orange);
}

.entry-footer.cat-orange .tags-links a:hover {
    background-color: var(--r-orange);
    color: white;
}

.entry-footer.cat-yellow .tags-links a {
    background-color: rgba(244, 208, 63, 0.15);
    border-color: var(--r-yellow);
    color: var(--r-yellow-dark);
}

.entry-footer.cat-yellow .tags-links a:hover {
    background-color: var(--r-yellow);
    color: #333;
}

.entry-footer.cat-green .tags-links a {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: var(--r-green);
    color: var(--r-green);
}

.entry-footer.cat-green .tags-links a:hover {
    background-color: var(--r-green);
    color: white;
}

.entry-footer.cat-blue .tags-links a {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: var(--r-blue);
    color: var(--r-blue);
}

.entry-footer.cat-blue .tags-links a:hover {
    background-color: var(--r-blue);
    color: white;
}

.entry-footer.cat-violet .tags-links a {
    background-color: rgba(155, 89, 182, 0.1);
    border-color: var(--r-violet);
    color: var(--r-violet);
}

.entry-footer.cat-violet .tags-links a:hover {
    background-color: var(--r-violet);
    color: white;
}

/* Utilities */
.u-border-radius-5 {
    border-radius: 5px;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 10px;
    list-style: none;
}

.nav-links a,
.nav-links span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    color: var(--c-text);
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-links a:hover {
    background-color: var(--r-blue);
    color: white;
}

.nav-links span.current {
    background-color: var(--r-red);
    /* Active page color */
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Responsive Styles
   =========================== */

/* Hamburger Menu Toggle (Text Style) */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-toggle span {
    border: 2px solid var(--c-text);
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.menu-toggle.is-active span {
    background-color: var(--c-text);
    color: white;
}

/* Desktop Hidden Elements */
.mobile-search {
    display: none;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
    :root {
        --container-width: 95%;
    }

    .site-header {
        padding: 5px 0;
    }

    .header-top-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-banner {
        width: 100%;
        max-width: 468px;
        height: 60px;
        /* Hide giant banners on mobile */
        display: none;
    }

    .logo h1 {
        font-size: 1.8rem !important;
        word-break: break-word;
    }

    .site-description {
        font-size: 0.85rem;
    }

    .header-bottom-row {
        padding-bottom: 5px;
        padding-top: 5px;
    }

    .nav-left-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
        z-index: 2001;
    }

    .sticky-logo {
        display: block !important;
        order: 1;
        margin-right: 0;
    }

    .sticky-logo img {
        height: 35px;
        width: auto;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background-color: white;
        z-index: 2000;
        padding: 100px 30px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        display: block;
    }

    .main-nav.is-active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    .main-nav ul li a {
        font-size: 1.2rem !important;
        display: block;
        padding: 15px 0;
        font-weight: 700 !important;
    }

    .mobile-search {
        display: block;
        margin-top: 40px;
        padding-top: 25px;
        border-top: 2px solid #f0f0f0;
    }

    .mobile-search .search-form {
        display: flex;
        border: 2px solid var(--r-orange);
        padding: 10px 20px;
        border-radius: 40px;
        background: #fdfdfd;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    }

    .mobile-search input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 1.1rem;
        background: transparent;
    }

    .header-bottom-row .search-bar {
        display: none;
        /* Hide from desktop position */
    }

    .hero-complex-grid {
        display: block;
        height: auto;
    }

    .hero-side-nav {
        display: none !important;
    }

    /* Stack Image and text in Hero on mobile */
    .hero-main-stage {
        height: 350px !important;
        position: relative;
        overflow: hidden;
    }

    .hero-slide {
        flex-direction: column !important;
        height: 100%;
    }

    /* Fondo de imagen que cubre todo */
    .hero-slide-image-wrap {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    /* Contenido sobre la imagen en la parte inferior */
    .hero-slide-content-wrap {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        z-index: 2;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    }

    .hero-slide-content-inner {
        background: transparent !important;
        padding: 20px 15px;
        color: white;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .hero-slide-content-inner h2 {
        font-size: 1.5rem !important;
        margin-bottom: 10px;
    }

    .hero-slide-content-inner h2 a {
        color: white !important;
    }

    /* Indicador de "deslizar" o puntos (opcional, lo manejaremos con JS o visualmente) */
    .hero-main-stage::after {
        content: '⟵ Desliza para ver más ⟶';
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.7rem;
        z-index: 10;
        text-transform: uppercase;
        pointer-events: none;
    }

    .hero-overlay-content h2 {
        font-size: 1.6rem;
    }

    .nav-item {
        flex: 0 0 200px;
        border-bottom: none;
        border-right: 1px solid var(--c-border);
    }

    .nav-item::before {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        height: 4px;
        width: 100%;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar-col {
        order: 2;
    }

    .content-col {
        order: 1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .entry-title {
        font-size: 1.7rem !important;
        padding-right: 0 !important;
    }

    .site-header .container {
        padding: 0 15px;
    }

    /* Force full width on layout columns */
    .content-col,
    .sidebar-col {
        width: 100% !important;
        padding: 0 !important;
    }
}

@media screen and (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem !important;
    }

    .hero-main-stage {
        height: 480px !important;
    }

    .hero-slide-image-wrap {
        height: 200px;
    }

    .hero-slide-content-wrap {
        height: 280px;
    }

    .hero-slide-content-inner {
        padding: 15px;
    }

    .hero-slide-content-inner h2 {
        font-size: 1.3rem !important;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .std-card h4 {
        font-size: 0.95rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-header header.entry-header,
    header.entry-header {
        padding-bottom: 10px !important;
        margin-bottom: 20px !important;
    }

    .entry-title {
        font-size: 1.5rem !important;
    }
}