/*
Theme Name: Fundación Rosa Luxemburgo
Theme URI: https://www.rosaluxemburgo.org
Description: Tema WordPress moderno y limpio inspirado en Sporting Cristal con hero video, mobile-first y modo oscuro.
Version: 1.0.0
Author: Mauro Gatti - Cooperativa Tropa Circa
Author URI: https://coop.tropacirca.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rosa-luxemburgo
Tags: modern, clean, hero-video, mobile-first, dark-mode, responsive, accessibility
*/

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for fixed header */
}

/* CSS Variables - Root */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #d92b00;
  --accent-color: #d92b00;
  --text-dark: #000000;
  --text-light: #666666;
  --bg-primary: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #ffffff;
  --bg-secondary: #f8f8f8;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 14px;
  --border-radius-lg: 20px;
  --border-radius-img: 14px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary-color: #ffffff;
  --secondary-color: #d92b00;
  --accent-color: #d92b00;
  --text-dark: #ffffff;
  --text-light: #cccccc;
  --bg-primary: #000000;
  --bg-light: #1a1a1a;
  --bg-dark: #000000;
  --bg-secondary: #2a2a2a;
  --border-color: #404040;
}

/* UNIVERSAL FIX FOR ALL WHITE BUTTONS - AT THE TOP */
* {
  box-sizing: border-box;
}

/* BOTON VER MAS ESPECIFICO - CONTORNO NARANJA Y LETRA NARANJA */
.noticias-button, .ver-mas-button, .load-more-btn, .section-feed-load-more {
  background: transparent !important;
  color: var(--accent-color) !important;
  border: 1px solid var(--accent-color) !important;
  padding: 0.875rem 2rem !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-weight: 600 !important;
}

.noticias-button:hover, .ver-mas-button:hover, .load-more-btn:hover, .section-feed-load-more:hover {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
}

/* Dark mode - mismo comportamiento */
[data-theme="dark"] .noticias-button, [data-theme="dark"] .ver-mas-button, 
[data-theme="dark"] .load-more-btn, [data-theme="dark"] .section-feed-load-more {
  background: transparent !important;
  color: var(--accent-color) !important;
  border: 1px solid var(--accent-color) !important;
}

[data-theme="dark"] .noticias-button:hover, [data-theme="dark"] .ver-mas-button:hover, 
[data-theme="dark"] .load-more-btn:hover, [data-theme="dark"] .section-feed-load-more:hover {
  background: var(--accent-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.screen-reader-text:focus,
.skip-link:focus {
  clip: auto;
  -webkit-clip-path: none;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  overflow: visible;
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 99999;
  padding: 0.75rem 1rem;
  background: #ffffff;
  color: #000000;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Remove all focus and selection styles */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus,
button:active,
input:active,
textarea:active,
select:active,
a:active,
button:hover,
input:hover,
textarea:hover,
select:hover,
a:hover {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove focus ring from all elements */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Remove selection outline in WebKit browsers */
::-webkit-focus-ring {
  outline: none !important;
}

/* Remove button focus in Firefox */
button::-moz-focus-inner {
  border: 0 !important;
}

/* Remove focus from mobile menu links specifically */
.mobile-menu > ul > li > a:focus,
.mobile-menu > ul > li > a:active,
.mobile-menu > ul > li > a:hover {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove focus from newsletter elements */
.mobile-newsletter:focus,
.mobile-newsletter:active,
.mobile-newsletter:hover,
.mobile-newsletter h3:focus,
.mobile-newsletter h3:active,
.mobile-newsletter h3:hover,
.mobile-newsletter a:focus,
.mobile-newsletter a:active,
.mobile-newsletter a:hover {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  transition: var(--transition);
  overflow-x: hidden;
}

/* Prevent double scroll on search page */
body.search-page {
  overflow: visible !important;
  overflow-x: hidden !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-style: normal;
}

h1 { font-size: 2.4rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.008em; }
h3 { font-size: 1.6rem; line-height: 1.25; }
h4 { font-size: 1.35rem; line-height: 1.3; }
h5 { font-size: 1.15rem; line-height: 1.35; }
h6 { font-size: 1rem; line-height: 1.4; }

p {
  margin: 0 0 1.25rem;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: normal;
}

.content p,
.single-content p,
.page-content p {
  max-width: 72ch;
}

.single-content,
.page-content {
  font-size: 1.05rem;
  line-height: 1.75;
  letter-spacing: -0.002em;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.single-content h2,
.page-content h2 {
  font-size: 1.9rem;
}

.single-content h3,
.page-content h3 {
  font-size: 1.45rem;
}

.single-content blockquote,
.page-content b.related-posts {
  margin: 3rem 0 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--border-color);
}

.single-content blockquote,
.page-content blockquote {
  background: var(--bg-secondary);
  color: var(--text-dark);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.single-content blockquote p:last-child,
.page-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-content ul,
.single-content ol,
.page-content ul,
.page-content ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

.single-content li + li,
.page-content li + li {
  margin-top: 0.35rem;
}

.single-content figure,
.page-content figure {
  margin: 2rem 0;
}

.single-content figcaption,
.page-content figcaption {
  text-align: center;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.featured-image-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-img);
  box-shadow: var(--shadow-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Header hidden state (mobile scroll down) */
.header.header-hidden {
  transform: translateY(-100%);
}

/* Header compact state on scroll */
@media screen and (max-width: 768px) {
  /* Solid background on mobile to prevent content showing through */
  .header {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  [data-theme="dark"] .header {
    background: #1a1a1a !important;
  }
  
  .header.scrolled .header-container {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
  
  .header.scrolled .logo-img {
    height: 40px;
  }
  
  .header.scrolled .hamburger {
    width: 44px;
    height: 44px;
    padding: 0.5rem;
  }
  
  .header.scrolled .theme-toggle,
  .header.scrolled .search-toggle {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }
  
  .header.scrolled .header-search-form {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

/* Admin bar adjustment */
.admin-bar .header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}

[data-theme="dark"] .header {
  background: #1a1a1a;
}

.header-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media screen and (max-width: 768px) {
  .header-container {
    padding: 0.4rem 1rem;
  }
}

/* Logo */
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  text-decoration: none;
}

.logo:focus,
.logo:focus-visible,
.logo:active,
.custom-logo-link:focus,
.custom-logo-link:focus-visible,
.custom-logo-link:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.logo-img {
  height: 60px;
  width: auto;
  display: block;
  border-radius: 0 !important;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.nav {
  display: none;
}

.logo img {
  height: 60px;
  width: auto;
  margin-right: 0.5rem;
  border-radius: 0 !important;
  box-shadow: none;
}

.logo img:hover {
  transform: none;
}

/* For any custom-logo output */
.custom-logo,
.custom-logo-link img {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Mobile Navigation */
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-social {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.25rem;
}

.header-social .social-icon {
  color: var(--text-dark);
  opacity: 0.8;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border-radius: 50%;
}

.header-social .social-icon:hover {
  color: var(--secondary-color);
  opacity: 1;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

/* Desktop hover behavior */
@media (min-width: 768px) {
  .hamburger:hover {
    background: rgba(217, 43, 0, 0.1);
  }
  
  .hamburger:hover span {
    background: var(--secondary-color);
  }
  
  .hamburger:hover .hamburger-text {
    color: var(--secondary-color);
  }
}


.hamburger:focus,
.hamburger:focus-visible,
.hamburger:active {
  outline: none;
  box-shadow: none;
  background: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  transition: var(--transition);
  border-radius: 3px;
  position: relative;
  transform-origin: center;
  opacity: 1;
  margin: 3px 0;
}

/* Solo afectar a los primeros 3 spans (las líneas del hamburguesa) */
.hamburger span:nth-child(1),
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
  transform-origin: center;
}

/* El texto "Menú" (4to span) no debe tener estilos de línea */
.hamburger span.hamburger-text {
  display: block;
  font-size: 10px;
  color: var(--text-dark);
  margin-top: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  margin: 2px 0 0 0;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: var(--text-dark);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: var(--text-dark);
}

.hamburger.active {
  background: none;
}

/* Header Inline Search */
.header-search {
  display: flex;
  align-items: center;
  position: relative;
}

.header-search-form {
  position: absolute;
  right: 100%;
  margin-right: 0.5rem;
  width: 0;
  overflow: hidden;
  transition: width 0.3s ease;
}

.header-search.active .header-search-form {
  width: 340px;
}

.header-search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.header-search-input:focus {
  border-color: var(--accent-color);
  box-shadow: none;
  outline: none;
}

.header-search-input::placeholder {
  color: var(--text-light);
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.2rem;
  outline: none;
  position: relative;
  z-index: 1;
}

.search-toggle-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.search-toggle-tooltip::after {
  content: '';
  position: absolute;
  top: -4px;
  right: 10px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid rgba(0, 0, 0, 0.85);
}

.search-toggle:hover .search-toggle-tooltip,
.search-toggle:focus-visible .search-toggle-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-toggle:focus,
.search-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.search-toggle .close-icon {
  display: none !important;
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  outline: none;
}

.theme-toggle:focus,
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--bg-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Theme Toggle Wrapper & Tooltip */
.theme-toggle-wrapper {
  position: relative;
  display: inline-flex;
}

.theme-toggle-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: rgba(30, 30, 30, 0.95);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  font-style: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  pointer-events: none;
}

.theme-toggle-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(30, 30, 30, 0.95);
}

.theme-toggle-wrapper:hover .theme-toggle-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: auto;
  background: var(--bg-primary);
  z-index: 999;
  transform: translateY(-100%);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: transform 0.35s ease, visibility 0.35s ease, opacity 0.35s ease;
  overflow: visible;
  padding: 1.5rem 1.25rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 782px) {
  .admin-bar .mobile-menu {
    top: calc(46px + 70px);
  }
}

@media screen and (min-width: 783px) {
  .admin-bar .mobile-menu {
    top: calc(32px + 70px);
  }
}

.mobile-menu.active {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 1140px;
  margin: 0 auto;
}

.mobile-menu li {
  margin: 0;
}

.mobile-menu > ul > li.menu-item-has-children {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Desktop hover behavior for submenu parents */
@media (min-width: 768px) {
  .mobile-menu > ul > li.menu-item-has-children:hover > a {
    color: var(--secondary-color);
  }
}

.mobile-menu > ul > li > a {
  display: inline-block;
  padding: 0.18rem 0;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.mobile-menu > ul > li > a:hover {
  background: none;
  color: var(--accent-color);
  text-decoration: none;
}

[data-theme="dark"] .mobile-menu {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mobile-menu > ul > li > a {
  color: #ffffff;
}

[data-theme="dark"] .mobile-menu > ul > li > a:hover {
  color: var(--accent-color);
}

@media (min-width: 768px) {
  .mobile-menu {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 3rem;
  }

  .mobile-menu > ul {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.8rem;
  }

  .mobile-menu > ul > li {
    margin: 0;
    padding: 0;
  }

  .mobile-newsletter {
    grid-column: 2;
    justify-self: end;
    position: relative;
    margin-left: 1.8rem;
  }

  .mobile-newsletter::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.2);
  }

  [data-theme="dark"] .mobile-newsletter::before {
    background: rgba(255, 255, 255, 0.2);
  }

}

.mobile-menu ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 1rem 1.25rem;
  background: #1a1a1a;
  border-radius: 8px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.mobile-menu ul ul li {
  margin: 0;
  display: block;
}

.mobile-menu ul ul li a {
  display: block;
  font-weight: 500;
  color: #ffffff;
  padding: 0.5rem 0;
  width: 100%;
  white-space: nowrap;
}

.mobile-menu ul ul li a:hover {
  color: var(--secondary-color);
}

.mobile-menu li.menu-item-has-children > ul {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-menu li.menu-item-has-children > ul.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-submenu-toggle {
  background: none;
  border: none;
  padding: 0.2rem 0.35rem;
  margin-left: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: var(--text-light);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-submenu-toggle:focus,
.mobile-submenu-toggle:focus-visible,
.mobile-submenu-toggle:active {
  outline: none;
  box-shadow: none;
}

.mobile-submenu-toggle::-moz-focus-inner {
  border: 0;
}

.mobile-submenu-toggle svg {
  stroke: currentColor;
}

.mobile-submenu-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--secondary-color);
  background: rgba(217, 43, 0, 0.1);
}

.mobile-submenu-toggle:hover {
  color: var(--secondary-color);
  background: rgba(217, 43, 0, 0.05);
}

.mobile-submenu-toggle:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.mobile-newsletter {
  margin: 0.35rem 0 0.35rem auto;
  padding: 0.35rem 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 240px;
  width: 100%;
}

.mobile-newsletter h3 {
  margin: 0 auto 0.3rem;
  font-weight: 800;
  color: var(--text-dark);
  font-size: 1rem;
  text-align: center;
}

.mobile-newsletter p {
  margin: 0 0 0.6rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.mobile-newsletter .newsletter-input-wrap {
  background: #fff;
  border: 1px solid var(--border-color, #ddd);
}

.mobile-newsletter .newsletter-input-wrap input[type="email"] {
  color: var(--text-dark);
}

.mobile-newsletter .newsletter-input-wrap input[type="email"]::placeholder {
  color: var(--text-light);
}

.mobile-newsletter .newsletter-input-wrap button {
  background: var(--accent-color);
}

.mobile-newsletter .newsletter-input-wrap button:hover {
  background: var(--secondary-color);
}

.single-share {
  position: sticky;
  top: 140px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-light);
  padding-top: 2rem;
  align-self: start;
}

.single-layout {
  display: block;
}

.single-shell {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.single-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.single-post {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-img);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
}

.single-breadcrumbs {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.single-breadcrumbs-label {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.7rem;
  opacity: 0.75;
  margin-right: 0.75rem;
}

.single-breadcrumbs-trail {
  flex: 1;
  min-width: 0;
}

.single-breadcrumbs-date {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.7rem;
  opacity: 0.75;
}

.single-breadcrumbs a {
  color: var(--text-light);
}

.single-breadcrumbs a:hover {
  color: var(--secondary-color);
}

@media (max-width: 480px) {
  .single-breadcrumbs {
    flex-wrap: wrap;
  }
}

.single-share .share-label {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dark);
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 0;
  color: var(--text-dark);
  background: var(--bg-secondary);
  transition: var(--transition);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.share-button:hover {
  background: var(--secondary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 43, 0, 0.25);
}

.share-button svg {
  width: 20px;
  height: 20px;
}

.single-share-inline {
  display: none;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0;
}

.single-share-inline .share-label {
  width: 100%;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dark);
  font-size: 0.7rem;
  margin-bottom: 0.25rem;
}

.single-header {
  position: relative;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.single-hero-image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  object-position: center;
}

.single-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 3rem 2rem;
  pointer-events: none;
}

.single-hero-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  pointer-events: auto;
}

.featured-image {
  margin-bottom: 1.5rem;
}

.single-meta {
  display: grid;
  gap: 0.5rem;
}

.single-title {
  font-size: 1.6rem;
  line-height: 1.3;
}

.single-excerpt {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0.5rem 0 1.25rem;
}

.single-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--text-light);
  font-size: 0.95rem;
}

.single-tags a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-dark);
  font-size: 0.85rem;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-img);
  margin: 1.5rem 0;
}

.single-content iframe,
.single-content .wp-block-embed__wrapper iframe,
.single-content figure iframe {
  width: 100%;
  border: none;
  border-radius: var(--border-radius-img);
  overflow: hidden;
}

.single-content figure {
  margin: 2rem 0;
}

.single-content figcaption {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* WordPress File Block (PDF, downloads) */
.wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin: 1.5rem 0;
}

.wp-block-file__embed,
.wp-block-file object,
.wp-block-file embed,
.wp-block-file iframe {
  width: 100%;
  flex: 0 0 100%;
  height: 70vh;
  min-height: 520px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
}

.wp-block-file-preview {
  width: 100%;
  display: none;
}

@media (max-width: 768px) {
  .wp-block-file-preview {
    display: block;
  }

  .wp-block-file__embed {
    display: none !important;
  }

  .wp-block-file__embed,
  .wp-block-file object,
  .wp-block-file embed,
  .wp-block-file iframe {
    height: 60vh;
    min-height: 420px;
  }
}

.wp-block-file-preview iframe {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.wp-block-file-preview__inner {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.wp-block-file-preview canvas {
  display: block;
  width: 100%;
  height: auto;
}

.wp-block-file a:not(.wp-block-file__button) {
  color: var(--text-dark);
  font-weight: 500;
  text-decoration: none;
  flex: 1 1 auto;
}

.wp-block-file__button {
  background: var(--accent-color) !important;
  color: #fff !important;
  padding: 0.6rem 1.25rem !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: var(--transition) !important;
  border: none !important;
  margin-left: auto;
}

.wp-block-file__button:hover {
  background: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.single-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.author-bio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.author-avatar img {
  border-radius: 50%;
}

.post-navigation {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .single-shell {
    grid-template-columns: 1fr;
  }
  
  .single-share {
    display: none;
  }
  
  .single-share-inline {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .single-layout {
    padding-top: 80px;
  }

  .single-shell {
    padding: 1.25rem 0;
  }
  
  .single-breadcrumbs {
    padding-top: 0;
    margin-top: 0;
  }
  
  .single-content {
    text-align: left;
    max-width: 100%;
    margin: 0;
  }
  
  .single-title {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  
  .single-excerpt {
    font-size: 1rem;
  }
  
  .single-post {
    padding: 1.5rem;
    border-left: none;
    border-right: none;
    border-radius: var(--border-radius-img);
  }
  
  .single-content img,
  .single-content iframe,
  .single-content figure {
    margin-left: auto;
    margin-right: auto;
  }
  
  .single-share {
    justify-content: center;
  }
}

/* Main content - ensure it stays below header */
main {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 56px;
  z-index: 1;
}

.admin-bar .hero {
  margin-top: 88px;
}

@media screen and (max-width: 782px) {
  .admin-bar .hero {
    margin-top: 102px;
  }
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  content-visibility: visible;
  contain-intrinsic-size: 100vh 100vw;
  will-change: transform;
  transform: translateZ(0);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-gradient, linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(217, 43, 0, 0.5) 100%));
  z-index: 2;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: left;
  color: white;
  padding: 3rem 4rem;
  max-width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 2px 4px 8px rgba(0,0,0,0.4);
  line-height: 1.1;
  max-width: 800px;
  white-space: pre-wrap;
}

/* Hero title word animation */
.hero-title .hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: heroWordIn 1.2s ease forwards;
}

.hero-title .hero-word:nth-child(1) { animation-delay: 0s; }
.hero-title .hero-word:nth-child(2) { animation-delay: 0.3s; }
.hero-title .hero-word:nth-child(3) { animation-delay: 0.6s; }
.hero-title .hero-word:nth-child(4) { animation-delay: 0.9s; }
.hero-title .hero-word:nth-child(5) { animation-delay: 1.2s; }
.hero-title .hero-word:nth-child(6) { animation-delay: 1.5s; }
.hero-title .hero-word:nth-child(7) { animation-delay: 1.8s; }
.hero-title .hero-word:nth-child(8) { animation-delay: 2.1s; }
.hero-title .hero-word:nth-child(9) { animation-delay: 2.4s; }
.hero-title .hero-word:nth-child(10) { animation-delay: 2.7s; }

/* Loop animation - fade out after display */
.hero-title.animate-loop .hero-word {
  animation: heroWordLoop 12s ease infinite;
}

.hero-title.animate-loop .hero-word:nth-child(1) { animation-delay: 0s; }
.hero-title.animate-loop .hero-word:nth-child(2) { animation-delay: 0.3s; }
.hero-title.animate-loop .hero-word:nth-child(3) { animation-delay: 0.6s; }
.hero-title.animate-loop .hero-word:nth-child(4) { animation-delay: 0.9s; }
.hero-title.animate-loop .hero-word:nth-child(5) { animation-delay: 1.2s; }
.hero-title.animate-loop .hero-word:nth-child(6) { animation-delay: 1.5s; }
.hero-title.animate-loop .hero-word:nth-child(7) { animation-delay: 1.8s; }
.hero-title.animate-loop .hero-word:nth-child(8) { animation-delay: 2.1s; }
.hero-title.animate-loop .hero-word:nth-child(9) { animation-delay: 2.4s; }
.hero-title.animate-loop .hero-word:nth-child(10) { animation-delay: 2.7s; }

@keyframes heroWordIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroWordLoop {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  8% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  92% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 0;
    transform: translateY(30px);
  }
}

@keyframes heroButtonLoop {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  10% {
    opacity: 1;
    transform: translateY(-5px);
  }
  13% {
    opacity: 1;
    transform: translateY(0);
  }
  86% {
    opacity: 1;
    transform: translateY(0);
  }
  93% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 0;
    transform: translateY(30px);
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  white-space: pre-wrap;
}

.hero-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: heroLineIn 1.8s ease forwards;
  animation-delay: 1.5s;
}

.hero-button.animate-loop {
  animation: heroButtonLoop 12s ease infinite;
  animation-delay: 1.5s;
  border: none;
  cursor: pointer;
}

.hero-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

/* Content Area */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section {
  margin-bottom: 4rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  max-width: 200px;
}

.section-title::before {
  background: linear-gradient(90deg, transparent, var(--accent-color));
}

.section-title::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-primary);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
}

.card-content {
  padding: 1.5rem;
}

.card-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
}

