/*
Theme Name: La Nota 25
Theme URI: https://lanotatucuman.com
Author: La Nota / Mauro
Author URI: https://lanotatucuman.com
Description: Tema de noticias optimizado para La Nota Tucumán. Incluye sidebar derecho, menú móvil, widgets de Tendencias, Publicidad y Foro. Optimizado para rendimiento y SEO con soporte WebP y responsive design.
Version: 2.5.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: la-nota-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ===== Right Sidebar Styles ===== */
/* Definición movida más abajo para evitar conflictos */

/* Search Widget */
.search-widget {
  margin-bottom: 24px;
}

.search-form {
  position: relative;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  background: var(--background-secondary);
  color: var(--text-color);
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-field:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--background-color);
  box-shadow: 0 0 0 3px rgba(255, 69, 69, 0.1);
}

.search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.search-submit:hover {
  color: var(--primary-color);
  background: rgba(255, 69, 69, 0.1);
}

/* Theme Toggle Widget */
.theme-toggle-widget {
  margin-bottom: 24px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: var(--background-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.theme-toggle-btn:hover {
  background: var(--hover-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.theme-toggle-btn i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover i {
  transform: rotate(15deg);
}

/* Dark theme styles */
[data-theme="dark"] .search-field,
body.dark-theme .search-field {
  background: var(--background-tertiary);
  border-color: var(--border-color-dark);
}

[data-theme="dark"] .theme-toggle-btn,
body.dark-theme .theme-toggle-btn {
  background: var(--background-tertiary);
  border-color: var(--border-color-dark);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .right-sidebar {
    display: none;
  }
}

/* Login to comment styles */
.login-to-comment {
  background: var(--background-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 20px;
}

.login-to-comment h4 {
  color: var(--text-color);
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
}

.login-to-comment p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.comment-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.comment-cta-actions .btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.comment-cta-actions .btn-primary {
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.comment-cta-actions .btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.comment-cta-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== More actions (three dots) ===== */
.single-post .post-header { position: relative; }
.post-media, .post-image-wrapper, .forum-topic-header, .debate-card { position: relative; }
.more-actions { position: absolute; top: 8px; right: 8px; z-index: 1600; }
.more-actions__btn {
  appearance: none;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--background-color);
  color: var(--text-color);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.more-actions__btn:hover { 
  background: var(--hover-color); 
  border-color: var(--text-secondary);
  transform: scale(1.05);
}
[data-theme="dark"] .more-actions__btn:hover, body.dark-theme .more-actions__btn:hover { 
  background: var(--hover-color); 
}
.more-actions__menu {
  position: absolute; top: 40px; right: 0;
  min-width: 220px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 6px;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1700;
}
.more-actions.is-open .more-actions__menu { 
  display: block; 
  opacity: 1;
  transform: translateY(0);
}
.more-actions__item { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  width: 100%; 
  padding: 10px 12px; 
  border-radius: 8px; 
  background: transparent; 
  color: var(--text-color); 
  border: 0; 
  cursor: pointer; 
  text-align: left;
  font-size: 14px;
  transition: background 0.15s ease;
}
.more-actions__item:hover { 
  background: var(--hover-color); 
}
.more-actions__item[disabled] { 
  opacity: 0.6; 
  cursor: not-allowed; 
}
.more-actions__item i {
  width: 16px;
  text-align: center;
}

/* Debate card specific styling */
.debate-card .more-actions {
  top: 12px;
  right: 12px;
}
.debate-card .more-actions__btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.9);
}
[data-theme="dark"] .debate-card .more-actions__btn,
body.dark-theme .debate-card .more-actions__btn {
  background: rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.2);
}

/* Debate Modal Styles */
.debate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.debate-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.debate-modal {
  background: var(--background-color);
  color: var(--text-color);
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.debate-modal-overlay.active .debate-modal {
  transform: scale(1) translateY(0);
}

.debate-modal-header {
  display: flex;
  align-items: center;
  justify-content: between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}

.debate-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.debate-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.debate-modal-close:hover {
  background: var(--hover-color);
  color: var(--text-color);
}

.debate-modal-body {
  padding: 20px 24px 24px;
}

.debate-modal-reference {
  background: var(--surface-color);
  border-left: 3px solid var(--accent-color);
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.debate-modal-reference i {
  margin-right: 8px;
  color: var(--accent-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--text-color);
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

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

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 10000;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-success {
  border-left: 4px solid #10b981;
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

.notification-success .notification-content i {
  color: #10b981;
}

.notification-error .notification-content i {
  color: #ef4444;
}

.notification-info .notification-content i {
  color: #3b82f6;
}

/*
Theme Name: La Nota Theme
Theme URI: https://host.tropacirca.com
Description: A Twitter-like responsive WordPress theme for news media with dark/light mode toggle
Version: 1.0.1
Author: Mauro Gatti
Text Domain: la-nota-theme
Domain Path: /languages
*/

.featured-news .featured-bars { pointer-events: none; display: none; }

/* Desktop: remove dim backdrop to prevent entire screen looking too dark */
@media (min-width: 992px) {
  body.mobile-menu-open::after { display: none !important; }
}

/* Hero Lead (main news above composer and featured) */
.hero-lead { margin: 12px 0 18px; padding-bottom: 26px; border-bottom: 1px solid var(--border-color); }
.hero-card { 
  display: block; 
  color: inherit; 
  text-decoration: none; 
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.hero-image-wrapper { position: relative; border-radius: 14px 14px 0 0; overflow: hidden; }
.hero-image { display: block; width: 100%; height: 54vw; max-height: 420px; object-fit: cover; }
.hero-badge {
  position: absolute; top: 12px; right: 12px; left: auto;
  background: #e53935; color: #fff;
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .2px;
}
.hero-body {
  padding: 12px 14px 22px; /* +10px bottom */
}
.hero-title {
  margin: 0 0 6px;
  font-size: 1.8rem; line-height: 1.22; font-weight: 800;
  padding: 0;
}
.hero-excerpt { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.35; }
@media (min-width: 576px) {
  .hero-image { height: 46vw; max-height: 460px; }
  .hero-title { font-size: 2.1rem; }
}
@media (min-width: 992px) {
  .hero-lead { margin: 6px 0 22px; padding-bottom: 28px; }
  .hero-image { height: 360px; }
  .hero-title { font-size: 2.3rem; }
}

/* Dark mode: slightly darker hero box for separation */
[data-theme="dark"] .hero-lead,
body.dark-theme .hero-lead {
  background: transparent; /* Avoid background band below hero card */
  border-bottom-color: var(--border-color);
}

/* Dark mode: hero body - removed background to respect border-radius */

/* Desktop: hamburger icon styling in sticky header */
@media (min-width: 992px) {
  .mobile-header .hamburger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: inherit;
  }
  .mobile-header .hamburger-menu i { font-size: 18px; }
  .mobile-header .hamburger-menu:hover { background: rgba(255,255,255,0.06); }
}

/* Desktop: normalize left sidebar primary menu */
@media (min-width: 992px) {
  .left-sidebar .nav-menu,
  .left-sidebar .nav-menu ul { list-style: none; padding-left: 0; margin: 0; }
  .left-sidebar .nav-menu li { margin: 4px 0; }
  .left-sidebar .nav-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
  }
  .left-sidebar .nav-menu a:hover { background: rgba(255,255,255,0.06); }
}

/* Desktop: normalize right sidebar widget menus (remove bullets, menu-like look) */
@media (min-width: 992px) {
  .right-sidebar .widget .menu,
  .right-sidebar .widget .menu ul,
  .right-sidebar .widget ul { list-style: none; padding-left: 0; margin: 0; }
  .right-sidebar .widget .menu li,
  .right-sidebar .widget ul li { margin: 4px 0; }
  .right-sidebar .widget .menu li a,
  .right-sidebar .widget ul li a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
  }
  .right-sidebar .widget .menu li a:hover,
  .right-sidebar .widget ul li a:hover { background: rgba(255,255,255,0.06); }
}
@media (max-width: 767.98px) {
  .featured-news .featured-bars { 
    display: flex !important; 
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 3px;
    z-index: 10;
  }
}

/* Lightbox top progress bars (stories-style) */
.image-lightbox .lightbox-bars {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  z-index: 4002; /* above .lightbox-nav/.lightbox-close (3001) */
  pointer-events: none;
}
.image-lightbox .lightbox-bars .bar {
  height: 3px;
  background: rgba(255,255,255,0.55);
  border-radius: 2px;
  overflow: hidden;
}
.image-lightbox .lightbox-bars .bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transform-origin: left center;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
}

@media (min-width: 992px) {
  .image-lightbox .lightbox-bars { top: 12px; left: 12px; right: 12px; gap: 8px; }
  .image-lightbox .lightbox-bars .bar { height: 4px; }
}

:root {
  --primary-color: #e53935;
  --primary-hover: #d32f2f;
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --text-color: #14171a;
  --text-secondary: #657786;
  --border-color: #e1e8ed;
  --hover-color: #f7f9fa;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

/* Self-hosted Poppins disabled to avoid 404s if files are not present.
   If you want to use self-hosted fonts, drop files into assets/fonts/ and
   re-enable the @font-face declarations. In the meantime the site will use
   the system font stack with optional locally-installed Poppins if available. */

body[data-theme="dark"],
[data-theme="dark"] {
  --background-color: #000000;
  --surface-color: #16181c;
  --text-color: #e7e9ea;
  --text-secondary: #71767b;
  --border-color: #2f3336;
  --hover-color: #1d1f23;
}

body.dark-theme {
  --background-color: #000000;
  --surface-color: #16181c;
  --text-color: #e7e9ea;
  --text-secondary: #71767b;
  --border-color: #2f3336;
  --hover-color: #1d1f23;
}

/* Full Color theme vars */
[data-theme="fullcolor"],
body.fullcolor-theme {
  /* keep base colors; only add accents */
  --rainbow-gradient: linear-gradient(90deg, #ff3e3e, #ff8a00, #f7e400, #3ddc84, #2196f3, #7b61ff, #e91e63);
}

/* Buttons: subtle rainbow border */
[data-theme="fullcolor"] .composer-post-btn,
body.fullcolor-theme .composer-post-btn,
[data-theme="fullcolor"] .lightbox-read-more,
body.fullcolor-theme .lightbox-read-more {
  background:
    linear-gradient(var(--primary-color), var(--primary-color)) padding-box,
    var(--rainbow-gradient) border-box;
  border: 2px solid transparent;
}
[data-theme="fullcolor"] .lightbox-read-more:hover,
body.fullcolor-theme .lightbox-read-more:hover {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* Icons: subtle rainbow glyphs */
[data-theme="fullcolor"] .post-action i,
body.fullcolor-theme .post-action i,
[data-theme="fullcolor"] .social-share-btn i,
body.fullcolor-theme .social-share-btn i,
[data-theme="fullcolor"] .theme-toggle i,
body.fullcolor-theme .theme-toggle i,
[data-theme="fullcolor"] .mobile-nav-btn i,
body.fullcolor-theme .mobile-nav-btn i {
  background: var(--rainbow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent; /* Safari/iOS */
  display: inline-block; /* ensure gradient area applies */
}

/* Separators/headers: rainbow border */
[data-theme="fullcolor"] .widget-header,
body.fullcolor-theme .widget-header,
[data-theme="fullcolor"] .main-navigation,
body.fullcolor-theme .main-navigation {
  border-image: var(--rainbow-gradient) 1;
  border-bottom: 2px solid transparent;
}

/* Meta tags: subtle underline */
[data-theme="fullcolor"] .post-meta .post-date,
body.fullcolor-theme .post-meta .post-date,
[data-theme="fullcolor"] .post-meta .post-reading-time,
body.fullcolor-theme .post-meta .post-reading-time {
  background-image: var(--rainbow-gradient);
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
  padding-bottom: 2px;
}

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

html {
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}

/* Site header / logos */
.site-header { position: sticky; top: 0; z-index: 1200; background: var(--background-color); }
.site-header .site-branding { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.site-logo { display: inline-flex; align-items: center; text-decoration: none; }
.site-logo img { display: block; height: 36px; width: auto; }
.site-logo .logo-dark { display: none !important; }
.site-logo .logo-default { display: inline !important; }

/* Dark theme logo switching */
[data-theme="dark"] .site-logo .logo-dark, 
body.dark-theme .site-logo .logo-dark { 
    display: inline !important; 
}
[data-theme="dark"] .site-logo .logo-default, 
body.dark-theme .site-logo .logo-default { 
    display: none !important; 
}

/* Fullcolor theme uses default logo */
[data-theme="fullcolor"] .site-logo .logo-dark, 
body.fullcolor-theme .site-logo .logo-dark { 
    display: none !important; 
}
[data-theme="fullcolor"] .site-logo .logo-default, 
body.fullcolor-theme .site-logo .logo-default { 
    display: inline !important; 
}

/* Mobile header logo adjustments */
.mobile-header .site-logo img { height: 32px; }
.left-sidebar .site-logo img { height: 40px; }

/* In-feed advertisements */
.infeed-ad {
    margin: 20px 0;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.infeed-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.infeed-ad a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.infeed-ad:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Publicidad cuadrada en posts individuales */
.single-post-ad {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.single-post-ad-widget {
    width: 300px;
    height: 300px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--background-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-post-ad-widget:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.single-post-ad-widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-ad-widget a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Responsive para móvil */
@media (max-width: 767.98px) {
    .single-post-ad-widget {
        width: 280px;
        height: 280px;
    }
}

/* Contador de caracteres para comentarios */
.character-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 5px;
}

.character-counter.warning {
    color: #ff9800;
}

.character-counter.danger {
    color: #f44336;
}

/* Mejoras para botones de guardar */
.nm-save-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nm-save-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.nm-save-btn.saved {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.nm-save-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.nm-save-wrap {
    margin: 15px 0;
    text-align: right;
}

/* Mejoras para página Mi Cuenta */
.account-section {
    margin-bottom: 30px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.account-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.account-notifications {
    list-style: none;
    padding: 0;
}

.notification-item {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: var(--hover-bg, rgba(0,0,0,0.02));
    border-color: var(--accent-color);
}

.notification-link {
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.notification-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    font-style: italic;
}

.liked-list, .saved-list {
    display: grid;
    gap: 20px;
}

.liked-item, .saved-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.liked-item:hover, .saved-item:hover {
    background: var(--hover-bg, rgba(0,0,0,0.02));
    border-color: var(--accent-color);
}

.saved-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
}

.saved-thumb img, .saved-thumb .ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-thumb .ph {
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.saved-body, .liked-body {
    flex: 1;
}

.saved-title, .liked-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}

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

.saved-title a:hover, .liked-title a:hover {
    color: var(--accent-color);
}

.saved-meta, .liked-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.saved-excerpt, .liked-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.account-pagination {
    margin-top: 20px;
    text-align: center;
}

.account-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.account-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.account-links .btn:hover {
    background: var(--accent-hover, #c62828);
    transform: translateY(-1px);
}

@media (max-width: 767.98px) {
    .saved-item, .liked-item {
        flex-direction: column;
    }
    
    .saved-thumb {
        width: 100%;
        height: 150px;
    }
    
    .account-links {
        flex-direction: column;
    }
    
    .account-links .btn {
        justify-content: center;
    }
}

/* Forzar transparencia solo en logos PNG */
.site-logo img,
.mobile-logo img,
.custom-logo-link img,
.logo img {
    background: transparent !important;
    mix-blend-mode: normal !important;
}

/* Asegurar que solo los logos PNG mantengan transparencia */
.site-logo img[src*=".png"],
.mobile-logo img[src*=".png"],
.custom-logo-link img[src*=".png"],
.logo img[src*=".png"] {
    background: transparent !important;
}

/* Estilos para avatares */
.post-avatar,
.response-avatar,
.account-avatar,
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
}

.post-avatar {
    width: 40px;
    height: 40px;
}

.response-avatar {
    width: 32px;
    height: 32px;
}

.account-avatar {
    width: 32px;
    height: 32px;
}

/* Fallback para avatares que no cargan */
.post-avatar[src=""],
.response-avatar[src=""],
.account-avatar[src=""] {
    background: #ddd url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') center/60% no-repeat;
}

/* Prevent duplicated logos across layouts */
.mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.mobile-header .site-logo img { height: 28px; }
.left-sidebar .logo .site-logo img { height: 40px; }

@media (min-width: 992px) {
  /* Desktop: hide mobile header */
  .mobile-header { display: none; }
  .mobile-footer { display: none; }
  .hamburger-menu { display: none !important; }
  #mobile-menu { display: block !important; }
  /* Hide segmented bars on desktop */
  .featured-news .featured-bars,
  body[data-theme] .featured-news .featured-bars { display: none !important; }
  /* Desktop stories: indicate clickable */
  .featured-news .featured-story { cursor: pointer; }
}

@media (max-width: 991.98px) {
  /* In the preview block, prioritize vertical scroll on mobile */
  .featured-news .featured-carousel,
  .featured-news .featured-story,
  .featured-news .featured-story * {
    touch-action: pan-y !important;
    -ms-touch-action: pan-y !important;
  }
  /* Ensure the preview never captures the gesture: let the page scroll instead */
  /* Allow interaction on carousel so taps can open stories; vertical scroll will be handled via JS */
  .featured-news .featured-carousel { pointer-events: auto; }
  /* Mobile: hide sidebar logo to avoid duplication */
  .left-sidebar .logo { display: none; }
}

/* Mobile menu base visibility */
#mobile-menu { 
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-color);
  z-index: 6000; /* single source of truth */
  overflow-y: auto;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

#mobile-menu.active { 
  display: block;
  transform: translateX(0);
}

/* Dim backdrop when the drawer is open; sits below the drawer */
body.mobile-menu-open::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 5500;
  pointer-events: none; /* don't block interactions with the drawer */
}

/* Desktop-specific mobile menu styles */
@media (min-width: 992px) {
  /* Standardize desktop drawer: right-side slide-in */
  #mobile-menu,
  .mobile-menu {
    left: auto;
    right: 0;
    width: 380px;
    height: 100vh;
    transform: translateX(100%);
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -12px 0 24px rgba(0,0,0,0.08);
    display: block;
    z-index: 7000; /* above backdrop (5500) */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    top: 0;
    transition: transform 0.3s ease;
    pointer-events: auto;
  }
  /* Ensure left-based mobile rules don't interfere on desktop */
  .mobile-menu,
  .mobile-menu.active { left: auto !important; }

  #mobile-menu.active,
  .mobile-menu.active {
    transform: translateX(0);
  }
}

a {
  color: var(--text-color);
  text-decoration: none;
}

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

a:visited {
  color: var(--text-color);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  width: 100vw;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr 260px;
  gap: 20px;
  padding: 20px 15px;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

/* Left Sidebar */
.left-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 0;
  border-right: 1px solid var(--border-color);
}

.logo {
  margin-bottom: 30px;
  padding: 0 10px;
}

.logo img {
  max-width: 150px;
  height: auto;
}

.nav-menu {
  list-style: none;
}

.nav-menu li {
  margin-bottom: 5px;
}

.nav-menu a {
  display: flex;
  align-items: center;
  padding: 15px 15px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 25px;
  margin: 0 5px;
  transition: background-color 0.2s ease;
  font-weight: 600;
}

.nav-menu a:hover {
  background-color: var(--hover-color);
}

.nav-menu .icon {
  margin-right: 15px;
  width: 24px;
  font-size: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  padding: 20px 15px;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 20px;
  z-index: 100;
}

.header h1 {
  font-size: 20px;
  font-weight: 900;
}

/* Composer card (feed top) */
.composer-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px !important;
  border: 1px solid var(--border-color, rgba(0,0,0,0.08)) !important;
  border-radius: 14px !important;
  background: var(--surface-color, #fff) !important;
  align-items: flex-start;
  cursor: pointer;
  box-shadow: var(--shadow, none) !important;
  width: 100%;
  overflow: hidden; /* keep children within rounded corners */
}
.composer-card:hover { background: var(--hover-color, rgba(0,0,0,0.02)); }
.composer-avatar { display: none; }
.composer-avatar img, .composer-avatar .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.composer-body { flex: 1; }
.composer-subscription-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--border-color, rgba(0,0,0,0.1));
  color: var(--text-secondary, #6b7280);
  font-weight: 800;
  font-size: 12.5px;
  text-align: center;
}
.composer-input {
  color: var(--text-secondary, #6b7280);
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08)) !important;
  margin-bottom: 10px;
}
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.composer-tools { display: flex; align-items: center; gap: 10px; color: var(--primary-color, #e11); flex: 1 1 auto; min-width: 0; }
.composer-tools i { font-size: 16px; color: var(--primary-color, #e11); opacity: 0.9; line-height: 1; vertical-align: middle; display: inline-block; margin-right: 2px; -webkit-font-smoothing: antialiased; }
.composer-card.is-auth .composer-tools, .composer-card.is-auth .composer-tools i { color: var(--primary-color, #e11) !important; }
.composer-tools i:hover { opacity: 1; }
.composer-card .composer-post-btn,
.composer-card button.composer-post-btn,
.header .composer-card .composer-actions .composer-post-btn {
  background: var(--primary-color, #e11);
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  height: 34px !important;
  padding: 0 14px !important;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font: inherit !important;
  font-size: 0.95rem !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none;
  text-decoration: none !important;
  transition: background-color .15s ease, opacity .15s ease;
  margin-left: auto;
}
.composer-card .composer-post-btn:hover,
.composer-card button.composer-post-btn:hover,
.header .composer-card .composer-actions .composer-post-btn:hover { background: var(--primary-hover, #c10) !important; }

.composer-card .composer-post-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1), 0 0 0 5px var(--primary-color, #e11);
}

/* Guest: small tooltip on hover/focus */
.composer-card.is-guest[data-tooltip] { position: relative; }
.composer-card.is-guest[data-tooltip]:hover::after,
.composer-card.is-guest[data-tooltip]:focus::after,
.composer-card.is-guest .composer-post-btn[data-tooltip]:hover::after,
.composer-card.is-guest .composer-post-btn[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 10px;
  background: rgba(17,17,17,0.92);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.composer-card.is-guest[data-tooltip]:hover::before,
.composer-card.is-guest[data-tooltip]:focus::before,
.composer-card.is-guest .composer-post-btn[data-tooltip]:hover::before,
.composer-card.is-guest .composer-post-btn[data-tooltip]:focus::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 16px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(17,17,17,0.92) transparent;
}

/* Guest state: grey tools and button */
.composer-card.is-guest .composer-tools,
.composer-card.is-guest .composer-tools i {
  color: var(--text-secondary);
}
.composer-card.is-guest .composer-tools i { opacity: 0.6; }
.composer-card.is-guest .composer-tools i:hover { opacity: 0.75; }
.composer-card.is-guest .composer-post-btn,
.composer-card.is-guest button.composer-post-btn,
.header .composer-card.is-guest .composer-actions .composer-post-btn {
  background: var(--border-color, rgba(0,0,0,0.08));
  color: var(--text-secondary, #6b7280) !important;
}
.composer-card.is-guest .composer-post-btn:hover,
.composer-card.is-guest button.composer-post-btn:hover,
.header .composer-card.is-guest .composer-actions .composer-post-btn:hover { background: var(--border-color, rgba(0,0,0,0.08)) !important; }

/* Guest: full-card hover overlay hint (replaces small bubble on hover) */
@media (hover: hover) {
  .composer-card.is-guest[data-tooltip] { position: relative; }
  /* hide the small arrow bubble when hovering/focusing */
  .composer-card.is-guest[data-tooltip]:hover::before,
  .composer-card.is-guest[data-tooltip]:hover::after,
  .composer-card.is-guest[data-tooltip]:focus-within::before { display: none; }
  /* overlay using ::after (separate rule to avoid display:none above) */
  .composer-card.is-guest[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 16px;
    color: #fff;
    font-weight: 800;
    background: rgba(0,0,0,0.6);
    border-radius: inherit;
    opacity: 0;
    transition: opacity .15s ease-in-out;
    z-index: 5;
    pointer-events: none; /* keep underlying card clickable */
  }
  .composer-card.is-guest[data-tooltip]:hover::after,
  .composer-card.is-guest[data-tooltip]:focus-within::after { opacity: 1; display: flex; }
}

/* Guest state: lighter placeholder */
.composer-card.is-guest .composer-input {
  color: var(--text-secondary, #6b7280);
  opacity: 0.7;
}

@media (max-width: 768px) {
  .composer-card { padding: 8px 10px !important; border-radius: 10px !important; }
  .composer-avatar { display: none; }
  .composer-subscription-hint { font-size: 12px; padding: 5px 8px; margin-bottom: 8px; }
  .composer-input { padding: 4px 0 8px; margin-bottom: 8px; font-size: 0.95rem; }
  .composer-actions { gap: 8px; }
  .composer-tools { gap: 8px; }
  .composer-tools i { font-size: 14px; }
  .composer-post-btn { height: 30px !important; padding: 0 10px !important; font-size: 13px !important; margin-top: 6px; }
  .sidebar-cta { display: none; }
}

/* Compose CTA in header */
.compose-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
}
.compose-btn i { font-size: 14px; }
.compose-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.featured-news {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  /* Hide horizontal bleed (arrows/shadows) but keep vertical overflow visible for scrolling */
  overflow-x: hidden;
  overflow-y: visible;
}

/* Sidebar CTA: Subscribe + Socials */
.sidebar-cta { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; padding-right: 8px; }
.subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--primary-color);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  align-self: flex-start; /* fit content, not full width */
  margin-right: 8px; /* avoid sticking to the right edge */
}
.subscribe-btn:hover { background: var(--primary-hover, #c10); }
.subscribe-btn i { font-size: 14px; }

.social-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
.social-row .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-color);
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--border-color);
}
.social-row .social-link:hover { background: var(--hover-color); }
.social-row .social-link i { font-size: 16px; }

/* Masonry-like feed for Agenda Cultural */
.agenda-archive .agenda-header { margin: 10px 0 16px; }
.agenda-archive .agenda-header h1 { font-size: 25px; margin: 0 0 8px; }
.agenda-filtros .filters-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.agenda-filtros .segmented { display: inline-flex; background: var(--card-bg, #111921); border-radius: 999px; padding: 4px; }
.agenda-filtros .segmented label { position: relative; }
.agenda-filtros .segmented input { position: absolute; opacity: 0; }
.agenda-filtros .segmented span { display: inline-block; padding: 6px 10px; border-radius: 999px; color: #fff; opacity: .7; cursor: pointer; }
.agenda-filtros .segmented input:checked + span { background: var(--primary-color); opacity: 1; }
.agenda-filtros .range { display: inline-flex; gap: 6px; align-items: center; }
.agenda-filtros .range input[type="date"] { background: #0f151b; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 8px; }
.agenda-filtros .btn-apply { background: var(--primary-color); color: #fff; border: 0; border-radius: 10px; padding: 6px 10px; cursor: pointer; }

.agenda-grid { column-count: 2; column-gap: 12px; }
.agenda-card { break-inside: avoid; margin: 0 0 12px; background: #0f151b; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.agenda-card .card-media img, .agenda-card .img-placeholder { display: block; width: 100%; height: auto; }
.agenda-card .img-placeholder { background: #1a2530; aspect-ratio: 4/5; }
.agenda-card .card-body { padding: 10px 10px 12px; }
.agenda-card .card-title { font-size: 18px; margin: 0 0 6px; }
.agenda-card .card-title a { color: #fff; text-decoration: none; }
.agenda-card .card-meta { color: rgba(255,255,255,.75); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.agenda-card .card-meta .dot { opacity:.6 }

/* Related small cards */
.agenda-grid.related { column-count: 2; }
.agenda-card.small .card-title { font-size: 14px; }

/* Desktop enhancements */
@media (min-width: 768px){
  .agenda-grid { column-count: 3; column-gap: 16px; }
  .agenda-grid.related { column-count: 3; }
}
@media (min-width: 1100px){
  .agenda-grid { column-count: 4; }
}

/* Agenda archive: site layout two columns (left sidebar + main) */
.container.agenda-layout { grid-template-columns: 200px 1fr; }

/* Mobile menu extras */
.mobile-menu-extras { padding: 14px 16px 22px; border-top: 1px solid var(--border-color); display: grid; gap: 16px; }
.mobile-menu-extras .subscribe-btn { justify-content: center; }
.mobile-menu-extras .social-row { justify-content: space-between; }

.featured-news h2 {
  margin-bottom: 15px;
  font-size: 21px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-news h2::before {
  content: '\f06d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary-color);
}

.featured-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative; /* for absolutely-positioned arrows */
  /* Allow both horizontal swipe (carousel) and vertical page scroll */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-story {
  /* vertical card like Instagram reels preview */
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 9 / 16;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-hover));
}

/* Featured navigation arrows (hidden by default, shown on desktop) */
.featured-news { position: relative; }
.featured-wrap { position: relative; }
.featured-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.65);
  color: #fff;
  display: none; /* default hidden; enabled in desktop MQ */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  backdrop-filter: saturate(120%) blur(2px);
}
.featured-nav i { pointer-events: none; font-size: 18px; }
.featured-nav.prev { left: 8px; }
.featured-nav.next { right: 8px; }
.featured-nav:hover { background: rgba(0,0,0,0.8); }

.featured-story:hover {
  transform: scale(1.05);
}

.featured-story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

.featured-story-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 15px 10px 10px;
  color: white;
}

.featured-story-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.featured-story-category {
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.posts-feed {
  padding: 0;
}

.post {
  padding: 15px 20px;
  border-bottom: 2px solid var(--border-color);
  /* slightly stronger bottom shadow to separate posts */
  box-shadow: 0 6px 10px -8px rgba(0,0,0,0.22);
  transition: background-color 0.2s ease;
}

.post:hover {
  background-color: var(--hover-color);
}

/* Subrayado rojo sutil en hover para tema oscuro */
[data-theme="dark"] .post:hover,
body.dark-theme .post:hover {
  border-bottom: 2px solid var(--primary-color);
  box-shadow: 0 6px 10px -8px rgba(229, 57, 53, 0.3);
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.post-author {
  font-weight: 700;
  color: var(--text-color);
}

.post-date {
  color: var(--text-secondary);
  font-size: inherit;
}

.post-reading-time {
  color: var(--text-secondary);
  font-size: inherit;
}

.post-content {
  margin-bottom: 10px;
  line-height: 1.45;
}

.post-content h3 {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.post-content p {
  font-size: 1rem;
  line-height: 1.6;
}

.single-post .post-title {
  margin: 0 0 14px; /* space below title before featured image */
  line-height: 1.2;
  font-weight: 900;
}

@media (min-width: 768px) {
  .single-post .post-title { font-size: 2.125rem; }
}
@media (max-width: 767.98px) {
  .single-post .post-title { font-size: 1.8rem; }
}

/* Article typography: scoped to single posts to avoid feed regressions */
.single-post .post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}
.single-post .post-content > * + * { margin-top: 1rem; }

/* Headings */
.single-post .post-content h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.4rem 0 .6rem; font-weight: 800; }
.single-post .post-content h3 { font-size: 1.25rem; line-height: 1.35; margin: 1.2rem 0 .5rem; font-weight: 800; }
.single-post .post-content h4 { font-size: 1.1rem; line-height: 1.4; margin: 1rem 0 .5rem; font-weight: 700; }

/* Paragraphs & lists */
.single-post .post-content p { margin: 0 0 1rem; }
.single-post .post-content ul,
.single-post .post-content ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.single-post .post-content li + li { margin-top: .35rem; }

/* Links */
.single-post .post-content a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 2px; }
.single-post .post-content a:hover { color: var(--primary-hover); }

/* Feed previews: match single post typography for titles and text */
.posts-feed .post .post-content {
  font-size: 1.05rem;
  line-height: 1.7;
}
.posts-feed .post .post-content > * + * { margin-top: 1rem; }
.posts-feed .post .post-content h3 {
  margin: 0 0 14px;
  line-height: 1.2;
  font-weight: 900;
  font-size: 1.8rem; /* mobile base, override on md+ */
}
@media (min-width: 768px) {
  .posts-feed .post .post-content h3 { font-size: 2.125rem; }
}
.posts-feed .post .post-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.2rem;
}

/* Blockquotes */
.single-post .post-content blockquote,
.single-post .post-content .wp-block-quote {
  border-left: 4px solid var(--primary-color);
  padding: .6rem 1rem;
  background: color-mix(in oklab, var(--surface-color) 88%, var(--primary-color) 12%);
  border-radius: 8px;
  margin: 1rem 0;
  font-style: italic;
}
.single-post .post-content blockquote cite,
.single-post .post-content .wp-block-quote cite { display: block; margin-top: .5rem; color: var(--text-secondary); font-style: normal; }

/* Pullquote */
.single-post .post-content .wp-block-pullquote { border: 1px solid var(--border-color); border-radius: 10px; padding: 1rem 1.2rem; background: var(--surface-color); text-align: center; }
.single-post .post-content .wp-block-pullquote blockquote { border: 0; background: none; padding: 0; font-size: 1.25rem; font-style: italic; }

/* Code & pre */
.single-post .post-content code { background: rgba(0,0,0,.06); border: 1px solid var(--border-color); padding: .12rem .35rem; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: .95em; }
[data-theme="dark"] .single-post .post-content code, body.dark-theme .single-post .post-content code { background: rgba(255,255,255,.08); }
.single-post .post-content pre { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 10px; padding: .9rem 1rem; overflow: auto; }
.single-post .post-content pre code { background: none; border: 0; padding: 0; }

/* Tables */
.single-post .post-content .table-wrapper { overflow-x: auto; }
.single-post .post-content table { width: 100%; border-collapse: collapse; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; display: block; max-width: 100%; }
.single-post .post-content thead { background: var(--surface-color); }
.single-post .post-content th,
.single-post .post-content td { padding: .6rem .7rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.single-post .post-content tr:nth-child(even) td { background: color-mix(in oklab, var(--surface-color) 92%, black 8%); }
[data-theme="dark"] .single-post .post-content tr:nth-child(even) td,
body.dark-theme .single-post .post-content tr:nth-child(even) td { background: color-mix(in oklab, var(--surface-color) 92%, white 8%); }

/* Figures & images */
.single-post .post-featured-image { margin-bottom: 1rem; }
.single-post .post-content figure { margin: 1rem 0; }
.single-post .post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.single-post .post-content figcaption { color: var(--text-secondary); font-size: .9rem; margin-top: .35rem; text-align: center; }

/* Alignment helpers (classic + blocks) */
.single-post .post-content .alignleft { float: left; margin: .2rem 1rem .8rem 0; }
.single-post .post-content .alignright { float: right; margin: .2rem 0 .8rem 1rem; }
.single-post .post-content .aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
@media (max-width: 640px) {
  .single-post .post-content .alignleft,
  .single-post .post-content .alignright { float: none; display: block; margin: .5rem auto; }
}

/* Captions (classic editor) */
.single-post .post-content .wp-caption { max-width: 100%; }
.single-post .post-content .wp-caption-text { color: var(--text-secondary); font-size: .9rem; margin-top: .35rem; text-align: center; }

.post-content h3 a {
  color: var(--text-color);
  text-decoration: none;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

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

.post-content h3 a:hover {
  color: var(--primary-color);
}

.post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 10px;
}

.post-image-link {
  display: block;
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.post-image-link:hover {
  transform: scale(1.02);
}

.social-share {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.social-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-secondary);
}

.social-share-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px) scale(1.1);
}

/* Featured video in feed */
.post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 12px;
}
.post-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.embed-video {
  background: #000;
}
.embed-video .embed-thumb,
.embed-video .embed-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, opacity .15s ease;
}
.video-play-btn i { font-size: 20px; }
.video-play-btn:hover { transform: scale(1.05); background: rgba(0,0,0,0.7); }
.post-media.playing .video-play-btn { opacity: 0; pointer-events: none; }

@media (max-width: 480px) {
  .video-play-btn { width: 54px; height: 54px; }
}

.mute-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.mute-toggle:hover { background: rgba(0,0,0,.65); transform: scale(1.05); }
.mute-toggle i { font-size: 14px; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.post-action {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.post-action:hover {
  background-color: var(--hover-color);
}

/* Push save button to the far right */
.post-actions .save-btn { margin-left: auto; }
.post-actions .save-btn.saved i { color: var(--primary-color); }
.post-actions .save-btn.saved { border-color: var(--primary-color); }

/* Right Sidebar Footer */
.sidebar-footer {
  margin-top: 30px;
  padding: 15px 10px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.sidebar-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-footer a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.sidebar-footer .sep {
  opacity: 0.6;
  margin: 0 2px;
}

/* Right Sidebar */
.right-sidebar {
  position: sticky;
  top: 0;
  padding: 20px 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  padding: 0 10px 20px;
}

.search-container {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  background-color: var(--surface-color);
  color: var(--text-color);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.2s ease;
  font-size: 16px;
}

.theme-toggle:hover {
  background-color: var(--hover-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.widget {
  background-color: var(--surface-color);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.widget-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 21px;
}

.widget-content {
  padding: 15px 20px;
}

.trending-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-category {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}

.trending-title {
  font-weight: 700;
  margin: 5px 0;
}

.trending-posts {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hide mobile elements on desktop */
.mobile-header,
.mobile-footer,
.mobile-menu {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 70px 1fr 250px;
    gap: 20px;
    padding: 20px 15px;
    max-width: 100%;
  }
  
  .nav-menu .nav-text {
    display: none;
  }
  
  .logo {
    text-align: center;
  }
  
  .logo img {
    max-width: 40px;
  }
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: 80px;
  }
  
  .container {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
    gap: 0;
    padding: 0 10px;
    max-width: 100vw;
    overflow-x: hidden;
  }
  /* Ensure Agenda archive collapses to single column on mobile */
  .container.agenda-layout { grid-template-columns: 1fr !important; }
  
  .left-sidebar {
    display: none;
  }
  
  .main-content {
    border: none;
    margin-top: 70px;
    margin-bottom: 0;
    padding: 0 10px;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .right-sidebar {
    display: none;
  }
  
  /* Agenda header + filters: prevent clipping on mobile */
  .agenda-archive .agenda-header,
  .agenda-archive .agenda-filtros,
  .agenda-archive .filters-row { width: 100%; max-width: 100%; }

  /* Filters: allow wrapping on small screens */
  .agenda-archive .filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .agenda-archive .segmented,
  .agenda-archive .range { width: 100%; max-width: 100%; }

  .agenda-archive .segmented label { flex: 1 1 auto; }
  .agenda-archive .range { display: flex; align-items: center; gap: 8px; }
  .agenda-archive .range input[type="date"] { flex: 1 1 140px; min-width: 0; }
  .agenda-archive .range .btn-apply { flex: 0 0 auto; }
  
  /* Show mobile elements on mobile */
  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
  }
  
  .mobile-footer {
    display: flex !important;
  }
  
  .mobile-menu {
    display: block !important;
    z-index: 4000;
  }
  
  /* Desktop Sticky Header */
  .desktop-sticky-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--background-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 4000;
    padding: 0 20px;
  }

  .desktop-sticky-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
  }

  .desktop-sticky-header .site-logo {
    height: 30px;
    width: auto;
  }
  .desktop-sticky-header .site-logo img {
    height: 30px;
    width: auto;
    display: block;
  }

  .desktop-sticky-header .hamburger-menu {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }

  .desktop-sticky-header .hamburger-menu:hover {
    background-color: var(--hover-color);
  }

  /* Desktop: usar el mismo header mobile */
  @media (min-width: 992px) {
    .mobile-header { display: flex !important; }
    body { padding-top: 0; }
  }

  /* WordPress admin bar: no offset extra cuando usamos header mobile */
  @media (min-width: 783px) {
    body.admin-bar { padding-top: 0; }
  }

  /* Desktop sticky header: desktop nav styles */
  .desktop-sticky-header .right-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .desktop-sticky-header .desktop-nav { display: block; }
  .desktop-sticky-header .desktop-nav-menu {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    align-items: center;
  }
  .desktop-sticky-header .desktop-nav-menu > li > a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease;
    display: inline-block;
  }
  .desktop-sticky-header .desktop-nav-menu > li > a:hover {
    background: var(--hover-color);
  }
  /* end desktop nav styles */

  /* Mobile Header */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    padding: 10px 20px;
    justify-content: space-between;
    align-items: center;
    height: 60px;
  }
  
  .mobile-logo h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
  }
  
  .mobile-logo h2 a {
    color: var(--text-color);
    text-decoration: none;
  }
  
  .mobile-logo img {
    max-height: 40px;
    width: auto;
  }
  
  .mobile-controls {
    display: flex;
    gap: 15px;
    align-items: center;
  }
  
  .mobile-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
  }
  
  .mobile-controls button:hover {
    background-color: var(--hover-color);
  }
  
  .mobile-search-container {
    position: relative;
    margin-right: 10px;
    display: flex;
    align-items: center;
  }
  
  .mobile-search-container form {
    display: flex;
    align-items: center;
    position: relative;
  }
  
  .mobile-search-input {
    width: 180px;
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
  }
  
  .mobile-search-input:focus {
    border-color: var(--primary-color);
  }
  
  .mobile-search-container .search-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: var(--text-color);
    padding: 8px;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
  }
  
  .mobile-search-container .search-btn:hover {
    background-color: var(--hover-color);
  }
  
  
  .mobile-controls {
    display: flex;
    gap: 15px;
    align-items: center;
  }
  
  .mobile-search-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
  }
  
  .mobile-search-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
  
  /* Mobile Footer */
  .mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 60px;
    flex: 1;
    max-width: 80px;
  }

  .mobile-nav-btn i {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--text-secondary);
  }

  .mobile-nav-btn:hover,
  .mobile-nav-btn:focus {
    color: var(--primary-color);
    background-color: var(--hover-color);
  }

  .mobile-nav-btn:hover i,
  .mobile-nav-btn:focus i {
    color: var(--primary-color);
  }

  .mobile-nav-btn span {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
  }

  /* Active state for current page */
  .mobile-nav-btn.active {
    color: var(--primary-color);
    background-color: var(--hover-color);
  }

  .mobile-nav-btn.active i {
    color: var(--primary-color);
  }

  /* Search Modal */
  .search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 2000;
  }

  .search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }

  .search-modal-content {
    background-color: var(--surface-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: modalSlideIn 0.3s ease-out;
  }

  @keyframes modalSlideIn {
    from {
      opacity: 0;
      transform: translateY(-50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .search-modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
  }

  .close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
  }

  .close-modal:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
  }

  .search-modal-body {
    padding: 20px;
  }

  .search-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }

  .modal-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease;
  }

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

  .search-submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
  }

  .search-submit-btn:hover {
    background-color: var(--primary-hover);
  }

  .search-suggestions {
    max-height: 300px;
    overflow-y: auto;
  }

  .search-suggestion {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .search-suggestion:hover {
    background-color: var(--hover-color);
  }

  .search-suggestion:last-child {
    border-bottom: none;
  }
  
  /* Image Lightbox Modal - Instagram Style */
  .image-lightbox {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    z-index: 3000;
    pointer-events: none; /* disable interactions when hidden */
  }
  
  .image-lightbox.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
    pointer-events: auto; /* enable interactions only when active */
  }

  /* Defensive: ensure inner controls are not visible when not active */
  .image-lightbox:not(.active) .lightbox-info,
  .image-lightbox:not(.active) .lightbox-read-more,
  .image-lightbox:not(.active) .lightbox-nav,
  .image-lightbox:not(.active) .lightbox-close,
  .image-lightbox:not(.active) .lightbox-bars {
    display: none !important;
  }

  /* Read more: only visible while active */
  #lightbox-read-more { display: none; }
  .image-lightbox.active #lightbox-read-more { display: flex; }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background-color 0.2s ease;
  }
  
  .lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
  }
  
  /* Lightbox navigation buttons */
  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background-color 0.2s ease, transform 0.1s ease;
  }

  .lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.03);
  }

  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
  
  .lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  #lightbox-image {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    cursor: pointer;
  }
  
  .lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
  }
  
  #lightbox-title {
    margin: 0 0 10px 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  }
  
  #lightbox-excerpt {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
  
  .lightbox-read-more {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: auto;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .lightbox-read-more:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
  }
  
  .hamburger-menu {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
  }
  
  
  @media (max-width: 991.98px) {
  .mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--background-color);
    z-index: 3000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }
  
  .mobile-menu.active {
    left: 0;
  }
  
  .mobile-menu.open {
    left: 0;
  }
}
  
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-menu-header .mobile-logo { display: flex; align-items: center; gap: 10px; }
  .mobile-menu-header .mobile-menu-close { margin-left: auto; }
  /* Close button inside the drawer header */
  .mobile-menu-close {
    appearance: none;
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-color);
    line-height: 1;
    cursor: pointer;
  }
  .mobile-menu-close:hover { background: rgba(0,0,0,0.06); color: var(--primary-color); }
  [data-theme="dark"] .mobile-menu-close:hover { background: rgba(255,255,255,0.08); }
  
  .mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
  }
  
  .mobile-menu-nav {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .mobile-menu-nav li {
    margin-bottom: 10px;
  }
  
  .mobile-menu-nav a {
    display: flex;
    align-items: center;
    padding: 15px 0;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
  }
  /* Remove bullets and default spacing from lists inside the drawer */
  #mobile-menu ul,
  #mobile-menu li { list-style: none; margin: 0; padding: 0; }
  #mobile-menu li::marker { content: none; }
  #mobile-menu ul { padding-left: 0; }
  /* Ensure any anchor in the drawer shows pointer */
  #mobile-menu a { cursor: pointer; }
  
  .mobile-menu-nav a:hover {
    color: var(--primary-color);
  }
  
  .mobile-menu-nav i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
  }

  /* Ensure extras links show pointer */
  #mobile-menu .mobile-menu-extras a,
  #mobile-menu .mobile-menu-extras button { cursor: pointer; }

  /* Typography tweaks (mobile) */
  .post-meta { font-size: 11px; }
  .post-content p { font-size: 0.95rem; line-height: 1.5; }
  .post-content h3 { font-size: 1.25rem; }
  /* Feed preview titles a bit larger on mobile */
  .posts-feed .post-content h3 { font-size: 1.35rem; }
}

