
/* --- Fuentes (mantenemos las mismas para coherencia visual base) --- */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Playfair+Display:wght@700&family=Roboto:wght@300;400;700&display=swap');

/* landing.css */
.landing-container {
  max-width: 800px;
  margin: auto;
  padding: 10px;
  font-family: sans-serif;
  width: 90%;
  margin: 0 auto;
  /* Centrado */
  padding-top: 1rem;
}

/* === Títulos de sección con gradientes personalizados === */
.section-title {
  background-color: #176fd3;
  /* Degradado de rojo oscuro a rosado */
  color: white;
  /* Texto en blanco para contraste */
  padding: 10px 15px;
  /* Espaciado interno */
  border-radius: 18px;
  /* Bordes redondeados */
  display: inline-block;
  /* Ocupa solo el espacio necesario */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Sombra sutil */
  font-weight: bold;
  /* Negrita */
  letter-spacing: 1px;
  /* Espaciado entre letras */
  display: flex; 
  /* Para que el icono y el texto estén en la misma línea */
  align-items: center; 
  /* Para alinear verticalmente el icono con el texto */    
  gap: 10px; 
  /* Espacio entre el icono y el texto */
  justify-content: center;
  /* Centrado del contenido */
}

/* SVG icono de Bus al lado del titulo de las tarjetas de las rutas */

.icon-section-title {
    width: 30px; /* Tamaño del icono */
    height: 30px; /* Tamaño del icono */
    fill: #ffffff; /* Color del icono, puedes cambiarlo */
    /* Si el SVG ya tiene fill="currentColor", puedes simplemente cambiar el color del texto del h3 */
}

/* Responsividad en Moviles del SVG */
@media (max-width: 768px) {
    .icon-section-title {
        width: 24px;
        height: 24px;
    }
}

/* === Carrusel de tarjetas de cabecera === */
.header-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-bottom: 2rem;
  overflow: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  /* Fondo suave */
  border-radius: 20px;
  padding: 1.5rem;
  -ms-overflow-style: none;
  /* IE */
  scrollbar-width: none;
  /* Firefox */
}

.header-cards::-webkit-scrollbar {
  display: none;
  /* Oculta scrollbar en Chrome/Safari */
}

.header-card {
  position: relative;
  flex: 0 0 auto;
  /* Evita que se contraigan */
  min-width: 400px;
  max-width: 500px;
  border-radius: 10px;
  overflow: hidden;
  padding: 1rem;
  display: block;
  text-decoration: none;
  /* Elimina subrayado */
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.header-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  z-index: 2;
  /* Oscurece imagen de fondo */
}

.header-card p {
  position: relative;
  z-index: 3;
  /* Sobre la imagen */
  color: #fff;
  margin: 0.2rem 0;
}

.header-card p:first-of-type {
  padding-top: 1rem;
  font-weight: bold;
}

.header-card p:nth-of-type(3) {
  font-size: small;
}

.header-cards-horizontal {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}



/* === Insignias (badges) de eventos === */
.route-badge {
  top: 10px;
  left: 10px;
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.route-badge.badge.bg-success {
  left: auto;
  right: 10px;
  /* Insignia a la derecha */
}

.landing-container { /* Un contenedor principal para centrar el contenido y limitar el ancho */
    max-width: 1200px; /* Un ancho un poco más generoso para ver más columnas */
    margin: 0 auto;
    padding: 20px;
}

/* --- SECCIÓN DE NOTICIAS PRINCIPAL: EL "ACOMODO PERRILLO" CON GRID --- */

.news-scroll {
    display: grid; /* Usamos Grid para un control más fino del layout */
    /* Definimos las columnas: 3 columnas en pantallas grandes, flexibles */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px; /* Espacio entre las tarjetas de noticias */
    padding: 20px 0;
}

.news-post {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Bordes ligeramente más redondeados */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07); /* Sombra más suave */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Efecto al pasar el mouse */
    display: flex; /* Para que el contenido interno se apile verticalmente */
    flex-direction: column;
    height: auto; /* Permitimos que la altura se ajuste al contenido */
    padding-bottom: 20px; /* Padding inferior final para la tarjeta */
}

.news-post:hover {
    transform: translateY(-5px); /* Pequeño levantamiento al pasar el mouse */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Sombra un poco más prominente */
}

/* TÍTULO DE LA NOTICIA */
.news-post h3 {
    margin: 20px 25px 10px 25px; /* Márgenes internos más compactos */
    font-size: 1.6em; /* Un tamaño más adecuado para tarjetas más pequeñas */
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
    color: #1a1a1a;
    text-align: left; /* Títulos alineados a la izquierda dentro de la tarjeta */
    flex-grow: 1; /* Permite que el título ocupe espacio si es largo */
}

.news-post h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.news-post h3 a:hover {
    color: #176fd3;
}

/* METADATOS DE LA NOTICIA (Autor, Fecha, Vistas) */
.news-meta {
    font-size: 0.85em;
    color: #777;
    margin: 0 25px 15px 25px; /* Márgenes ajustados */
    font-family: 'Roboto', sans-serif;
    text-align: left; /* Alinear a la izquierda */
}

.news-meta span {
    display: block; /* Cada metadato en su propia línea para ahorrar espacio */
    margin-bottom: 3px;
}

.news-meta .news-author {
    font-weight: 700;
    color: #444;
}

