html, body {
    max-width: 100%;
    overflow-x: hidden !important; /* Esto elimina el espacio blanco a la derecha */
}


/* ===== Paleta & reset ===== */
:root{
    --bg: #0d0d0f;
    --bg-soft:#151517;
    --panel:#f2d34c;
    --panel-ink:#171717;
    --ink:#eaeaea;
    --muted:#b9b9bd;
    --line:#2a2a2e;
    --radius: 16px;
    --gap: 22px;
    --header-height: 70px; /* Altura del header */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
    margin:0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}

/* ===========================
   HEADER RESPONSIVO
   =========================== */
body > header {
    background: linear-gradient(to right, #000000, #000000);
    display: flex;
    justify-content: space-between; /* Logo a la izq, Nav a la der */
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}
body > header .logo { 
    height: 45px;
    transition: transform 0.3s ease;
}
body > header .logo:hover { transform: scale(1.05); }

/* Botón de Hamburguesa (Oculto en Desktop) */
.header-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
.header-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navegación (Desktop) */
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.main-nav li { 
    margin: 0 10px; 
    position: relative; 
}
.main-nav ul li a,
.main-nav ul li span {
    text-decoration: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
}
.main-nav ul li a:hover,
.main-nav ul li span:hover { 
    color: #ffcc00; 
    background-color: rgba(255, 204, 0, 0.1);
}

/* Dropdown (Desktop) */
.main-nav li .dropdown-content{
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #c5b30e;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,.45);
    z-index: 1001;
}
.main-nav li .dropdown-content a{
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background .2s ease, color .2s ease;
}
.main-nav li .dropdown-content a:hover{
    background: rgba(255, 204, 0, 0.12);
    color: #7c0ec5;
}
.main-nav li.dropdown:hover .dropdown-content{
    display: block;
}

/* ===========================
   HEADER (MÓVIL - RESPONSIVO)
   =========================== */
@media (max-width: 992px) {
    /* Muestra el botón de hamburguesa */
    .header-toggle {
        display: block;
        z-index: 1002;
    }
    /* Oculta la navegación de desktop */
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: #1E1E1E;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        z-index: 1001;
        padding-top: var(--header-height);
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
    }
    /* Cuando se abre (clase 'is-open' de JS) */
    .main-nav.is-open {
        display: block;
        transform: translateX(0);
    }
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }
    .main-nav li {
        margin: 10px 0;
    }
    .main-nav ul li a,
    .main-nav ul li span {
        display: block;
        padding: 15px;
    }
    .main-nav li .dropdown-content {
        position: static;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border: none;
        padding-left: 15px;
    }
}

/* ===========================
   CONTENIDO (Estilos de Radio)
   =========================== */

/* Contenedor global */
.wrap-radio{
  width: min(1200px, 92vw);
  margin-inline: auto;
  padding: 18px 0 60px;
}

/* --- ¡NUEVO! Barra de Filtro --- */
.filter-nav {
    background-color: var(--panel); /* Fondo amarillo */
    padding: 0 15px;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.filter-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Para que sea responsivo */
    min-height: 50px;
}
.filter-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--panel-ink);
    text-decoration: none;
    padding: 15px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.filter-item.active {
    background-color: var(--panel); 
    color: black;
    font-weight: 700;
}
.filter-item:hover:not(.active) {
    background-color: rgba(227, 195, 9, 0.67);
}

/* Dropdown de filtro */
.filter-dropdown {
    position: relative;
}
.filter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f2d34c;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 15px rgba(250, 237, 2, 0.3);
    z-index: 10;
}
.filter-dropdown:hover .filter-dropdown-content {
    display: block;
}
.filter-dropdown-content a {
    display: block;
    color: rgb(0, 0, 0);
    padding: 12px 15px;
    text-decoration: none;
}
.filter-dropdown-content a:hover {
    background-color: var(--border-color);
}

/* Formulario de Búsqueda */
.filter-search {
    display: flex;
    margin-left: auto; /* Empuja a la derecha */
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
}
.filter-search input {
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #333;
}
.filter-search input:focus {
    outline: none;
}
.filter-search button {
    background: #e0e0e0;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #333;
}
.filter-search button:hover {
    background: #ccc;
}

