/*
  Archivo: CSS/styles.css
  Propósito: Proveer estilos nativos que reemplazan a Bootstrap.
  Contenido: variables de tema, utilidades (grid, botones), componentes (navbar, card, footer, carousel)
  Notas: Mantener las clases utilizadas en los templates para compatibilidad.
*/
/* Reset básico */

body, header, nav, footer, .card, .panel-admin {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

body.dark-mode {
    background-color: #121212; /* Un gris hiper oscuro estilo Spotify */
    color: #e0e0e0;            /* Texto gris claro para no cansar la vista */
}

body.dark-mode header {
    background-color: #1f1f1f;
    border-bottom: 1px solid #333;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { min-height: 100%; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; color: #111; }
:root {
    --sidebar-width: 220px;
  /* Variables de tema: ajustar colores para modo claro */
  --bg: #ffffff;
  --text: #111827;
  --muted: rgba(0,0,0,0.65);
  --card-bg: #ffffff;
  --border: rgba(0,0,0,0.06);
  --accent: #EF3363;
  --indicator-stroke: rgba(0,0,0,0.9);
  --footer-bottom-bg: rgba(0,0,0,0.03);
  --surface-muted: rgba(0,0,0,0.02);
  --surface-muted-strong: rgba(0,0,0,0.05);
  --facebook: #1877f2;
  --instagram: #e1306c;
  --whatsapp: #25d366;
  --twitter: #111827;
  --linkedin: #0a66c2;
  --messenger: #0084ff;
}
/* Variables para modo oscuro (aplicadas cuando [data-bs-theme="dark"]) */
[data-bs-theme="dark"] {
  --bg: #0b1220;
  --text: #e6eef8;
  --muted: rgba(255,255,255,0.7);
  --card-bg: #07101a;
  --border: rgba(255,255,255,0.06);
  --accent: #EF3363;
  --indicator-stroke: rgba(255,255,255,0.9);
  --footer-bottom-bg: rgba(255,255,255,0.03);
  --surface-muted: rgba(255,255,255,0.06);
  --surface-muted-strong: rgba(255,255,255,0.12);
  --facebook: #1877f2;
  --instagram: #e1306c;
  --whatsapp: #25d366;
  --twitter: #111827;
  --linkedin: #0a66c2;
  --messenger: #0084ff;
}
[data-bs-theme="dark"] #logo{
  content: url('../img/logo_alt.png');
}
/* Layout general: cuerpo como columna flex para sticky footer */
body { display:flex; flex-direction:column; min-height:100vh; background: var(--bg); color: var(--text); overflow-x: clip; }
.site-main {
  padding: 0;
  flex: 1;
}
h2 {
  margin-top: 10px;
  margin-bottom: 10px;
}
/* el carrusel ocupa todo el ancho naturalmente sin compensaciones */
.site-main .carousel {
  margin: 0;
  width: 100%;
}
/* Basic container utilities */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.container-fluid { width: 100%; padding-left: 16px; padding-right: 16px; }
.container-noticia { width: 100%; max-width: 800px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
/* =========================
   Navbar & Header Styles
   ========================= */
.navbar {
  background: var(--bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: transform 0.3s ease;
}
.navbar.nav-hidden {
  transform: translateY(-100%);
}
.navbar .container-fluid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap; /* Importante para móvil: permite que el menú caiga debajo */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 32px;
  padding-right: 32px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  margin-right: 0;
}
#logo {
  content: url('../img/logo.png');
  max-height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
/* Toggler (Mobile) */
.navbar-toggler {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: block; /* Visible en móvil */
}
.navbar-toggler:focus {
  outline: 2px solid var(--accent);
}
.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}
[data-bs-theme="dark"] .navbar-toggler-icon {
  filter: invert(1) grayscale(100%) brightness(200%);
}
/* Menú Colapsable */
.navbar-collapse {
  flex-basis: 100%; /* Ocupa toda la línea en móvil */
  flex-grow: 1;
  align-items: center;
  display: none; /* Oculto por defecto en móvil */
}
.navbar-collapse.show {
  display: block; /* Mostrar al expandir */
}
.navbar-nav {
  display: flex;
  flex-direction: column; /* Vertical en móvil */
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  gap: 8px;
  margin-top: 12px;
}
.nav-link {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 700;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}
.nav-link:hover, .nav-link.active {
  background: rgba(0,0,0,0.05);
  color: var(--accent);
}
.nav-item{
  margin-top: 15px;
}
/* Search Bar */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: #1a2332;
  margin-top: 0;
  width: auto;
  transition: border-color 0.2s ease;
}
.nav-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 107, 44, 0.2);
}
.nav-search .search-input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  width: 100%;
  font-size: 14px;
  font-family: inherit;
}
/* Override for desplegable */
.nav-search.buscador-desplegable .search-input.input-desplegable {
  width: 0px;
  opacity: 0;
  padding: 0;
  background: transparent;
  transition: width 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}
.nav-search.buscador-desplegable:hover .search-input.input-desplegable,
.nav-search.buscador-desplegable:focus-within .search-input.input-desplegable {
  width: 220px;
  opacity: 1;
  padding: 5px 10px;
}
.nav-search.buscador-desplegable:hover,
.nav-search.buscador-desplegable:focus-within {
  background-color: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
}
.nav-search .search-input::placeholder {
  color: #000;
}
.nav-search .search-input:focus {
  outline: none;
}
.search-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.search-btn:hover {
  color: var(--accent);
}
.search-btn:active {
  opacity: 0.8;
}
.clear-btn {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s ease, opacity 0.2s ease;
}
.nav-search .search-input:not(:placeholder-shown) ~ .clear-btn {
  visibility: visible;
  opacity: 1;
}
[data-bs-theme="light"] .nav-search {
  background: #f5f5f5;
  border-color: #e0e0e0;
}
[data-bs-theme="light"] .nav-search:focus-within {
  border-color: var(--accent);
}
[data-bs-theme="light"] .nav-search .search-input {
  color: var(--text);
}
[data-bs-theme="light"] .nav-search .search-input::placeholder {
  color: #f60361;
}
[data-bs-theme="light"] .search-btn:hover {
  background: rgba(255, 107, 44, 0.1);
}
/* =========================
   Desktop Navbar (>1024px)
   ========================= */
