/* ==========================================================================
   CSS DEFINITIVO v5.0: TRAMIGUAY S.A. de C.V. | UI Corporativa & SEO Logístico
   ========================================================================== */

:root {
    --primary-blue: #091a2f;
    --secondary-blue: #112d4e;
    --accent-green: #00ff88;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --glass-bg: rgba(17, 45, 78, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; background-color: var(--primary-blue); }
body { background-color: var(--primary-blue); color: var(--text-main); overflow-x: hidden; }

/* Utilidades */
.text-green { color: var(--accent-green); }
.text-blue { color: #3b82f6; }
.text-orange { color: #f59e0b; }
.w-100 { width: 100%; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary-blue); }
::-webkit-scrollbar-thumb { background: var(--secondary-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-green); }

/* Preloader */
#preloader { position: fixed; inset: 0; background: var(--primary-blue); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.loader-bus { font-size: 3rem; color: var(--accent-green); animation: bounceBus 1s infinite alternate; }
@keyframes bounceBus { from { transform: translateY(0); } to { transform: translateY(-20px); } }

/* Glassmorphism Classes */
.glass { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); }
.glass-green { background: linear-gradient(135deg, rgba(11, 37, 69, 0.9), rgba(0, 168, 107, 0.2)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(0, 255, 136, 0.3); border-radius: 20px; padding: 40px; text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.4); }

/* Status Banner */
.status-banner { background: #050e1a; padding: 8px 5%; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; border-bottom: 1px solid var(--glass-border); }
.status-left, .status-right a { display: flex; align-items: center; gap: 8px; color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.status-right a:hover { color: var(--accent-green); }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,255,136,0.7); } 70% { box-shadow: 0 0 0 10px rgba(0,255,136,0); } 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0); } }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; position: sticky; top: 10px; z-index: 1000; margin: 0 2%; border-radius: 20px; transition: all 0.3s; }
.logo h2 { color: #fff; font-size: 1.2rem; font-weight: 900; line-height: 1; }
.logo span { color: var(--accent-green); font-size: 0.9rem; font-weight: 600; letter-spacing: 1px; }
.nav-links { display: flex; gap: 25px; list-style: none; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-green); }

