/* ===== VARIABLES ACTUALIZADAS ===== */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #457b9d;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
  
  --success: #28a745;
  --warning: #ffc107;
  --info: #17a2b8;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== TOPBAR ===== */
.topbar {
  background-color: var(--secondary);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-phone, .topbar-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-phone a {
  color: #f1faee;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}

.topbar-phone a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  font-size: 0.8rem;
}

.topbar-social a:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== HEADER ===== */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--light-gray);
  transition: var(--transition);
}

.logo:hover img {
  border-color: var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--secondary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1;
  font-weight: 500;
}

/* ===== MENÚ HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== NAVEGACIÓN ===== */
.nav {
  transition: var(--transition);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-link {
  font-weight: 600;
  position: relative;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--dark);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(230, 57, 70, 0.4);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
  flex: 1;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
  position: relative;
}

.page-header {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary) 0%, #2a4a7a 50%, var(--accent) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-weight: 800;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #f1faee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* ===== SECCIONES GENERALES ===== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  color: var(--secondary);
  margin-bottom: 50px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 2px;
}

/* ===== SECCIÓN HORARIOS ===== */
.schedule-section {
  background-color: var(--white);
  position: relative;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
}

.schedule-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.schedule-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
}

.schedule-card:hover {
  transform: translateY(-12px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.schedule-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 25px;
  transition: all 0.4s ease;
}

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

.schedule-card h3 {
  margin-bottom: 18px;
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 800;
  position: relative;
}

.schedule-card .time {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
  line-height: 1.2;
}

.schedule-card .days {
  color: var(--gray);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ===== SECCIÓN RUTAS ===== */
.routes-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
  position: relative;
}

.routes-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--light-gray) 50%, transparent 100%);
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

.route-item {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--primary);
}

.route-item::before {
  content: '📍';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 1.4rem;
}

.route-item:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.route-item span {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.2rem;
  display: block;
  padding-left: 30px;
}

/* ===== INFORMACIÓN ADICIONAL ===== */
.info-section {
  background-color: var(--white);
  position: relative;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--primary);
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.info-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 25px;
  transition: all 0.4s ease;
}

.info-card:hover i {
  transform: scale(1.1);
}

.info-card h3 {
  margin-bottom: 18px;
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 800;
}

.info-card p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a2d4a 100%);
  color: var(--light);
  padding: 80px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(230, 57, 70, 0.05) 0%, transparent 50%);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.footer-section:first-child {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.footer-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.footer-logo:hover img {
  border-color: var(--primary);
  transform: rotate(5deg);
}

.footer-logo span {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  background: linear-gradient(135deg, #ffffff 0%, #a8dadc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-section p {
  margin-bottom: 25px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: 25px;
  font-size: 1.3rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-contact p:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer-contact a {
  color: #e2e8f0;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* ===== ANIMACIONES ===== */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .schedule-grid,
  .routes-grid,
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .footer-section:first-child {
    grid-column: 1 / -1;
    text-align: center;
    max-width: none;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 100px 30px 30px;
    transition: right 0.3s ease;
    z-index: 999;
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 1.1rem;
    width: 100%;
  }
  
  .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
  
  .nav-cta {
    margin-top: 20px;
    text-align: center;
    padding: 12px 20px !important;
    display: block;
    width: 100%;
  }

  .page-header {
    padding: 60px 0;
  }
  
  .page-header h1 {
    font-size: 2.2rem;
  }
  
  .page-header p {
    font-size: 1.1rem;
  }
  
  section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .schedule-grid,
  .routes-grid,
  .info-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .schedule-card,
  .info-card {
    padding: 30px 20px;
  }
  
  .route-item {
    padding: 20px;
    text-align: left;
    padding-left: 50px;
  }
  
  .route-item::before {
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-contact p {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .schedule-card .time {
    font-size: 1.5rem;
  }
  
  .route-item span {
    font-size: 1.1rem;
  }
}

/* ===== REDUCCIÓN DE MOVIMIENTO ===== */
@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;
  }
}