.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #d92b00;
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  z-index: 2;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.card-category-badge:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 43, 0, 0.3);
  text-decoration: none;
  color: #fff;
}

[data-theme="dark"] .card-category-badge {
  background: #d92b00;
  color: #fff;
}

[data-theme="dark"] .card-category-badge:hover {
  background: var(--secondary-color);
  text-decoration: none;
  color: #fff;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  transition: var(--transition);
}

/* Stretched link: el enlace del título cubre toda la tarjeta */
.card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card:hover .card-title,
.card-title a:hover {
  color: var(--accent-color);
}

.card-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.card-link:hover {
  color: var(--secondary-color);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-img);
  transition: var(--transition);
}

img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Módulos Destacados (4 columnas cuadradas)
   ========================================================================== */
.modulos-section {
  padding: 4rem 2rem;
  background: #000;
}

.modulos-container {
  max-width: 1400px;
  margin: 0 auto;
}

.modulos-section-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.modulos-section-title::before,
.modulos-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  max-width: 200px;
}

.modulos-section-title::before {
  background: linear-gradient(90deg, transparent, var(--accent-color));
}

.modulos-section-title::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.modulos-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4.5rem) / 4);
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  padding-bottom: 0.5rem;
}

.modulos-grid::-webkit-scrollbar {
  display: none;
}

.modulo-card {
  background: #1a1a1a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-snap-align: start;
  border: 2px solid transparent;
}

.modulo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(217, 43, 0, 0.15);
  border-color: var(--accent-color);
}

/* Imágenes unificadas para todas las cards */
.modulo-image,
.pub-card-image,
.av-card-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: #f0f0f0;
  border-radius: 14px;
}

.modulo-image img,
.pub-card-image img,
.av-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.modulo-card:hover .modulo-image img,
.pub-card:hover .pub-card-image img,
.av-card:hover .av-card-thumbnail img {
  transform: scale(1.05);
}

.modulo-placeholder,
.pub-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: rgba(255, 255, 255, 0.5);
}

.modulo-placeholder svg,
.pub-card-placeholder svg {
  width: 60px;
  height: 60px;
}

.av-card-placeholder {
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3548 100%);
}

.modulo-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  border-top: 2px solid var(--accent-color);
}

.modulo-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-style: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modulo-title em {
  font-style: normal;
  color: var(--accent);
}

.modulo-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 0;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Wrapper con flechas de navegación */
.modulos-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modulos-nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modulos-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.modulos-nav svg {
  width: 24px;
  height: 24px;
}

/* Card como link */
a.modulo-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

/* Módulos Responsive */
@media (max-width: 1200px) {
  .modulos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .modulos-section {
    padding: 3rem 1rem;
  }
  
  .modulos-wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .modulos-nav {
    display: none;
  }
  
  .modulos-grid {
    grid-auto-flow: column;
    grid-auto-columns: 100vw;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    padding: 0 1rem;
  }
  
  .modulo-card,
  a.modulo-card {
    width: 100vw;
    max-width: 100vw;
    flex-direction: row;
    align-items: stretch;
  }
  
  .modulo-image {
    width: 40%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
  }
  
  .modulo-content {
    width: 60%;
    padding: 1rem;
  }
  
  .modulo-title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .modulo-desc {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (max-width: 480px) {
  .modulo-card,
  a.modulo-card {
    flex-direction: column;
  }
  
  .modulo-image {
    width: 100%;
  }
  
  .modulo-content {
    width: 100%;
  }
}

/* ==========================================================================
   Publicaciones Destacadas
   ========================================================================== */
.publicaciones-section {
  padding: 4rem 2rem;
  background-color: #f4f3ef;
  background-image:
    linear-gradient(rgba(217, 43, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 43, 0, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

[data-theme="dark"] .publicaciones-section {
  background-color: #1a1008;
  background-image:
    linear-gradient(rgba(217, 43, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 43, 0, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.publicaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .publicaciones-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100vw;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    padding: 0 1rem;
  }
  
  .pub-card {
    width: 100vw;
    max-width: 100vw;
  }
}

.pub-card {
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.pub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-color);
}

.pub-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: #f0f0f0;
  border-radius: 14px;
}

.pub-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.pub-card:hover .pub-card-image img {
  transform: scale(1.05);
}

.pub-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
}

.pub-card-placeholder svg {
  width: 80px;
  height: 80px;
}

.pub-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pub-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  line-height: 1.3;
  font-style: normal;
  transition: var(--transition);
}

.pub-card:hover .pub-card-title {
  color: var(--accent-color);
}

.pub-card-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  font-style: normal;
  flex: 1;
  margin-bottom: 1.25rem;
}

/* Card como link */
a.pub-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Noticias Section
   ========================================================================== */

.noticias-section {
  padding: 4rem 2rem;
  background: var(--accent-color);
}

.noticias-section-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 3rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.noticias-section-title::before,
.noticias-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  max-width: 200px;
}

