
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- Variables de Color --- */
:root {
    --color-primario: #1565c0;      /* Azul profesional */
    --color-secundario: #ff6b35;    /* Naranja vibrante */
    --color-acento: #26a69a;        /* Verde azulado */
    --color-fondo: #fafafa;
    --color-texto: #37474f;
    --color-texto-fuerte: #2c3e50;  /* Texto con mayor contraste para datos importantes */
    --color-cabecera-fondo: #ffffff;
    --color-tarjeta-fondo: #ffffff;
    --color-borde: #e0e0e0;
    --color-blanco: #fff;
    --color-gris-claro: #f5f5f5;
    --sombra-tarjeta: 0 4px 20px rgba(0,0,0,0.1);
    --sombra-hover: 0 8px 25px rgba(0,0,0,0.15);
    --gradiente-primario: linear-gradient(135deg, #1565c0, #1976d2);
    --gradiente-secundario: linear-gradient(135deg, #ff6b35, #ff8a50);
}

body.dark-mode {
    --color-primario: #42a5f5;
    --color-secundario: #ff7043;
    --color-acento: #4db6ac;
    --color-fondo: #121212;
    --color-texto: #e0e0e0;
    --color-texto-fuerte: #ffffff;  /* Texto blanco para máximo contraste en modo oscuro */
    --color-cabecera-fondo: #1e1e1e;
    --color-tarjeta-fondo: #2a2a2a;
    --color-borde: #424242;
    --color-gris-claro: #2a2a2a;
    --sombra-tarjeta: 0 4px 20px rgba(0,0,0,0.3);
    --sombra-hover: 0 8px 25px rgba(0,0,0,0.4);
    --gradiente-primario: linear-gradient(135deg, #42a5f5, #1976d2);
    --gradiente-secundario: linear-gradient(135deg, #ff7043, #ff5722);
}

/* --- Estilos Base y Tipografía --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

.container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

h1, h2, h3, h4 { color: var(--color-primario); font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.2; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
a { color: var(--color-secundario); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-primario); }
img { max-width: 100%; height: auto; display: block; }

/* --- Mejoras de Foco para Accesibilidad --- */
a:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--color-primario);
    outline-offset: 4px;
    border-radius: 4px;
}

/* --- Ritmo Vertical y Espaciado --- */
main > section {
    padding-block: clamp(4rem, 8vw, 6rem);
}

.section {
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradiente-secundario);
    border-radius: 2px;
}

/* Limita el ancho de línea para mejorar legibilidad */
.service-page-header p, .blog-content p, .fleet-item p {
    max-width: 65ch;
    margin-inline: auto;
}

.service-page-header {
    background: var(--color-gris-claro);
    padding: 4rem 0;
    text-align: center;
    position: relative;
}

.service-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradiente-primario);
}

/* --- Animaciones --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* --- Portada (Hero) --- */
.hero {
    position: relative;
    padding: clamp(5rem, 12vw, 10rem) 20px;
    color: var(--color-blanco);
    text-align: center;
    background: 
        linear-gradient(135deg, rgba(21, 101, 192, 0.8), rgba(255, 107, 53, 0.7)),
        url('../img/hero-background.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero h1 { 
    color: var(--color-blanco);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Botones --- */
.btn {
    display: inline-block;
    background: var(--gradiente-secundario);
    color: var(--color-blanco) !important;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    text-decoration: 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:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-hover);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(0);
}

/* --- Tarjetas --- */
.card {
    display: flex;
    flex-direction: column;
    background: var(--color-tarjeta-fondo);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--sombra-tarjeta);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--color-borde);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradiente-secundario);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.card:hover::before {
    transform: scaleX(1);
}
/* Espaciado interno de las tarjetas */
.card > * + * {
    margin-top: 1.25rem;
}

/* --- Grids --- */
.grid-3, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; /* Aumentamos el espaciado */
}

