/*
  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 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { 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);
  --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: #FF6B98;
  --indicator-stroke: rgba(255,255,255,0.9);
  --footer-bottom-bg: rgba(255,255,255,0.03);
  --facebook: #1877f2;
  --instagram: #e1306c;
  --whatsapp: #25d366;
  --twitter: #111827;
  --linkedin: #0a66c2;
  --messenger: #0084ff;
}
[data-bs-theme="dark"] #logo{
  content: url('https://www.catink.com.mx//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: hidden; }
.site-main {
  padding: 10px;
  flex: 1;
}
h2 {
  margin-top: 10px;
  margin-bottom: 10px;
}
/* anular padding lateral en carrusel para que ocupe todo el ancho */
.site-main .carousel {
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
  margin-top: -16px;
}
/* Basic container utilities */
.container { width: 100%; max-width: 100%; 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: relative;
  z-index: 2000;
}
.navbar .container-fluid {
  display: flex;
  flex-wrap: wrap; /* Importante para móvil: permite que el menú caiga debajo */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  margin-right: 0;
}
#logo {
  content: url('https://www.catink.com.mx/img/logo.png');
  max-height: 50px;
  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;
}
.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: 12px;
  width: 100%; /* Full ancho en móvil */
  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(--accent);
  width: 100%;
  font-size: 14px;
  font-family: inherit;
}
.nav-search .search-input::placeholder {
  color: var(--text);
}
.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(--accent);
}
[data-bs-theme="light"] .nav-search .search-input::placeholder {
  color: rgba(255, 107, 44, 0.5);
}
[data-bs-theme="light"] .search-btn:hover {
  background: rgba(255, 107, 44, 0.1);
}
/* =========================
   Desktop Navbar (>1024px)
   ========================= */
@media (min-width: 1025px) {
  .navbar .container-fluid {
    flex-wrap: nowrap; /* Una sola línea */
    justify-content: flex-start;
  } 
  .navbar-toggler {
    display: none; /* Ocultar botón */
  }
  .navbar-collapse {
    display: flex !important; /* Siempre visible */
    flex-basis: auto;
    margin-top: 0;
  }
  .navbar-nav {
    flex-direction: row; /* Horizontal */
    margin-top: 0;
    margin-left: 20px;
    gap: 16px;
  }
  .nav-search {
    width: auto;
    margin-top: 0;
    margin-left: auto; /* Empujar a la derecha */
    min-width: 250px;
  }
}
/* 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: var(--border); }
.btn-outline-secondary:hover {
  background: rgba(0,0,0,0.04);
}
.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); }
.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 { 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; }
.footer-links a:hover { opacity:1; text-decoration:underline; }
.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; }
/* 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; pointer-events: none; visibility: hidden;}
.carousel-item picture, .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:6%; 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; bottom:40px; left:70%; transform:translateX(-50%); display:flex; gap:12px; z-index:10; justify-content:flex-start; padding-left:6%; }
.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:var(--indicator-stroke); 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; }
}
.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;
    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;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Single News View */
.img-titular {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}
.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-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%;
  }
  .carousel, .carousel-inner, .carousel-item {
    height: 65vh;
    min-height: 420px;
  }
  .carousel-item {
    position: absolute;
    overflow: hidden;
  }
  .carousel-item.active{
    position: relative;
  }
  .carousel-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  /* Caption adjustments for mobile */
  .carousel-caption {
    display: flex !important; /* Force show on mobile overriding caption-md */
    padding: 24px 16px 80px;
    padding-right: 16px; /* Quitar el margen derecho grande */
    padding-bottom: 80px; /* Espacio para indicadores */
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0) 100%);
    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.6rem;
    margin-bottom: 8px;
  }
  .carousel-caption p {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Custom indicators mobile */
  .custom-indicators {
    display: flex;
    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% - 6px); max-width: calc(33.3333% - 6px); }
  .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% - 12px); max-width: calc(66.6667% - 12px); }
  .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% - 12px) !important; max-width: calc(66.6667% - 12px) !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% - 6px) !important; max-width: calc(33.3333% - 6px) !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);
}
.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 */
.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 35%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 100%);
  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;
  -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;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  min-height: 0;
}
.title-limit-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
/* DESCRIPCIONES */
.desc-limit-1 {
  display: -webkit-box;
  -webkit-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;
  -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;
  -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;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: .95rem;
  color: var(--muted);
}
/* ===============================
   MOBILE OPTIMIZATION
   =============================== */
@media (max-width: 768px) {
  .news-overlay h3 {
    -webkit-line-clamp: 2;
  }
  .news-overlay p {
    -webkit-line-clamp: 2;
  }
  .card-body p {
    -webkit-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;
  }
  .site-main {
    padding: 16px;
  }
  .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-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px);
  }
  .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 {
    padding: 8px;
  }
  .site-main .carousel {
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }
}
/* telefono (<=578px) */
@media (max-width: 578px) {
  .container,
  .container-fluid,
  .container-noticia {
    padding-left: 10px;
    padding-right: 10px;
  }
  .site-main {
    padding: 6px;
  }
  .site-main .carousel {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }
  .carousel,
  .carousel-inner,
  .carousel-item {
    min-height: 360px;
  }
  .carousel-caption {
    padding: 18px 12px 72px;
  }
  .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;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .custom-indicators {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    justify-content: center;
    padding-left: 0;
    gap: 8px;
    bottom: 14px;
  }
}
.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;
  overflow: hidden;
}
.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;
}