@media (max-width: 480px) {
  .featured-carousel {
    gap: 8px; /* tighter gap so 2.5 items fit */
  }
  
  .featured-story {
    width: 39vw; /* two full + ~half third visible accounting for gaps */
    aspect-ratio: 9 / 16;
  }
  
  .post {
    padding: 12px 15px;
  }
  
  .mobile-header {
    padding: 8px 15px;
  }
  
  .social-share {
    gap: 8px;
  }
  
  .social-share-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* Utility Classes */
.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;
}

.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Social Share (icon-only) refinement */
.social-share {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.social-share-btn:hover {
  background-color: var(--hover-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.social-share-btn:active {
  transform: scale(0.96);
}

.social-share-btn i { pointer-events: none; }

/* Copied feedback state for icon-only buttons */
.social-share-btn.copied {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

@media (max-width: 480px) {
  .social-share { gap: 8px; }
  .social-share-btn { width: 36px; height: 36px; font-size: 14px; }
}

/* Minimal Comment form */
.minimal-comment { margin: 24px 0 8px; }
.minimal-comment-title { font-size: 1.1rem; margin-bottom: 12px; }
.minimal-comment-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
}
.minimal-comment .input,
.minimal-comment .textarea {
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.minimal-comment .input:focus,
.minimal-comment .textarea:focus { outline: none; border-color: var(--primary-color); }
.minimal-comment .form-submit { margin: 6px 0 0; }

/* Like button state */
.like-btn { cursor: pointer; border: none; background: transparent; }
.like-btn.liked { color: var(--primary-color); }

/* Single post title tuning */
.single-post .post-title {
  line-height: 1.15;
}

/* Featured News Section */
.featured-news { position: relative; margin: 16px 0 24px; }
.featured-news, .featured-news * {
  /* Allow both horizontal swipe in carousel and vertical page scroll anywhere in the section */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
.featured-news > h2 { font-size: 1.1rem; margin: 0 0 10px; }
.featured-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
.featured-carousel::-webkit-scrollbar { display: none; }
.featured-story {
  position: relative;
  flex: 0 0 auto; /* width-driven sizing; don't force percentage basis */
  max-width: none;
  aspect-ratio: 9 / 16; /* keep vertical portrait */
  scroll-snap-align: start; /* snap each story neatly */
  
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.featured-story, .featured-story * {
  /* Allow both horizontal swipe inside the carousel and vertical page scroll */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
.featured-story:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.12); }
.featured-story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.featured-story::after {
  /* Bottom gradient overlay behind text */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 48%;
  background: linear-gradient( to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.45) 35%, rgba(0,0,0,0.2) 70%, rgba(0,0,0,0) 100% );
  pointer-events: none;
}
.featured-story-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 14px 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}
.featured-story-category { font-size: 12px; font-weight: 600; opacity: .9; text-transform: uppercase; letter-spacing: .4px; }
.featured-story-title { font-size: 1.05rem; line-height: 1.2; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Progress bars overlay */
.featured-bars {
  position: absolute;
  left: 10px; right: 10px; top: 8px;
  display: flex; gap: 4px;
  z-index: 10; /* ensure above image/overlay */
}
.featured-bars .bar {
  height: 2px; flex: 1 1 0;
  background: rgba(255,255,255,.25);
  border-radius: 999px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.featured-bars .bar > span {
  display: block; height: 100%; width: 0%;
  background: #fff; 
  transition: width .35s ease;
  border-radius: 999px;
  box-shadow: 0 0 4px rgba(255,255,255,0.3);
}

/* Mejorar barras en móvil */
@media (max-width: 767.98px) {
  .featured-bars {
    left: 8px !important; 
    right: 8px !important; 
    top: 8px !important;
    gap: 2px !important;
    display: flex !important;
    position: absolute !important;
    z-index: 15 !important;
  }
  .featured-bars .bar {
    height: 2px !important;
    background: rgba(255,255,255,.2) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    flex: 1 1 0 !important;
  }
  .featured-bars .bar > span {
    background: rgba(255,255,255,0.9) !important;
    height: 100% !important;
    display: block !important;
    border-radius: 999px !important;
    transition: width .35s ease !important;
  }
}

@media (min-width: 992px) {
  .featured-news h2 { font-size: 26px; }
  .featured-carousel { gap: 18px; }
  /* Show ~3.5 cards: (100% - 3 gaps) / 3.5 */
  .featured-story { aspect-ratio: 9 / 16; width: calc((100% - 54px) / 3.5); }
  .featured-story-title { font-size: 1.2rem; }
  .featured-story-category { font-size: 13px; }
  /* Show title with its own background chip and remove large overlay */
  .featured-story::after { background: none !important; height: 0 !important; }
  .featured-story-overlay { z-index: 10; background: linear-gradient(transparent, rgba(0,0,0,0.5)) !important; }
  /* Title: white text, no chip background on desktop */
  .featured-news .featured-story .featured-story-title { color: #fff !important; background: transparent !important; padding: 0 !important; text-shadow: 0 1px 2px rgba(0,0,0,0.4) !important; box-shadow: none !important; }
  .featured-news .featured-story .featured-story-category { color: rgba(255,255,255,0.9) !important; }
  /* Show arrows on desktop without overriding per-button left/right */
  .featured-nav { display: inline-flex; }
}

@media (max-width: 480px) {
  /* Make the featured section stand out: slightly wider than content with tighter vertical spacing */
  .featured-news { margin: 8px 0 12px; }
  .featured-news { margin-left: -15px; margin-right: -15px; }
  .featured-carousel { padding-left: 10px; padding-right: 10px; }
  .featured-story { width: 39vw; }
  .featured-story-title { font-size: 1rem; }
}

/* Force-hide featured bars on desktop (late override to win cascade) */
@media (min-width: 992px) {
  .featured-news .featured-bars { display: none !important; }
}

/* Also hide lightbox bars on desktop (defensive) */
@media (min-width: 992px) {
  .image-lightbox .lightbox-bars { display: none !important; }
}

/* Related posts styling */
.related-posts { margin: 24px 0 12px; }
.related-posts > h3 { margin: 0 0 12px; font-size: 1.2rem; }
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.related-post {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.related-post:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.related-post-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.related-post h4 { margin: 0 0 6px; font-size: 1rem; line-height: 1.25; }
.related-post h4 a { color: var(--text-color); text-decoration: none; }
.related-post h4 a:hover { color: var(--primary-color); }
.related-post p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }

@media (max-width: 900px) {
  .related-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .related-posts-grid { grid-template-columns: 1fr; }
  .related-post-image { height: 180px; }
}

/* Scroll To Top button (desktop) */
.scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none; /* hidden by default; toggled via .show */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  z-index: 5000;
}
.scroll-to-top:hover {
  background: var(--hover-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}
.scroll-to-top.show { display: inline-flex; }
@media (max-width: 768px) { .scroll-to-top { display: none !important; } }

/* Scrollbar styles for sidebars */
.left-sidebar {
  overflow: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}
.left-sidebar::-webkit-scrollbar { /* Chrome/Safari */
  display: none;
}

/* Right sidebar with visible but thin scrollbar */
.right-sidebar {
  scrollbar-width: thin;        /* Firefox */
  scrollbar-color: var(--border-color) transparent;
}
.right-sidebar::-webkit-scrollbar { /* Chrome/Safari */
  width: 6px;
}
.right-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.right-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.right-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Global scrollbar: visible by default (sidebars still hide their own scrollbars) */

/* Safety: keep search modal hidden unless active */
.search-modal { display: none !important; }
.search-modal.active { display: flex !important; }

/* Forum / En Debate styles */
.forum-wrap {
  margin-top: 24px;
}

.forum-header {
  margin-bottom: 16px;
}
.forum-title { font-size: 28px; margin: 0 0 6px; }
.forum-subtitle { color: var(--text-secondary); margin: 0; }

.community-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 14px 0 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}
.community-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 20px;
}
.community-tabs .tab.is-active {
  background: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.forum-topic-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.forum-topic-card {
  grid-column: span 12;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.forum-topic-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.forum-topic-card .topic-thumb {
  display: block;
  margin-bottom: 10px;
  border-radius: 12px;
  overflow: hidden;
}
.forum-topic-card .topic-thumb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Placeholder when no featured image */
.forum-topic-card .topic-thumb.placeholder {
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
}
.forum-topic-card .topic-thumb .placeholder-icon,
.forum-topic-card .topic-thumb .topic-thumb-placeholder i {
  font-size: 42px;
  color: var(--text-secondary);
  opacity: 0.6;
}

.forum-topic-card .topic-title {
  font-size: 20px;
  margin: 4px 0 8px;
}
.forum-topic-card .topic-title a { color: inherit; text-decoration: none; }
.forum-topic-card .topic-title a:hover { text-decoration: underline; }

.forum-topic-card .topic-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.forum-topic-card .topic-excerpt { margin: 6px 0 10px; color: var(--text-secondary); }

.debate-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.debate-tags .tag-chip {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--background-color);
}
.debate-tags .tag-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* Like button */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.like-btn.is-liked {
  border-color: var(--primary-color);
  background: rgba(255,0,0,0.06);
  color: #d33;
}
.like-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* New topic form & notices */
.forum-notice {
  background: #f0f8ff;
  border: 1px solid #b3d4ff;
  color: #215a96;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0 16px;
}
.forum-new-topic .form-row { margin-bottom: 12px; }
.forum-new-topic .form-row label { display:block; margin-bottom: 6px; font-weight: 600; }
.forum-new-topic input[type="text"],
.forum-new-topic textarea,
.forum-new-topic input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--text-color);
}
.forum-new-topic .form-actions { margin-top: 10px; }

/* CTA card */
.forum-cta .forum-cta-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}
.forum-cta .cta-actions { display: flex; gap: 10px; margin-top: 10px; }

/* Modal policies - removed duplicate conflicting styles */

  /* Collapsible: new topic */
  .forum-new-topic.is-collapsible { margin-bottom: 16px; }
  .forum-new-topic .collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
  }
  .forum-new-topic .collapsible-toggle {
    appearance: none;
    border: 1px solid var(--border-color);
    background: var(--hover-color);
    color: var(--text-color);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .2s ease;
  }
  .forum-new-topic .collapsible-toggle:hover { border-color: var(--primary-color); }
  .forum-new-topic .collapsible-toggle i { transition: transform .2s ease; }
  .forum-new-topic .forum-form.is-open {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
  }

  /* Mobile-safe modal: full-screen with scrollable body */
  @media (max-width: 600px) {
    .forum-modal__backdrop { background: rgba(0,0,0,.45); }
    .forum-modal__dialog {
      inset: 0 !important;
      transform: none !important;
      width: 100vw !important;
      height: 100vh !important;
      max-width: none;
      border-radius: 0;
      padding: 12px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    /* Support either .forum-modal__content or .forum-modal__body as scroll area */
    .forum-modal__dialog .forum-modal__content,
    .forum-modal__dialog .forum-modal__body,
    .forum-modal__dialog .modal-body {
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      max-height: calc(100vh - 80px);
      padding-right: 4px; /* avoid overlaying with scrollbar */
    }
    .forum-modal__dialog h2,
    .forum-modal__dialog .forum-modal__title { margin-top: 4px; }
  }

  .forum-modal__close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
  .forum-modal__actions { margin-top: 12px; text-align: right; }

@media (min-width: 768px) {
  .forum-topic-card { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .forum-topic-card { grid-column: span 4; }
}

.debate-form {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 20px;
}
.debate-form textarea {
  width: 100%;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  min-height: 80px;
}
.debate-form .debate-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 12px;
}
.debate-form input[type="url"] {
  flex: 1;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}
.debate-form .char-counter { color: var(--text-secondary); font-size: 12px; margin-left: auto; }
.form-feedback { margin-top: 8px; font-size: 14px; color: var(--text-secondary); }

.debate-feed { display: grid; gap: 12px; }
.debate-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 12px 10px;
}
.debate-meta { color: var(--text-secondary); font-size: 13px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.debate-content p { margin: 0 0 8px; line-height: 1.35; }
.debate-link a { color: var(--primary-color); word-break: break-all; }
.debate-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hover-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 12px;
}
.hashtag-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--hover-color); border: 1px solid var(--border-color); margin-bottom: 10px; }
.hashtag-chip .clear-filter { color: var(--text-secondary); font-weight: 700; }

  /* Hashtag cloud widget */
  .hashtag-cloud, .tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
  .hashtag-cloud .tag-chip, .tag-cloud .tag-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    line-height: 1;
  }
  .hashtag-cloud .tag-chip:hover, .tag-cloud .tag-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }

.debate-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--text-secondary); font-size: 13px; }
.debate-actions .comments-count { display: inline-flex; align-items: center; gap: 6px; }

.debate-replies { margin-top: 8px; }
.reply-list { list-style: none; padding: 0; margin: 0 0 8px; }
.reply-list li { padding: 6px 8px; border-left: 2px solid var(--border-color); margin-bottom: 6px; border-radius: 6px; background: rgba(0,0,0,0.02); }
[data-theme="dark"] .reply-list li, body.dark-theme .reply-list li { background: rgba(255,255,255,0.03); }

.reply-form { display: flex; gap: 8px; margin-top: 6px; }
.reply-form input[type="text"] {
  flex: 1;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 10px 12px;
}
.btn-reply { padding: 8px 14px; border-radius: 999px; }

.debate-loading { text-align: center; padding: 14px; color: var(--text-secondary); }

@media (max-width: 560px) {
  .debate-form .debate-form-row { flex-direction: column; align-items: flex-start; }
  .debate-form .char-counter { margin-left: 0; }
}

/* Compose card tooltip (guest users) */
.composer-card,
#compose-card { position: relative; }
.composer-card.show-tooltip::after,
#compose-card.show-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 12px; right: 12px; bottom: calc(100% + 8px);
  background: rgba(0,0,0,0.92);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  z-index: 4000;
  pointer-events: none;
}
.composer-card.show-tooltip::before,
#compose-card.show-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%; left: 24px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(0,0,0,0.92) transparent;
  z-index: 4000;
  pointer-events: none;
}