.noticias-section-title::before {
  background: linear-gradient(90deg, transparent, #fff);
}

.noticias-section-title::after {
  background: linear-gradient(90deg, #fff, transparent);
}

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.noticia-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

[data-theme="dark"] .noticia-card {
  background: #111;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.noticia-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-color);
}

[data-theme="dark"] .noticia-card:hover {
  box-shadow: 0 8px 30px rgba(217, 43, 0, 0.18);
}

.noticia-card-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
}

.noticia-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.noticia-card:hover .noticia-card-image img {
  transform: scale(1.05);
}

.noticia-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

[data-theme="dark"] .noticia-card-placeholder {
  background: linear-gradient(135deg, #1c1c1c 0%, #0f0f0f 100%);
}

.noticia-card-content {
  padding: 1.25rem;
}

.noticia-card-date {
  display: block;
  font-size: 0.7rem;
  color: #999;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .noticia-card-date {
  color: rgba(255, 255, 255, 0.65);
}

.noticia-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

[data-theme="dark"] .noticia-card-title {
  color: rgba(255, 255, 255, 0.92);
}

.noticia-card:hover .noticia-card-title {
  color: var(--accent-color);
}

.noticias-ver-mas {
  text-align: center;
}

.noticias-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-style: normal;
  padding: 0.875rem 2rem;
  border: 2px solid var(--accent-color);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-color);
  background: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.noticias-button:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Dark mode for noticias-button */
[data-theme="dark"] .noticias-button {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: transparent;
}

[data-theme="dark"] .noticias-button:hover {
  background: var(--accent-color);
  color: #fff;
}

.audiovisuales-section .noticias-ver-mas {
  margin-top: 10px;
}

.audiovisuales-section .noticias-button {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: transparent;
}

.audiovisuales-section .noticias-button:hover {
  border-color: var(--accent-color);
  background-color: var(--accent-color);
  color: #fff;
}

[data-theme="dark"] .audiovisuales-section .noticias-button {
  border-color: rgba(255, 255, 255, 0.8);
  color: #ffffff;
}

[data-theme="dark"] .audiovisuales-section .noticias-button:hover {
  border-color: #ffffff;
  background-color: #ffffff;
  color: var(--accent-color);
}

.publicaciones-section .noticias-ver-mas {
  margin-top: 10px;
}

@media (max-width: 1200px) {
  .noticias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .noticias-section {
    padding: 3rem 1rem;
  }
  
  .noticias-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100vw;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    padding: 0 1rem;
  }
  
  .noticia-card {
    width: 100vw;
    max-width: 100vw;
  }
  
  .noticia-card-title {
    font-size: 0.95rem;
  }
}

.audiovisuales-section {
  padding: 4rem 2rem;
  background-color: #111111;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.11) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
}

/* Si la página es mediateca o la sección tiene clase mediateca, cambiar fondo */
.page-mediateca .audiovisuales-section,
.audiovisuales-section.mediateca,
body[class*="mediateca"] .audiovisuales-section {
  background: var(--bg-light) !important;
  background-image: none !important;
}

[data-theme="dark"] .page-mediateca .audiovisuales-section,
[data-theme="dark"] .audiovisuales-section.mediateca,
[data-theme="dark"] body[class*="mediateca"] .audiovisuales-section {
  background: var(--bg-secondary) !important;
}

/* REGLA UNIVERSAL PARA SECCIÓN MEDIATECA EN HOME - ATRAPA TODO */
.home .audiovisuales-section,
body.home .audiovisuales-section,
.page-template-home .audiovisuales-section {
  background: var(--bg-light) !important;
  background-image: none !important;
}

[data-theme="dark"] .home .audiovisuales-section,
[data-theme="dark"] body.home .audiovisuales-section,
[data-theme="dark"] .page-template-home .audiovisuales-section {
  background: var(--bg-secondary) !important;
}

/* Si el título dice Mediateca, cambiar el fondo */
.audiovisuales-section .section-title:contains("Mediateca"),
.audiovisuales-section .section-title:contains("MEDIATECA") {
  background: var(--bg-light) !important;
  background-image: none !important;
}

/* Atrapa cualquier sección con título Mediateca */
.section-title[medialateca],
.section-title.mediateca {
  background: var(--bg-light) !important;
}

/* Sección Mediateca - Fondo claro para modo light */
.mediateca-section {
  padding: 4rem 2rem;
  background: var(--bg-light);
}

[data-theme="dark"] .mediateca-section {
  background: var(--bg-secondary);
}

.audiovisuales-section .section-title {
  color: var(--text-dark);
}

/* Dark mode para audiovisuales */
[data-theme="dark"] .audiovisuales-section .section-title {
  color: #ffffff;
}

.audiovisuales-section .section-title::before {
  background: linear-gradient(90deg, transparent, rgba(217, 43, 0, 0.7));
}

.audiovisuales-section .section-title::after {
  background: linear-gradient(90deg, rgba(217, 43, 0, 0.7), transparent);
}

[data-theme="dark"] .audiovisuales-section {
  background-color: #080808;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
}

.audiovisuales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .audiovisuales-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100vw;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    padding: 0 1rem;
  }
  
  .av-card {
    width: 100vw;
    max-width: 100vw;
  }
}

.av-card {
  display: block;
  text-decoration: none;
  background: var(--bg-primary);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.av-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-color);
}

.av-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.5s ease;
}

.av-card:hover .av-card-thumbnail img {
  transform: scale(1.05);
}

.av-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3548 100%);
}

.av-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .av-card-play {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

.av-card-play svg {
  fill: none;
}

.av-card:hover .av-card-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent-color);
  color: white;
}

.av-card:hover .av-card-play svg {
  fill: none;
}

/* Newsletter error message styling */
.newsletter-error {
  color: var(--accent-color);
  font-size: 0.9rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  text-align: center;
}

[data-theme="dark"] .newsletter-error {
  background: rgba(0, 0, 0, 0.2);
}

/* Iconos de formato para Mediateca */
.av-card-format-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .av-card-format-icon {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.av-card-format-icon svg {
  width: 22px;
  height: 22px;
}

.av-card:hover .av-card-format-icon {
  transform: translate(-50%, -50%) scale(1.1);
  /* No cambiar fondo ni colores en hover */
}

/* Mantener colores del SVG consistentes - solo contorno */
.av-card-format-icon svg {
  color: var(--accent-color) !important;
  fill: none !important;
  stroke: var(--accent-color) !important;
  stroke-width: 2 !important;
}

[data-theme="dark"] .av-card-format-icon svg {
  stroke: var(--accent-color) !important;
  fill: none !important;
}

/* Colores específicos por formato (solo para estado normal) */
.av-card:not(:hover) .av-card-format-icon[data-format="video"],
.av-card:not(:hover) .av-card-format-icon[data-format="podcast"],
.av-card:not(:hover) .av-card-format-icon[data-format="article"],
[data-theme="dark"] .av-card:not(:hover) .av-card-format-icon[data-format="podcast"] {
  color: var(--accent-color);
}

/* Etiqueta de formato */
.av-card-format-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-light);
}

.av-card[data-format="video"] .av-card-format-label {
  background: rgba(217, 43, 0, 0.1);
  color: #d92b00;
}
.av-card[data-format="podcast"] .av-card-format-label {
  background: rgba(255, 140, 0, 0.1);
  color: var(--accent-color);
}

[data-theme="dark"] .av-card-format-label {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .av-card[data-format="video"] .av-card-format-label {
  background: rgba(217, 43, 0, 0.2);
}
[data-theme="dark"] .av-card[data-format="podcast"] .av-card-format-label {
  background: rgba(255, 140, 0, 0.2);
  color: var(--accent-color);
}

.av-card-content {
  padding: 1.25rem;
}

.av-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  line-height: 1.3;
  transition: var(--transition);
}

.av-card:hover .av-card-title {
  color: var(--accent-color);
}

.av-card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  font-style: normal;
}

/* Responsive */
@media (max-width: 768px) {
  .publicaciones-section,
  .audiovisuales-section {
    padding: 3rem 1rem;
  }
  
  .section-title,
  .modulos-section-title,
  .noticias-section-title,
  .ejes-section-title,
  .audiovisuales-section .section-title,
  .quienes-somos-title {
    font-size: 2rem;
    letter-spacing: 0.1em;
    line-height: 1.1;
    gap: 1rem;
  }
  
  .section-title::before,
  .section-title::after,
  .modulos-section-title::before,
  .modulos-section-title::after,
  .noticias-section-title::before,
  .noticias-section-title::after,
  .ejes-section-title::before,
  .ejes-section-title::after,
  .audiovisuales-section .section-title::before,
  .audiovisuales-section .section-title::after,
  .quienes-somos-title::before,
  .quienes-somos-title::after {
    max-width: 80px;
  }
  
  .publicaciones-grid,
  .audiovisuales-grid {
    grid-template-columns: 1fr;
  }
  
  .pub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ==========================================================================
   Artículos de la Categoría (Single Post)
   ========================================================================== */

/* Hero de categoría con imagen de portada */
.category-hero {
  position: relative;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.category-hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 3rem 2rem;
  pointer-events: none;
}

.category-hero-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  pointer-events: auto;
}

.category-posts-section {
  padding: 4rem 2rem;
  background: var(--bg-secondary);
}

.category-posts-container {
  max-width: 1200px;
  margin: 0 auto;
}

.category-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-top: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-posts-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.category-posts-title::before,
.category-posts-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  max-width: 200px;
}

.category-posts-title::before {
  background: linear-gradient(90deg, transparent, var(--accent-color));
}

.category-posts-title::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.category-posts-count {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.category-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.category-post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.category-post-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.category-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-post-card:hover .category-post-thumb img {
  transform: scale(1.05);
}

.category-post-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  font-style: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-post-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.category-posts-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.3s ease;
}

.category-posts-link:hover {
  gap: 0.75rem;
}

@media (max-width: 992px) {
  .category-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .category-posts-section {
    padding: 3rem 1rem;
  }
  
  .category-posts-header {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 2rem;
  }
  
  .category-hero {
    min-height: 300px;
  }
  
  .category-hero-overlay {
    padding: 2rem 1rem;
  }
  
  .category-hero-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .category-posts-title {
    font-size: 1.75rem;
    letter-spacing: 0.1em;
    gap: 1rem;
  }
  
  .category-posts-title::before,
  .category-posts-title::after {
    max-width: 80px;
  }
  
  .category-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  background: #12151c;
  padding: 3rem 2rem 1rem;
  border-top: none;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
}

.single-layout + .footer,
.single-layout ~ .footer {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 1rem 1rem;
  }
}

/* ==========================================================================
   Quienes Somos - Intro Section
   ========================================================================== */
.quienes-somos-intro {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-image: 
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%),
    radial-gradient(
      circle,
      rgba(0, 0, 0, 0.07) 1px,
      transparent 1px
    );
  background-size: auto, 20px 20px;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .quienes-somos-intro {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-image: 
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%),
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px
    );
  background-size: auto, 20px 20px;
}

.quienes-somos-container {
  max-width: 1200px;
  margin: 0 auto;
}

.quienes-somos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 500px;
}

.quienes-somos-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quienes-somos-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 0;
  position: relative;
}

.quienes-somos-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.quienes-somos-title a:hover::after,
.quienes-somos-title:hover::after {
  background: var(--accent-color);
  width: 100px;
}

.quienes-somos-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin: 0;
  position: relative;
}

.quienes-somos-text p {
  margin-bottom: 1.5rem;
}

.quienes-somos-text p:last-child {
  margin-bottom: 0;
}

.quienes-somos-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  align-self: flex-start;
}

.quienes-somos-button:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(217, 43, 0, 0.3);
  border-color: var(--accent-color);
}

.quienes-somos-button:hover svg {
  stroke: #fff;
  transform: translateX(4px);
}

.quienes-somos-button svg {
  transition: transform 0.3s ease;
}

.quienes-somos-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  min-height: 400px;
}

.quienes-somos-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
}

.quienes-somos-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.quienes-somos-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(217, 43, 0, 0.1) 0%, 
    rgba(217, 43, 0, 0.05) 50%, 
    transparent 100%);
  pointer-events: none;
}

