/* Variables CSS */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    padding-top: 80px; /* Espacio para el header fijo */
}

/* Header y Navegación */
.header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: white !important;
    text-decoration: none;
}

.navbar-brand i {
    margin-right: 10px;
    animation: rocket 2s ease-in-out infinite;
}

@keyframes rocket {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: var(--shadow);
    border-radius: 15px;
}

/* Hero Section */
.hero {
    background: var(--gradient-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Espacio adicional para el header fijo */
}

/* Espaciado adicional para simular los dos saltos de línea */
.hero-small {
    margin-top: 4rem; /* Simula dos saltos de línea */
    padding-top: 120px; /* Espacio adicional para el header fijo */
}

/* Espaciado para todas las páginas */
.page-content {
    margin-top: 6rem; /* Espacio para el header fijo + dos saltos de línea */
    padding-top: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botones */
.btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Cards */
.card {
    border-radius: 20px;
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-body {
    padding: 2rem;
}

.card i {
    transition: all 0.3s ease;
}

.card:hover i {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* Contenido principal */
.main-content {
    padding-top: 0; /* Remover padding adicional */
}

/* Secciones Hero */
.hero {
    margin-top: -80px; /* Compensar el padding del body */
    padding-top: 120px; /* Espacio adicional para el header */
}

.hero-small {
    margin-top: -80px; /* Compensar el padding del body */
    padding-top: 100px; /* Espacio para el header */
}

/* Secciones */
.novedades {
    background: var(--light-color);
}

.contacto {
    background: var(--dark-color);
}

.social-links .btn {
    border-radius: 50px;
    margin: 5px;
    transition: all 0.3s ease;
}

.social-links .btn:hover {
    transform: translateY(-3px) scale(1.05);
}

/* Footer */
.footer {
    background: var(--dark-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* Animaciones adicionales */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efectos de hover para elementos interactivos */
.nav-item:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Estilos específicos para páginas de transporte público */
.transport-card, .taxi-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.transport-card:hover, .taxi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.empresa-logo, .taxi-logo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.lineas-preview .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
}

.empresa-info, .taxi-info {
    font-size: 0.9rem;
}

.servicio-detalles .detalle-item {
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.servicio-detalles .detalle-item i {
    margin-bottom: 0.5rem;
}

.servicio-detalles .detalle-item strong {
    font-size: 1.1rem;
}

/* Estilos para modales de transporte */
.linea-item, .ruta-item {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.linea-item:hover, .ruta-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.2);
}

/* Estilos para mapas */
.mapa-container {
    border-radius: 10px;
    overflow: hidden;
}

.mapa-leyenda {
    font-size: 0.9rem;
}

.leyenda-color {
    border-radius: 2px;
}

/* Estilos para marcadores de paradas */
.parada-marker, .parada-marker-principal, .parada-marker-terminal, .parada-marker-secundaria {
    background: transparent;
    border: none;
}

.parada-marker-principal i {
    color: #dc3545 !important;
}

.parada-marker-terminal i {
    color: #28a745 !important;
}

.parada-marker-secundaria i {
    color: #6c757d !important;
}

/* Estilos para resultados de búsqueda */
.distancia-numero {
    font-size: 1.5rem;
    font-weight: bold;
}

.linea-icono {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Estilos para pasos numerados */
.paso-numero {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto;
}

/* Estilos para sugerencias de búsqueda */
.btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Estilos para controles de filtro */
.btn-group .btn {
    border-radius: 20px;
    margin: 0 2px;
}

.btn-group .btn:first-child {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* Estilos para notificaciones */
.alert.position-fixed {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 10px;
}

/* Estilos para botones flotantes */
.btn.position-fixed {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Estilos para autocompletado */
input[list] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Estilos para círculo de radio de búsqueda */
.leaflet-interactive {
    stroke-dasharray: 5, 5;
}

/* Estilos para popups de Leaflet */
.leaflet-popup-content {
    border-radius: 10px;
    padding: 1rem;
}

.leaflet-popup-content h6 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.leaflet-popup-content p {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.leaflet-popup-content small {
    color: var(--muted);
}

/* Estilos para botones de acción en tarjetas */
.card-footer .btn {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Estilos para badges de tipo de transporte */
.badge.bg-primary, .badge.bg-warning {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 15px;
}

/* Estilos para información de distancia */
.distancia-info {
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.distancia-numero {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

/* Estilos para parada cercana */
.parada-cercana {
    padding: 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Estilos para controles de filtro dinámicos */
.controles-filtro {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Estilos para botones de sugerencia */
.btn-outline-secondary {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos para formulario de búsqueda */
.form-control-lg {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select-lg {
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

/* Estilos para botones de búsqueda */
.btn-lg {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
