/* Estilos principales - tema café (totalmente responsive) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #F4A460;
    --text-primary: #2C1810;
    --text-secondary: #5D4E37;
    --background-light: #FFF8F0;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Tipografía y fondo */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    font-size: clamp(14px, 2.5vw, 16px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #6B3410;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 8px 16px;
    font-size: clamp(13px, 2vw, 14px);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-small {
    padding: 8px 16px;
    font-size: clamp(13px, 2vw, 14px);
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo h1 {
    color: var(--primary-color);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    margin: 0;
}

.logo span {
    color: var(--secondary-color);
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    display: block;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    font-size: clamp(14px, 2vw, 16px);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.btn-register:hover {
    background-color: #6B3410;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 2rem 60px;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--white) 100%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: clamp(1.5rem, 5vw, 3rem);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--text-secondary);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Search Section */
.search-section {
    padding: clamp(40px, 8vw, 60px) 0;
    background-color: var(--background-light);
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--white);
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: clamp(14px, 2.5vw, 1rem);
}

.search-bar input::placeholder {
    color: #999;
}

.search-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: clamp(14px, 2.5vw, 16px);
}

.search-btn:hover {
    background-color: #6B3410;
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Map Preview */
.map-preview {
    padding: clamp(50px, 10vw, 80px) 0;
}

.map-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.map-container {
    position: relative;
    height: clamp(300px, 50vw, 400px);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#map {
    height: 100%;
    width: 100%;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.map-popup {
    text-align: center;
    min-width: 200px;
}

.map-popup h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: clamp(14px, 3vw, 16px);
}

.map-popup p {
    margin: 5px 0;
    font-size: clamp(12px, 2.5vw, 14px);
}

.user-location-marker {
    font-size: clamp(20px, 4vw, 24px);
    text-align: center;
}

/* Featured Cafeterias */
.featured-cafeterias {
    padding: clamp(50px, 10vw, 80px) 0;
    background-color: var(--background-light);
}

.featured-cafeterias h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.cafeterias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cafe-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.cafe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cafe-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cafe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cafe-card:hover .cafe-image img {
    transform: scale(1.05);
}

.cafe-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 600;
}

.rating-star {
    color: #FFD700;
}

.cafe-info {
    padding: 1.5rem;
}

.cafe-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.cafe-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

/* Popular Routes */
.popular-routes {
    padding: clamp(50px, 10vw, 80px) 0;
}

.popular-routes h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.route-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.route-icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: 1rem;
}

.route-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.route-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

/* How it Works */
.how-it-works {
    padding: clamp(50px, 10vw, 80px) 0;
    background-color: var(--background-light);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: clamp(50px, 10vw, 60px);
    height: clamp(50px, 10vw, 60px);
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.step p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

/* CTA Section */
.cta-section {
    padding: clamp(50px, 10vw, 80px) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.cta-section .btn-primary:hover {
    background-color: var(--background-light);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: var(--white);
    padding: clamp(40px, 8vw, 60px) 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section h3 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.footer-section h4 {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: clamp(13px, 2vw, 15px);
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(12px, 2vw, 14px);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modals y tarjetas auxiliares */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 15px;
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 720px;
    width: 95%;
    padding: 20px;
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

/* Formulario de edición / perfil */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Tabla genérica */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 600px;
}

.table th,
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: clamp(13px, 2vw, 14px);
}

.table th {
    background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    color: var(--text-secondary);
    font-weight: 600;
}

/* Badges / labels */
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: clamp(11px, 2vw, 12px);
    font-weight: 600;
    background: var(--background-light);
    color: var(--text-secondary);
}

.badge--primary {
    background: var(--primary-color);
    color: var(--white);
}

/* Small utilities */
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.6s ease-out; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* =============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================
   FOCUS STATES PARA ACCESIBILIDAD
   ============================================= */
.btn:focus,
.search-btn:focus,
.nav-menu a:focus,
.search-bar input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =============================================
   UTILIDADES RESPONSIVE
   ============================================= */
.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block;
    }
}

.hide-tablet {
    display: block;
}

@media (max-width: 1024px) {
    .hide-tablet {
        display: none;
    }
}

/* =============================================
   MEJORAS DE RENDIMIENTO
   ============================================= */