/* IMAGEN DE LA NOTICIA (con Swiper) */
.swiper {
    width: 100%;
    height: 200px; /* Altura más compacta para las tarjetas */
    margin: 0;
    background-color: #f0f0f0;
    position: relative;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Pie de foto de la imagen */
.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 15px; /* Padding ajustado */
    font-size: 0.8em; /* Tamaño de fuente más pequeño */
    text-align: left;
    font-family: 'Roboto', sans-serif;
}

/* Paginación de Swiper */
.swiper-pagination-bullet {
    background-color: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    width: 7px; /* Más pequeños */
    height: 7px;
    margin: 0 3px !important;
}

.swiper-pagination-bullet-active {
    background-color: #176fd3 !important;
}

/* RESUMEN DE LA NOTICIA */
.summary {
    font-size: 1em; /* Texto más estándar */
    color: #444;
    margin: 15px 25px 10px 25px; /* Márgenes compactos */
    line-height: 1.6;
    font-family: 'Merriweather', serif;
    text-align: justify;
}

/* DESCRIPCIÓN PARCIAL / CONTENIDO PRINCIPAL */
.full-description {
    margin: 0 25px 15px 25px; /* Márgenes compactos */
    color: #333;
    font-size: 0.95em;
    line-height: 1.5;
    font-family: 'Merriweather', serif;
    text-align: justify;
}

.full-description p {
    margin-bottom: 0.8em; /* Menos espacio entre párrafos */
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px; /* Padding más pequeño para el botón */
    background-color: #313131;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em; /* Fuente más pequeña */
    transition: background-color 0.3s ease;
    /* Para que el botón se alinee a la izquierda dentro de la tarjeta */
    margin-left: 25px;
    margin-right: auto;
}

.read-more:hover {
    background-color: #181818;
}

/* CATEGORÍA y ETIQUETAS */
.news-taxonomy {
    margin: 15px 25px 0 25px;
    padding-top: 15px;
    border-top: 1px dashed #e9e9e9;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Espacio entre los elementos de taxonomía */
    align-items: center;
}

.category-badge {
    background-color: #e6f0fa;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8em; /* Más pequeño */
    font-weight: 700;
    color: #176fd3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.category-badge a {
    text-decoration: none;
    color: inherit;
}

.category-badge:hover {
    background-color: #d1e7fa;
    border-color: #8cc6ff;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* Espacio entre las etiquetas */
}

.label-tag {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 0.75em; /* Más pequeño */
    font-weight: 500;
    color: #666;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.label-tag a {
    text-decoration: none;
    color: inherit;
}

.label-tag:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Oculta los elementos en pantallas con un ancho máximo de 767px (móviles) */
@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* --- Media Query para Dispositivos Móviles --- */
/* Los estilos dentro de este bloque solo se aplicarán en pantallas de 768px o menos */
@media (max-width: 768px) {
    /* Reiniciamos el contenedor de noticias */
    .news-scroll {
        /* Eliminamos el grid para que los elementos se apilen verticalmente */
        display: block; 
        padding: 0; /* Quitamos el padding del contenedor principal si es necesario */
    }

    .news-post {
        background: #ffffff;
        /* Quitamos el borde y la sombra para un estilo más plano */
        border: none;
        box-shadow: none;
        border-radius: 0;
        /* Agregamos un borde inferior para separar visualmente las noticias */
        border-bottom: 1px solid #e0e0e0; 
        margin-bottom: 50px; /* Separación entre cada noticia */

    }

    .news-post:hover {
        /* Eliminamos el efecto de "levantamiento" en móvil */
        transform: none;
        box-shadow: none;
    }
    
    /* Para que el contenido interno de cada noticia no tenga márgenes laterales */
    .news-post h3,
    .news-meta,
    .summary,
    .full-description,
    .read-more,
    .news-taxonomy {
        margin-left: 20px;
        margin-right: 20px;
    }

    /* La imagen de la noticia puede ocupar todo el ancho */
    .swiper {
        width: 100%;
        height: 250px; /* Ajustamos la altura de la imagen para móvil */
        margin: 0; 
    }

        /* Para que el contenido interno de cada noticia no tenga márgenes laterales */
    .news-post h3,
    .news-meta,
    .summary,
    .full-description,
    .read-more,
    .news-taxonomy {
        /* Agregamos el padding que quitamos del contenedor para que el texto sí tenga espacio */
        margin-left: 20px;
        margin-right: 20px;
    }

    .news-post .read-more {
        margin-left: 20px;
    }
    /* Quitamos el padding del contenedor principal para que los elementos puedan ocupar el ancho completo */
    .landing-container {
        padding: 0;
    }

    /* Reiniciamos el contenedor de noticias */
    .news-post {
        background: #ffffff;
        border: none;
        box-shadow: none;
        border-radius: 0;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 20px;
        /* Quitamos el padding para que la imagen y el botón se peguen a los bordes de la pantalla */
        padding: 0;
    }

    /* Estilos para el botón en móvil */
    .read-more {
        display: block;
        /* Ocupamos el 100% del ancho del contenedor padre */
        width: 100%;
        /* Quitamos los márgenes laterales */
        margin: 15px 0;
        /* Ajustamos el padding para que el texto no se pegue a los bordes */
        padding: 12px 20px;
        font-size: 1em;
        border-radius: 5px;
        text-align: center;
    }
}