/* Responsivo para el filtro */
@media (max-width: 992px) {
    .filter-search {
        margin-left: 0;
        width: 100%;
        margin: 10px 0;
    }
    .filter-search input {
        width: 100%;
    }
}


/* Header de SECCIÓN */
.header-radio{
  display:flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 16px;
  padding: 10px 0 20px;
  border-bottom: 4px solid var(--panel);
  margin-bottom: 8px;
}
.title-page{
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: .5px;
  text-align: left;
}

/* ===== Secciones ===== */
.section-block{ 
  --head-h: 60px;
  margin: 18px 0 26px;
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin: 0 0 16px;
}
.section-title{
  background: var(--panel);
  color: var(--panel-ink);
  font-weight: 900;
  padding: 0 24px;
  height: var(--head-h);
  display:flex;
  align-items:center;
  border-radius: 14px;
  margin: 0;
  letter-spacing: .4px;
}

/* Botón "Ver más" */
.sec-more{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: var(--head-h);
  padding: 0 26px;
  border-radius: 14px;
  background: var(--panel);
  color: var(--panel-ink);
  text-decoration:none;
  font-weight: 800;
  font-size: 1.12rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.sec-more:hover{ transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.sec-more:active{ transform: translateY(0); box-shadow: 0 4px 12px rgba(0,0,0,.22); }

@media (max-width: 640px){
  .sec-more{ font-size: 1.03rem; padding: 0 20px; }
  .section-head { 
      flex-direction: column; 
      align-items: flex-start; 
      gap: 10px;
  }
}

/* ===== Grid tarjetas (Para Recientes) ===== */
.news-grid-3x3 {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 980px){ .news-grid-3x3 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 640px){ .news-grid-3x3 { grid-template-columns: 1fr; } }

.section-block + .section-block{
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
a:focus-visible, .card:focus-within{
  outline: 3px solid var(--panel);
  outline-offset: 2px;
  border-color: var(--panel);
}

/* FOOTER */
.footer {
  position: relative;
  color: #ddd;
  background: #000;
  padding: 36px 0 24px;
  margin-top: 40px;
}
.footer::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, #f7e755, #ecdb48);
  opacity:.7;
}
.footer-inner{
  width: min(1200px, 92%);
  margin: 0 auto;
}
.footer-columns{
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.footer-col h3{
  color: #fff;
  font-size: 22px;
  margin: 8px 0 12px;
}
.footer-col ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li{
  margin: 8px 0;
}
.footer-col a{
  color: #cfd2d6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
  font-size: 14px;
}
.footer-col a:hover{
  color: #ffcc00;
  border-color: rgba(255,204,0,.4);
}
.footer-col.social{
  margin-left: auto;
}
.social-list{
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 6px 0 0;
  margin: 0;
  justify-content: flex-end;
}
.social-list a{
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  text-decoration: none;
  transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}
.social-list a:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
  border-color: #ffcc00;
}
.social-list svg{
  width: 20px; height: 20px;
  fill: #fff;
}
.footer-legal{
  text-align: center;
  font-size: 13px;
  color: #b9bdc2;
  margin-top: 20px;
}
.footer-legal a{
  color: #cfd2d6;
  text-decoration: underline;
}
.footer-legal a:hover{
  color: #ffcc00;
}
.footer-legal .sep{
  margin: 0 10px;
  opacity: .6;
}
@media (max-width: 900px){
  .footer-columns{ gap: 40px; }
}
@media (max-width: 700px){
  .footer-columns{
    flex-direction: column;
    gap: 18px;
  }
  .footer-col.social{ margin-left: 0; }
  .social-list{ justify-content: flex-start; }
  .footer-legal{ font-size: 12px; }
}

/* Scrollbar */
*{ scrollbar-width: thin; scrollbar-color: #f5e020 #414141; }
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-thumb{ background:#c6f705; border-radius:8px; }
*::-webkit-scrollbar-track{ background:#d1d1db; }

/* =========================================
   1. ESTILOS GENERALES (PC: Mouse y Teclado)
   ========================================= */

/* CONTENEDOR PRINCIPAL */
.carousel-container {
    position: relative;
    width: 100%;
    /* Dejamos 45px a los lados SIEMPRE para las flechas en PC */
    padding: 20px 45px; 
    box-sizing: border-box;
    overflow: hidden; 
}

/* EL RIEL (CARRUSEL) */
.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px 5px; /* Espacio para animación y sombra */
    scrollbar-width: none; 
}
.carousel::-webkit-scrollbar { display: none; } 

/* --- FLECHAS (Visibles por defecto) --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #fdd835;
    color: #000;
    font-size: 18px;
    cursor: pointer;
    z-index: 20; /* Encima de todo */
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s, background-color 0.2s;
}
.nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: #ffd700;
}

/* POSICIÓN DE FLECHAS: Pegadas a los bordes del contenedor */
.left-btn { left: 5px; }
.right-btn { right: 5px; }


/* --- TARJETA Y ANIMACIONES (Estilo PC) --- */
.news-card {
    /* Ancho fijo base, pero flexible si la ventana es MINÚSCULA */
    width: 300px;
    min-width: 300px; 
    flex: 0 0 auto;
    background-color: #0d0d0d;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid #1a1a1a;
    
    /* ANIMACIÓN */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

/* HOVER: Se activa con el mouse */
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.6);
    border-color: #fdd835;
    z-index: 5;
}

.news-img {
    width: 100%; height: 160px; object-fit: cover;
    border-radius: 12px; margin-bottom: 12px;
}

/* --- ESTILOS INTERNOS (TEXTO Y BOTONES) --- */
.info-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; padding: 0 4px;
}
.info-top span:first-child { color: #e6a345; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.date-tag { background-color: #222; color: #bbb; font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 600; }
.news-card h2 { color: #fff; margin: 5px 0 10px 0; font-size: 18px; line-height: 1.3; }
.news-card p { color: #ccc; font-size: 14px; }

.tag-btn {
    border: none; padding: 8px 18px; border-radius: 20px;
    font-size: 13px; font-weight: 800; cursor: pointer; margin-right: 8px;
    transition: opacity 0.2s, transform 0.2s; text-transform: capitalize;
}
.tag-btn:hover { opacity: 0.9; transform: scale(1.05); }
.tag-btn:nth-of-type(1) { background-color: #fdd835; color: #000; }
.tag-btn.small { background-color: #2a2a2a; color: #fff; }


/* ====================================================================
   2. DETECCIÓN DE MÓVIL REAL (Touch Screen)
   Aquí ocurre la magia. Usamos 'pointer: coarse' que significa 
   "puntero grueso" (dedo), en lugar de medir el ancho de la pantalla.
   ==================================================================== */

@media (hover: none) and (pointer: coarse) {
    
    /* Contenedor se expande a full pantalla y quita el espacio de flechas */
    .carousel-container {
        width: 100vw !important;
        padding: 20px 0 !important; 
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }

    /* ADIÓS FLECHAS (Solo si es touch) */

    /* RIEL FLUIDO */
    .carousel {
        display: flex !important;
        gap: 15px !important;
        padding: 0 20px !important;
        scroll-snap-type: x mandatory; /* Efecto imán en el dedo */
    }

    /* TARJETA ADAPTABLE (SWIPE) */
    .news-card {
        /* Se hace gigante para llenar la pantalla del cel */
        min-width: 85vw !important; 
        width: 85vw !important;
        max-width: 85vw !important;
        
        scroll-snap-align: center;
        margin: 0 !important;
        transform: none !important; /* Sin animación hover en celular */
    }
}










/* Título: 3 líneas seguras */
.news-card h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: calc(1.3em * 3); /* 3 líneas exactas */
}

/* Párrafo: 2 líneas seguras */
.news-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    min-height: calc(1.35em * 2); /* 2 líneas exactas */
}
/* Ajustes de líneas y espacio en móvil */
@media (hover: none) and (pointer: coarse) {

    /* Título responsive */
    .news-card h2 {
        -webkit-line-clamp: 3; /* ← número de líneas */
        min-height: calc(1.3em * 3); /* ← ajusta el espacio visual */
    }

    /* Párrafo responsive */
    .news-card p {
        -webkit-line-clamp: 2; /* ← número de líneas */
        min-height: calc(1.35em * 2); /* ← ajusta el espacio visual */
    }
}
