﻿/* --- Variables y Estilos Generales --- */
:root {
    --color-principal: #007bff; /* Azul vibrante, comúnmente usado en deportes */
    --color-secundario: #ff4500; /* Naranja/Rojo, para acentos y energía */
    --color-fondo: #f8f9fa; /* Fondo claro */
    --color-texto: #333;
    --fuente-titulo: 'Arial Black', sans-serif;
    --fuente-cuerpo: 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    margin: 0;
    padding-top: 60px; /* Ajuste para el header fijo */
}

a {
    color: var(--color-principal);
    text-decoration: none;
}

    a:hover {
        color: var(--color-secundario);
        text-decoration: underline;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Encabezado (Header) y Navegación --- */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: fixed; /* Fija el header en la parte superior */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

    header img {
        height: 40px; /* Tamaño del logo */
        width: auto;
    }

    header nav a {
        color: var(--color-texto);
        font-weight: bold;
        margin-left: 20px;
        padding: 5px 0;
        transition: color 0.3s, border-bottom 0.3s;
        text-transform: uppercase;
    }

        header nav a:hover {
            color: var(--color-principal);
            border-bottom: 2px solid var(--color-principal);
            text-decoration: none;
        }

/* --- Sección Hero (Principal) --- */
.hero {
    background-image: url('https://picsum.photos/1200/600?nature,mountainbike'); /* Imagen de fondo relacionada con ciclismo */
    background-size: cover;
    background-position: center;
    color: #ffffff;
    text-align: center;
    padding: 100px 20px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5); /* Overlay oscuro para mejor legibilidad */
    }

    .hero * {
        z-index: 1; /* Asegura que el texto esté sobre el overlay */
    }

    .hero h1 {
        font-family: var(--fuente-titulo);
        font-size: 3.5em;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .hero p {
        font-size: 1.5em;
        font-style: italic;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

/* --- Slider (Carrusel de Imágenes) --- */
.slider {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* Ajusta el ancho para el número de imágenes + el clon */
    width: 400%; /* 4 imágenes */
}

    .slides img {
        width: 25%; /* Cada imagen ocupa 1/4 del contenedor de slides */
        height: auto;
        display: block;
        object-fit: cover;
        min-height: 350px;
    }

/* Los botones del slider puedes manejarlos con JavaScript para la funcionalidad */
/* Si no tienes JS aún, puedes omitir el estilo o darle uno básico */
.slider-btns {
    display: none; /* Ocultar si se usa un script automático */
}

/* --- Secciones Generales --- */
.section {
    padding: 50px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.titulo-seccion {
    font-family: var(--fuente-titulo);
    text-align: center;
    color: var(--color-secundario);
    font-size: 2.5em;
    margin-bottom: 30px;
    position: relative;
}

    .titulo-seccion::after {
        content: '';
        display: block;
        width: 60px;
        height: 3px;
        background-color: var(--color-principal);
        margin: 10px auto 0;
    }

#nosotros p {
    line-height: 1.6;
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* --- Galería --- */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

    .galeria img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease;
    }

        .galeria img:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

/* --- Pie de Página (Footer) --- */
footer {
    background-color: #343a40; /* Oscuro */
    color: #f8f9fa;
    padding: 15px 0;
    text-align: center;
    border-top: none;
}

    footer a {
        color: var(--color-principal);
        margin-left: 5px;
    }

/* --- Media Queries para Responsive Design --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding-bottom: 10px;
    }

        header nav {
            margin-top: 10px;
        }

            header nav a {
                margin: 0 10px;
                font-size: 0.9em;
            }

    .hero {
        min-height: 300px;
        padding: 60px 20px;
    }

        .hero h1 {
            font-size: 2.5em;
        }

        .hero p {
            font-size: 1.2em;
        }
}

/* --- Estilos para la Sección de Rutas --- */

#rutas {
    background-color: #ffffff; /* Fondo claro para destacar las tarjetas */
}

.rutas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.ruta-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .ruta-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

.ruta-map-placeholder {
    height: 250px; /* Altura para el mapa o el placeholder */
    background-color: #ccc;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    font-weight: bold;
    text-transform: uppercase;
}

.ruta-info {
    padding: 20px;
}

    .ruta-info h3 {
        color: var(--color-principal);
        margin-top: 0;
        font-size: 1.5em;
        border-bottom: 2px solid var(--color-secundario);
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

    .ruta-info p {
        font-size: 0.95em;
        margin-bottom: 15px;
    }

.ruta-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

    .ruta-stats span {
        background-color: var(--color-fondo);
        padding: 5px 10px;
        border-radius: 5px;
        border: 1px solid #eee;
        color: var(--color-texto);
    }

.btn-ruta-details {
    display: inline-block;
    background-color: var(--color-secundario);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s;
}

    .btn-ruta-details:hover {
        background-color: #cc3700; /* Tono más oscuro de naranja/rojo */
        text-decoration: none;
    }

/* Media Query para móvil */
@media (max-width: 600px) {
    .rutas-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Estilos para la Página de Detalle de Ruta --- */

/* 1. Hero y Título */
.route-hero {
    background-color: #343a40;
    color: #ffffff;
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 5px solid var(--color-principal);
}

.back-link {
    color: #cccccc;
    font-size: 1em;
    margin-bottom: 15px;
    display: inline-block;
    transition: color 0.3s;
}

    .back-link:hover {
        color: var(--color-secundario);
        text-decoration: none;
    }

.route-hero h1 {
    font-family: var(--fuente-titulo);
    font-size: 3em;
    margin-top: 0;
    margin-bottom: 10px;
}

.route-tagline {
    font-size: 1.1em;
    opacity: 0.8;
}

/* 2. Resumen de Estadísticas (Fila) */
.route-stats-summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: -60px; /* Eleva el box sobre el hero para un efecto visual */
    position: relative;
    z-index: 10;
}

.stat-box {
    text-align: center;
    padding: 10px 15px;
    min-width: 120px;
}

.stat-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-family: var(--fuente-titulo);
    font-size: 1.8em;
    color: var(--color-principal);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
}

/* 3. Grid Principal (Contenido y Sidebar) */
.route-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 para el mapa, 1/3 para el sidebar */
    gap: 30px;
    margin-top: 40px;
}