.quienes-somos-image:hover img {
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .quienes-somos-intro {
    padding: 4rem 1.5rem;
  }
  
  .quienes-somos-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .quienes-somos-title {
    font-size: 2.5rem;
  }
  
  .quienes-somos-text {
    font-size: 1rem;
  }
  
  .quienes-somos-image {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .quienes-somos-intro {
    padding: 3rem 1rem;
  }
  
  .quienes-somos-grid {
    gap: 2rem;
  }
  
  .quienes-somos-title {
    font-size: 2rem;
  }
  
  .quienes-somos-text {
    font-size: 0.95rem;
  }
  
  .quienes-somos-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .quienes-somos-image-wrapper {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 480px) {
  .quienes-somos-title {
    font-size: 1.75rem;
  }
  
  .quienes-somos-text {
    font-size: 0.9rem;
  }
  
  .quienes-somos-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Footer Grid
   ========================================================================== */
.footer-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Footer Grid (mover aquí si es necesario)
   ========================================================================== */

/* Estilos unificados para carruseles del home */
.home-carousel-track {
  width: 100%;
  display: grid;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-padding-left: 0;
  align-items: stretch;
}

/* Desktop: 4 columnas perfectas */
@media (min-width: 1025px) {
  .home-carousel-track {
    grid-template-columns: none;
    grid-auto-columns: calc((100% - 4.5rem) / 4);
    grid-auto-flow: column;
    align-items: stretch;
  }
  
  .home-carousel-item {
    display: flex;
    height: 100%;
    min-height: 0;
  }
  
  /* Todas las cards con la misma altura y comportamiento */
  .modulo-card,
  .pub-card,
  .av-card,
  a.modulo-card,
  a.pub-card,
  a.av-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .modulo-card:hover,
  .pub-card:hover,
  .av-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }
  
  /* Asegurar que las imágenes también tengan bordes redondeados */
  .modulo-image img,
  .pub-card-image img,
  .av-card-thumbnail img {
    border-radius: 14px;
  }
  
  .pub-card-content,
  .av-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .modulo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
}

/* Tablet: 2 columnas */
@media (min-width: 769px) and (max-width: 1024px) {
  .home-carousel-track {
    grid-auto-columns: calc((100% - 1.5rem) / 2);
    grid-auto-flow: column;
    align-items: stretch;
  }
  
  .home-carousel-item {
    display: flex;
    height: 100%;
    min-height: 0;
  }
  
  .modulo-card,
  .pub-card,
  .av-card,
  a.modulo-card,
  a.pub-card,
  a.av-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .pub-card-content,
  .av-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .modulo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
}

/* Mobile: 1 columna */
@media (max-width: 768px) {
  .home-carousel-track {
    grid-auto-columns: 100%;
    grid-auto-flow: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .home-carousel-item {
    display: flex;
    height: 100%;
    min-height: 0;
  }
  
  .modulo-card,
  .pub-card,
  .av-card,
  a.modulo-card,
  a.pub-card,
  a.av-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .pub-card-content,
  .av-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .modulo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .home-carousel-item {
    scroll-snap-align: start;
  }
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.footer-col {
  padding: 0 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col:first-child {
  padding-left: 0;
}

.footer-col:last-child {
  border-right: none;
  padding-right: 0;
}

.footer-col h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
  font-size: 1.05rem;
  font-style: normal;
}

.footer-col p,
.footer-col p a {
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.9rem;
  font-style: normal;
}

.footer-col p a:hover {
  color: var(--accent-color) !important;
}

.footer-col p a[href^="mailto"] {
  white-space: nowrap;
}

@media (max-width: 992px) {
  .footer-col {
    border-right: none;
    padding-right: 0;
  }
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  list-style: none;
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-style: normal;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--accent-color);
}

/* Newsletter Form in Footer */
.footer-col-newsletter p {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  font-style: normal;
}

.newsletter-form {
  width: 100%;
}

.newsletter-input-wrap {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.newsletter-input-wrap:focus-within {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.15);
}

.newsletter-input-wrap input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}

.newsletter-input-wrap input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-input-wrap button {
  background: var(--accent-color);
  border: none;
  padding: 0.85rem 1rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-input-wrap button:hover {
  background: var(--secondary-color);
}

.newsletter-input-wrap button svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-copyright {
  margin: 0;
  font-size: 0.85rem;
}

.footer-copyright br + a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copyright br + a:hover {
  color: var(--accent-color);
}

.footer-bottom-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom-social span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-bottom-social a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--secondary-color);
  color: #fff;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1600;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  stroke: currentColor;
}

[data-theme="dark"] .back-to-top {
  background: #fff;
  color: #000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

[data-theme="dark"] .back-to-top:hover {
  background: var(--secondary-color);
  color: #fff;
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-modal.active {
  display: flex;
}

.search-container {
  background: var(--bg-light);
  padding: 1.75rem;
  border-radius: 18px;
  width: min(560px, 92%);
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  border: 1px solid var(--border-color);
}

.search-container form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.search-container input[type="search"],
.search-container input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-dark);
  transition: var(--transition);
}

.search-container input[type="search"]:focus,
.search-container input[type="text"]:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: none;
}

.search-container input[type="submit"],
.search-container button[type="submit"] {
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: none;
  background: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-container input[type="submit"]:hover,
.search-container button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.search-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: var(--transition);
  z-index: 3;
}

.search-close:hover {
  background: var(--bg-secondary);
  color: var(--text-dark);
}

/* Responsive Design */
@media (min-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  /* Hero content mobile - estilo más como desktop */
  .hero-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 3 !important;
    text-align: left !important;
    color: white !important;
    padding: 2rem 0.5rem !important;
    max-width: 100% !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%) !important;
  }
  
  .hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.4);
    line-height: 1.1;
    max-width: 100%;
    white-space: pre-wrap;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    white-space: pre-wrap;
    max-width: 100%;
  }
  
  .hero-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 1rem;
  }
  
  .content {
    padding: 2rem 1rem;
  }
  
  .header-container {
    padding: 1rem;
  }
  
  /* Hide search, theme toggle and social from header on mobile */
  .header .header-search,
  .header .theme-toggle,
  .header .header-social {
    display: none;
  }
  
  /* Add padding at bottom for the fixed bottom bar */
  body {
    padding-bottom: 70px;
  }
}

/* Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 767px) {
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
  }
  
  [data-theme="dark"] .mobile-bottom-bar {
    background: var(--bg-dark);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  
  .bottom-bar-item:hover,
  .bottom-bar-item:focus {
    color: var(--secondary-color);
    text-decoration: none;
  }
  
  .bottom-bar-item svg {
    width: 22px;
    height: 22px;
  }
  
  .bottom-bar-item span {
    line-height: 1;
  }
  
  /* Hide back-to-top on mobile since we have bottom bar */
  .back-to-top {
    bottom: 80px;
  }
}

/* Mobile Search Modal */
.mobile-search-modal {
  display: none;
}

@media (max-width: 767px) {
  .mobile-search-modal {
    display: block;
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .mobile-search-modal.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  [data-theme="dark"] .mobile-search-modal {
    background: var(--bg-dark);
  }
  
  .mobile-search-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .mobile-search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
  }
  
  .mobile-search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
  }
  
  .mobile-search-input::placeholder {
    color: var(--text-light);
  }
  
  .mobile-search-submit {
    padding: 0.875rem 1rem;
    background: var(--accent-color);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-search-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    white-space: nowrap;
  }
  
  .mobile-search-close:hover {
    color: var(--accent-color);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Related Posts - fuera del .single-shell, ancho propio */
.related-posts {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--border-color);
}

.related-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-img);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.related-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

.related-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s;
  border-radius: 14px;
}

.related-card:hover .related-thumb {
  transform: scale(1.05);
}

.related-body {
  padding: 1rem;
}

.related-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-cat {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--accent-color);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  pointer-events: none;
  z-index: 1;
}

.related-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
}

/* Responsive: 2 columns on tablet, 1 on mobile */
@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Post Navigation Enhanced */
.post-nav-enhanced {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.post-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-img);
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
}

.post-nav-item:hover {
  background: var(--bg-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-nav-prev {
  grid-column: 1;
}

.post-nav-next {
  grid-column: 2;
  text-align: right;
  justify-content: flex-end;
}

.post-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text-dark);
  flex-shrink: 0;
}

.post-nav-item:hover .post-nav-arrow {
  background: var(--secondary-color);
  color: #fff;
}

.post-nav-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.post-nav-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 600;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subscribe Section */
.subscribe-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #d92b00 100%);
  padding: 3rem 1.5rem;
  margin-top: 3rem;
}

.subscribe-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.subscribe-content h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.subscribe-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  margin: 0;
}

.subscribe-form {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  max-width: 400px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text-dark);
}

.subscribe-form input[type="email"]::placeholder {
  color: #999;
}

.subscribe-btn {
  padding: 0.875rem 1.5rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.subscribe-btn:hover {
  background: #000;
  transform: translateY(-2px);
}

/* Infinite Posts Section */
.infinite-posts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.infinite-posts-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-dark);
}

.infinite-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.infinite-post-card {
  background: var(--bg-light);
  border-radius: var(--border-radius-img);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.infinite-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.infinite-post-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.infinite-post-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
}

.infinite-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  border-radius: 14px;
}

.infinite-post-card:hover .infinite-post-thumb img {
  transform: scale(1.05);
}

.infinite-post-content {
  padding: 1.25rem;
}

.infinite-post-cat {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-color);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.infinite-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.infinite-post-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.infinite-posts-loader {
  text-align: center;
  margin-top: 2.5rem;
}

.load-more-btn {
  padding: 1rem 2.5rem;
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover {
  background: #e62e00;
  transform: translateY(-2px);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.load-more-btn.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 900px) {
  .post-nav-enhanced {
    grid-template-columns: 1fr;
  }
  
  .post-nav-next {
    grid-column: 1;
    text-align: left;
    justify-content: flex-start;
  }
  
  .subscribe-container {
    flex-direction: column;
    text-align: center;
  }
  
  .subscribe-form {
    width: 100%;
    max-width: none;
  }
  
  .infinite-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-nav-thumb {
    display: none;
  }
  
  .subscribe-form {
    flex-direction: column;
  }
  
  .infinite-posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Section Page Template
   ========================================================================== */

/* Hero Section */
.section-hero {
  position: relative;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--section-header-offset, 0px);
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  left: 50% !important;
  right: 50% !important;
  max-width: none !important;
  max-height: none !important;
}

/* Override section container for full-width hero */
.section-container .section-hero {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  left: 50% !important;
  right: 50% !important;
}

.section-hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.section-hero-image,
.section-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.section-hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: var(--section-hero-content-padding, 2rem);
  max-width: var(--section-hero-content-max-width, 900px);
  align-self: center;
  margin: 0 auto;
}

.section-hero-title {
  font-size: var(--section-hero-title-size, clamp(2.5rem, 5vw, 3.5rem));
  font-weight: 900;
  font-weight: var(--section-hero-title-font-weight, 900);
  font-family: var(--section-hero-title-font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--section-hero-text-color, var(--text-dark));
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
  display: inline-block;
}

/* Dark mode para section-hero-title */
[data-theme="dark"] .section-hero-title {
  color: var(--section-hero-text-color, #fff);
}

.section-hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30%;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.section-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,var(--section-hero-overlay-top, 0.3)) 0%,
    rgba(0,0,0,var(--section-hero-overlay-mid, 0.5)) 50%,
    rgba(0,0,0,var(--section-hero-overlay-bottom, 0.7)) 100%
  );
  z-index: 1;
}

.section-hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #d92b00 100%);
}

.section-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,var(--section-hero-overlay-top, 0.3)) 0%,
    rgba(0,0,0,var(--section-hero-overlay-mid, 0.5)) 50%,
    rgba(0,0,0,var(--section-hero-overlay-bottom, 0.7)) 100%
  );
}

.section-hero-content {
  position: relative;
  z-index: 2;
  text-align: var(--section-hero-text-align, left);
  padding: var(--section-hero-content-padding, 2rem);
  max-width: var(--section-hero-content-max-width, 900px);
  align-self: var(--section-hero-content-align, center);
  margin: 0 auto;
}

.section-hero-title {
  font-size: var(--section-hero-title-size, clamp(2.5rem, 5vw, 3.5rem));
  font-weight: 900;
  font-weight: var(--section-hero-title-font-weight, 900);
  font-family: var(--section-hero-title-font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--section-hero-text-color, #fff);
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.section-hero-subtitle {
  font-size: var(--section-hero-subtitle-size, clamp(1.1rem, 2.5vw, 1.5rem));
  font-weight: var(--section-hero-subtitle-font-weight, 700);
  font-family: var(--section-hero-subtitle-font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);
  color: rgba(255,255,255,0.9);
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Two Column Text Section */
.section-columns {
  padding: var(--section-columns-padding-y, 4rem) 1.5rem;
  background: var(--section-columns-bg, var(--bg-light));
}

.section-columns-container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.section-columns-container.section-columns-single {
  max-width: 800px;
  display: block;
}

.section-columns-single {
  grid-template-columns: 1fr;
}

.section-column {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.section-column p {
  margin: 0 0 1.25rem;
}

.section-column p:last-child {
  margin-bottom: 0;
}

.section-column h2,
.section-column h3,
.section-column h4 {
  margin: 0 0 1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.section-column h2 {
  font-size: 1.75rem;
}

.section-column h3 {
  font-size: 1.4rem;
}

.section-column-full {
  max-width: 800px;
  margin: 0 auto;
}

/* Reset Gutenberg block styles inside section */
.section-column .wp-block-group,
.section-column .wp-block-columns,
.section-column .wp-block-cover,
.section-column > * {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.section-column .wp-block-group__inner-container {
  max-width: none;
  padding: 0;
}

/* Reset Elementor styles inside section */
.section-column .elementor,
.section-column .elementor-widget-wrap,
.section-column .elementor-element,
.section-column .elementor-container,
.section-column .elementor-row,
.section-column .elementor-column,
.section-column .elementor-column-wrap,
.section-column .elementor-widget-container,
.section-column .elementor-section {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  display: block !important;
}

.section-column .elementor-section-wrap,
.section-column .elementor-inner {
  margin: 0 !important;
  padding: 0 !important;
}

.section-column .elementor-text-editor {
  padding: 0 !important;
}

.section-column .elementor-widget-text-editor {
  margin: 0 !important;
}

/* Hide Elementor empty placeholders */
.section-column .elementor-location-header,
.section-column .elementor-location-footer,
.section-column [data-elementor-type="header"],
.section-column [data-elementor-type="footer"] {
  display: none !important;
}

/* Ensure section page content is properly aligned */
.section-page {
  width: 100%;
}

.section-page .alignwide,
.section-page .alignfull {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
  width: 100%;
}

/* Reset any Elementor global styles on section pages */
.page-template-page-section .elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 100% !important;
}

.page-template-page-section .elementor-widget-wrap {
  padding: 0 !important;
}

/* YouTube Video Section */
.section-video {
  padding: 4rem 1.5rem;
  background: var(--bg-secondary);
}

.section-video-container {
  max-width: 900px;
  margin: 0 auto;
}

.section-video-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 2rem;
  color: var(--text-dark);
}

.section-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius-img);
  box-shadow: var(--shadow-lg);
}

.section-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-img);
}