@media (min-width: 1025px) {
  .navbar .container-fluid {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .navbar-toggler {
    display: none;
  }
  .navbar-collapse {
    display: flex !important;
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .navbar-nav {
    flex-direction: row;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .navbar-nav::-webkit-scrollbar { display: none; }
  .navbar-nav .nav-link {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 8px 10px;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .nav-search:not(.buscador-desplegable) {
    width: auto;
    margin-top: 0;
    min-width: 250px;
  }
  .nav-search.buscador-desplegable {
    width: auto;
    margin-top: 0;
    border: none;
    background: transparent;
    padding: 2px 5px;
    order: 1; /* el buscador queda al final, a la derecha de las acciones */
  }
  .navbar-brand { order: 0; }
  .navbar-collapse { order: 0; }
  .nav-actions { order: 0; }
}
/* Grid simple
  - .row y .col para maquetar bloques sencillos
  - las variantes .col-md-* se aplican en media queries
*/
.row { display:flex; flex-wrap:wrap; }
.col { flex:1; }
.col-md-3 { flex: calc(30%); max-width: calc(30%);}
.col-md-9 { flex: calc(70%); max-width: calc(70%);}
/* Botones
  - .btn con variante .btn-outline-secondary
*/
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:6px 12px; border-radius:6px; cursor:pointer; border:1px solid transparent; background:transparent; color: var(--text);}
.btn:focus { outline:2px solid rgba(0,0,0,0.08); }
.btn-outline-secondary { border-color: transparent; }
.btn-outline-secondary:hover {
  background: rgba(0,0,0,0.06);
}
/* Icon-only nav buttons */
.nav-actions .btn-outline-secondary {
  border: none;
  border-radius: 50%;
  width: 38px; height: 38px;
  padding: 0;
  font-size: 1.1rem;
  color: var(--text);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nav-actions .btn-outline-secondary:hover {
  background: var(--border);
  color: var(--accent);
  transform: scale(1.08);
}
/* Username button keeps text style */
.nav-actions .btn-outline-secondary.btn-user {
  width: auto;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 6px;
  border: 1.5px solid var(--border);
}
.nav-actions .btn-outline-secondary.btn-user:hover {
  border-color: var(--accent);
  background: rgba(239, 51, 99, 0.06);
  transform: none;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  opacity: 0.9;
}
/* nav utilities */
.nav-left { margin-right: auto; }
/* form input replacement for .form-control */
.input { width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:6px; background:transparent; color:var(--text); margin-bottom:10px; }
.input:focus {
  border-color: var(--accent);
  outline: none;
}
/* card header/footer neutral styles */
.card-header { padding:12px 16px; background: transparent; }
.card-footer { padding: 12px 16px; background: transparent;}
.card-especial{justify-content: space-between;}
/* Componente Card
  - .card, .card-body, .card-title, .card-text
  - Uso: entradas principales y sidebars
*/
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(11,11,11,0.04); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card[data-url] { cursor: pointer; }
.card[data-url]:hover { transform: scale(1.02); box-shadow: 0 10px 28px rgba(11,11,11,0.1); }
.card-body { padding: 16px; }
.card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card-text { color: var(--text); font-size: 0.95rem; }
.card-img-top { width:100%; height:auto; display:block; }
.card-tag { text-transform:uppercase; font-size:.85rem; font-weight:600; opacity:.8; margin-bottom:10px; margin-top: 10px; background-color:#EF3363; border-radius:8px; padding:4px 8px; display:inline-block; }
/* Make anchor buttons look consistent */
a.btn { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; color:inherit; }
/* Comportamiento de colapso (menu responsive)
   - .collapse se muestra como bloque en móvil, y como flex en escritorio
*/
.collapse { display:none; }
.collapse.show { display:block; }
@media (min-width: 1025px) {
  .navbar,
  .collapse { display:flex; align-items:center; }
  .navbar-toggler { display: none; }
  .sidebar {
    display: none;
  }
  .site-main,
  .site-footer {
    margin-left: 0;
  }
}
/* spacing helpers */
.mt-5 { margin-top: 3rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.text-center { text-align:center; }
/* Footer
  - .site-footer contiene columnas de enlace y redes
  - .footer-bottom es la franja inferior con copyright
*/
.site-footer, .footer-bottom, .footer-title, .footer-text, .footer-links a, .social-links a { transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out; }
.site-footer { background: var(--card-bg); border-top: 1px solid var(--border); padding-top: 16px; }
.footer-title { font-weight:700; margin-bottom:15px; }
.footer-text { font-size:0.95rem; color:var(--muted); }
.footer-links { list-style:none; padding:0; margin:0; }
.footer-links li { margin-bottom:8px; }
.footer-links a { text-decoration:none; color:var(--text); opacity:0.9; position: relative; }
.footer-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.3s ease;
}
.footer-links a:hover::after { transform: scaleX(1); }
.footer-links a:hover { opacity:1; }
.social-links { display:flex; gap:15px; }
.social-links a { font-size:1.5rem; color:var(--text); opacity:0.9; transition: transform .2s ease, opacity .2s ease; text-decoration:none; }
.social-links a:hover { opacity:1; transform: translateY(-3px); }
.footer-bottom { background: var(--footer-bottom-bg); padding: 15px 0; }
/* Animación de paneo horizontal para el slider en móvil */
@keyframes panLeftRight {
  0%   { object-position: 10% center; }
  100% { object-position: 90% center; }
}
/* Carousel specific styles (extracted) */
.carousel, .carousel-inner, .carousel-item { position:relative; height: 65vh; min-height: 320px; overflow:hidden; }
.carousel-inner { position: relative; }
.carousel-item { position: absolute; inset: 0; opacity: 0; transform: translateX(6%); transition: opacity .6s ease, transform .6s ease !important; pointer-events: none; visibility: hidden;}
.carousel-item picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.carousel-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;}
.carousel-item.active { opacity:1; transform: translateX(0); position: relative; pointer-events: auto; visibility: visible;}
.carousel-item::before { content: ""; position:absolute; inset:0; z-index:1; background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.25) 65%, rgba(0,0,0,0.05) 80%, rgba(0,0,0,0) 100%); pointer-events: none;}
.carousel-caption { z-index:2; position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; padding-left: calc(max(0px, (100% - 1400px) / 2) + 115px); padding-right:50%; text-align:left; color:#fff; pointer-events: none; margin-top: 3rem;}
.carousel-caption h5 { font-size:3rem; font-weight:800; line-height:1.2; }
.carousel-caption p { font-size:1.1rem; max-width:600px; margin-top:15px; opacity:0.9; }
.carousel-caption a {pointer-events: auto;}
.carousel-tag { text-transform:uppercase; font-size:.85rem; font-weight:600; opacity:.8; margin-bottom:10px; margin-top: 10px; background-color:#EF3363; border-radius:8px; padding:4px 8px; display:inline-block; text-decoration: none; color:#fff;}
.carousel-link {display:inline-block; text-decoration:none; color: #fff; position: relative; z-index: 5;}
.carousel-link:hover { color:#EF3363; }
.custom-indicators { position:absolute; left:calc(max(0px, (100% - 1400px) / 2) + 24px); top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:12px; z-index:10; justify-content:center; }
.custom-indicators button { background:none; border:none; padding:0; cursor:pointer; }
.indicator-avatar { position:relative; width:72px; height:72px; }
.indicator-avatar img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.indicator-avatar svg { position:absolute; inset:0; transform:rotate(-90deg); }
.indicator-avatar circle { fill:none; stroke:rgba(255,255,255,0.9); stroke-width:3; stroke-dasharray:100; stroke-dashoffset:100; transition: stroke-dashoffset linear; }
/* Carousel visibility control */
.carousel-img { width:100%; display:block; }
/* caption show on md+ */
.caption-md { display: none; }
@media (min-width: 768px) { .caption-md { display:block; } }
/* row without gap */
.row-no-gap { gap: 0; }
/* left image for card */
.card-img-left { width:100%; height:100%; object-fit:cover; display:block; }
.card-img-left-rounded { width:100%; height:100%; object-fit:cover; display:block; border-radius: 50%; }
/* text muted */
.text-muted { color: var(--muted); font-size: 10px; }
/* Utility replacements for some Bootstrap helpers used in markup */
.d-none { display: none !important; }
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
  .d-md-none { display: none !important; }
  .d-md-flex { display: flex !important; }
}
.img-fluid { max-width: 100%; height: auto; display: block; }
.rounded-start { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.g-0 { gap: 0; }
.mb-3 { margin-bottom: 1rem; }
.text-body-secondary { color: var(--muted); }
.align-items-center { align-items: center; }
.d-flex { display: flex; }
.gap-2 { gap: 0.5rem; }
/* List group minimal */
.list-group { list-style: none; padding: 0; margin: 0; }
.list-group-flush { border-top: none; }
.list-group-item {margin-left: 30px;}
/* Uso de Bootstrap Icons: las reglas específicas se obtienen desde
  la hoja de estilos de Bootstrap Icons importada en los headers.
  Se mantiene la clase .bi por compatibilidad visual. */
.bi { display:inline-block; font-style:normal; }
/* responsive tweaks */
@media (max-width: 768px) {
  .container, .container-fluid { padding-left: 12px; padding-right:12px; }
  .carousel-caption {
    padding: 32px 16px 80px 24px;
    max-width: 100%;
   }
  /* Forzar columnas a 100% en pantallas pequeñas (apilar) */
  .col { flex-basis: 100%; max-width: 100%; }
  /* Ensure col-md-* also stack on mobile */
  [class*="col-md-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  /* Adjust horizontal cards to NOT stack on mobile, per user request */
  .card .row-no-gap {
    flex-direction: row; /* Force row */
  }
  /* Override the 100% width for col-md-* inside these specific cards */
  .card .row-no-gap > .col-md-4 {
    flex: 0 0 40%; /* Image takes 40% width */
    max-width: 40%;
  }
  .card .row-no-gap > .col-md-8 {
    flex: 0 0 60%; /* Content takes 60% width */
    max-width: 60%;
  }
  .card-img-left {
    height: 100%; /* Full height of container */
    width: 100%;
    object-fit: cover;
    min-height: 120px; /* Minimum height */
  }
  /* Adjust card body padding for smaller space */
  .card .card-body {
    padding: 10px;
  }
  .card-title {
    font-size: 1rem; /* Smaller title */
  }
  .card-text, .card-body p {
    font-size: 0.85rem; /* Smaller text */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color:#fff
  }
  /* Login responsive adjustments */
  .login-wrapper {
    padding: 1rem;
  }
  .login-card {
    width: 100%;
  }
  /* Scrollable cards row (carousel-like) for mobile */
  .scrollable-cards-row {
    display: flex;
    flex-wrap: nowrap; /* Prevent stacking */
    overflow-x: auto; /* Enable horizontal scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    scroll-snap-type: x mandatory; /* Snap to cards */
    gap: 16px;
    padding-bottom: 16px; /* Space for scrollbar if any */
    margin-right: -12px; /* Compensate for container padding right */
    padding-right: 12px; /* Add padding to right so last card isn't cut off */
  }
  .scrollable-cards-row .col {
    flex: 0 0 85%; /* Card width 85% of screen */
    max-width: 85%;
    scroll-snap-align: center; /* Snap to center */
  }
  .news-link{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Bloque barra lateral dentro del artículo */
.ql-callout {
  background: rgba(239,51,99,.07);
  border-left: 3px solid var(--accent, #EF3363);
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
  font-style: italic;
}

/* Single News View */
.img-titular {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
  display: block;
}
.descripcion {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.like-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.like-btn:hover {
  background: var(--accent);
  color: #fff;
}
/* Quill Content Safe Display */
.ql-editor,
.post-content {
  overflow-wrap: break-word;
  padding: 0;
  font-family: inherit;
}
.ql-editor img,
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.ql-editor p,
.post-content p {
  margin-bottom: 1em;
  line-height: 1.6;
}
.ql-editor iframe,
.post-content iframe {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 24px auto;
}
/* Sidebar Wrapper */
.sidebar-wrapper {
  position: sticky;
  top: 20px;
}
@media (max-width: 768px) {
  /* Navbar adjustments */
  .navbar .container-fluid {
    justify-content: space-between;
    gap: 6px;
    padding-left: 14px;
    padding-right: 14px;
  }
  /* Logo reducido en móvil */
  #logo {
    max-height: 20px;
  }
  .navbar-toggler {
    margin-left: 0;
    padding: 4px 7px;
    order: 2;
  }
  .navbar-brand { flex: 0 0 auto; }
  /* Opciones (tema, perfil, admin, salir) pegadas al logo, hamburger al extremo derecho */
  .nav-actions {
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    order: 1;
    flex-basis: auto;
    width: auto;
    margin-top: 0;
    margin-left: 0;
  }
  .nav-actions .btn-outline-secondary {
    width: 34px; height: 34px;
    font-size: 0.95rem;
    padding: 0;
    flex-shrink: 0;
  }
  .nav-actions .btn-outline-secondary.btn-user {
    width: 34px;
    padding: 0;
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  /* Ocultar nombre de usuario, mostrar solo ícono */
  .btn-username { display: none; }
  /* Theme switch: mismo tamaño que iconos (34×34) y al final de nav-actions */
  .navbar .theme-switch-icons {
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    order: 10;
  }
  .navbar .theme-switch-icons-track {
    width: 30px !important;
    height: 18px !important;
    padding: 0 2px !important;
  }
  .navbar .theme-switch-icons-icon {
    width: 10px !important;
    height: 10px !important;
    font-size: 9px !important;
  }
  .navbar .theme-switch-icons-thumb {
    width: 14px !important;
    height: 14px !important;
    top: 2px !important;
    left: 2px !important;
  }
  .navbar .theme-switch-input:checked + .theme-switch-icons-track .theme-switch-icons-thumb,
  [data-bs-theme="dark"] .navbar .theme-switch-icons-thumb {
    left: 14px !important;
  }
  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    display: block;
    width: 100%;
  }
  /* Slider reducido a media pantalla en móvil */
  .carousel, .carousel-inner, .carousel-item {
    height: 50vh;
    min-height: 300px;
  }
  .carousel-item {
    position: absolute;
    overflow: hidden;
  }
  .carousel-item.active{
    position: relative;
  }
  /* Imagen del carrusel sin zoom: se muestra tal cual cubriendo el contenedor */
  .carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
  }
  /* Caption adjustments for mobile */
  .carousel-caption {
    display: flex !important; /* Force show on mobile overriding caption-md */
    padding: 16px 16px 56px;
    padding-right: 16px; /* Quitar el margen derecho grande */
    /* Degradado más corto: solo cubre la franja inferior para no tapar la imagen */
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 30%, rgba(0,0,0,0) 60%);
    align-items: flex-start; /* Alinea los elementos (incluyendo tags) a la izquierda */
    justify-content: flex-end;
  }
  .carousel-tag:not(:first-of-type){
    display: none !important;
  }
  .carousel-item::before{
    display: none;
  }
  /* Ajuste específico para que el tag no se expanda al 100% en flex column */
  .carousel-tag {
    align-self: flex-start; /* Importante: evita que se estire */
    display: inline-block;
    width: auto;
    margin-bottom: 8px;
  }
  .carousel-caption h5 {
    font-size: 1.45rem;
    margin-bottom: 6px;
  }
  .carousel-caption p {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Custom indicators mobile: vuelven a abajo horizontal */
  .custom-indicators {
    display: flex;
    flex-direction: row;
    top: auto;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding-left: 0;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }
  .indicator-avatar {
    width: 48px;
    height: 48px;
  }
  .news-tag:not(:first-of-type){
    display: none !important;
  }
  .carousel-tag,
  .news-tag{
    font-size:.65rem;
    padding:2px 6px;
  }
  .tag-news{
    display: none !important;
  }
}
/* md+ responsive utilities and card column sizes */
@media (min-width: 768px) {
  /* Reducir gap en escritorio para evitar overflow que provoque wrapping */
  .row { gap: 12px; }
  /* Columnas con ajuste para compensar el gap: restamos la parte proporcional del gap */
  .col-md-3 { flex: 0 0 calc(25% - 6px); max-width: calc(25% - 6px);}
  .col-md-4 { flex: 0 0 calc(33.3333% - 8px); max-width: calc(33.3333% - 8px); }
  .col-md-5 { flex: 0 0 calc(41.6667% - 6px); max-width: calc(41.6667% - 6px); }
  .col-md-55 { flex: 0 0 calc(45.8333% - 6px); max-width: calc(45.8333% - 6px); }
  .col-md-6 { flex: 0 0 calc(50% - 6px); max-width: calc(50% - 6px); }
  .col-md-65 { flex: 0 0 calc(54.1666% - 6px); max-width: calc(54.1666% - 6px); }
  .col-md-7 { flex: 0 0 calc(58.3333% - 6px); max-width: calc(58.3333% - 6px); }
  .col-md-8 { flex: 0 0 calc(66.6667% - 4px); max-width: calc(66.6667% - 4px); }
  .col-md-9 { flex: 0 0 calc(75% - 6px); max-width: calc(75% - 6px);}
  .card .row { flex-wrap: nowrap; align-items: stretch; }
  .card .col-md-4 { padding: 0; display:flex; }
  .card .col-md-4 img { width:100%; height:100%; object-fit:cover; display:block; }
  /* Forzar que las columnas principales respeten las fracciones en escritorio (alta especificidad) */
  .row > .col-md-8 { flex: 0 0 calc(66.6667% - 4px) !important; max-width: calc(66.6667% - 4px) !important; }
  .row > .col-md-6 { flex: 0 0 calc(50% - 6px) !important; max-width: calc(50% - 6px) !important; }
  .row > .col-md-4 { flex: 0 0 calc(33.3333% - 8px) !important; max-width: calc(33.3333% - 8px) !important; }
  /* Asegurar que las tarjetas ocupen el ancho completo de la columna */
  .row > .col-md-8 .card, .row > .col-md-4 .card { width: 100% !important; }
  /* Alinear la fila principal y asegurar que no haya saltos inesperados */
  .row { align-items: stretch; }
}
/* Contenidos */
.img-adicional { width:100%; height:auto; object-fit:cover; display:block; margin-top:12px; margin-bottom:12px; }
.sidebar-card {
  width: 100%;
}
/* Cards especiales */
.news-card {
  position: relative;
  height: 225px;
  border-radius: 12px;
  overflow: hidden;
  margin: 6px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Tarjetas que respetan el ratio exacto del crop — sin recorte adicional */
.news-card.card-banner { height: auto; aspect-ratio: 32/9; }
.news-card.card-thumb  { height: auto; aspect-ratio: 16/9; }
.news-card:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
}
.news-card picture {
  display: block;
  width: 100%;
  height: 100%;
}
.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-link {display: block; text-decoration:none; color: var(--text); position: relative; z-index: 3;}
.news-link:hover { color:#EF3363; }
.news-link-card {display: block; text-decoration:none; color: #fff; position: relative; z-index: 3;}
.news-link-card:hover { color:#EF3363; }
/* Gradiente oscuro — solo cubre la zona inferior donde va el texto */
.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 28%, rgba(0,0,0,.15) 48%, rgba(0,0,0,0) 62%);
  z-index: 1;
}
/* Overlay de noticias */
.news-overlay {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  color: #fff;
  z-index: 2;
  min-height: 0;
}
.news-overlay .news-tag { order: 0; }
.news-overlay .news-link,
.news-overlay p { order: 2;}
.news-overlay p, .news-overlay h3 {
  margin: 0;
}
/* TAG */
.news-tag {
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  display: inline-block;
  margin-right: 6px;
  z-index: 3;
  text-decoration: none;
}
.tag-news {
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #fff;
  display: inline-block;
  margin-right: 4px;
  z-index: 3;
  line-height: 1;
  text-decoration: none;
}
.news-content{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}
/* En overlay: forzar que los tags queden arriba y visibles */
.news-overlay .news-tag {
  align-self: flex-start !important;
  display: inline-flex;
  margin-bottom: 8px;
}
/* En cards horizontales (lista): mantener chips alineados en línea */
.card .news-tag {
  align-self: flex-start;
}
/* Título */
.news-overlay h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Descripción */
.news-overlay p {
  font-size: .95rem;
  opacity: .9;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* boton de like */
.news-overlay .like-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}
.news-overlay .like-btn:hover {
  color: #EF3363;
}
/* Carrucel de noticias */
.news-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Para “encajar” en cada slide */
    -webkit-overflow-scrolling: touch; /* Suaviza el scroll en móviles */
    gap: 1rem; /* espacio entre newss */
    padding-bottom: 0.5rem;
}
.news-carousel::-webkit-scrollbar {
    height: 8px;
}
.news-carousel::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}
.news-slide {
    flex: 0 0 auto; /* que no se estire, mantener su tamaño */
    scroll-snap-align: start;
    width: 300px; /* tamaño de cada news, ajustable */
    max-width: 90vw; /* que no se salga en móviles */
}
/* banners */
.banner {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
/* boton de banner */
.banner-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
}
.banner-card-img-top {
  width: 100%; 
  height: 250px; 
  object-fit: cover;
}
.ad-container {
  position: relative;
}
.ads-label {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 5px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
}
@media(max-width: 768px){
    .banner-card-img-top {
        max-height: 150px;   /* altura máxima */
        width: 100%;        /* que ocupe todo el ancho */
        height: auto;       /* conservar proporción */
        object-fit: cover;  /* cubrir el contenedor sin deformar */
        display: block;
    }
}
/* TÍTULOS */
.title-limit-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  min-height: 0;
}
.title-limit-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
/* DESCRIPCIONES */
.desc-limit-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 0;
}
.desc-limit-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 0;
}
.desc-limit-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 0;
}
/* ===============================
   HORIZONTAL CARDS
   =============================== */
.card-body h5 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: .95rem;
  color: var(--muted);
}
/* ===============================
   MOBILE OPTIMIZATION
   =============================== */
@media (max-width: 768px) {
  /* ── MOBILE: imagen arriba · texto DEBAJO (no superpuesto) ── */

  /* La card pasa a flex-column para que imagen y texto se apilen */
  .news-card {
    height: auto !important;
    aspect-ratio: unset !important;
    overflow: visible;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
  }

  /* Contenedor <picture>: ratio 7:5, esquinas superiores redondeadas */
  .news-card picture {
    height: auto;
    aspect-ratio: 7/5;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    flex-shrink: 0;
  }
  /* Imagen directa (sin <picture>): mismo tratamiento */
  .news-card > img {
    height: auto !important;
    aspect-ratio: 7/5;
    border-radius: 12px 12px 0 0;
  }
  /* Imagen dentro de <picture> */
  .news-card picture img {
    height: auto !important;
    aspect-ratio: 7/5;
  }

  /* card-banner usa crop3 posicionado a la derecha → arte/círculos visibles */
  .news-card.card-banner picture img {
    object-position: right center;
  }

  /* Sin gradiente — el texto ya no va superpuesto a la imagen */
  .news-card::before {
    display: none !important;
  }

  /* Panel de texto debajo de la imagen */
  .news-overlay {
    position: relative !important;
    inset: auto !important;
    flex-grow: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 12px 14px;
    color: var(--text);
    min-height: 0;
  }
  .news-overlay .news-content {
    margin-top: 0;
  }
  .news-overlay h3 {
    color: var(--text);
    font-size: 1rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .news-overlay p {
    color: var(--muted);
    font-size: .85rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  /* Colores de enlaces en panel claro/oscuro */
  .news-link-card {
    color: var(--text);
  }
  .news-link-card:hover { color: var(--accent); }

  /* Sin scale en hover (overflow ya no contiene el card) */
  .news-card:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
  }

  /* Tags más pequeños */
  .news-overlay .news-tag {
    font-size: .65rem;
    padding: 3px 7px;
  }

  .card-body p {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* formulario suscripcion */
.form-card {
    background: transparent;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.08);
}
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
}
.form-group textarea {
    resize: vertical;
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
}
/* Ajuste del botón */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}
.btn-success {
    margin-top: 20px;
    padding: 12px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-success:hover {
    background: #218838;
}
/* enbebido de videos */
.video-responsive{
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: auto;
}
.video-responsive iframe,
.video-responsive blockquote.instagram-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
.social-embed-container{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: auto;
}
.social-embed-container .video-responsive {
    width: 100%;
    max-width: 100%;
    min-height: 320px;
}
.social-embed-container iframe,
.social-embed-container blockquote,
.social-embed-container .instagram-media {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}
.social-embed-container > iframe,
.social-embed-container > .video-responsive,
.social-embed-container blockquote {
    min-height: 320px;
}
.social-embed-container .instagram-media{
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}
.instagram-media{
    margin:auto !important;
    max-width:100% !important;
    width:100% !important;
}
.row.mb-3 {
    margin-bottom: 1.5rem;
}
.video-responsive-vertical {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 177.77%; /* 9:16 */
    overflow: hidden;
}
.video-responsive-vertical blockquote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.tiktok-app-wrapper{
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 580px; /* altura suficiente para mostrar video + descripción */
    overflow: hidden;
    border-radius: 12px;
    margin: auto;
}
.tiktok-app-wrapper iframe{
    width: 100%;
    height: 100%;
    border: none;
}
/* =========================
   EMBEDS RESPONSIVOS (FIX)
   ========================= */
/* Contenedor base universal */
.embed-container {
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  display: block;
}
/* =========================
   VIDEO 16:9 (YouTube, Vimeo)
   ========================= */
.video-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}
.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
/* =========================
   VIDEO VERTICAL (TikTok, Shorts)
   ========================= */
.video-responsive-vertical {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding-bottom: 177.77%; /* 9:16 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.video-responsive-vertical iframe,
.video-responsive-vertical blockquote {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
/* =========================
   INSTAGRAM EMBED (FIX REAL)
   ========================= */
.instagram-embed {
  width: 100%;
  max-width: 540px;
  margin: auto;
  overflow: hidden;
}
.instagram-embed blockquote.instagram-media {
  width: 100% !important;
  max-width: 100% !important;
  margin: auto !important;
}
/* =========================
   SOCIAL GENERIC CONTAINER
   ========================= */
.social-embed-container {
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  overflow: hidden;
}
/* Eliminar overrides conflictivos */
.social-embed-container iframe,
.social-embed-container blockquote {
  width: 100% !important;
  max-width: 100% !important;
}
/* =========================
   TIKTOK EMBED (APP STYLE FIX)
   ========================= */
.tiktok-app-wrapper {
  width: 100%;
  max-width: 420px;
  margin: auto;
  border-radius: 12px;
  overflow: hidden;
}
.tiktok-app-wrapper iframe {
  width: 100%;
  height: 600px;
  border: none;
}
/* =========================
   FIX GLOBAL EMBEDS
   ========================= */
/* Evita que scripts externos rompan layout */
iframe {
  max-width: 100%;
}
/* Evita desbordes raros */
blockquote {
  max-width: 100%;
}
/* Espaciado uniforme */
.embed-container,
.video-responsive,
.video-responsive-vertical,
.instagram-embed,
.tiktok-app-wrapper {
  margin-top: 20px;
  margin-bottom: 20px;
}
/* menu de compartir */
.share-bar {
    display: flex;
    flex-wrap: wrap; /* permite que los botones bajen en móvil */
    gap: 10px;       /* espacio entre botones */
    justify-content: center; /* centrar en desktop */
    padding: 10px 0;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    color: white;
    font-size: 1.4rem;
    text-decoration: none;
    transition: background 0.3s;
}
/* Colores por red social */
.share-btn.facebook { background: var(--facebook); }
.share-btn.instagram { background: var(--instagram); }
.share-btn.whatsapp { background: var(--whatsapp); }
.share-btn.twitter { background: var(--twitter); }
.share-btn.linkedin { background: var(--linkedin); }
.share-btn.messenger { background: var(--messenger); }
/* Hover */
.share-btn:hover {
    opacity: 0.8;
}
/* Móvil: botones más pequeños y más ajustados */
@media (max-width: 768px) {
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
/* Modal centrado y bloqueante */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.cookie-content {
  background: var(--bg, #fff);
  color: var(--text, #000);
  padding: 25px 30px;
  max-width: 450px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.cookie-content h2 {
  margin-top: 0;
}
.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}
.cookie-buttons button {
  background: #dc2a74;
  border: none;
  border-radius: 12px;
  padding: 8px 15px;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}
.cookie-buttons .leer-mas {
  background: #888;
  color: #fff;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 12px;
  display: inline-block;
}
.embed-placeholder {
    border: 1px solid #ccc;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    background: #f9f9f9;
    margin: 10px 0;
}
.embed-placeholder button {
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: #dc2a74;
    color: #fff;
    cursor: pointer;
}
/* politicas de cookies */
ol{
  margin-left:20px;
  margin-bottom:20px;
}
li{
  margin-left: 10px;
  margin-bottom: 10px;
}
ul{
  margin-left:20px;
  margin-bottom:20px;
}
hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
/* Carrucel de videos */
.video-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Para “encajar” en cada slide */
    -webkit-overflow-scrolling: touch; /* Suaviza el scroll en móviles */
    gap: 1rem; /* espacio entre videos */
    padding-bottom: 0.5rem;
}
.video-carousel::-webkit-scrollbar {
    height: 8px;
}
.video-carousel::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}
.video-slide {
    flex: 0 0 auto; /* que no se estire, mantener su tamaño */
    scroll-snap-align: start;
    width: 300px; /* tamaño de cada video, ajustable */
    max-width: 90vw; /* que no se salga en móviles */
}
/* CASO: solo un video */
.video-carousel.single-video{
    justify-content:center;
    overflow:hidden;
}
.video-carousel.single-video .video-slide{
    width:100%;
    max-width:950px;
}
.video-responsive iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
/* ==================================================
   SISTEMA RESPONSIVE GLOBAL
   telefono(<=578) | telefono grande(<=768) | tableta(<=980)
   laptop(<=1200) | monitor(<=1400) | monitor grande(>1400)
   ================================================== */
/* monitor grande (>1400px) */
@media (min-width: 1401px) {
  .container {
    max-width: 1320px;
  }
  .container-noticia {
    max-width: 960px;
  }
  .carousel-caption h5 {
    font-size: 3.2rem;
  }
}
/* monitor (<=1400px) */
@media (max-width: 1400px) {
  .container {
    max-width: 1200px;
  }
  .carousel-caption h5 {
    font-size: 2.8rem;
  }
}
/* laptop (<=1200px) */
@media (max-width: 1200px) {
  .container {
    max-width: 1040px;
  }
  .nav-search {
    min-width: 220px;
  }
  .carousel-caption {
    padding-right: 40%;
  }
  .carousel-caption h5 {
    font-size: 2.4rem;
  }
}
/* tableta (<=980px) */
@media (max-width: 980px) {
  .container,
  .container-fluid,
  .container-noticia {
    padding-left: 14px;
    padding-right: 14px;
  }
  .site-main .carousel {
    margin: 0;
    width: 100%;
  }
  .carousel-caption {
    padding-right: 28%;
  }
  .carousel-caption h5 {
    font-size: 2rem;
  }
}
/* telefono grande (<=768px) */
@media (max-width: 768px) {
  .container,
  .container-fluid,
  .container-noticia {
    padding-left: 12px;
    padding-right: 12px;
  }
  .site-main .carousel {
    margin: 0;
    width: 100%;
  }
}
/* telefono (<=578px) */
@media (max-width: 578px) {
  .container,
  .container-fluid,
  .container-noticia {
    padding-left: 10px;
    padding-right: 10px;
  }
  .site-main .carousel {
    margin: 0;
    width: 100%;
  }
  .carousel,
  .carousel-inner,
  .carousel-item {
    min-height: 300px;
  }
  .carousel-caption {
    padding: 14px 12px 56px;
  }
  .carousel-caption h5 {
    font-size: 1.35rem;
  }
  .carousel-caption p {
    font-size: 0.85rem;
  }
  .custom-indicators {
    gap: 6px;
  }
  .indicator-avatar {
    width: 42px;
    height: 42px;
  }
}
/* Ajuste tablet horizontal/intermedia para evitar áreas vacías entre 768px y 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .carousel,
  .carousel-inner,
  .carousel-item {
    height: 60vh;
    min-height: 440px;
  }
  .carousel-item::before {
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.48) 55%, rgba(0,0,0,0.12) 100%);
  }
  .carousel-caption {
    padding: 26px 18px 84px;
    padding-right: 18px;
    max-width: 100%;
    justify-content: flex-end;
    align-items: flex-start;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 52%, rgba(0,0,0,0) 100%);
  }
  .carousel-caption h5 {
    font-size: 1.9rem;
  }
  .carousel-caption p {
    font-size: 1rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .custom-indicators {
    flex-direction: column;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    justify-content: center;
    padding-left: 0;
    gap: 8px;
    bottom: auto;
  }
}
.pagination-wrapper{
  display:flex;
  justify-content:center;
  margin:30px 0;
}
.pagination{
  list-style:none;
  display:flex;
  gap:8px;
}
.pagination li a{
  padding:8px 14px;
  border:1px solid var(--bg);
  text-decoration:none;
  color:var(--text);
  border-radius:6px;
}
.pagination li.active a{
  background:var(--accent);
  color:var(--text);
  border-color:var(--border);
}
.pagination li a:hover{
  background:var(--bg);
}
/* =========================
   FIX REAL INSTAGRAM
   ========================= */

.social-embed-container.instagram-embed {
    display: block;
    max-width: 540px;
    margin: 20px auto;
}

/* Instagram NO debe ser absolute */
.instagram-embed blockquote.instagram-media {
    position: static !important;
    width: 100% !important;
    max-width: 540px !important;
    height: auto !important;
    margin: auto !important;
}

/* Deja que Instagram calcule su altura */
.instagram-embed iframe {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 600px;
}
/* Estilos de barra de busqueda */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-width: 400px; /* opcional */
  min-width: 250px; /* importante */
  background: #2b2b2b;
  border-radius: 8px;
  margin-top: 5px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}
.search-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #444;
  align-items: center;
}
.search-item:hover {
  background: #3a3a3a;
}
.search-results .search-item img {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
  flex-shrink: 0;
}
.search-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color:#fff;
}
.img-search {
    width: 50px;
    height: auto;
}
/* ===============================
   PERFIL DE USUARIO
   =============================== */
.perfil-wrapper {
  display: flex;
  gap: 40px;
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 30px 20px;
}
.perfil-sidebar {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.perfil-avatar-wrap {
  position: relative;
  margin-bottom: 16px;
}
.perfil-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--muted);
  overflow: hidden;
}
.perfil-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.perfil-camera {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  border: 3px solid var(--bg);
  transition: opacity 0.2s;
}
.perfil-camera:hover {
  opacity: 0.85;
}
.perfil-nombre {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 4px 0 2px;
  color: var(--text);
}
.perfil-username {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.perfil-meta-info {
  width: 100%;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.perfil-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.perfil-meta-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.perfil-meta-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.perfil-form {
  flex: 1;
  min-width: 0;
}
.perfil-row {
  display: flex;
  gap: 16px;
}
.perfil-half {
  flex: 1;
  min-width: 0;
}
.perfil-form .input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.perfil-form select.input {
  appearance: auto;
  cursor: pointer;
}
.btn-perfil-save {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: opacity 0.2s;
}
.btn-perfil-save:hover {
  opacity: 0.9;
}
/* Perfil responsive */
@media (max-width: 768px) {
  .perfil-wrapper {
    flex-direction: column;
    gap: 24px;
    padding: 20px 10px;
  }
  .perfil-sidebar {
    flex: none;
    width: 100%;
  }
  .perfil-row {
    flex-direction: column;
    gap: 0;
  }
}
/* ===========================
   Perfil Público de Editores
   =========================== */
.autor-header {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding: 30px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 30px;
}
.autor-foto-wrap { flex-shrink: 0; }
.autor-foto {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
}
.autor-foto-fallback {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}
.autor-info { flex: 1; }
.autor-nombre {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text);
}
.autor-username {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.autor-stats {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.autor-stats strong { color: var(--text); }
.autor-bio {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}
.autor-social { display: flex; gap: 10px; flex-wrap: wrap; }
.autor-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.autor-social-link:hover { opacity: 0.8; }
.autor-social-twitter { background: #0f1419; color: #fff; }
.autor-social-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.autor-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.autor-article-card {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
}
.autor-article-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.autor-article-img {
  width: 200px;
  min-height: 140px;
  object-fit: cover;
  flex-shrink: 0;
}
.autor-article-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.autor-article-tags { margin-bottom: 6px; display: flex; gap: 6px; }
.autor-article-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.autor-article-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.autor-article-date {
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 768px) {
  .autor-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .autor-social { justify-content: center; }
  .autor-article-card { flex-direction: column; }
  .autor-article-img { width: 100%; height: 180px; }
}
/* ===============================
   SISTEMA DE COMENTARIOS
   =============================== */
.comentarios-section { margin-top: 2.5rem; padding-top: 0; }
.comentarios-titulo {
  font-size: 1.3rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 1.5rem;
  padding-left: 12px; border-left: 4px solid var(--accent);
}
/* Formulario */
.comentario-form {
  display: flex; gap: 16px; margin-bottom: 0.5rem;
  align-items: flex-start; padding: 20px 0;
}
.comentario-form-avatar { flex-shrink: 0; }
.comentario-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.comentario-avatar-placeholder {
  width: 56px; height: 56px; border-radius: 50%;
  background: #e5e7eb; color: #9ca3af; display: flex;
  align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.comentario-form-body { flex: 1; }
.comentario-form-body textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px 16px; font-size: 0.95rem; resize: vertical;
  background: #f3f4f6; color: var(--text);
  font-family: inherit; min-height: 100px;
}
[data-bs-theme="dark"] .comentario-form-body textarea { background: var(--card-bg); border-color: var(--border); }
[data-bs-theme="dark"] .comentario-avatar-placeholder { background: #374151; color: #6b7280; }
.comentario-form-body textarea:focus { outline: none; border-color: var(--accent); }
.comentario-form-body textarea:disabled { opacity: 0.6; cursor: not-allowed; }
.comentario-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.comentario-chars { font-size: 0.8rem; color: var(--muted); }
.btn-publicar {
  background: transparent; color: var(--accent); border: 2px solid var(--accent);
  border-radius: 6px; padding: 8px 24px; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-publicar:hover { background: var(--accent); color: #fff; }
.btn-publicar:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-publicar:disabled:hover { background: transparent; color: var(--accent); }
.btn-comentar {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 6px 16px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s;
}
.btn-comentar:hover { opacity: 0.85; }
.btn-cancelar {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 16px; font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-cancelar:hover { background: var(--border); }
/* Login msg */
.comentario-login-msg {
  font-size: 0.9rem; color: var(--muted); font-style: italic;
  margin-bottom: 1.5rem; padding: 0;
}
/* Lista */
.comentarios-lista { display: flex; flex-direction: column; gap: 0; }
.comentarios-vacio { color: var(--muted); text-align: center; padding: 2rem 0; font-size: 0.95rem; }
.comentario-item {
  display: flex; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeInCom 0.3s ease;
}
@keyframes fadeInCom { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.comentario-avatar-col { flex-shrink: 0; padding-top: 2px; }
.comentario-item .comentario-avatar,
.comentario-item .comentario-avatar-placeholder { width: 40px; height: 40px; font-size: 1.1rem; }
.comentario-body { flex: 1; min-width: 0; }
.comentario-header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comentario-autor { font-size: 0.95rem; }
.badge-editor {
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.comentario-fecha { font-size: 0.8rem; color: var(--muted); }
.comentario-texto { font-size: 0.95rem; line-height: 1.5; margin: 0 0 8px; word-break: break-word; }
/* Acciones */
.comentario-acciones { display: flex; gap: 12px; align-items: center; }
.comentario-acciones button {
  background: none; border: none; color: var(--muted); font-size: 0.85rem;
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px; transition: color 0.2s, background 0.2s;
}
.comentario-acciones button:hover { color: var(--text); background: var(--border); }
.btn-like-com.liked, .btn-like-com.liked:hover { color: #e53e3e; }
.btn-reportar-com:hover { color: #e53e3e !important; }
/* Edit textarea inline */
.edit-textarea {
  width: 100%; border: 1px solid var(--accent); border-radius: 8px;
  padding: 8px 10px; font-size: 0.95rem; resize: vertical;
  background: var(--card-bg); color: var(--text);
  font-family: inherit; min-height: 60px; margin-bottom: 8px;
}
/* Modal reporte */
.modal-reporte {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.modal-reporte-content {
  background: var(--card-bg); border-radius: 12px; padding: 24px;
  width: 90%; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-reporte-content h3 { margin: 0 0 16px; font-size: 1.1rem; }
.modal-reporte-content select {
  width: 100%; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.95rem; margin-bottom: 16px;
  background: var(--card-bg); color: var(--text);
}
.modal-reporte-btns { display: flex; gap: 8px; justify-content: flex-end; }
/* Mobile */
@media (max-width: 768px) {
  .comentario-form { gap: 10px; padding: 16px 0; }
  .comentario-form .comentario-avatar,
  .comentario-form .comentario-avatar-placeholder { width: 44px; height: 44px; font-size: 1.3rem; }
  .comentario-item .comentario-avatar,
  .comentario-item .comentario-avatar-placeholder { width: 32px; height: 32px; font-size: 0.9rem; }
  .comentario-acciones { gap: 8px; flex-wrap: wrap; }
  .comentario-acciones button { font-size: 0.8rem; }
}
/* Toast notifications */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 99999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-msg {
  pointer-events: auto;
  background: var(--card-bg); color: var(--text);
  border-left: 4px solid var(--accent);
  padding: 12px 20px; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-size: 0.9rem; max-width: 340px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
.toast-msg.toast-error { border-left-color: #e53e3e; }
.toast-msg.toast-success { border-left-color: #38a169; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
/* Transición global para el modo oscuro */
body, .nav-link, .btn, .card, .site-main {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out !important;
}

/* Sobrescribir transiciones del carrusel */
.carousel-item {
    transition: opacity .6s ease, transform .6s ease !important;
}
.navbar {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out, transform 0.3s ease !important;
}

/* Interruptor de tema (Con Iconos) */
.theme-switch-icons {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.theme-switch-input {
  display: none;
}

.theme-switch-icons-track {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 32px;
  background: #f0f0f0;
  border-radius: 50px;
  position: relative;
  transition: background-color 0.3s ease;
  padding: 0 6px;
}

.theme-switch-icons-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 16px;
  color: var(--text);
  transition: opacity 0.3s ease;
  z-index: 1;
}

.theme-switch-icons-sun {
  opacity: 1;
}

.theme-switch-icons-moon {
  opacity: 0.4;
}

.theme-switch-icons-thumb {
  position: absolute;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 0;
}

.theme-switch-input:checked + .theme-switch-icons-track {
  background-color: #2a2a3e;
}

.theme-switch-input:checked + .theme-switch-icons-track .theme-switch-icons-sun {
  opacity: 0.4;
}

.theme-switch-input:checked + .theme-switch-icons-track .theme-switch-icons-moon {
  opacity: 1;
}

.theme-switch-input:checked + .theme-switch-icons-track .theme-switch-icons-thumb {
  left: 31px;
}

[data-bs-theme="dark"] .theme-switch-icons-track {
  background-color: #2a2a3e;
}

[data-bs-theme="dark"] .theme-switch-icons-sun {
  opacity: 0.4;
}

[data-bs-theme="dark"] .theme-switch-icons-moon {
  opacity: 1;
}

[data-bs-theme="dark"] .theme-switch-icons-thumb {
  left: 31px;
}