/* --- Footer --- */
.footer {
    background-color: var(--color-cabecera-fondo);
    padding: 50px 0 0 0;
    margin-top: 60px;
    color: var(--color-texto);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-primario);
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-secundario);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--color-texto); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--color-secundario); }
.footer-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.footer-social-icons a img { width: 24px; height: 24px; transition: transform 0.2s; }
.footer-social-icons a:hover img { transform: scale(1.1); }

.footer-bottom {
    border-top: 1px solid var(--color-borde);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Header y Navegación Mejorada --- */
.header { 
    background-color: var(--color-cabecera-fondo); 
    box-shadow: var(--sombra-tarjeta); 
    padding: 20px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    height: 45px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.desktop-nav ul { 
    list-style: none; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.desktop-nav a { 
    color: var(--color-texto); 
    font-weight: 600; 
    padding: 12px 16px; 
    border-radius: 8px; 
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.desktop-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradiente-secundario);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.desktop-nav a:hover::before,
.desktop-nav a.active::before {
    width: 80%;
}

.desktop-nav a:hover, 
.desktop-nav a.active { 
    background-color: var(--color-gris-claro);
    color: var(--color-primario);
}

.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 16px;
}

.lang-switch a {
    padding: 8px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.lang-switch a:hover {
    background-color: var(--color-gris-claro) !important;
    transform: scale(1.1);
}

.theme-switch {
    background: var(--color-gris-claro);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-switch:hover {
    background: var(--color-primario);
    transform: scale(1.1);
}

.mobile-nav-toggle { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer; 
    z-index: 1001;
    padding: 8px;
}

.hamburger-icon {
    width: 25px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-texto);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 85px;
    left: 0;
    right: 0;
    background: var(--color-cabecera-fondo);
    box-shadow: var(--sombra-tarjeta);
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav ul {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    margin-bottom: 10px;
}

.mobile-nav a {
    display: block;
    padding: 15px;
    color: var(--color-texto);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.mobile-nav a:hover {
    background: var(--color-gris-claro);
    color: var(--color-primario);
}

body.nav-open .mobile-nav {
    display: block;
}

body.nav-open .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

body.nav-open .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

body.nav-open .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 992px) { 
    .desktop-nav { display: none; } 
    .mobile-nav-toggle { display: block; }
}

/* --- Estilos para Opciones de Vehículos --- */
.vehicle-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    max-width: 100%;
}

.vehicle-option {
    cursor: pointer;
    position: relative;
    width: 100%;
}

.vehicle-option input[type="radio"] {
    display: none;
}

.vehicle-card {
    background: var(--color-tarjeta-fondo);
    border: 2px solid var(--color-borde);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    box-shadow: var(--sombra-tarjeta);
}

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

.vehicle-card:hover::before {
    left: 100%;
}

.vehicle-card:hover {
    border-color: var(--color-primario);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 50px rgba(13, 71, 161, 0.25);
}

.vehicle-option input[type="radio"]:checked + .vehicle-card {
    border-color: var(--color-primario);
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: white;
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 50px rgba(13, 71, 161, 0.4);
}

.vehicle-option input[type="radio"]:checked + .vehicle-card::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
    backdrop-filter: blur(5px);
}

.vehicle-option input[type="radio"]:checked + .vehicle-card .vehicle-info strong,
.vehicle-option input[type="radio"]:checked + .vehicle-card .vehicle-info small {
    color: white;
}

.vehicle-image {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: grayscale(0.2);
}

.vehicle-card:hover .vehicle-image {
    transform: scale(1.2) rotate(8deg);
    filter: grayscale(0);
}

.vehicle-option input[type="radio"]:checked + .vehicle-card .vehicle-image {
    transform: scale(1.15);
    filter: grayscale(0) brightness(1.2);
}

.vehicle-info {
    text-align: center;
    z-index: 1;
    position: relative;
}

.vehicle-info strong {
    display: block;
    color: var(--color-texto);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.vehicle-info small {
    color: var(--color-primario);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    background: rgba(13, 71, 161, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .vehicle-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .vehicle-option {
        min-width: unset;
    }
    
    .vehicle-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 1.25rem;
        min-height: 90px;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .vehicle-image {
        font-size: 2.5rem;
        width: 60px;
        height: 60px;
        margin-right: 1rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .vehicle-card:hover .vehicle-image {
        transform: scale(1.1) rotate(5deg);
    }
    
    .vehicle-info {
        text-align: left;
        flex: 1;
    }
    
    .vehicle-info strong {
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
    
    .vehicle-info small {
        padding: 0.3rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Responsive breakpoint para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .vehicle-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Responsive breakpoint para desktop grande */
@media (min-width: 1200px) {
    .vehicle-options {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        margin: 1rem auto 0;
    }
}

/* --- Desktop Button Centering Fixes --- */
@media (min-width: 769px) {
    .vehicle-card {
        text-align: center;
    }
    .vehicle-info {
        text-align: center;
    }
    .card .btn {
        margin: 1rem auto 0 auto;
        display: inline-block;
    }
}

/* --- Optimización de Formularios y Layout General --- */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-texto);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.4;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--color-borde);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--color-blanco);
    color: var(--color-texto);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
    transform: translateY(-1px);
}

.form-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.trip-form-section {
    background: var(--color-blanco);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-borde);
    transition: all 0.3s ease;
}

.trip-form-section:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Mejoras para botones principales */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 50px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(13, 71, 161, 0.4);
}

.btn-secondary {
    background: var(--color-blanco);
    color: var(--color-primario);
    border: 2px solid var(--color-primario);
}

.btn-secondary:hover {
    background: var(--color-primario);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(13, 71, 161, 0.3);
}

/* Estilos para selectores de modo */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--color-borde);
    border-radius: 12px;
    background: var(--color-blanco);
    color: var(--color-texto);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

.mode-btn:hover,
.mode-btn.active {
    border-color: var(--color-primario);
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(13, 71, 161, 0.3);
}

/* Optimización de espaciado en hero section */
.hero {
    padding: 4rem 0;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .trip-form-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .mode-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 1.125rem 1.5rem;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
}

/* Optimización del mapa interactivo */
#interactive-map-container {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--color-borde);
}