/* Articles Feed Section */
.section-feed {
  padding: var(--section-feed-padding-y, 4rem) 1.5rem;
  background: var(--section-feed-bg, var(--bg-light));
}

.section-feed-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-feed-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--text-dark);
  display: none; /* Ocultar título "Artículos" */
}

.section-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.section-feed-load-more-wrap {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.section-feed-load-more {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  transition: var(--transition);
}

.section-feed-load-more:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.section-feed-load-more.loading,
.section-feed-load-more:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.section-feed-card {
  background: var(--bg-light);
  border-radius: var(--border-radius-img);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  transition: var(--transition);
}

.section-feed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.section-feed-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.section-feed-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}

.section-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  border-radius: 14px;
}

.section-feed-card:hover .section-feed-thumb img {
  transform: scale(1.05);
}

.section-feed-content {
  padding: 1.25rem;
}

.section-feed-cat {
  display: none; /* Ocultar la categoría de contenido normal */
}

/* Category badge sobre la imagen para section-feed - MÁS ESPECÍFICO */
.section-feed-card .card-category-badge,
.section-feed .card-category-badge,
.section-feed-grid .card-category-badge {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  background: #d92b00 !important;
  color: #fff !important;
  padding: 0.35rem 0.7rem !important;
  border-radius: 999px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  z-index: 2 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.section-feed-card .card-category-badge:hover,
.section-feed .card-category-badge:hover,
.section-feed-grid .card-category-badge:hover {
  background: var(--secondary-color) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(217, 43, 0, 0.3) !important;
  text-decoration: none !important;
  color: #fff !important;
}

[data-theme="dark"] .section-feed-card .card-category-badge,
[data-theme="dark"] .section-feed .card-category-badge,
[data-theme="dark"] .section-feed-grid .card-category-badge {
  background: #d92b00 !important;
  color: #fff !important;
}

[data-theme="dark"] .section-feed-card .card-category-badge:hover,
[data-theme="dark"] .section-feed .card-category-badge:hover,
[data-theme="dark"] .section-feed-grid .card-category-badge:hover {
  background: var(--secondary-color) !important;
  text-decoration: none !important;
  color: #fff !important;
}

/* Si usa .section-feed-cat como badge */
.section-feed-card .section-feed-cat {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  background: #d92b00 !important;
  color: #fff !important;
  padding: 0.35rem 0.7rem !important;
  border-radius: 999px !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  z-index: 2 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.section-feed-card .section-feed-cat:hover {
  background: var(--secondary-color) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(217, 43, 0, 0.3) !important;
  text-decoration: none !important;
  color: #fff !important;
}

.section-feed-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.5rem;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-feed-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.section-feed-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Section Page Responsive */
@media (max-width: 900px) {
  .section-hero {
    min-height: 50vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
  }
  
  .section-hero-image,
  .section-hero-video {
    object-fit: contain;
    object-position: center;
  }
  
  .section-columns-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .section-feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .section-hero {
    min-height: 40vh;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
  }
  
  .section-hero-content {
    padding: 1.5rem;
  }
  
  .section-columns {
    padding: 2.5rem 1rem;
  }
  
  .section-video {
    padding: 2.5rem 1rem;
  }
  
  .section-feed {
    padding: 2.5rem 1rem;
  }
  
  .section-feed-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Archive Pages (Categories, Tags, Authors, Dates)
   ========================================================================== */

.archive-main {
  padding-top: 120px;
}

.archive-header {
  background: transparent;
  padding: 3rem 1.5rem;
  margin-bottom: 2rem;
}

.archive-header-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.archive-label {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.archive-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.archive-title::before,
.archive-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  max-width: 200px;
}

.archive-title::before {
  background: linear-gradient(90deg, transparent, var(--accent-color));
}

.archive-title::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.archive-description {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 1rem;
  font-style: normal;
}

.archive-description p {
  margin: 0;
  font-style: normal;
}

.archive-count {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
}

.archive-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem 3rem;
}

.archive-content .card-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .archive-content .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .archive-content .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .archive-content {
    padding: 0 1.5rem 2rem;
  }
  
  .archive-content .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .archive-main {
    padding-top: 100px;
  }
  
  .archive-header {
    padding: 2rem 1rem;
  }
  
  .archive-title {
    font-size: 1.75rem;
    letter-spacing: 0.1em;
    gap: 1rem;
  }
  
  .archive-title::before,
  .archive-title::after {
    max-width: 80px;
  }
}

/* ==========================================================================
   Search Results Page
   ========================================================================== */

.search-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #d92b00 100%);
  padding: 3rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  border-radius: var(--border-radius-img);
}

.search-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.search-title span {
  display: block;
  color: rgba(255, 255, 255, 0.9);
}

.search-header .search-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-header .search-field {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
}

.search-header .search-field::placeholder {
  color: #999;
}

.search-header .search-submit {
  padding: 0.875rem 1.5rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-header .search-submit:hover {
  background: #000;
  transform: translateY(-2px);
}

/* Search page usa estilos de archive */

.search-count {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Search header usa estilos de archive */
.search-header {
  text-align: center;
  padding: 3rem 2rem;
}

.search-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.search-title span {
  color: var(--accent-color);
}

/* Search page usa responsive de archive */

.no-results {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
}

.no-results-title {
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.no-results-text {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.search-suggestions {
  background: var(--bg-secondary);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: left;
}

.search-suggestions h3 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.search-suggestions ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.search-suggestions li {
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.no-results .search-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.no-results .search-field {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 1rem;
  background: var(--bg-light);
  color: var(--text-dark);
}

.no-results .search-submit {
  padding: 0.875rem 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.no-results .search-submit:hover {
  background: var(--secondary-color);
}

@media (max-width: 768px) {
  .search-header {
    padding: 2rem 1rem;
  }
  
  .search-header .search-form,
  .no-results .search-form {
    flex-direction: column;
  }
  
  .search-results {
    padding: 0 1rem;
  }
}

/* ==========================================================================
   Modern Pagination
   ========================================================================== */

.pagination,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0 1rem;
  flex-wrap: wrap;
}

.pagination .nav-links {
  margin: 0;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.page-numbers:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 43, 0, 0.3);
}

.page-numbers.current {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(217, 43, 0, 0.4);
  cursor: default;
  transform: none;
}

.page-numbers.dots {
  background: transparent;
  border-color: transparent;
  cursor: default;
  min-width: 32px;
  padding: 0;
  color: var(--text-light);
}

.page-numbers.dots:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text-light);
  transform: none;
  box-shadow: none;
}

/* Prev/Next buttons with arrows */
.page-numbers.prev,
.page-numbers.next {
  padding: 0 1.25rem;
  gap: 0.5rem;
  font-weight: 500;
}

.page-numbers.prev::before {
  content: '←';
  font-size: 1.1rem;
}

.page-numbers.next::after {
  content: '→';
  font-size: 1.1rem;
}

/* Dark mode */
[data-theme="dark"] .page-numbers {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-dark);
}

[data-theme="dark"] .page-numbers:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

[data-theme="dark"] .page-numbers.current {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

[data-theme="dark"] .page-numbers.dots {
  background: transparent;
  border-color: transparent;
}

/* Pagination info text */
.pagination-info {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Responsive pagination */
@media (max-width: 600px) {
  .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }
  
  .page-numbers.prev,
  .page-numbers.next {
    padding: 0 0.75rem;
  }
  
  /* Hide some numbers on mobile, keep first, last, current and neighbors */
  .page-numbers:not(.prev):not(.next):not(.current):not(.dots) {
    display: none;
  }
  
  .page-numbers.current,
  .page-numbers.current + .page-numbers,
  .page-numbers:has(+ .page-numbers.current),
  .page-numbers.prev,
  .page-numbers.next,
  .page-numbers.dots {
    display: inline-flex;
  }
}

/* Section feed pagination (if added) */
.section-feed-pagination {
  margin-top: 2rem;
}

.section-feed-pagination .nav-links {
  gap: 0.75rem;
}

/* ==========================================================================
   Carousel / Slider Section
   ========================================================================== */

.carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  margin: 0 auto 3rem;
  max-width: calc(100% - 4rem);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 500px;
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 20px;
  overflow: hidden;
}

/* Slide Background Layers */
.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.slide-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.slide-bg-image-2 {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 2;
  mix-blend-mode: multiply;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.slide-gradient {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* Slide Content Box */
.slide-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  width: 100%;
}

.slide-box {
  max-width: 380px;
  padding: 2rem;
  border-radius: 12px;
  color: #fff;
}

.slide-box.position-left {
  margin-right: auto;
}

.slide-box.position-right {
  margin-left: auto;
}

.slide-box.position-center {
  margin: 0 auto;
  text-align: center;
}

.slide-box-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 1rem;
  line-height: 1.2;
  text-transform: lowercase;
}

.slide-box-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  opacity: 0.95;
}

.slide-box-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 30px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.slide-box-button:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.carousel-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

/* Carousel Dots */
.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  background: rgba(255,255,255,0.8);
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-section {
    max-width: 100%;
    border-radius: 0;
    margin-bottom: 2rem;
  }
  
  .carousel-container {
    height: 450px;
  }
  
  .carousel-slide {
    border-radius: 0;
  }
  
  .slide-box {
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 !important;
  }
  
  .slide-box-title {
    font-size: 1.5rem;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .carousel-prev {
    left: 0.5rem;
  }
  
  .carousel-next {
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 400px;
  }
  
  .slide-content {
    padding: 1rem;
  }
  
  .slide-box {
    padding: 1.25rem;
  }
  
  .slide-box-title {
    font-size: 1.25rem;
  }
  
  .slide-box-text {
    font-size: 0.85rem;
  }
}

/* Home Carousel */
.home-carousel {
  position: relative;
  width: 100%;
  padding: 0 1.5rem;
}

.home-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.home-carousel-btn:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.home-carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.home-carousel-btn.prev {
  left: -1.5rem;
}

.home-carousel-btn.next {
  right: -1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .home-carousel-btn {
    width: 44px;
    height: 44px;
  }
  .home-carousel-btn.prev {
    left: -0.75rem;
  }
  .home-carousel-btn.next {
    right: -0.75rem;
  }
}

@media (max-width: 768px) {
  .home-carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .home-carousel-btn.prev {
    left: -0.5rem;
  }
  .home-carousel-btn.next {
    right: -0.5rem;
  }
}

@media (max-width: 600px) {
  .home-carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .home-carousel-btn.prev {
    left: 0.5rem;
  }
  .home-carousel-btn.next {
    right: 0.5rem;
  }
}

/* ==========================================================================
   Image Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 1rem;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Make images in posts clickable */
.single-content img,
.entry-content img,
.wp-block-image img,
.wp-block-gallery img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.single-content img:hover,
.entry-content img:hover,
.wp-block-image img:hover,
.wp-block-gallery img:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    padding: 0.75rem;
  }
  
  .lightbox-prev {
    left: 0.5rem;
  }
  
  .lightbox-next {
    right: 0.5rem;
  }
  
  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}

/* ==========================================================================
   Nuestro Trabajo Section
   ========================================================================== */

.modulo-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-style: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modulo-title em {
  font-style: normal;
  color: var(--accent);
}

.modulo-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 0;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  font-weight: 800;
}

/* ===================================
   PÁGINA QUIÉNES SOMOS - DISEÑO GLOBAL
   =================================== */

/* Contenedor principal */
.quienes-page-global {
  background: var(--bg-primary);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Sección Introducción - Página Quiénes Somos */
.quienes-page-global .intro-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.intro-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.intro-text h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 2rem;
  color: var(--text-dark);
  position: relative;
}

.intro-text h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.intro-lead {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--text-light);
  font-weight: 400;
}