/* Buttons */
.btn { padding: 12px 24px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s; border: none; cursor: pointer; }
.btn-primary { background: var(--accent-green); color: var(--primary-blue); }
.btn-primary:hover { background: #00cc6d; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--text-main); color: var(--text-main); }
.btn-outline:hover { background: var(--text-main); color: var(--primary-blue); }
.btn-glow { border: 1px solid var(--accent-green); color: var(--accent-green); box-shadow: 0 0 15px rgba(0,255,136,0.2); }
.btn-glow:hover { background: var(--accent-green); color: var(--primary-blue); box-shadow: 0 0 25px rgba(0,255,136,0.4); }

/* Hero Section */
.hero { position: relative; padding: 120px 5% 100px; text-align: center; min-height: 80vh; display: flex; align-items: center; justify-content: center; background: url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=1500&auto=format&fit=crop') center/cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(9, 26, 47, 0.8), var(--primary-blue)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.pulse-badge { background: rgba(0, 255, 136, 0.1); border: 1px solid var(--accent-green); color: var(--accent-green); padding: 8px 16px; border-radius: 30px; font-size: 0.85rem; font-weight: 600; margin-bottom: 25px; display: inline-flex; align-items: center; gap: 8px; animation: pulse 2s infinite; }
.hero-content h1 { font-size: 3.5rem; color: #fff; line-height: 1.1; margin-bottom: 20px; font-weight: 900; }
.hero-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 35px; }
.hero-buttons { display: flex; justify-content: center; gap: 15px; }

/* Modulo Tarifario */
.tariff-banner { padding: 0 5%; margin-top: -60px; position: relative; z-index: 5; margin-bottom: 60px; }
.tariff-header h2 { color: #fff; font-size: 2rem; margin-bottom: 5px; }
.tariff-header p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; }
.tooltip-icon { font-size: 2.5rem; color: var(--accent-green); margin-bottom: 10px; }
.tariff-cards { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.t-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 25px 40px; border-radius: 15px; min-width: 280px; transition: transform 0.3s; }
.t-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.3); }
.t-card.special { background: rgba(0, 255, 136, 0.05); border: 1px solid rgba(0, 255, 136, 0.2); position: relative; }
.badge-ac { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent-green); color: var(--primary-blue); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 900; white-space: nowrap; }
.t-type { display: block; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; margin-bottom: 5px; font-weight: bold; }
.t-price { display: block; font-size: 3.5rem; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 10px; }
.t-card.special .t-price { color: var(--accent-green); }
.t-desc { color: #aaa; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.vmt-link-btn { display: inline-flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.3); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; transition: background 0.3s; }
.vmt-link-btn:hover { background: rgba(0, 255, 136, 0.2); color: var(--accent-green); }

/* Módulo Inteligencia Logística (NUEVO) */
.logistics-section { padding: 20px 5% 80px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2.2rem; color: #fff; margin-bottom: 10px; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.logistics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.alert-card { padding: 30px; border-left: 4px solid var(--accent-green); transition: transform 0.3s; }
.alert-card:hover { transform: translateY(-5px); }
.alert-card:nth-child(1) { border-left-color: #3b82f6; } /* AM Azul */
.alert-card:nth-child(2) { border-left-color: #f59e0b; } /* PM Naranja */
.alert-icon { font-size: 2rem; margin-bottom: 15px; }
.alert-card h3 { color: #fff; font-size: 1.3rem; margin-bottom: 15px; }
.alert-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.alert-card strong { color: #fff; }
.alert-card em { color: var(--accent-green); font-style: normal; font-weight: bold; display: block; margin-top: 10px; }

/* Map Section & Grid */
.map-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: stretch; padding: 0 5% 80px; }
.map-wrapper { position: relative; padding: 10px; }
#map-container { height: 100%; min-height: 600px; width: 100%; border-radius: 12px; z-index: 1; background: #112d4e; }
.map-overlay-info { position: absolute; bottom: 20px; left: 20px; z-index: 10; background: rgba(9, 26, 47, 0.9); padding: 10px 15px; border-radius: 8px; display: flex; gap: 15px; font-size: 0.85rem; border: 1px solid var(--glass-border); }

/* Card de Nodos Ampliada (SEO) */
.detail-card { padding: 30px; text-align: left; display: flex; flex-direction: column; }
.card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; }
.card-header i { font-size: 1.5rem; color: var(--accent-green); }
.card-header h3 { color: #fff; font-size: 1.3rem; }
.route-stops { list-style: none; overflow-y: auto; padding-right: 10px; flex-grow: 1; max-height: 600px; }
.extended-stops li { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: flex-start; gap: 15px; }
.extended-stops li i { color: var(--accent-green); margin-top: 3px; font-size: 1.1rem; }
.extended-stops li div { display: flex; flex-direction: column; gap: 5px; }
.extended-stops li strong { color: #fff; font-size: 1.05rem; }
.highlight-text { color: var(--accent-green) !important; font-weight: 900; }
.coverage-area { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }
.coverage-area i { color: #3b82f6 !important; font-size: 0.8rem !important; margin-right: 5px; }
.coverage-area strong { color: #e2e8f0; font-size: 0.85rem !important; }

/* Modal Privado */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(5px); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-glass { background: var(--secondary-blue); border: 1px solid var(--glass-border); padding: 40px; border-radius: 16px; width: 90%; max-width: 400px; position: relative; transform: translateY(20px); transition: all 0.3s; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-overlay.active .modal-glass { transform: translateY(0); }
.close-btn { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.close-btn:hover { color: #ff4757; }
.modal-header { text-align: center; margin-bottom: 30px; }
.modal-header i { font-size: 2.5rem; color: #3b82f6; margin-bottom: 10px; }
.modal-header h3 { color: #fff; font-size: 1.5rem; }
.modal-header p { color: var(--text-muted); font-size: 0.9rem; }
.input-group { position: relative; margin-bottom: 20px; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-group input { width: 100%; padding: 15px 15px 15px 45px; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 8px; color: #fff; font-size: 1rem; outline: none; transition: border 0.3s; }
.input-group input:focus { border-color: #3b82f6; }

/* Botón Flotante WhatsApp */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: #fff; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 10000; transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.1) rotate(10deg); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6); color: #fff; }

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

/* Footer */
footer { text-align: center; padding: 30px; border-top: 1px solid var(--glass-border); background: #050e1a; }
.developer-credit strong { color: var(--accent-green); }

/* Responsive Mobile */
@media (max-width: 992px) {
    .map-grid { grid-template-columns: 1fr; padding: 0 5% 40px; }
    #map-container { min-height: 400px; }
    .tariff-cards { flex-direction: column; align-items: center; }
    .t-card { width: 100%; max-width: 320px; }
}
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; border-radius: 0; margin: 0; }
    .hero-content h1 { font-size: 2.2rem; }
    .status-left span:last-child { display: none; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 1.8rem; }
}