#interactive-map {
    height: 450px;
    width: 100%;
    border-radius: 14px;
}

/* Información de puntos seleccionados */
#selected-points-info {
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    border: 2px solid var(--color-primario);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

/* Información de ruta calculada */
#route-info {
    background: var(--color-blanco);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-borde);
}

/* Mejoras para step indicators */
.form-step {
    transition: all 0.4s ease;
}

.form-step.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.form-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para trip summary card */
#trip-summary-card {
    background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 12px 48px rgba(13, 71, 161, 0.3);
    position: relative;
    overflow: hidden;
}

#trip-summary-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Indicadores de confianza y stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--color-blanco);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-borde);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primario);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 600;
}

/* Botón Calcular Ruta - Estilos específicos con máximo énfasis */
#calculate-route-btn {
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    background: linear-gradient(135deg, #ff6b35 0%, #e67e22 100%);
    color: #ffffff;
    padding: 1.2rem 2.5rem;
    border-radius: 14px;
    border: 2px solid #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(243, 156, 18, 0.5), 0 0 0 0 rgba(243, 156, 18, 0.4);
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-emphasis 2s ease-in-out infinite;
}

@keyframes pulse-emphasis {
    0%, 100% { 
        box-shadow: 0 8px 30px rgba(243, 156, 18, 0.5), 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    50% { 
        box-shadow: 0 8px 30px rgba(243, 156, 18, 0.7), 0 0 0 8px rgba(243, 156, 18, 0.1);
    }
}

#calculate-route-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(243, 156, 18, 0.6);
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

#calculate-route-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Botón Centrar en Valdivia - Colores fijos para contraste */
#center-map-btn {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border: 2px solid #dee2e6 !important;
    transition: all 0.3s ease !important;
}

#center-map-btn:hover {
    background: #e9ecef !important;
    color: #1a202c !important;
    border-color: #adb5bd !important;
    transform: translateY(-2px);
}

body.dark-mode #center-map-btn {
    background: #3a3a3a !important;
    color: #ffffff !important;
    border-color: #5a5a5a !important;
}