.intro-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Imagen Destacada - Página Quiénes Somos */
.intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-image-container {
  width: 100%;
  max-width: 500px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.featured-image {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

.featured-image-container:hover .featured-image {
  transform: scale(1.05);
}

.featured-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

/* Mapa Interactivo Mundial - Profesional con SVG del Usuario */
.world-map-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.world-map-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.interactive-world-map {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.world-map-svg-container {
  width: 100%;
  height: 800px;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  background: #000000;
}

.world-map-svg-container svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.1);
}

/* Estilos para el SVG del usuario - Mapa Negro con Bordes Naranjas */
.world-map-svg-container svg path {
  fill: #000000;
  stroke: #d92b00;
  stroke-width: 0.8;
  transition: all 0.4s ease;
  cursor: pointer;
}

.world-map-svg-container svg path:hover {
  fill: #1a1a1a;
  stroke: #d92b00;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(217, 43, 0, 0.4));
}

.world-map-svg-container svg polygon {
  fill: #000000;
  stroke: #d92b00;
  stroke-width: 0.8;
  transition: all 0.4s ease;
  cursor: pointer;
}

.world-map-svg-container svg polygon:hover {
  fill: #1a1a1a;
  stroke: #d92b00;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(217, 43, 0, 0.4));
}

/* Países específicos con colores naranjas */
.world-map-svg-container svg path[data-iso="US"]:hover,
.world-map-svg-container svg path[data-iso="MX"]:hover,
.world-map-svg-container svg path[data-iso="BR"]:hover,
.world-map-svg-container svg path[data-iso="AR"]:hover {
  fill: #d92b00;
  stroke: #d92b00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(217, 43, 0, 0.6));
}

.world-map-svg-container svg path[data-iso="DE"]:hover,
.world-map-svg-container svg path[data-iso="FR"]:hover,
.world-map-container svg path[data-iso="GB"]:hover,
.world-map-svg-container svg path[data-iso="ES"]:hover,
.world-map-container svg path[data-iso="IT"]:hover {
  fill: #d92b00;
  stroke: #d92b00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(217, 43, 0, 0.6));
}

.world-map-svg-container svg path[data-iso="CN"]:hover,
.world-map-svg-container svg path[data-iso="IN"]:hover,
.world-map-svg-container svg path[data-iso="JP"]:hover,
.world-map-svg-container svg path[data-iso="KR"]:hover {
  fill: #d92b00;
  stroke: #d92b00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(217, 43, 0, 0.6));
}

.world-map-container svg path[data-iso="ZA"]:hover,
.world-map-container svg path[data-iso="EG"]:hover,
.world-map-container svg path[data-iso="NG"]:hover,
.world-map-container svg path[data-iso="KE"]:hover {
  fill: #d92b00;
  stroke: #d92b00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(217, 43, 0, 0.6));
}

.world-map-svg-container svg path[data-iso="AU"]:hover,
.world-map-container svg path[data-iso="NZ"]:hover {
  fill: #d92b00;
  stroke: #d92b00;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 12px rgba(217, 43, 0, 0.6));
}

/* Overlay de puntos de oficinas */
.offices-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.office-point {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d92b00;
  border: 4px solid #ffffff;
  cursor: pointer;
  pointer-events: all;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 10;
  animation: pulse 2s infinite;
  box-shadow: 0 0 20px rgba(217, 43, 0, 0.8), 0 0 40px rgba(217, 43, 0, 0.4);
}

.office-point.headquarters {
  background: #d92b00;
  width: 28px;
  height: 28px;
  border-width: 5px;
  animation: headquartersPulse 2s infinite;
  box-shadow: 0 0 25px rgba(217, 43, 0, 1), 0 0 50px rgba(217, 43, 0, 0.6);
}

.office-point:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 30px rgba(217, 43, 0, 1), 0 0 60px rgba(217, 43, 0, 0.8);
  z-index: 20;
  background: #d92b00;
  border-color: #ffffff;
}

.office-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-bottom: 0.4rem;
  pointer-events: none;
  z-index: 30;
  border: 1px solid #d92b00;
}

.office-point:hover .office-tooltip {
  opacity: 1;
  visibility: visible;
  border-color: #d92b00;
}

/* Animaciones */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes headquartersPulse {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(217, 43, 0, 0.7); }
  50% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 10px rgba(217, 43, 0, 0); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(217, 43, 0, 0.7); }
}