@media (max-width: 768px) {
    /* Reducir complejidad de sombras en móviles */
    .cafe-card,
    .route-card,
    .step,
    .card,
    .modal {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Simplificar transiciones */
    * {
        transition-duration: 0.2s !important;
    }
}

/* =============================================
   GRID RESPONSIVE AVANZADO
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .cafeterias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .routes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   OPTIMIZACIÓN DE IMÁGENES
   ============================================= */
@media (max-width: 768px) {
    .hero-image img,
    .cafe-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* =============================================
   SAFE AREA PARA NOTCH (iPhone X+)
   ============================================= */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .nav-menu {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .header,
    .nav-menu,
    .hamburger,
    .hero-actions,
    .cta-section,
    .footer {
        display: none !important;
    }

    body {
        background: white;
    }

    .hero,
    .featured-cafeterias,
    .popular-routes,
    .how-it-works {
        padding: 20px 0;
    }

    .cafe-card,
    .route-card,
    .step {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* =============================================
   DARK MODE SUPPORT (OPCIONAL)
   ============================================= */
@media (prefers-color-scheme: dark) {
    /* Si decides implementar modo oscuro en el futuro */
    /* Descomentar y ajustar según necesidad
    :root {
        --primary-color: #A0522D;
        --text-primary: #F5F5F5;
        --background-light: #1A1A1A;
        --white: #2C2C2C;
    }
    */
}

/* =============================================
   MEJORAS PARA TABLETS EN LANDSCAPE
   ============================================= */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 100px 2rem 50px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .cafeterias-grid,
    .routes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================
   OPTIMIZACIÓN DE TOUCH TARGETS
   ============================================= */
@media (max-width: 768px) {
    /* Garantizar mínimo 44x44px para elementos táctiles */
    .btn,
    .search-btn,
    .nav-menu a,
    .hamburger {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu a {
        width: 100%;
        padding: 12px 24px;
    }
}

/* =============================================
   MEJORAS DE CONTRASTE
   ============================================= */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #6B3410;
        border: 2px solid var(--text-primary);
    }

    .nav-menu a {
        color: #000;
        font-weight: 600;
    }

    .hero-title,
    .featured-cafeterias h2,
    .popular-routes h2,
    .how-it-works h2 {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }
}

/* =============================================
   ANIMACIONES DE CARGA PROGRESIVA
   ============================================= */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   MEJORAS PARA NAVEGADORES ANTIGUOS
   ============================================= */
@supports not (display: grid) {
    .cafeterias-grid,
    .routes-grid,
    .steps,
    .footer-content {
        display: flex;
        flex-wrap: wrap;
    }

    .cafe-card,
    .route-card,
    .step,
    .footer-section {
        flex: 1 1 300px;
        margin: 10px;
    }
}

/* =============================================
   SCROLL SNAP PARA SECCIONES (OPCIONAL)
   ============================================= */
@media (min-width: 769px) {
    /* Si quieres efecto de scroll snap en desktop
    html {
        scroll-snap-type: y proximity;
    }

    section {
        scroll-snap-align: start;
    }
    */
}

/* =============================================
   FIN DEL ARCHIVO - TOTALMENTE RESPONSIVE
   ============================================= ========================
   RESPONSIVE - TABLETS
   ============================================= */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    
    .nav-container { padding: 1rem 1.5rem; }
    
    .hamburger { display: flex; }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 1rem 0; }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 1.5rem 40px;
    }

    .hero-content { 
        margin-bottom: 2rem;
        max-width: 100%;
    }
    
    .hero-actions { 
        flex-direction: column; 
        align-items: center; 
        gap: 1rem; 
    }
    
    .hero-actions .btn { 
        width: 100%; 
        max-width: 300px; 
    }
    
    .hero-stats { 
        justify-content: center; 
        gap: 2rem; 
    }

    .search-bar { 
        flex-direction: column;
        width: 100%;
    }
    
    .search-btn { 
        padding: 15px 20px; 
        width: 100%;
    }

    .map-controls { 
        flex-direction: column; 
        top: 10px; 
        right: 10px; 
        gap: 5px; 
    }

    .cafeterias-grid { 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .routes-grid { 
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .steps { 
        grid-template-columns: 1fr; 
    }

    .footer-content { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    .social-links { 
        justify-content: center; 
    }

    .cta-section .btn {
        width: 100%;
        max-width: 300px;
    }

    .modal {
        width: 98%;
        padding: 15px;
        max-height: 85vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }
}

/* =============================================
   RESPONSIVE - MÓVILES
   ============================================= */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    
    .nav-container { padding: 1rem; }
    
    .nav-menu { top: 65px; }

    .hero { padding: 90px 1rem 30px; }
    
    .hero-actions { gap: 0.8rem; }
    
    .hero-stats { 
        gap: 1.5rem;
        justify-content: space-around;
        width: 100%;
    }

    .btn { 
        padding: 10px 20px; 
    }

    .map-container { 
        height: 280px; 
        border-radius: 6px;
    }

    .cafe-info, .route-card, .step { 
        padding: 1.2rem; 
    }

    .cafeterias-grid { 
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .routes-grid { 
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-bar {
        border-radius: 6px;
    }

    .search-bar input {
        padding: 12px 15px;
    }

    .search-btn {
        padding: 12px 20px;
    }

    .modal {
        padding: 12px;
    }

    .table {
        min-width: 500px;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
    }

    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
}

/* =============================================
   RESPONSIVE - MÓVILES PEQUEÑOS
   ============================================= */
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    
    .nav-container { padding: 0.8rem; }

    .hero { padding: 85px 0.8rem 25px; }

    .hero-stats { gap: 1rem; }

    .btn { 
        padding: 9px 18px; 
        font-size: 13px;
    }

    .cafe-info, .route-card, .step { 
        padding: 1rem; 
    }

    .map-container { height: 250px; }

    .search-bar input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .search-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .table {
        min-width: 450px;
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
    }
}

/* =============================================
   OPTIMIZACIÓN PARA PANTALLAS TÁCTILES
   ============================================= */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
    }

    .nav-menu a:active {
        color: var(--primary-color);
        background-color: var(--background-light);
    }

    .cafe-card:active {
        transform: translateY(-3px);
    }

    .route-card:active {
        transform: translateY(-3px);
    }

    /* Desactivar hover en móviles */
    .btn:hover,
    .cafe-card:hover,
    .route-card:hover {
        transform: none;
    }

    .cafe-card:hover .cafe-image img {
        transform: none;
    }

    /* Áreas táctiles más grandes */
    .nav-menu a {
        padding: 12px 20px;
    }

    .hamburger {
        padding: 8px;
    }
}

/* =============================================
   LANDSCAPE MODE EN MÓVILES
   ============================================= */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 1rem 30px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .nav-menu {
        top: 60px;
        padding: 1rem 0;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }
}

/* =====================