.route-main h2, .route-sidebar h3 {
    color: var(--color-secundario);
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-top: 30px;
}

.map-container, .chart-container {
    width: 100%;
    height: 400px; /* La altura debe ser suficiente para ver bien la ruta */
    /* Remueve los estilos de placeholder */
    background-color: transparent;
    border: none;
    padding: 0;
}

.map-placeholder-text, .chart-placeholder-text {
    color: #999;
    font-style: italic;
}

/* 6. Columna Lateral y Botón de Descarga */
.download-box {
    background-color: var(--color-fondo);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    margin-bottom: 30px;
}

.btn-download {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--color-principal);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    margin: 15px 0;
    transition: background-color 0.3s;
}

    .btn-download:hover {
        background-color: #0056b3;
        text-decoration: none;
    }

.sidebar-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

    .sidebar-gallery img {
        width: 100%;
        height: auto;
        border-radius: 4px;
        object-fit: cover;
    }


/* Media Query para Móvil/Tableta */
@media (max-width: 992px) {
    .route-main-grid {
        grid-template-columns: 1fr; /* Una sola columna en dispositivos pequeños */
    }

    .route-stats-summary {
        margin-top: 0; /* Deshacer el efecto de elevación en móvil */
    }

    .stat-box {
        min-width: 45%; /* Dos columnas en móvil */
        margin-bottom: 10px;
    }
}

/* --- Estilos para la Sección de Contacto --- */

.contact-tagline {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1em;
    color: #555;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Formulario más ancho que la info */
    gap: 40px;
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Estilos del Formulario */
.contact-form {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-texto);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Asegura que el padding no añada ancho extra */
    font-size: 1em;
    transition: border-color 0.3s;
}

    .contact-form input:focus,
    .contact-form select:focus,
    .contact-form textarea:focus {
        border-color: var(--color-principal);
        outline: none;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
    }

/* Estilo del botón de envío */
.btn-submit {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--color-secundario);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

    .btn-submit:hover {
        background-color: #cc3700;
    }

/* Estilos de Información Adicional */
.contact-info-container {
    padding-top: 20px;
}

.info-box {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-left: 5px solid var(--color-principal);
    border-radius: 5px;
}

    .info-box h3 {
        margin-top: 0;
        color: var(--color-principal);
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

.social-links a {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--color-secundario);
    transition: color 0.3s;
}

    .social-links a:hover {
        color: var(--color-principal);
        text-decoration: none;
    }

/* Media Query para Móvil */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
    }
}

/* --- Estilos para la Sección Nosotros --- */

.about-us-section {
    background-color: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr; /* Texto más ancho que la imagen/sidebar */
    gap: 40px;
    margin-bottom: 50px;
    align-items: start;
}

.about-main-text h3 {
    color: var(--color-secundario);
    font-size: 1.8em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 0;
}