/* Panel de información */
.office-info-panel {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.office-details h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.office-details p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .world-map-section {
    padding: 3rem 0;
  }
  
  .interactive-world-map {
    padding: 2rem 1rem;
  }
  
  .world-map-svg-container {
    height: 400px;
  }
  
  .office-point {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }
  
  .office-point.headquarters {
    width: 16px;
    height: 16px;
    border-width: 3px;
  }
  
  .office-tooltip {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .world-map-svg-container {
    height: 300px;
  }
  
  .office-point {
    width: 10px;
    height: 10px;
  }
  
  .office-point.headquarters {
    width: 14px;
    height: 14px;
  }
}

/* Lista de oficinas */

/* Panel de información */
.office-info-panel {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.office-info-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.office-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.office-description {
  color: var(--text-light);
  text-align: center;
}

/* Lista de oficinas */
.offices-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.office-region {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.office-region:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.office-region h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  position: relative;
}

.office-region h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.office-item {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-left: 3px solid transparent;
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.office-item:hover {
  border-left-color: var(--secondary-color);
  background: var(--bg-light);
  transform: translateX(5px);
}

.office-item.headquarters {
  border-left-color: var(--primary-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-light) 100%);
}

.office-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.office-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.office-item a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.office-item a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Grid de coordenadas */
.grid-lines {
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .world-map-svg {
    max-height: 500px;
  }
  
  .offices-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .world-map-section {
    padding: 4rem 0;
  }
  
  .interactive-world-map {
    padding: 2rem;
  }
  
  .world-map-svg {
    max-height: 400px;
  }
  
  .offices-list {
    grid-template-columns: 1fr;
  }
  
  .office-item {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .world-map-svg {
    max-height: 300px;
  }
  
  .office-region {
    padding: 1.5rem;
  }
  
  .office-region h3 {
    font-size: 1.1rem;
  }
}

/* Timeline de Historia */
.history-section {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.history-timeline {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.timeline-header {
  text-align: center;
  margin-bottom: 4rem;
}

.timeline-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--secondary-color);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  margin-bottom: 4rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-year {
  flex: 0 0 120px;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--secondary-color);
  background: var(--bg-primary);
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 2rem;
  position: relative;
  z-index: 2;
}

.timeline-content {
  flex: 1;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 15px solid transparent;
  transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
  right: -30px;
  border-left-color: var(--bg-secondary);
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: -30px;
  border-right-color: var(--bg-secondary);
}

.timeline-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.timeline-content p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Sección Oficina Regional Cono Sur */
.regional-office-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.regional-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.regional-text h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

.regional-lead {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 3rem;
  color: var(--text-light);
}

.work-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.work-area {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.work-area:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.work-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.work-area h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.work-area p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.regional-map {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: 3rem;
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
}

.country {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  font-weight: 700;
  color: var(--text-dark);
  transition: var(--transition);
  cursor: pointer;
}

.country:hover {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.05);
}

.country.argentina {
  background: linear-gradient(135deg, #74b9ff, #0984e3);
  color: white;
}

.country.chile {
  background: linear-gradient(135deg, #ff7675, #d63031);
  color: white;
}

.country.uruguay {
  background: linear-gradient(135deg, #55efc4, #00b894);
  color: white;
}

/* Sección Compromiso */
.commitment-section {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.commitment-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.commitment-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.commitment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.commitment-item {
  background: var(--bg-secondary);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-align: center;
}

.commitment-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.commitment-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.commitment-item h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.commitment-item p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Contacto CTA */
.contact-cta {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: white;
}

.cta-content p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid transparent;
}

.btn-primary {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  font-weight: bold !important;
  padding: 0.875rem 2rem !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.btn-primary:hover {
  background: #000000 !important;
  color: #ffffff !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
  text-decoration: none !important;
}

/* Dark mode for btn-primary */
[data-theme="dark"] .btn-primary {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

[data-theme="dark"] .btn-primary:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

.btn-secondary {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-secondary:hover {
  background: white;
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Dark mode styles for buttons */
[data-theme="dark"] .btn-primary {
  background: white;
  color: var(--secondary-color);
}

[data-theme="dark"] .btn-secondary {
  background: transparent;
  color: white;
  border-color: white;
}

[data-theme="dark"] .btn-secondary:hover {
  background: white;
  color: var(--secondary-color);
  border-color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Mailchimp Form Styles */
.mc4wp-form,
.mailchimp-form,
form[id*="mc-embedded"],
form[class*="mc4wp"] {
  max-width: 320px;
  margin: 1rem auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.mc4wp-form p,
.mailchimp-form p {
  margin-bottom: 1rem;
}

.mc4wp-form label,
.mailchimp-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mc4wp-form input[type="email"],
.mailchimp-form input[type="email"],
.mc4wp-form input[type="text"],
.mailchimp-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.mc4wp-form input[type="email"]:focus,
.mailchimp-form input[type="email"]:focus,
.mc4wp-form input[type="text"]:focus,
.mailchimp-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 2px rgba(217, 43, 0, 0.1);
}

.mc4wp-form input[type="submit"],
.mailchimp-form input[type="submit"],
.mc4wp-form button[type="submit"],
.mailchimp-form button[type="submit"] {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color) !important;
  color: #ffffff !important;
  border: 2px solid var(--accent-color) !important;
  border-radius: 999px !important;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.mc4wp-form input[type="submit"]:hover,
.mailchimp-form input[type="submit"]:hover,
.mc4wp-form button[type="submit"]:hover,
.mailchimp-form button[type="submit"]:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark mode for Mailchimp forms */
[data-theme="dark"] .mc4wp-form,
[data-theme="dark"] .mailchimp-form {
  background: transparent;
  border: none;
}

[data-theme="dark"] .mc4wp-form label,
[data-theme="dark"] .mailchimp-form label {
  color: var(--text-dark);
}

[data-theme="dark"] .mc4wp-form input[type="email"],
[data-theme="dark"] .mailchimp-form input[type="email"],
[data-theme="dark"] .mc4wp-form input[type="text"],
[data-theme="dark"] .mailchimp-form input[type="text"] {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-dark);
}

[data-theme="dark"] .mc4wp-form input[type="email"]:focus,
[data-theme="dark"] .mailchimp-form input[type="email"]:focus,
[data-theme="dark"] .mc4wp-form input[type="text"]:focus,
[data-theme="dark"] .mailchimp-form input[type="text"]:focus {
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .mc4wp-form,
  .mailchimp-form {
    margin: 0.5rem 1rem;
  }
}

/* Dark mode for btn-outline */
[data-theme="dark"] .btn-outline {
  background: transparent;
  color: white;
  border-color: white;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* General button contrast fixes */
[class*="button"][style*="background: white"], 
[class*="button"][style*="background: #fff"], 
[class*="button"][style*="background: #ffffff"],
[class*="btn"][style*="background: white"], 
[class*="btn"][style*="background: #fff"], 
[class*="btn"][style*="background: #ffffff"] {
  color: #1a1a1a !important;
}

/* Ensure buttons with dark background have light text */
[class*="button"][style*="background: #000"], 
[class*="button"][style*="background: #000000"],
[class*="btn"][style*="background: #000"], 
[class*="btn"][style*="background: #000000"] {
  color: #ffffff !important;
}

/* Dark mode button fixes */
[data-theme="dark"] [class*="button"][style*="background: white"], 
[data-theme="dark"] [class*="btn"][style*="background: white"], 
[data-theme="dark"] [class*="button"][style*="background: #fff"], 
[data-theme="dark"] [class*="btn"][style*="background: #fff"] {
  color: #1a1a1a !important;
}

/* Buttons with transparent background in dark mode */
[data-theme="dark"] [class*="button"].btn-outline,
[data-theme="dark"] [class*="btn"].btn-outline {
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* Specific button fixes for common issues */
button[style*="background: white"],
button[style*="background: #fff"],
button[style*="background: #ffffff"],
input[type="button"][style*="background: white"],
input[type="button"][style*="background: #fff"],
input[type="button"][style*="background: #ffffff"],
input[type="submit"][style*="background: white"],
input[type="submit"][style*="background: #fff"],
input[type="submit"][style*="background: #ffffff"],
.button[style*="background: white"],
.button[style*="background: #fff"],
.button[style*="background: #ffffff"],
.btn[style*="background: white"],
.btn[style*="background: #fff"],
.btn[style*="background: #ffffff"],
a.button[style*="background: white"],
a.button[style*="background: #fff"],
a.button[style*="background: #ffffff"],
a.btn[style*="background: white"],
a.btn[style*="background: #fff"],
a.btn[style*="background: #ffffff"],
button.white,
button.bg-white,
input[type="button"].white,
input[type="button"].bg-white,
input[type="submit"].white,
input[type="submit"].bg-white,
.button.white,
.button.bg-white,
.btn.white,
.btn.bg-white,
a.button.white,
a.button.bg-white,
a.btn.white,
a.btn.bg-white {
  color: #1a1a1a !important;
}

/* Force text color for dark background buttons */
button[style*="background: #000"],
button[style*="background: #000000"],
input[type="button"][style*="background: #000"],
input[type="button"][style*="background: #000000"],
input[type="submit"][style*="background: #000"],
input[type="submit"][style*="background: #000000"],
.button[style*="background: #000"],
.button[style*="background: #000000"],
.btn[style*="background: #000"],
.btn[style*="background: #000000"],
a.button[style*="background: #000"],
a.button[style*="background: #000000"],
a.btn[style*="background: #000"],
a.btn[style*="background: #000000"],
button.black,
button.bg-black,
input[type="button"].black,
input[type="button"].bg-black,
input[type="submit"].black,
input[type="submit"].bg-black,
.button.black,
.button.bg-black,
.btn.black,
.btn.bg-black,
a.button.black,
a.button.bg-black,
a.btn.black,
a.btn.bg-black {
  color: #ffffff !important;
}

/* Dark mode specific fixes */
[data-theme="dark"] button[style*="background: white"],
[data-theme="dark"] button[style*="background: #fff"],
[data-theme="dark"] button[style*="background: #ffffff"],
[data-theme="dark"] input[type="button"][style*="background: white"],
[data-theme="dark"] input[type="button"][style*="background: #fff"],
[data-theme="dark"] input[type="button"][style*="background: #ffffff"],
[data-theme="dark"] input[type="submit"][style*="background: white"],
[data-theme="dark"] input[type="submit"][style*="background: #fff"],
[data-theme="dark"] input[type="submit"][style*="background: #ffffff"],
[data-theme="dark"] .button[style*="background: white"],
[data-theme="dark"] .button[style*="background: #fff"],
[data-theme="dark"] .button[style*="background: #ffffff"],
[data-theme="dark"] .btn[style*="background: white"],
[data-theme="dark"] .btn[style*="background: #fff"],
[data-theme="dark"] .btn[style*="background: #ffffff"],
[data-theme="dark"] a.button[style*="background: white"],
[data-theme="dark"] a.button[style*="background: #fff"],
[data-theme="dark"] a.button[style*="background: #ffffff"],
[data-theme="dark"] a.btn[style*="background: white"],
[data-theme="dark"] a.btn[style*="background: #fff"],
[data-theme="dark"] a.btn[style*="background: #ffffff"],
[data-theme="dark"] button.white,
[data-theme="dark"] button.bg-white,
[data-theme="dark"] input[type="button"].white,
[data-theme="dark"] input[type="button"].bg-white,
[data-theme="dark"] input[type="submit"].white,
[data-theme="dark"] input[type="submit"].bg-white,
[data-theme="dark"] .button.white,
[data-theme="dark"] .button.bg-white,
[data-theme="dark"] .btn.white,
[data-theme="dark"] .btn.bg-white,
[data-theme="dark"] a.button.white,
[data-theme="dark"] a.button.bg-white,
[data-theme="dark"] a.btn.white,
[data-theme="dark"] a.btn.bg-white {
  color: #1a1a1a !important;
}

/* Outline buttons in dark mode */
[data-theme="dark"] button.btn-outline,
[data-theme="dark"] input[type="button"].btn-outline,
[data-theme="dark"] input[type="submit"].btn-outline,
[data-theme="dark"] .button.btn-outline,
[data-theme="dark"] .btn.btn-outline,
[data-theme="dark"] a.button.btn-outline,
[data-theme="dark"] a.btn.btn-outline,
[data-theme="dark"] button.outline,
[data-theme="dark"] input[type="button"].outline,
[data-theme="dark"] input[type="submit"].outline,
[data-theme="dark"] .button.outline,
[data-theme="dark"] .btn.outline,
[data-theme="dark"] a.button.outline,
[data-theme="dark"] a.btn.outline,
[data-theme="dark"] button[style*="background: transparent"],
[data-theme="dark"] input[type="button"][style*="background: transparent"],
[data-theme="dark"] input[type="submit"][style*="background: transparent"],
[data-theme="dark"] .button[style*="background: transparent"],
[data-theme="dark"] .btn[style*="background: transparent"],
[data-theme="dark"] a.button[style*="background: transparent"],
[data-theme="dark"] a.btn[style*="background: transparent"] {
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* Universal fix for any element with white background and white text */
[style*="background: white"][style*="color: white"],
[style*="background: white"][style*="color: #fff"],
[style*="background: white"][style*="color: #ffffff"],
[style*="background: #fff"][style*="color: white"],
[style*="background: #fff"][style*="color: #fff"],
[style*="background: #fff"][style*="color: #ffffff"],
[style*="background: #ffffff"][style*="color: white"],
[style*="background: #ffffff"][style*="color: #fff"],
[style*="background: #ffffff"][style*="color: #ffffff"] {
  color: #1a1a1a !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .intro-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .regional-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-left: 60px;
  }
  
  .timeline-year {
    position: absolute;
    left: -60px;
    margin: 0;
  }
  
  .timeline-content::before {
    left: -30px !important;
    border-right-color: var(--bg-secondary) !important;
    border-left: none !important;
  }
}

@media (max-width: 768px) {
  .hero-stats {
    gap: 2rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .work-areas {
    grid-template-columns: 1fr;
  }
  
  .commitment-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  
  .offices-list {
    grid-template-columns: 1fr;
  }
  
  .interactive-world-map {
    padding: 2rem 1rem;
  }
  
  .timeline-item {
    margin-left: 40px;
  }
  
  .timeline-year {
    left: -40px;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .section-header h2,
  .regional-text h2,
  .commitment-content h2,
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .intro-text h2 {
    font-size: 1.8rem;
  }
  
  .value-card,
  .work-area,
  .commitment-item {
    padding: 1.5rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  .timeline-item {
    margin-left: 30px;
  }
  
  .timeline-year {
    left: -30px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Efecto parallax suave */
.quienes-hero-global {
  background-attachment: fixed;
}

/* Mejoras de accesibilidad */
.office:focus,
.continent:focus,
.country:focus,
.btn:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Modo oscuro específico para esta página */
[data-theme="dark"] .interactive-world-map {
  background: var(--bg-dark);
  border-color: var(--border-color);
}

[data-theme="dark"] .office-info-panel {
  background: var(--bg-dark);
}

[data-theme="dark"] .timeline-content::before {
  border-right-color: var(--bg-dark);
  border-left-color: var(--bg-dark);
}

/* ===================================
   QUIÉNES SOMOS - NUEVO DISEÑO
   =================================== */

/* Hero Section Grande */
.quienes-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 700px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.quienes-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.quienes-hero-image .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quienes-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.quienes-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 4rem 2rem;
}

.quienes-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Dark mode para quienes-hero-content h1 */
[data-theme="dark"] .quienes-hero-content h1 {
  color: #ffffff;
}

.quienes-hero-content .hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  font-weight: 400;
}

/* Intro Section */
.quienes-intro {
  padding: 5rem 2rem;
  background: var(--bg-primary);
}

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.intro-main .intro-lead {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.intro-main p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.intro-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--secondary-color);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--secondary-color);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Oficinas Globales Section */
.oficinas-globales,
#sedes {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

/* Scroll behavior para anclas */
html {
  scroll-behavior: smooth;
}

/* Offset para anclas con header fijo */
#sedes {
  scroll-margin-top: 100px;
}

/* Asegurar que el ancla funcione */
:target {
  scroll-margin-top: 100px;
}

.oficinas-globales .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.oficinas-globales .section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.oficinas-globales .section-header p {
  font-size: 1.15rem;
  color: var(--text-light);
}

/* Region Blocks */
.region-block {
  margin-bottom: 3rem;
}

.region-block:last-child {
  margin-bottom: 0;
}

.region-header {
  margin-bottom: 1.5rem;
}

.region-icon {
  display: none;
}

.region-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  padding-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.region-header h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* Oficinas Grid */
.oficinas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.oficinas-grid.sede {
  display: flex;
  justify-content: center;
}

.oficinas-grid.sede .oficina-card.destacada {
  max-width: 500px;
  width: 100%;
  padding: 2.5rem;
}

.oficinas-grid.sede .oficina-ciudad {
  font-size: 1.4rem;
}

.oficinas-grid.sede .oficina-info p {
  font-size: 1.05rem;
}

/* Oficina Card */
.oficina-card {
  background: var(--bg-primary);
  padding: 1.75rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
}

.oficina-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.oficina-card.destacada {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-left: 4px solid var(--secondary-color);
}

.oficina-content {
  flex: 1;
  position: relative;
}

.oficina-image {
  width: 140px;
  height: 250px;
  min-width: 140px;
  overflow: hidden;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.oficina-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.oficina-card:hover .oficina-image img {
  transform: scale(1.05);
}

.oficina-region-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary-color);
  background: rgba(217, 43, 0, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.oficina-ciudad {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.oficina-info {
  margin-bottom: 1rem;
}

.oficina-info p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.oficina-info p:last-child {
  margin-bottom: 0;
}

.oficina-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.oficina-email:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Oficina Card como enlace */
a.oficina-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

a.oficina-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

a.oficina-card:hover .oficina-ciudad {
  color: var(--secondary-color);
}

a.oficina-card:hover .oficina-image img {
  transform: scale(1.05);
}

.oficina-link-icon {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

a.oficina-card:hover .oficina-link-icon {
  opacity: 1;
  transform: scale(1);
}

/* Responsive Quiénes Somos */
@media (max-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .intro-stats {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .oficinas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .oficina-card {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .oficina-image {
    width: 120px;
    height: 210px;
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .quienes-hero {
    height: 60vh;
    min-height: 400px;
  }
  
  .quienes-hero-content {
    padding: 3rem 0;
  }
  
  .quienes-intro {
    padding: 3rem 0;
  }
  
  .oficina-card {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .oficina-image {
    width: 100px;
    height: 180px;
    min-width: 100px;
  }
  
  .oficinas-grid {
    grid-template-columns: 1fr;
  }
  
  .intro-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .oficinas-globales {
    padding: 3rem 0;
  }
  
  .oficinas-grid {
    grid-template-columns: 1fr;
  }
  
  .region-header h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .quienes-hero {
    height: 50vh;
    min-height: 350px;
  }
  
  .oficina-card {
    padding: 1.25rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Ejes de Trabajo (Home) — Diseño editorial numerado
   ========================================================================== */

.ejes-section {
  padding: 5rem 2rem;
  background-color: var(--bg-secondary);
  background-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.07) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
}

[data-theme="dark"] .ejes-section {
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
}

.ejes-container {
  max-width: 1200px;
  margin: 0 auto;
}

.ejes-section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ejes-section-title a {
  color: inherit;
  text-decoration: none;
}

.ejes-section-title:hover::before,
.ejes-section-title:hover::after {
  background: linear-gradient(90deg, transparent, var(--accent-color));
  max-width: 200px;
  opacity: 1;
}

.ejes-section-title:hover::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.ejes-section-title a:hover::before,
.ejes-section-title a:hover::after {
  background: linear-gradient(90deg, transparent, var(--accent-color));
  max-width: 200px;
  opacity: 1;
}

.ejes-section-title a:hover::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.ejes-section-title::before,
.ejes-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color));
  max-width: 160px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.ejes-section-title::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.ejes-section-desc {
  text-align: center;
  max-width: 640px;
  margin: -1.25rem auto 2.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted, #777);
}

/* Mosaico asimétrico: card 1 alta (2 filas) + 2×2 a la derecha */
.ejes-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  grid-template-rows: 275px 275px;
  gap: 0.875rem;
}

.eje-card:nth-child(1) {
  grid-row: 1 / 3;
}

/* Tarjeta tipo imagen */
.eje-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  background: #111;
  border: 2px solid var(--accent-color);
  aspect-ratio: unset;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.45s ease;
}

.eje-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
}

a.eje-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
}

.eje-card:hover .eje-card-image {
  opacity: 1;
  transform: none;
}

.eje-card:hover .eje-card-image img {
  transform: scale(1.08);
}

/* Imagen de fondo */
.eje-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition: none;
  order: unset;
}

.eje-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.eje-card-placeholder {
  width: 100%;
  height: 100%;
}

.eje-placeholder-1 { background: linear-gradient(150deg, #1a0508 0%, #6b1520 50%, #2a0a12 100%); }
.eje-placeholder-2 { background: linear-gradient(150deg, #1a001a 0%, #7a005c 50%, #2d0030 100%); }
.eje-placeholder-3 { background: linear-gradient(150deg, #00101a 0%, #003d6b 50%, #001528 100%); }
.eje-placeholder-4 { background: linear-gradient(150deg, #001a0a 0%, #0a5c28 50%, #001a0a 100%); }
.eje-placeholder-5 { background: linear-gradient(150deg, #1a0e00 0%, #7a3d00 50%, #1a0800 100%); }

/* Overlay degradado */
.eje-card-overlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.05) 100%
  );
  transition: background 0.45s ease;
}

.eje-card-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1.0) 0%,
    rgba(0, 0, 0, 0.7) 40%,
    rgba(0, 0, 0, 0.4) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.eje-card:hover .eje-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.38) 55%,
    rgba(0, 0, 0, 0.04) 100%
  );
}

/* Contenido: columna vertical al pie */
.eje-card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.5rem 1.75rem;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  transition: border-color 0.3s ease;
}

.eje-card:hover .eje-card-content {
  border-top-color: var(--accent-color);
}

/* Círculo decorativo: oculto */
.eje-card-number {
  display: none;
}

/* Título */
.eje-card-title {
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0;
  padding-bottom: 10px;
  transition: none;
  position: relative;
}

.eje-card-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 12px;
  background: var(--accent-color);
  border-radius: 0;
  transition: width 0.3s ease;
  opacity: 1;
}

.eje-card:hover .eje-card-title {
  color: #fff;
}

.eje-card:hover .eje-card-title::after {
  width: 80px;
}

/* Card 1 tiene más espacio, título más grande */
.eje-card:nth-child(1) .eje-card-title {
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
}

.eje-card:nth-child(1) .eje-card-content {
  padding: 2rem 2rem 2.25rem;
}

/* Flecha */
.eje-card-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(6px);
  flex-shrink: 0;
}

.eje-card:hover .eje-card-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* Ejes Responsive */
@media (max-width: 960px) {
  .ejes-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 260px 220px 220px;
  }

  .eje-card:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }
}

@media (max-width: 580px) {
  .ejes-section {
    padding: 3rem 1rem;
  }

  .ejes-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 180px 180px;
    gap: 0.625rem;
  }

  .eje-card:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .eje-card-title {
    font-size: 1rem;
  }

  .eje-card:nth-child(1) .eje-card-title {
    font-size: 1.25rem;
  }

  .eje-card-content {
    padding: 1rem 1.1rem 1.25rem;
  }
}

@media (max-width: 380px) {
  .ejes-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .eje-card {
    min-height: 200px;
  }

  .eje-card:nth-child(1) {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ==========================================================================
   PDF Flipbook  (.rosa-flipbook)
   ========================================================================== */
.rosa-flipbook {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 2rem auto;
  background: #1a1a1a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.45);
  font-family: inherit;
}

.fb-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: #ccc;
  font-size: .9rem;
}
.fb-loader-bar {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.fb-loader-bar::after {
  content: '';
  position: absolute;
  left: -60%;
  width: 60%;
  height: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  animation: fb-slide 1.2s linear infinite;
}
@keyframes fb-slide {
  to { left: 110%; }
}
.fb-error {
  color: #f88;
  font-size: .95rem;
}
.fb-error a { color: #fff; }

/* Viewport / stage */
.fb-viewport {
  position: relative;
  width: 100%;
}
.fb-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  background: #2a2a2a;
  min-height: 300px;
  transition: transform .3s ease, opacity .3s ease;
}
.fb-stage.fb-flip-next  { animation: fb-flip-next  .3s ease; }
.fb-stage.fb-flip-prev  { animation: fb-flip-prev  .3s ease; }
@keyframes fb-flip-next { 0%{opacity:1;transform:translateX(0)} 50%{opacity:.3;transform:translateX(-2%)} 100%{opacity:1;transform:translateX(0)} }
@keyframes fb-flip-prev { 0%{opacity:1;transform:translateX(0)} 50%{opacity:.3;transform:translateX(2%)} 100%{opacity:1;transform:translateX(0)} }

.fb-page {
  flex: 1;
  min-width: 0;
  position: relative;
}
.fb-page-inner {
  width: 100%;
  background: #fff;
}
.fb-canvas-left,
.fb-canvas-right {
  display: block;
  width: 100%;
  height: auto;
}
.fb-spine {
  width: 6px;
  align-self: stretch;
  background: linear-gradient(to right, rgba(0,0,0,.35), rgba(0,0,0,.05));
  flex-shrink: 0;
}
.fb-stage.fb-single .fb-spine { display: none; }
.fb-stage.fb-single .fb-page  { max-width: 600px; margin: 0 auto; flex: none; width: 100%; }

/* Invisible tap zones */
.fb-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  cursor: pointer;
  z-index: 2;
}
.fb-tap-prev { left: 0; }
.fb-tap-next { right: 0; }

/* Controls bar */
.fb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .6rem 1rem;
  background: #111;
  border-top: 1px solid rgba(255,255,255,.08);
}
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 3px;
  color: #ddd;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.fb-btn:hover:not(:disabled) { background: var(--accent-color); color: #fff; }
.fb-btn:disabled { opacity: .3; cursor: default; }
.fb-pager {
  font-size: .8rem;
  color: #aaa;
  min-width: 6rem;
  text-align: center;
  letter-spacing: .03em;
}

/* Fullscreen */
.rosa-flipbook:fullscreen {
  max-width: 100vw;
  border-radius: 0;
}
.rosa-flipbook:fullscreen .fb-stage {
  height: calc(100vh - 50px);
  overflow: auto;
}

/* ==========================================================================
   Iframe embed  (.rosa-iframe-wrap)
   ========================================================================== */
.rosa-iframe-wrap {
  margin: 2rem 0;
  border: none;
  padding: 0;
}
.rosa-iframe-embed {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.rosa-iframe-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: none;
}
.rosa-iframe-caption {
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--text-muted, #888);
  text-align: center;
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  .rosa-flipbook { border-radius: 0; }
  .fb-pager { min-width: 4.5rem; }
  .rosa-iframe-embed { border-radius: 2px; }
}

/* ==========================================================================
   MEDIATECA page-mediateca.php
   ========================================================================== */

.mediateca-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.mediateca-hero {
  padding: 7.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-bar .mediateca-hero {
  padding-top: 9.5rem;
}

.mediateca-hero-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

.mediateca-main-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-dark) !important;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Dark mode para el título */
[data-theme="dark"] .mediateca-main-title {
  color: #ffffff !important;
}

/* REGLA UNIVERSAL BRUTAL PARA MEDIATECA - ATRAPA TODO */
.mediateca-main-title,
.page-mediateca h1,
.page-mediateca h2,
.page-mediateca h3,
.page-mediateca .title,
.page-mediateca .main-title,
.mediateca h1,
.mediateca h2,
.mediateca h3,
.mediateca .title,
.mediateca .main-title,
body.page-mediateca h1,
body.page-mediateca h2,
body.page-mediateca h3,
body.page-mediateca .title,
body.page-mediateca .main-title,
.mediateca-hero h1,
.mediateca-hero h2,
.mediateca-hero h3,
.mediateca-hero .title,
.mediateca-hero .main-title {
  color: var(--text-dark) !important;
}

[data-theme="dark"] .mediateca-main-title,
[data-theme="dark"] .page-mediateca h1,
[data-theme="dark"] .page-mediateca h2,
[data-theme="dark"] .page-mediateca h3,
[data-theme="dark"] .page-mediateca .title,
[data-theme="dark"] .page-mediateca .main-title,
[data-theme="dark"] .mediateca h1,
[data-theme="dark"] .mediateca h2,
[data-theme="dark"] .mediateca h3,
[data-theme="dark"] .mediateca .title,
[data-theme="dark"] .mediateca .main-title,
[data-theme="dark"] body.page-mediateca h1,
[data-theme="dark"] body.page-mediateca h2,
[data-theme="dark"] body.page-mediateca h3,
[data-theme="dark"] body.page-mediateca .title,
[data-theme="dark"] body.page-mediateca .main-title,
[data-theme="dark"] .mediateca-hero h1,
[data-theme="dark"] .mediateca-hero h2,
[data-theme="dark"] .mediateca-hero h3,
[data-theme="dark"] .mediateca-hero .title,
[data-theme="dark"] .mediateca-hero .main-title {
  color: #ffffff !important;
}

/* ATRAPA CUALQUIER ELEMENTO CON TEXTO MEDIATECA */
[class*="mediateca"] h1,
[class*="mediateca"] h2,
[class*="mediateca"] h3,
[class*="mediateca"] .title,
[class*="mediateca"] .main-title {
  color: var(--text-dark) !important;
}

[data-theme="dark"] [class*="mediateca"] h1,
[data-theme="dark"] [class*="mediateca"] h2,
[data-theme="dark"] [class*="mediateca"] h3,
[data-theme="dark"] [class*="mediateca"] .title,
[data-theme="dark"] [class*="mediateca"] .main-title {
  color: #ffffff !important;
}

/* ATRAPA CUALQUIER H1 EN PÁGINA MEDIATECA */
body[class*="mediateca"] h1,
body[class*="mediateca"] h2,
body[class*="mediateca"] h3,
body[class*="mediateca"] .title,
body[class*="mediateca"] .main-title {
  color: var(--text-dark) !important;
}

[data-theme="dark"] body[class*="mediateca"] h1,
[data-theme="dark"] body[class*="mediateca"] h2,
[data-theme="dark"] body[class*="mediateca"] h3,
[data-theme="dark"] body[class*="mediateca"] .title,
[data-theme="dark"] body[class*="mediateca"] .main-title {
  color: #ffffff !important;
}

.mediateca-intro-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-light);
}
.mediateca-intro-text p { margin-bottom: .75rem; }
.mediateca-intro-text p:last-child { margin-bottom: 0; }
.mediateca-intro-text a { color: var(--accent-color); }

/* Filter bar */
.mediateca-filterbar-wrap {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: .85rem 0;
}

.mediateca-filterbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Search */
.mediateca-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.mediateca-search-input {
  width: 200px;
  padding: .45rem .45rem .45rem 2.1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: .875rem;
  color: var(--text-dark);
  background: var(--bg-primary);
  transition: border-color .2s, width .25s;
  font-family: inherit;
}

.mediateca-search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  width: 240px;
}

.mediateca-search-icon {
  position: absolute;
  left: .6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  line-height: 0;
}

/* Tabs */
.mediateca-tabs {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.mediateca-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border: 2px solid transparent;
  border-radius: 50px;
  background: none;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
}

.mediateca-tab svg {
  flex-shrink: 0;
  color: inherit;
}

.mediateca-tab:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.mediateca-tab.active {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(217, 43, 0, .06);
}

/* Grid section */
.mediateca-grid-section {
  padding: 2.5rem 0 4rem;
}

.mediateca-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Cards */
.media-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  overflow: visible;
  transition: transform .22s, box-shadow .22s;
}

.media-card:hover {
  transform: translateY(-4px);
}

/* Thumb */
.media-card-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-img);
  background: var(--bg-secondary);
  text-decoration: none;
}

.media-card--publication .media-card-thumb {
  aspect-ratio: 3 / 4;
}

.media-card--video .media-card-thumb,
.media-card--podcast .media-card-thumb {
  aspect-ratio: 16 / 10;
}

.media-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .35s;
}

.media-card:hover .media-card-img {
  transform: scale(1.04);
}

.media-card-no-img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--border-color);
}

.media-card-no-img svg {
  width: 48px;
  height: 48px;
}

/* Type badge over image */
.media-type-badge {
  position: absolute;
  top: .65rem;
  left: .65rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-type-badge--publication {
  background: rgba(217, 43, 0, .85);
  color: #fff;
}

.media-type-badge--video {
  background: rgba(0, 0, 0, .72);
  color: #fff;
}

.media-type-badge--podcast {
  background: rgba(26, 26, 26, .78);
  color: #fff;
}

/* Play overlay */
.media-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s;
}

.media-card:hover .media-play-overlay {
  opacity: 1;
}

/* Card body */
.media-card-body {
  padding: .9rem .75rem 1rem;
}

.media-card-cat {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-color);
  margin-bottom: .35rem;
}

.media-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: .85rem;
  color: var(--text-dark);
}