/* Trending Filter Bar */
.trending-filter-bar {
  margin: 12px 0 16px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
}
.trending-filter-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.trending-filter-form .filter-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.trending-filter-form select {
  width: 100%;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
}
.trending-filter-form select[multiple] {
  min-height: 140px;
}
.trending-filter-form .filter-actions { display: flex; gap: 8px; }
.trending-filter-form .btn-apply,
.trending-filter-form .btn-clear {
  appearance: none;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--hover-color);
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
}
.trending-filter-form .btn-apply { background: var(--primary-tint, var(--hover-color)); }
.trending-filter-form .btn-apply i,
.trending-filter-form .btn-clear i { margin-right: 6px; }

@media (max-width: 992px) {
  .trending-filter-form { grid-template-columns: 1fr; }
  .trending-filter-form select[multiple] { min-height: 120px; }
}

/* Trending button below navigation */
.trending-below-nav { margin: 10px 0 16px; display: none; }
.trending-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
  border: 1px solid var(--border-color);
  font-weight: 600;
}
.trending-nav-btn i { color: #ff5722; }
.trending-nav-btn:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .trending-nav-btn:hover, body.dark-theme .trending-nav-btn:hover { background: rgba(255,255,255,0.06); }

/* Debate button below navigation */
.debate-nav { margin: 10px 0 16px; display: none; }
.debate-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
  border: 1px solid var(--border-color);
  font-weight: 600;
}
.debate-nav-btn i { color: #e53935; }
.debate-nav-btn:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .debate-nav-btn:hover, body.dark-theme .debate-nav-btn:hover { background: rgba(255,255,255,0.06); }

/* Visible only on mobile */
@media (max-width: 991.98px) {
  .trending-below-nav { display: block; }
  .debate-nav { display: block; }
}

/* Show debate nav on desktop sidebar */

/* ===== EN DEBATE SYSTEM STYLES ===== */

/* Debates Archive Page */
.debates-header {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.debates-controls .search-box {
    position: relative;
}

.debates-controls .search-box input {
    padding-left: 40px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
}

.debates-controls .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.algorithm-info .alert {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 8px;
    color: var(--text-color);
}

/* Tag Filters */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-filter {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter:hover,
.tag-filter.active {
    background: #ff5722;
    color: white;
    border-color: #ff5722;
}

/* Debate Cards */
.debate-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.debate-card:hover {
    border-color: #ff5722;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.1);
}

.debate-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.community-role {
    background: #ff5722;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.user-badge {
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.debate-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.parent-indicator,
.source-indicator {
    margin-left: 8px;
}

.parent-indicator a,
.source-indicator a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Debate Content */
.debate-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.debate-title a:hover {
    color: #ff5722;
}

.debate-excerpt {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Debate Tags */
.debate-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.debate-tag {
    background: rgba(255, 87, 34, 0.1);
    color: #ff5722;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.debate-tag:hover {
    background: #ff5722;
    color: white;
}

/* Debate Actions */
.debate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 87, 34, 0.1);
    color: #ff5722;
}

.action-btn.voted {
    color: #ff5722;
    background: rgba(255, 87, 34, 0.1);
}

.action-btn i {
    font-size: 16px;
}

.account-btn, .theme-aware-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--surface-color);
    color: var(--text-color) !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: inherit;
    font-weight: 400;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.account-btn:hover, .theme-aware-btn:hover {
    background: var(--hover-color);
    color: var(--text-color) !important;
    text-decoration: none;
    border-color: var(--text-secondary);
}

.account-btn img, .theme-aware-btn .account-avatar {
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    object-fit: cover;
}

.account-btn i, .theme-aware-btn i {
    font-size: 1em;
    color: var(--text-secondary);
}

.action-label {
    font-size: 13px;
}

.debate-stats {
    font-size: 13px;
    color: var(--text-muted);
}

/* Child Debates */
.child-debates {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.child-debates-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.child-debates-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.child-debate-link {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.child-debate-link:hover {
    color: #ff5722;
}

.view-all-children {
    color: #ff5722;
    font-size: 13px;
    text-decoration: none;
    margin-top: 8px;
}

/* Single Debate Page */
.debate-single-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.debate-header {
    margin-bottom: 25px;
}

.debate-single .debate-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.debate-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.debate-content p {
    margin-bottom: 1.2rem;
}

/* Child Debates Grid */
.child-debates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.child-debate-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}

.child-debate-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.child-debate-title a {
    color: var(--text-color);
    text-decoration: none;
}

.child-debate-title a:hover {
    color: #ff5722;
}

.child-debate-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.child-debate-meta span {
    margin-right: 10px;
}

.child-debate-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Live Debate */
.live-debate {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.live-indicator {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.live-chat-container {
    background: var(--bg-secondary);
    border-radius: 8px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.live-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
}

.live-chat-input {
    padding: 15px;
}

/* Login/Register Buttons in Sidebar */
.sidebar-cta .login-btn,
.sidebar-cta .register-btn,
.sidebar-cta .logout-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar-cta .login-btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.sidebar-cta .login-btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.sidebar-cta .register-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.sidebar-cta .register-btn:hover {
    background: var(--primary-color);
    color: white;
}

.sidebar-cta .logout-btn {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.sidebar-cta .logout-btn:hover {
    background: transparent;
    color: #dc3545;
}

.sidebar-cta .user-info {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--widget-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-weight: 500;
}

.sidebar-cta .user-info i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Forum Sidebar Styles */
.forum-sidebar-widget {
    background: var(--widget-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.widget.forum-widget {
    border-left: 3px solid var(--accent-color);
}

.widget.forum-widget .widget-header {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    font-weight: 600;
}

.widget.ad-widget {
    text-align: center;
    padding: 0;
}

.widget.ad-widget .widget-content {
    padding: 15px;
}

.widget.ad-widget img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.widget.ad-widget .ad-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.7;
}

.right-sidebar .widget.forum-widget:first-of-type {
    margin-top: 15px;
}

/* Forum advertisement specific styles */
.forum-ad-content {
    text-align: center;
}

.forum-ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.forum-ad-image:hover {
    transform: scale(1.02);
}

.ad-type-banner .forum-ad-image {
    max-width: 300px;
    max-height: 250px;
}

.ad-type-skyscraper .forum-ad-image {
    max-width: 160px;
    max-height: 600px;
}

.ad-type-square .forum-ad-image {
    max-width: 250px;
    max-height: 250px;
}

.ad-placeholder {
    background: var(--border-color);
    color: var(--text-muted);
    padding: 20px;
    border-radius: 8px;
    font-style: italic;
    text-align: center;
    display: none; /* Ocultar placeholders por defecto */
}

/* Solo mostrar placeholders en el sidebar */
.right-sidebar .ad-placeholder {
    display: block;
}

/* Like button styles */
.like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
}

.like-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.like-btn.liked {
    color: #dc3545;
}

.like-btn.liked i {
    animation: heartbeat 0.6s ease-in-out;
}

@keyframes heartbeat {
0% { transform: scale(1); }
50% { transform: scale(1.2); }
100% { transform: scale(1); }
}

/* Liked debates section styles */
.liked-list {
display: flex;
flex-direction: column;
gap: 16px;
}

.liked-item {
background: var(--widget-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 16px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.liked-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.liked-title a {
color: var(--text-color);
text-decoration: none;
font-weight: 600;
font-size: 16px;
}

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

.liked-meta {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.liked-meta i {
    margin-right: 4px;
}

.liked-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Enhanced Debate Editor Styles */
.debate-editor-container {
    position: relative;
    background: var(--widget-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.debate-editor-container textarea {
    width: 100%;
    border: none;
    padding: 15px;
    background: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}

.debate-editor-container textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.toolbar-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.toolbar-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    max-height: 250px;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.emoji-categories {
    display: flex;
    padding: 10px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 5px;
}

.emoji-cat-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.emoji-cat-btn:hover,
.emoji-cat-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 10px;
}

.emoji-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
}

.emoji-btn:hover {
    background: var(--bg-secondary);
}

/* Sticker Picker */
.sticker-picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--widget-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.sticker-categories {
    display: flex;
    padding: 10px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 5px;
    flex-wrap: wrap;
}

.sticker-cat-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sticker-cat-btn:hover,
.sticker-cat-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
}

.sticker-btn {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sticker-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

.sticker-emoji {
    font-size: 24px;
}

.sticker-name {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Hashtag Helper */
.hashtag-helper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.hashtag-title {
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hashtag-suggestion {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 15px;
    text-align: left;
    cursor: pointer;
    color: var(--accent-color);
    font-size: 14px;
    transition: background 0.2s ease;
}

.hashtag-suggestion:hover {
    background: var(--bg-secondary);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .emoji-categories,
    .sticker-categories {
        flex-wrap: wrap;
    }
    
    .toolbar-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: #ff5722;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff5722;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Author Card */
.author-card {
    text-align: center;
}

.author-card .author-avatar {
    margin: 0 auto 15px;
}

.author-card h6 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.author-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
}

.author-stats {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .debates-controls .row > div {
        margin-bottom: 10px;
    }
    
    .debate-card {
        padding: 15px;
    }
    
    .debate-single-content {
        padding: 20px;
    }
    
    .debate-single .debate-title {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .child-debates-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .algorithm-info .alert,
body.dark-theme .algorithm-info .alert {
    background: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.3);
}

[data-theme="dark"] .live-chat-container,
body.dark-theme .live-chat-container {
    background: var(--bg-color);
}

/* Open Debate Button */
.open-debate-section {
    background: linear-gradient(135deg, #e53935, #ef5350);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.open-debate-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.open-debate-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
}

.open-debate-btn i {
    font-size: 18px;
}

.open-debate-section small {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

/* Post More Actions (three dots on image) */
.post-featured-image {
    position: relative;
}

.post-more-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.post-more-actions .more-actions-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.post-more-actions .more-actions-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.post-more-actions .more-actions-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.post-more-actions .more-actions-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.post-more-actions .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s ease;
}

.post-more-actions .menu-item:hover {
    background: var(--bg-secondary);
}

.post-more-actions .menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.post-more-actions .menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.post-more-actions .menu-item i {
    font-size: 16px;
    width: 16px;
}

/* Debate Actions - Consistent with site theme */
.debate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.vote-section {
    display: flex;
    align-items: center;
}

.vote-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.vote-btn:hover {
    background: var(--bg-secondary);
    border-color: #e53935;
    color: #e53935;
}

.vote-btn.voted {
    background: #e53935;
    color: white;
    border-color: #e53935;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Subscription CTA - Consistent with site theme */
.subscription-cta {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.cta-content h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-content h3 i {
    color: #e53935;
}

.cta-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.cta-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.cta-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.cta-tab.active,
.cta-tab:hover {
    background: #e53935;
    color: white;
    border-color: #e53935;
}

.cta-message {
    margin-bottom: 25px;
}

.cta-message p {
    color: var(--text-color);
    font-size: 16px;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.cta-buttons .btn {
    min-width: 200px;
    padding: 12px 24px;
    font-weight: 600;
}
@media (min-width: 992px) {
  .left-sidebar .debate-nav { display: block; }
}

/* Desktop sticky: reuse mobile header on scroll */
@media (min-width: 992px) {
  .mobile-header {
    display: flex !important; /* override global hidden rule */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.2s ease;
    pointer-events: none;
    background: var(--surface-color, #fff);
    box-shadow: none;
    backdrop-filter: saturate(140%) blur(6px);
  }
  /* Prevent overlap: add space when sticky is visible */
  body.show-desktop-sticky .container { padding-top: 70px; }
  /* Allow the side drawer menu on desktop too */
  .mobile-menu { display: block !important; }
  /* Stronger override vs earlier #mobile-menu { display:none !important } */
  #mobile-menu { display: block !important; z-index: 1300; }
  /* Ensure hamburger is visible on desktop sticky */
  body.show-desktop-sticky .hamburger-menu { display: inline-flex !important; }
  body.show-desktop-sticky .mobile-header {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  }
  /* Optional: avoid overlapping toast elements */
  body.mobile-menu-open .mobile-header { transform: translateY(-100%); opacity: 0; pointer-events: none; }
}

/* Sidebar: Trending as menu-like item (Desktop) */
@media (min-width: 992px) {
  .left-sidebar .trending-below-nav { margin: 6px 0 8px; }
  .left-sidebar .trending-below-nav .trending-nav-btn {
    display: block;
    width: 100%;
    background: transparent !important;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
  }
  .left-sidebar .trending-below-nav .trending-nav-btn:hover {
    background: rgba(255,255,255,0.06);
  }
  
  /* Debate nav styling for desktop sidebar */
  .left-sidebar .debate-nav { margin: 6px 0 8px; }
  .left-sidebar .debate-nav .debate-nav-btn {
    display: block;
    width: 100%;
    background: transparent !important;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
  }
  .left-sidebar .debate-nav .debate-nav-btn:hover {
    background: rgba(255,255,255,0.06);
  }
}

/* Mobile menu extras: Trending above Subscribe and styled as menu item */
@media (max-width: 991.98px) {
  #mobile-menu .mobile-menu-extras { display: flex; flex-direction: column; gap: 10px; padding: 10px 14px 16px; }
  #mobile-menu .mobile-menu-extras .trending-link {
    display: block;
    background: transparent !important;
    color: inherit;
    border: 0;
    padding: 12px 14px;
    line-height: 1.2;
    border-radius: 10px;
    font-weight: 600;
  }
  #mobile-menu .mobile-menu-extras .trending-link:hover { background: rgba(255,255,255,0.06); }
}

/* Final overrides: ensure desktop drawer wins over earlier generic rules */
@media (min-width: 992px) {
  #mobile-menu {
    position: fixed !important;
    left: auto !important;
    right: 0 !important;
    width: 380px !important;
    max-width: 90vw;
    height: 100vh !important;
    transform: translateX(100%) !important;
    z-index: 7000 !important; /* above backdrop */
    background: var(--background-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -12px 0 24px rgba(0,0,0,0.08);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #mobile-menu.active { transform: translateX(0) !important; }
}

/* Strong overrides to remove bullets/markers inside the drawer */
#mobile-menu ul,
#mobile-menu li,
#mobile-menu .menu,
#mobile-menu .menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#mobile-menu li::marker,
#mobile-menu .menu li::marker,
#mobile-menu li::before,
#mobile-menu .menu li::before { content: none !important; }
#mobile-menu ul { padding-left: 0 !important; }

/* Close button absolute to ensure it stays aligned */
.mobile-menu-header { position: relative; }
.mobile-menu-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 999px; /* circular */
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.mobile-menu-close i { line-height: 1; pointer-events: none; }

/* Hover/active states matching theme */
.mobile-menu-close:hover {
  background: rgba(0,0,0,0.04);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
[data-theme="dark"] .mobile-menu-close {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
[data-theme="dark"] .mobile-menu-close:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Account CTA (avatar + login) under Subscribe */
.account-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.mobile-menu-extras .account-cta { padding: 10px 14px 4px; }
.sidebar-cta .account-cta { margin-top: 10px; padding: 8px 0; }

.account-cta .avatar-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex: 0 0 44px;
}
.account-cta .avatar-icon i { font-size: 22px; color: var(--text-color); opacity: 0.9; }

.account-cta .login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
}
.account-cta .login-btn:hover {
  background: rgba(0,0,0,0.04);
}
[data-theme="dark"] .account-cta .login-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* Subscriber Login page */
.subscriber-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.subscriber-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 22px 20px;
}
.subscriber-login-card .login-header { margin-bottom: 14px; }
.subscriber-login-card h1 { font-size: 26px; margin: 0 0 6px; }
.subscriber-login-card .login-subtitle { color: var(--muted-text-color); margin: 0; }
.subscriber-login-card .login-error {
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #cc2e2e;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.subscriber-login-card .login-field { display: block; margin-bottom: 12px; }
.subscriber-login-card .login-field span { display: block; font-weight: 600; margin-bottom: 6px; }
.subscriber-login-card input[type="text"],
.subscriber-login-card input[type="password"] {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 10px 12px;
}
.subscriber-login-card .remember-field { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; }
.subscriber-login-card .login-submit {
  width: 100%;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--primary-color, #e53935);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.subscriber-login-card .login-submit:hover { filter: brightness(0.95); }
.subscriber-login-card .login-links { margin-top: 12px; display: flex; justify-content: space-between; }
/* Honeypot field hidden */
.subscriber-login-card .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== Foro de Debate ===== */
.forum-wrap { max-width: 920px; margin: 24px auto; padding: 0 16px; }
.forum-header { margin-bottom: 16px; }
.forum-title { font-size: 28px; margin: 0 0 6px; }
.forum-subtitle { color: #666; margin: 0; }
.forum-notice { background: #eef7ff; border: 1px solid #cfe6ff; padding: 10px 12px; border-radius: 8px; margin: 12px 0; }

.forum-new-topic, .forum-cta { margin: 18px 0 24px; }
.forum-form .form-row { display: flex; flex-direction: column; margin-bottom: 12px; }
.forum-form label { font-weight: 600; margin-bottom: 6px; }
.forum-form input[type="text"],
.forum-form textarea { 
    padding: 10px 12px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    background: var(--background-color); 
    color: var(--text-color);
}
.forum-form textarea { resize: vertical; }
.forum-form .form-actions { margin-top: 8px; }
.forum-form .btn-primary { background: var(--primary-color, #e53935); color:#fff; border:none; padding:10px 14px; border-radius:10px; font-weight:700; cursor:pointer; }

.forum-cta-card { padding: 16px; border: 1px dashed #ddd; border-radius: 10px; background: #fafafa; }
.forum-cta-card h2 { margin-top:0; }
.forum-cta-card .btn { display:inline-block; padding:8px 12px; border-radius:8px; border:1px solid #ddd; text-decoration:none; margin-right:8px; }
.forum-cta-card .btn-primary { background: var(--primary-color, #e53935); color:#fff; border:none; }

.forum-topics { margin-top: 10px; }
.forum-topic-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.forum-topic-card { padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fff; }
.forum-topic-card .topic-title { margin: 0 0 6px; font-size: 18px; }
.forum-topic-card .topic-meta { color:#666; font-size: 13px; display:flex; gap:14px; }
.forum-topic-card .topic-excerpt { margin: 8px 0 0; }
.forum-pagination { margin: 16px 0; }

/* Single debate topic */
.forum-topic-single { max-width: 820px; margin: 24px auto; padding: 0 16px; }
.forum-topic-header { margin-bottom: 12px; }
.forum-topic-title { font-size: 32px; margin: 0 0 8px; }
.forum-topic-header { position: relative; }
.forum-share { margin-top: 10px; display:flex; gap:10px; }
.forum-share .share-btn { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:50%; background:#f5f5f5; color:#333; text-decoration:none; }
.forum-share .share-btn.twitter { color:#111; }
.single-post-content { margin: 16px 0 24px; }
.forum-section-title { font-size: 20px; margin: 0 0 10px; }
.forum-login-cta { background:#fffbe6; border:1px solid #ffe58f; padding:10px 12px; border-radius:8px; margin-bottom:10px; }
.forum-comments-closed { color:#666; }

.forum-more-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

/* ===== Mi Cuenta + Guardados ===== */
.account-wrap { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.account-header { margin-bottom: 16px; }
.account-title { font-size: 28px; margin: 0 0 8px; }
.account-meta { color:#666; display:flex; gap:12px; align-items:center; }
.account-badge { display:inline-flex; gap:6px; align-items:center; padding:4px 8px; border-radius:8px; font-size:13px; }
.account-badge.paid { background:#fff1f0; color:#cf1322; border:1px solid #ffa39e; }
.account-badge.free { background:#f6ffed; color:#237804; border:1px solid #b7eb8f; }
.account-section { margin: 12px 0 24px; }
.saved-list { display:grid; grid-template-columns: 1fr; gap: 12px; }
.saved-item { display:flex; gap:12px; border:1px solid #eee; background:#fff; border-radius:10px; padding:10px; }
.saved-thumb img, .saved-thumb .ph { width:160px; height:100px; object-fit:cover; border-radius:8px; background:#f2f2f2; display:block; }
.saved-title { margin:0 0 6px; font-size:18px; }
.saved-meta { color:#666; display:flex; gap:12px; font-size:13px; margin-bottom:6px; }
.saved-excerpt { margin:0 0 8px; }
.saved-actions { display:flex; gap:8px; }
.nm-save-wrap { margin-top: 8px; }
.nm-save-form .nm-save-btn { background:#fff; border:1px solid #ddd; border-radius:8px; padding:6px 10px; cursor:pointer; font-weight:600; }
.nm-save-form .nm-save-btn[aria-pressed="true"] { background:#fffbe6; border-color:#ffe58f; }
.account-links { display:flex; gap:10px; flex-wrap:wrap; }
.account-links .btn { display:inline-block; padding:8px 12px; border:1px solid #ddd; border-radius:8px; text-decoration:none; color:#fff; }
.account-pagination { margin: 16px 0; }

@media (min-width: 768px) {
  .saved-list { grid-template-columns: 1fr 1fr; }
}

/* Account CTA and notifications */
.account-cta { margin-top: 10px; }
.account-cta .btn-primary { background: var(--primary-color, #e53935); color:#fff; border:none; padding:10px 14px; border-radius:10px; font-weight:700; text-decoration:none; display:inline-flex; align-items:center; gap:8px; }
.account-cta .btn-primary:hover { filter: brightness(0.95); }

.account-notifications { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.notification-item { background:#fff; border:1px solid #eee; border-radius:10px; padding:10px; }
.notification-link { color:#333; text-decoration:none; display:block; font-size:14px; }
.notification-link strong { font-weight:700; }
.notification-link em { font-style:normal; color:#111; }
.notification-link .when { color:#888; font-size:12px; }
.notification-excerpt { margin-top:6px; color:#555; font-size:13px; }

/* Hashtag chips */
.debate-tags { margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.tag-chip { display:inline-block; padding:4px 8px; border-radius:999px; background:#f5f5f5; border:1px solid #eaeaea; font-size:12px; color:#333; text-decoration:none; }
.tag-chip:hover { background:#efefef; }

/* ===== 404 Page ===== */
.notfound-wrap { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.notfound-header { margin-bottom: 14px; }
.notfound-title { font-size: 28px; margin: 0 0 6px; }
.notfound-subtitle { color:#666; margin:0; }
.notfound-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin: 12px 0 20px; }
.notfound-actions .btn { display:inline-block; padding:8px 12px; border:1px solid #ddd; border-radius:8px; text-decoration:none; color:#333; }
.notfound-actions .btn-primary { background: var(--primary-color, #e53935); color:#fff; border:none; }
.notfound-search { display:flex; gap:8px; align-items:center; }
.notfound-search input[type="search"] { padding:8px 10px; border:1px solid #ddd; border-radius:8px; }
.notfound-grid { display:grid; grid-template-columns: 1fr; gap:12px; }
.nf-card { border:1px solid #eee; border-radius:10px; background:#fff; padding:10px; }
.nf-thumb img, .nf-thumb .ph { width:100%; height:160px; object-fit:cover; border-radius:8px; background:#f2f2f2; display:block; }
.nf-title { font-size:16px; margin:8px 0 0; }

@media (min-width: 768px) {
  .notfound-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Foro: Políticas Modal ===== */
.forum-modal-open { overflow:hidden; }
.forum-modal { position: fixed; inset: 0; display: none; z-index: 8000; }
.forum-modal[aria-hidden="false"] { display: flex; align-items: center; justify-content: center; }
.forum-modal__backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.5); z-index: 8000; }
.forum-modal__dialog { position: relative; max-width: 720px; width: 90vw; background: var(--background-color); color: var(--text-color); border-radius:12px; padding:20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 8001; margin: 20px; }
.forum-modal__close { position:absolute; right:10px; top:8px; background:transparent; border:none; font-size:22px; cursor:pointer; color: var(--text-color); }
.forum-modal__content ul { margin: 10px 0 10px 18px; }
.forum-modal__actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.forum-modal__actions .btn i { margin-right: 5px; }

/* ===== Mi Cuenta layout ===== */
.account-wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.account-header { border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 16px; }
.account-title { font-size: 28px; margin: 0 0 6px; }
.account-meta { display:flex; gap:12px; align-items:center; color:#666; flex-wrap:wrap; }
.account-badge { display:inline-flex; gap:6px; align-items:center; padding:4px 8px; border-radius:999px; font-size:12px; border:1px solid #eee; }
.account-badge.paid { background:#fff7e6; border-color:#ffe4b5; }
.account-badge.free { background:#f5f5f5; }
.account-cta { margin-top: 10px; }

.account-section { margin: 20px 0; }
.account-section-title { font-size: 20px; margin: 0 0 10px; display:flex; align-items:center; gap:8px; }

.account-notifications { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.notification-item { background:#fff; border:1px solid #eee; border-radius:10px; padding:10px; }

.saved-list { display:grid; grid-template-columns: 1fr; gap:12px; }
.saved-item { display:flex; gap:12px; border:1px solid #eee; background:#fff; border-radius:10px; padding:10px; }
.saved-thumb img, .saved-thumb .ph { width: 140px; height: 100px; object-fit: cover; border-radius:8px; background:#f2f2f2; display:block; }
.saved-body { flex:1; min-width:0; }
.saved-title { font-size:18px; margin:0 0 6px; }
.saved-meta { color:#888; display:flex; gap:10px; flex-wrap:wrap; font-size:12px; }
.saved-excerpt { color:#555; font-size:14px; margin:8px 0; }
.saved-actions { display:flex; gap:10px; }

.account-links { display:flex; gap:10px; flex-wrap:wrap; margin: 18px 0; }

@media (min-width: 900px) {
  .account-header { display:flex; align-items:flex-end; justify-content:space-between; }
  .account-cta { margin-top: 0; }
  .saved-list { grid-template-columns: 1fr 1fr; }
}

/* Forum uploaded images inside content */
.forum-uploaded-img { max-width: 100%; height:auto; border-radius:10px; margin-top: 10px; display:block; }

/* ===== Comunidad (muro) ===== */
.community-wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.community-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.community-title { font-size: 28px; margin: 0; }
.community-tabs { display:flex; gap:8px; }
.community-tabs .tab { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid #eee; border-radius:999px; text-decoration:none; color:#333; }
.community-tabs .tab.is-active { background: var(--primary-color, #e53935); border-color: var(--primary-color, #e53935); color:#fff; }

.community-notifs { margin: 14px 0 18px; }
.community-notifs .section-title { font-size: 20px; margin: 0 0 8px; display:flex; gap:8px; align-items:center; }
.notif-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.notif-item { background:#fff; border:1px solid #eee; border-radius:10px; padding:10px; }
.community-notifs .muted { color:#777; }

.community-feed .feed-grid { display:grid; grid-template-columns: 1fr; gap:12px; }
.feed-card { background:#fff; border:1px solid #eee; border-radius:10px; padding:12px; }
.feed-card__title { margin:0 0 6px; font-size:18px; }
.feed-card__meta { color:#888; display:flex; gap:10px; flex-wrap:wrap; font-size:12px; }
.feed-card__excerpt { color:#555; font-size:14px; margin-top: 6px; }
.community-pagination { margin: 16px 0; }

@media (min-width: 900px) {
  .community-feed .feed-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Accessibility Improvements ===== */
.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;
}

.form-help {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.required span {
  color: #e74c3c;
  font-weight: bold;
}

/* Focus indicators */
.btn:focus,
.account-btn:focus,
input:focus,
textarea:focus,
button:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .account-btn {
    border: 2px solid currentColor;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