.mission-vision {
    background-color: var(--color-fondo);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--color-principal);
    margin-top: 20px;
}

    .mission-vision h4 {
        color: var(--color-principal);
        margin-top: 0;
    }

.about-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.about-focus {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

/* --- Estilos para el Equipo --- */
.team-title {
    margin-top: 40px;
    margin-bottom: 40px;
}

.team-cards-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.team-member-card {
    text-align: center;
    max-width: 250px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Foto circular */
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--color-principal);
}

.member-role {
    color: var(--color-secundario);
    font-weight: bold;
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Media Query para Móvil */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
    }
}

/* --- Estilos para la Página de Galería Completa --- */

.gallery-page-container {
    padding-top: 30px;
    padding-bottom: 50px;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* --- Estilos de las Pestañas (Tabs) --- */
.gallery-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 3px solid #eee;
    margin-bottom: 30px;
}

.tab-button {
    background-color: transparent;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #666;
    transition: color 0.3s, border-bottom 0.3s;
    text-transform: uppercase;
}

    .tab-button:hover {
        color: var(--color-secundario);
    }

    .tab-button.active {
        color: var(--color-principal);
        border-bottom: 3px solid var(--color-principal);
    }

/* --- Estilos del Contenido y la Cuadrícula --- */
.category-title {
    color: var(--color-texto);
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* Contenedor principal de la galería */
.full-gallery-grid {
    display: grid;
    /* 4 columnas en desktop */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 10px 0;
}

    .full-gallery-grid img {
        width: 100%;
        height: 250px; /* Altura fija para uniformidad */
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
    }

        .full-gallery-grid img:hover {
            transform: scale(1.03);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

.tab-content {
    /* Por defecto se maneja con el script, pero definimos la visualización del grid */
    display: none;
}

    .tab-content.active {
        display: grid; /* El script lo activa como grid */
    }

/* Media Query para Tabletas y Móviles */
@media (max-width: 992px) {
    .full-gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en tabletas */
    }
}

@media (max-width: 600px) {
    .gallery-tabs {
        flex-direction: column;
    }

    .tab-button {
        padding: 10px;
    }

    .full-gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    }
}

/* --- Estilos para la Sección de Blog/Crónicas --- */

.blog-tagline {
    text-align: center;
    margin-bottom: 40px;
}

.blog-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-post-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

    .blog-post-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-info {
    padding: 20px;
}

.post-tag {
    display: inline-block;
    background-color: var(--color-principal);
    color: white;
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.post-info h3 {
    color: var(--color-texto);
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    color: var(--color-secundario);
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s;
}

    .read-more:hover {
        color: var(--color-principal);
        text-decoration: underline;
    }

/* Media Query para Móvil */
@media (max-width: 768px) {
    .blog-teaser-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Estilos para la Página de Post Individual (Versión Final) --- */

.post-detail-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
}

.post-header {
    /* 🛠️ AJUSTE: Eliminar borde simple, añadir padding y estilo de caja */
    border-bottom: none;
    padding: 30px;
    margin-bottom: 30px;
    background-color: var(--color-fondo); /* Fondo suave para destacarlo */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* 🛠️ AJUSTE CLAVE 1: Forzar Bloque Vertical para el Enlace de Retorno */
.back-to-blog {
    display: block;
    color: var(--color-secundario);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1em;
    text-transform: uppercase;
    text-decoration: none;
}

    .back-to-blog:hover {
        color: var(--color-principal);
    }


/* 🛠️ AJUSTE CLAVE 2: Estilo y Espacio para el Título */
.post-title {
    font-family: var(--fuente-titulo);
    font-size: 2.8em;
    color: var(--color-principal);
    margin-top: 5px;
    margin-bottom: 15px;
    line-height: 1.1;
    border-bottom: 1px solid #e0e0e0; /* Separador bajo el título */
    padding-bottom: 15px;
}

/* 🛠️ AJUSTE CLAVE 3: Estilos de los Metadatos */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.9em;
    color: #555;
    padding-top: 10px;
    /* La línea ya la dimos en el post-title, no es necesario aquí */
}

.meta-item {
    padding-right: 15px;
    margin-right: 15px;
    border-right: 1px solid #ddd; /* Separador vertical entre ítems */
}

    .meta-item:last-child {
        border-right: none;
        margin-right: 0;
        padding-right: 0;
    }


.post-hero-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

    .post-hero-image img {
        width: 100%;
        height: auto;
        display: block;
    }

.post-body {
    line-height: 1.7;
    font-size: 1.1em;
}

    .post-body h2 {
        color: var(--color-secundario);
        font-size: 2em;
        margin-top: 40px;
        margin-bottom: 15px;
    }

.post-intro {
    font-style: italic;
    font-size: 1.2em;
    color: var(--color-texto);
}

/* Estilo para la Cita Destacada */
.post-quote {
    display: block;
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 5px solid var(--color-principal);
    background-color: #f8f8f8;
    font-style: italic;
    color: #555;
    border-radius: 4px;
}

/* Galería de Fotos dentro del Post */
.post-small-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 30px 0;
}

    .post-small-gallery img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        border-radius: 4px;
    }

