/* =========================================
   1. VARIABLES Y ESTILOS GLOBALES
   ========================================= */
:root {
    --color-primary: #007bff;
    --color-secondary: #28a745;
    --color-background: #f8f9fa;
    --color-card-bg: #ffffff;
    --color-border: #e9ecef;
    --color-text: #343a40;
    --color-text-light: #6c757d;
}

* { box-sizing: border-box; }

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

.main-layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   2. ENCABEZADO (HEADER)
   ========================================= */
.page-header {
    background-image: url('fondo_runners.jpg'); 
    background-size: cover; 
    background-position: center;
    padding: 60px 20px; 
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center; 
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2; 
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.page-header h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.instagram-link {
    color: white;
    font-size: 2.5em;
    transition: color 0.3s ease;
}

.instagram-link:hover { color: #e1306c; }

/* =========================================
   3. BUSCADOR Y MAPA (DISE脩O FLEX)
   ========================================= */
.top-content-flex {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.filtro-form {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.filtro-form h2 { 
    text-align: left; 
    color: var(--color-primary); 
    margin-bottom: 20px;
}

.input-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.geofiltro {
    background: #f1f8ff;
    padding: 15px;
    border-radius: 6px;
}

.btn-group { margin-top: 20px; display: flex; gap: 10px; }

.btn-aplicar {
    background-color: var(--color-secondary);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-limpiar {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
}

#mapa-general { 
    height: 400px;
    border: 1px solid #ced4da;
    border-radius: 8px;
}

/* =========================================
   4. LISTADO DE CARRERAS Y PAGINACI脫N
   ========================================= */
.evento-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-primary);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 6px;
    display: flex;
    gap: 20px;
}

.evento-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.evento-image img { width: 100%; height: 100%; object-fit: cover; }

.evento-details { flex-grow: 1; }

/* --- Estilos personalizados para el texto de la carrera --- */

.evento-details h3 {
    margin: 0 0 5px 0;       /* Achica el espacio abajo del título */
    color: #007bff;          /* Color azul (podés cambiarlo por el que quieras) */
    font-size: 1.25em;       /* Tamaño del nombre de la carrera */
    font-weight: bold;
}

.evento-details p {
    margin: 2px 0;           /* Pegamos más los renglones (fecha, lugar, etc) */
    font-size: 0.9em;        /* Texto un poquito más chico para que entre todo */
    color: #444;             /* Gris oscuro para que sea legible */
    line-height: 1.3;        /* Altura de línea compacta */
}

/* Si querés que los iconos tengan un color especial */
.evento-details p i {
    color: #007bff;
    margin-right: 5px;
    width: 18px;             /* Esto alinea todos los textos verticalmente */
    text-align: center;
}

.btn-detalles {
    display: inline-block;
    margin-top: 10px;
    background: var(--color-primary);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
}

/* Regla para ocultar carreras (Paginaci贸n) */
.hidden-card { display: none !important; }

.ver-mas-container { text-align: center; margin: 30px 0; }

.btn-ver-mas {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* =========================================
   5. FOOTER Y CONTACTO
   ========================================= */
.site-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.contacto-box {
    background: #343a40;
    color: white;
    padding: 30px;
    border-radius: 8px;
}

.contacto-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.contacto-box input, .contacto-box textarea {
    padding: 10px;
    border-radius: 4px;
    border: none;
}

.btn-enviar {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
}


/* =========================================
   6. RESPONSIVIDAD
   ========================================= */

/* Escritorio: Filtros y Mapa lado a lado */
@media (min-width: 992px) {
    .top-content-flex { flex-direction: row; }
    .filtro-col { flex: 0 0 55%; }
    .mapa-col { flex: 0 0 45%; }
    #mapa-general { height: 100%; min-height: 500px; }
    .header-content { flex-direction: row; }
}

/* Tablets y M贸viles */
@media (max-width: 768px) {
    .evento-card { flex-direction: column; }
    .evento-image { width: 100%; height: 200px; }
    .page-header {
        padding: 25px 15px; /* Menos espacio arriba y abajo */
    }

    /* Reducimos un poco el tamaño del texto para que no quede gigante en el espacio chico */
    .page-header h1 {
        font-size: 1.4em; 
        line-height: 1.2;
    }

    /* Ajustamos el tamaño del logo de Instagram para que no desborde */
    .instagram-link {
        font-size: 1.8em;
    }

    .header-content {
        gap: 8px; /* Menos espacio entre el icono y el texto */
    }
    
    .input-group-row { flex-direction: column; }
}
/* Contenedor de botones de redes sociales */
.social-buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px; /* Espacio respecto al formulario de filtros */
}

.social-btn {
    flex: 1; /* Hace que los 3 midan lo mismo */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 5px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    transition: transform 0.2s, opacity 0.2s;
}

.social-btn i {
    margin-right: 8px;
    font-size: 1.2em;
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: white;
}

/* Colores de marca */
.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.facebook {
    background-color: #1877F2;
}

.social-btn.email {
    background-color: #ea4335; /* Rojo Gmail */
}

/* Ajuste para móviles: si el espacio es muy chico, se apilan */
@media (max-width: 480px) {
    .social-buttons-container {
        flex-direction: column;
    }
}