body.dark-mode #center-map-btn:hover {
    background: #4a4a4a !important;
    color: #ffffff !important;
    border-color: #6a6a6a !important;
}

/* Predefined Destinations List - Fixed contrast colors */
#predefined-form select,
#origen,
#destino {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border: 2px solid #dee2e6 !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#predefined-form select:hover,
#origen:hover,
#destino:hover {
    border-color: #1565c0 !important;
    background: #f8f9fa !important;
}

#predefined-form select:focus,
#origen:focus,
#destino:focus {
    outline: none !important;
    border-color: #1565c0 !important;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1) !important;
}

/* Predefined destinations select options */
#predefined-form select option,
#origen option,
#destino option {
    background: #ffffff !important;
    color: #2c3e50 !important;
    padding: 0.5rem;
}

body.dark-mode #predefined-form select,
body.dark-mode #origen,
body.dark-mode #destino {
    background: #3a3a3a !important;
    color: #ffffff !important;
    border-color: #5a5a5a !important;
}

body.dark-mode #predefined-form select:hover,
body.dark-mode #origen:hover,
body.dark-mode #destino:hover {
    background: #4a4a4a !important;
    border-color: #42a5f5 !important;
}

body.dark-mode #predefined-form select:focus,
body.dark-mode #origen:focus,
body.dark-mode #destino:focus {
    border-color: #42a5f5 !important;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.1) !important;
}

body.dark-mode #predefined-form select option,
body.dark-mode #origen option,
body.dark-mode #destino option {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

/* Responsivo adicional para mapa */
@media (max-width: 768px) {
    #interactive-map {
        height: 350px;
    }
    
    #selected-points-info,
    #route-info {
        padding: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

#calculate-route-btn[style*="display: none"] {
    display: none !important;
}

#calculate-route-btn[style*="display: inline-block"] {
    display: inline-block !important;
}

/* ========================================= */
/* OPTIMIZACIONES MOBILE - MÁRGENES REDUCIDOS */
/* ========================================= */

@media (max-width: 768px) {
    /* ELIMINAR completamente padding horizontal del contenedor principal */
    .container {
        padding-inline: 4px; /* ULTRA reducido para eliminar barras grises */
        max-width: 100%; /* Asegurar que use todo el ancho */
        width: 100%; /* Forzar ancho completo */
    }
    
    /* Reducir padding vertical de secciones principales */
    main > section {
        padding-block: clamp(2rem, 6vw, 3rem); /* Reducido de 4rem-6rem a 2rem-3rem */
    }
    
    /* Reducir márgenes de títulos de sección */
    .section-title {
        margin-bottom: 1.5rem; /* Reducido de 3rem a 1.5rem */
    }
    
    /* Optimizar padding de cards y elementos principales */
    .card, .card-modern, .quote-form {
        padding: 1rem; /* Reducido de padding más generosos */
        margin-bottom: 1rem; /* Reducido márgenes entre cards */
    }
    
    /* Optimizar hero section padding */
    .hero {
        padding: clamp(3rem, 8vw, 6rem) 12px; /* Reducido padding horizontal */
    }
    
    /* Reducir spacing en grids */
    .grid-3, .form-grid {
        gap: 1rem; /* Reducido gap entre elementos del grid */
    }
    
    /* Optimizar footer padding */
    .footer {
        padding: 2rem 0 1rem 0; /* Reducido de 50px a 2rem */
    }
    
    .footer-bottom {
        padding: 1rem 0; /* Reducido de 20px a 1rem */
    }
    
    /* Optimizar formularios */
    .form-group {
        margin-bottom: 0.75rem; /* Reducido spacing entre campos */
    }
    
    /* Reducir padding de botones */
    .btn, .btn-modern {
        padding: 0.75rem 1.25rem; /* Optimizado para mobile */
    }
    
    /* Optimizar testimonials */
    .testimonial-card {
        padding: 1.25rem; /* Reducido padding */
        margin-bottom: 1rem;
    }
    
    /* Reducir spacing de stats */
    .stats-grid {
        gap: 1rem; /* Reducido gap entre stats */
        margin: 1rem 0; /* Reducido margen vertical */
    }
    
    /* Optimizar elementos flotantes del hero */
    .hero-content {
        padding: 1.5rem 0; /* Reducido padding del contenido del hero */
    }
    
    /* Reducir padding de la sección de cotización */
    .quote-section {
        padding: 2rem 0; /* Reducido de más padding */
    }
    
    /* Optimizar mapa interactivo */
    #interactive-map-container {
        margin-top: 1rem; /* Reducido margen superior */
    }
    
    /* Reducir padding de elementos informativos */
    .badge {
        padding: 0.25rem 0.75rem; /* Optimizado para mobile */
        margin: 0.25rem;
    }
    
    /* Optimizar spacing de trust indicators */
    .hero .container > div:last-child {
        gap: 1rem; /* Reducido gap entre indicadores de confianza */
    }
}

