/* Variables CSS */
:root {
    /* Colores */
    --primary-color: #eb2525;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --danger-color: #ffffff;
    --success-color: #10b981;
    
    /* Tipografía */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;
    
    /* Bordes */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 2rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #0da271;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.logo-img {
    height: 40px;
}

.logo-highlight {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    padding: var(--spacing-xs) 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding-top: 100px;
    padding-bottom: var(--spacing-xxl);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: var(--spacing-lg);
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

/* Secciones comunes */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    padding: var(--spacing-xxl) 0;
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    color: var(--primary-color);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.service-description {
    color: var(--gray-color);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.service-features {
    margin-bottom: var(--spacing-md);
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.service-features i {
    color: var(--success-color);
}

/* Courses Section */
.courses {
    padding: var(--spacing-xxl) 0;
    background-color: #f8fafc;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.course-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card.featured {
    transform: scale(1.05);
    border: 2px solid var(--primary-color);
    position: relative;
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.course-header {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
}

.course-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.course-price {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.price-note {
    font-size: 0.9rem;
    opacity: 0.9;
}

.course-content {
    padding: var(--spacing-lg);
    flex-grow: 1;
}

.course-description {
    color: var(--gray-color);
    margin-bottom: var(--spacing-md);
}

.course-features {
    margin-bottom: var(--spacing-md);
}

.course-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.course-features i {
    color: var(--success-color);
}

.course-footer {
    padding: var(--spacing-lg);
    padding-top: 0;
}

/* Testimonials Section */
.testimonials {
    padding: var(--spacing-xxl) 0;
    background-color: white;
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.testimonial-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-light);
}

.testimonial-rating {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.testimonial-text {
    font-style: italic;
    color: var(--dark-color);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.author-avatar {
    font-size: 2.5rem;
    color: var(--gray-light);
}

.author-name {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.author-course {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Contact Section */
.contact {
    padding: var(--spacing-xxl) 0;
    background-color: #f8fafc;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-text {
    color: var(--gray-color);
    line-height: 1.6;
}

.contact-text a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--primary-dark);
}

/* Formulario */
.contact-form-container {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

.checkbox-group input {
    margin-top: 0.25rem;
}

.checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-note {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--gray-color);
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo .logo-text {
    color: white;
}

.footer-description {
    margin: var(--spacing-md) 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: #cbd5e1;
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-legal a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}
/*mapa*/
/* Sección Mapa y Sedes */
.map-section {
    background-color: white;
    padding: 80px 0;
}

.map-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 40px;
    height: 600px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.locations-sidebar {
    background-color: var(--light-color);
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.locations-sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.locations-sidebar h3 i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.locations-sidebar > p {
    color: var(--gray-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.locations-list {
    flex-grow: 1;
}

.location-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
}

.location-item.active {
    border-left-color: var(--secondary-color);
    background-color: rgba(231, 76, 60, 0.05);
    transform: translateX(5px);
}

.location-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.location-info h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.location-info h4 i {
    color: var(--secondary-color);
    margin-right: 8px;
    font-size: 0.9rem;
}

.location-info p {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.location-info p i {
    width: 16px;
    margin-right: 8px;
    color: var(--accent-color);
}

.btn-location-select {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    width: 100%;
}

.btn-location-select:hover {
    background-color: #2980b9;
}

.map-legend {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.map-legend h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.map-legend h4 i {
    color: var(--secondary-color);
    margin-right: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.map-wrapper {
    position: relative;
    height: 100%;
}

#autoescuelaMap {
    height: 100%;
    width: 100%;
    z-index: 1;
    min-height: 400px; /* Altura mínima para asegurar que se vea */
}

/* Corregir estilos del mapa de Leaflet */
#autoescuelaMap.leaflet-container {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-map-control {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-map-control:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Estilos para los popups del mapa */
.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.leaflet-popup-content {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    margin: 15px 20px;
}

.leaflet-popup-content h3 {
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.leaflet-popup-content p {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.leaflet-popup-content i {
    width: 16px;
    margin-right: 8px;
    color: var(--accent-color);
}

.leaflet-popup-content a {
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .hero .container,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .course-card.featured {
        transform: none;
    }
    .map-container {
        grid-template-columns: 1fr;
        height: 900px;
    }
    
    .map-wrapper {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: var(--spacing-xl) 0;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .services-grid,
    .courses-grid,
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
}
/* Prevenir scroll horizontal y mejorar experiencia táctil */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Mejorar botones para touch en móvil */
@media (max-width: 768px) {
    .btn, 
    .nav-link,
    .menu-toggle,
    input[type="submit"],
    button {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Asegurar que el contenido no se salga */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
    }
    
    /* Mejorar textos para lectura en móvil */
    p, li, .contact-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}