.media-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color .18s;
}

.media-card-title a:hover {
  color: var(--accent-color);
}

/* Action buttons */
.media-card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.media-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem .9rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, color .18s, transform .15s;
  white-space: nowrap;
  line-height: 1;
}

.media-btn:hover {
  transform: translateY(-1px);
}

.media-btn--primary {
  background: var(--accent-color);
  color: #fff;
}

.media-btn--primary:hover {
  background: #b82200;
  color: #fff;
}

.media-btn--secondary {
  background: #2a2a2a;
  color: #fff;
}

.media-btn--secondary:hover {
  background: #111;
  color: #fff;
}

/* Empty state */
.mediateca-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
}

.mediateca-empty svg {
  display: block;
  margin: 0 auto 1rem;
  opacity: .35;
}

.mediateca-empty p {
  font-size: 1rem;
}

/* ------------------------------------------------------------------
   Radio Rosa — Spotify embed block
   ------------------------------------------------------------------ */
.radio-rosa-wrap {
  background: #121212;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.radio-rosa-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.radio-rosa-header {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.radio-rosa-icon {
  display: inline-flex;
  align-items: center;
  color: #1DB954;
  flex-shrink: 0;
}

.radio-rosa-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.01em;
  margin: 0;
}

.radio-rosa-embed {
  width: 100%;
}

.radio-rosa-embed iframe {
  display: block;
  border: none;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .mediateca-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .mediateca-main-title {
    font-size: 2rem;
  }

  .mediateca-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .mediateca-filterbar {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .mediateca-search-input,
  .mediateca-search-input:focus {
    width: 100%;
  }

  .mediateca-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .3rem;
    padding-bottom: .25rem;
  }

  .mediateca-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .media-card--publication .media-card-thumb {
    aspect-ratio: 4 / 3;
  }
}

/* ------------------------------------------------------------------
   Audioteca — category-audioteca.php
   ------------------------------------------------------------------ */

/* Filterbar sin tabs: solo buscador + contador */
.mediateca-filterbar--search-only {
  justify-content: space-between;
}

.audioteca-count {
  font-size: .85rem;
  color: var(--text-muted, #888);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Extracto dentro de la card */
.media-card-excerpt {
  font-size: .82rem;
  color: var(--text-muted, #666);
  line-height: 1.5;
  margin: .4rem 0 .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Placeholder específico para podcast (fondo oscuro acorde a Spotify) */
.media-card-no-img--podcast {
  background: #121212;
  color: #1DB954;
}

/* En la página de audioteca el embed de Radio Rosa siempre es visible */
.audioteca-page .radio-rosa-wrap {
  display: block;
}

/* ------------------------------------------------------------------
   YouTube channel block — yt-channel-wrap
   ------------------------------------------------------------------ */
.yt-channel-wrap {
  background: #0f0f0f;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.yt-channel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.yt-channel-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  grid-column: 1 / -1;
}

.yt-channel-icon {
  color: #FF0000;
  flex-shrink: 0;
  display: flex;
}

.yt-channel-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.yt-channel-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.yt-channel-desc {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0;
}

.yt-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #FF0000;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .65rem 1.4rem;
  border-radius: 2rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
  width: fit-content;
}

.yt-channel-btn:hover {
  background: #cc0000;
  transform: translateY(-1px);
  color: #fff;
}

.yt-channel-embed {
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
}

.yt-channel-embed iframe {
  display: block;
}

/* En la página de audiovisuales el bloque YouTube siempre es visible */
.audiovisuales-page .yt-channel-wrap {
  display: block;
}

@media (max-width: 768px) {
  .yt-channel-inner {
    grid-template-columns: 1fr;
  }
  .yt-channel-header {
    grid-column: 1;
  }
}