/* ========================================= */
/* OPTIMIZACIONES AGRESIVAS - CONTENEDORES ANIDADOS */  
/* ========================================= */

/* Reducir padding específico de elementos problemáticos en mobile */
@media (max-width: 768px) {
    
    /* Glass cards - REDUCCIÓN AGRESIVA */
    .glass-card {
        padding: 1.25rem 0.75rem !important; /* Era 3rem 2rem - REDUCIDO 60% */
        margin-bottom: 1.5rem !important;    /* Era 4rem - REDUCIDO 62% */
    }
    
    /* Quote section - container interno ULTRA agresivo */
    .quote-section .container {
        padding-inline: 2px; /* EXTREMO - eliminar barras grises */
        width: 100vw; /* Usar viewport width completo */
        max-width: 100vw;
        margin-left: calc(-50vw + 50%); /* Centrar y expandir */
        margin-right: calc(-50vw + 50%);
    }
    
    /* Quote form - ajustar para compensar */
    .quote-form {
        padding-inline: 6px; /* Padding interno mínimo */
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Form steps - reducir padding interno */
    .form-step {
        padding: 0.5rem 0; /* Reducir padding entre pasos */
    }
    
    /* Stats grid - gap más agresivo */
    .stats-grid, 
    div[style*="grid-template-columns"][style*="gap: 2rem"] {
        gap: 0.75rem !important; /* Forzar gap más pequeño */
        margin-bottom: 1rem !important;
    }
    
    /* Trust badges section - menos padding */
    div[style*="padding-top: 2rem"] {
        padding-top: 1rem !important;
        margin-top: 1rem !important;
    }
    
    /* Vehicle options - más compacto */
    .vehicle-options {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .vehicle-card {
        padding: 0.75rem 0.5rem;
    }
    
    /* Form grid - más compacto */
    .form-grid {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Interactive map container - sin margin excesivo */
    #interactive-map-container {
        margin-top: 0.5rem;
    }
    
    /* Trip summary card - más compacto */
    #trip-summary-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Testimonials - más compacto */
    .testimonials .container {
        padding-inline: 8px;
    }
    
    .testimonial-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Footer grid - más compacto */
    .footer-grid {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-col {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    /* Services grid - más compacto */
    .grid-3 {
        gap: 0.75rem;
    }
    
    /* Hero trust indicators - más compacto */
    .hero div[style*="gap: 2rem"] {
        gap: 0.5rem !important;
        margin-top: 1rem !important;
    }
    
    /* Badge spacing más agresivo */
    .badge {
        padding: 0.2rem 0.5rem;
        margin: 0.1rem;
        font-size: 0.8rem;
    }
}

/* Optimizaciones adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    /* ULTRA EXTREMO - eliminar completamente las barras grises */
    .container {
        padding-inline: 2px; /* EXTREMO */
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }
    
    /* Ajustar body para evitar scroll horizontal */
    body {
        overflow-x: hidden;
    }
    
    /* Asegurar que todos los elementos usen el ancho completo */
    .quote-section, .section {
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Reducir aún más el padding vertical en móviles pequeños */
    main > section {
        padding-block: clamp(1rem, 4vw, 2rem); /* MÁS agresivo */
    }
    
    /* Optimizar hero para móviles pequeños */
    .hero {
        padding: clamp(1.5rem, 5vw, 3rem) 6px; /* MÁS agresivo */
    }
    
    /* Reducir padding de cards en móviles muy pequeños */
    .card, .card-modern, .quote-form {
        padding: 0.5rem; /* MÁS agresivo - era 0.75rem */
    }
    
    /* Glass cards ULTRA compactas y proporcionadas */
    .glass-card {
        width: auto !important;
        max-width: calc(100% - 4px) !important;
        padding: 0.75rem 0.5rem !important;
        margin: 0.5rem auto 1rem auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Elementos con background inline - típicos de la imagen */
    div[style*="background"][style*="padding"] {
        width: auto !important;
        max-width: calc(100% - 4px) !important;
        margin: 0.5rem auto !important;
        padding: 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    /* Cards específicas de información de viaje */
    div[style*="background: var(--color-gris-claro)"],
    div[style*="background:#"],
    div[style*="background-color"] {
        width: auto !important;
        min-width: 150px !important;
        max-width: calc(100% - 8px) !important;
        margin: 0.25rem auto !important;
        box-sizing: border-box !important;
    }
    
    /* Optimizar botones para pantallas pequeñas */
    .btn, .btn-modern {
        padding: 0.5rem 0.75rem; /* MÁS compacto */
        font-size: 0.85rem;
    }
    
    /* Stats grid ultra compacto */
    .stats-grid,
    div[style*="grid-template-columns"][style*="gap"] {
        gap: 0.5rem !important;
    }
    
    /* Form fields más compactos */
    .form-group {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    /* Section titles más compactos */
    .section-title {
        margin-bottom: 1rem;
        font-size: 1.5rem;
        width: 100%;
    }
    
    /* AJUSTAR CARDS/BOTONES PROPORCIONALMENTE */
    .card, .card-modern, .glass-card {
        width: auto; /* Permitir que se ajusten a contenido */
        max-width: calc(100% - 4px); /* Respecto al container */
        margin: 0.25rem auto; /* Centrar horizontalmente */
        padding: 0.75rem 1rem; /* Padding proporcionado */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Quote form específico - debe usar más ancho */
    .quote-form {
        width: calc(100% - 8px);
        max-width: calc(100% - 8px);
        margin: 0 auto;
        box-sizing: border-box;
        padding: 0.75rem;
    }
    
    /* CARDS DE INFORMACIÓN DE VIAJE - Proporcionales */
    div[style*="background"]:not(.quote-form) {
        width: auto !important;
        max-width: calc(100% - 8px) !important;
        margin: 0.5rem auto !important;
        padding: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        border-radius: 12px !important;
    }
    
    /* Vehicle options - grid mejorado */
    .vehicle-options {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .vehicle-card {
        width: auto;
        min-width: 200px;
        max-width: calc(100% - 16px);
        margin: 0 auto;
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Form grid - disposición vertical en mobile */
    .form-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    /* Stats grid - cards centradas y proporcionadas */
    .stats-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: center;
    }
    
    .stats-grid > div {
        width: auto;
        min-width: 150px;
        max-width: calc(100% - 16px);
        padding: 0.75rem;
        text-align: center;
    }
    
    /* Botones - ajustados a contenido */
    .btn, .btn-modern {
        width: auto;
        min-width: 120px;
        max-width: calc(100% - 16px);
        padding: 0.75rem 1.5rem;
        margin: 0.25rem auto;
        display: inline-block;
        text-align: center;
        box-sizing: border-box;
    }
    
    /* Asegurar que inputs y selects usen ancho completo */
    input, select, textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Mostrar texto corto en mobile */
    .mobile-text {
        display: inline !important;
    }
    
    .desktop-text {
        display: none !important;
    }
}

/* Control de visibilidad de textos desktop/mobile */
.mobile-text {
    display: none !important;
}

.desktop-text {
    display: inline !important;
}

/* Hide mobile emojis on desktop */
.mobile-emoji {
    display: none;
}