/* Estilo de la Sección de Datos */
.post-data-summary {
    background-color: var(--color-fondo);
    padding: 25px;
    border-radius: 8px;
    margin: 40px 0;
}

    .post-data-summary h3 {
        color: var(--color-principal);
        border-bottom: 1px solid #ddd;
        padding-bottom: 5px;
    }

    .post-data-summary ul {
        list-style: none;
        padding: 0;
    }

    .post-data-summary li {
        padding: 5px 0;
        border-bottom: 1px dotted #eee;
    }

/* Estilos para Compartir */
.post-share {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.share-button {
    display: inline-block;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

    .share-button.facebook {
        background-color: #3b5998;
    }

    .share-button.twitter {
        background-color: #00acee;
    }

/* Media Query para Móvil */
@media (max-width: 768px) {
    .post-title {
        font-size: 2em;
    }

    /* 🛠️ AJUSTE MÓVIL: Metadatos apilados */
    .post-meta {
        flex-direction: column;
        gap: 0;
    }

    .meta-item {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
        padding-bottom: 5px;
    }

    .post-small-gallery {
        grid-template-columns: 1fr;
    }
}

/* --- Estilos para el Footer (Pie de Página) --- */

.main-footer {
    /* Fondo blanco para coincidir con el header */
    background-color: #ffffff;
    /* Texto oscuro para contraste sobre fondo blanco */
    color: var(--color-texto);
    padding: 50px 0;
    font-size: 0.95em;
    /* Línea de acento y sombra para definir la sección */
    border-top: 5px solid var(--color-secundario);
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

/* Diseño de cuadrícula para 4 columnas */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    gap: 30px;
}

.footer-col h3 {
    /* Títulos en color secundario para destacar */
    color: var(--color-secundario);
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 5px;
    /* Línea divisoria sutil */
    border-bottom: 1px solid #e0e0e0;
}

/* Estilos de la Columna de Branding */
.footer-branding .footer-logo {
    height: 60px;
    width: auto;
    filter: none; /* Quitamos el filtro si el fondo es blanco */
    margin-bottom: 10px;
}

.footer-branding .copyright {
    margin-top: 20px;
    font-size: 0.85em;
    opacity: 0.7;
    color: #555555;
}

/* Estilos generales de enlaces en footer */
.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links a,
.footer-contact p,
.footer-social a {
    color: #555555; /* Gris oscuro para mejor lectura */
    text-decoration: none;
    line-height: 2.2;
    transition: color 0.3s;
}

    .footer-links a:hover,
    .footer-social a:hover {
        color: var(--color-secundario);
        text-decoration: underline;
    }

/* Estilos del botón CTA de Contacto */
.btn-footer-contact {
    display: inline-block;
    background-color: var(--color-secundario);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s;
}

    .btn-footer-contact:hover {
        opacity: 0.9;
    }

.footer-social .social-icons {
    display: flex;
    flex-direction: column;
}


/* --- Media Queries (Responsividad) --- */

/* Tabletas (Ancho máximo 992px) */
@media (max-width: 992px) {
    .footer-grid {
        /* Pasa a 2 columnas */
        grid-template-columns: 1fr 1fr;
    }

    .footer-branding {
        grid-column: span 2; /* El branding ocupa el ancho completo superior */
        text-align: center;
        margin-bottom: 20px;
    }
}

/* Móviles (Ancho máximo 600px) */
@media (max-width: 600px) {
    .footer-grid {
        /* Pasa a 1 columna */
        grid-template-columns: 1fr;
    }

    .footer-branding {
        grid-column: span 1;
    }

    .footer-col {
        text-align: center; /* Centramos el texto de todas las columnas */
        margin-bottom: 30px;
    }

    /* Centramos los enlaces y el botón en móvil */
    .footer-links ul {
        display: inline-block;
        text-align: left;
    }

    .footer-social .social-icons {
        align-items: center; /* Centramos los iconos sociales */
    }
}