:root {
  --blue: #00a8e8;
  --blue-glow: rgba(0, 168, 232, 0.08);
  --blue-dark: #0077b6;
  --cyan: #00e5ff;
  --orange: #f57c00;
  --dark: #111827;
  --dark-card: #ffffff;
  --dark-surface: #f8fafc;
  --dark-border: rgba(0, 0, 0, 0.06);
  --white: #111827;
  --gray-100: #f0f0f5;
  --gray-300: #4b5563;
  --gray-500: #6b7280;
  --gradient-blue: linear-gradient(135deg, #00a8e8, #0077b6);
  --gradient-hero: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-300);
  line-height: 1.7;
  background: #f8fafc;
  overflow-x: hidden;
}

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }

/* ---- Header ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border);
  transition: background 0.3s;
}

header .logo {
  height: 32px;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--blue-dark);
  background: rgba(0, 168, 232, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark);
  cursor: pointer;
  padding: 0.5rem;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 6rem;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 168, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 232, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}

.hero-glow-1 {
  top: -200px;
  right: -100px;
  background: var(--blue);
}

.hero-glow-2 {
  bottom: -200px;
  left: -100px;
  background: var(--blue-dark);
}

.hero-content {
  position: relative;
  max-width: 900px;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 168, 232, 0.1);
  border: 1px solid rgba(0, 168, 232, 0.2);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-logo {
  display: block;
  width: clamp(280px, 50vw, 500px);
  height: auto;
  margin: 0 auto 1rem;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--gray-300);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero .extra-text {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-tagline {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(0, 168, 232, 0.25);
  border-bottom: 1px solid rgba(0, 168, 232, 0.25);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 168, 232, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 168, 232, 0.4);
}

.btn-secondary {
  background: #ffffff;
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover {
  background: #f0f4f8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---- Sections common ---- */
.section {
  padding: 7rem 2rem;
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.section-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-300);
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-blue);
  border-radius: 2px;
  margin: 3rem 0;
}

/* ---- Project Section ---- */
.project-section {
  background: #ffffff;
  border-top: 1px solid var(--dark-border);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.project-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.highlight-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.highlight-card:hover {
  border-color: rgba(0, 168, 232, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 168, 232, 0.08);
}

.highlight-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.highlight-card .icon svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.highlight-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.highlight-card p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ---- System Modes (Project Section) ---- */
.subsection-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.system-modes {
  display: grid;
  gap: 0.75rem;
}

.mode-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--gray-300);
  transition: border-color 0.2s;
}

.mode-item:hover {
  border-color: rgba(0, 168, 232, 0.3);
}

.mode-icon {
  font-size: 1.3rem;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.mode-name {
  color: var(--gray-500);
  font-size: 0.85rem;
}

/* ---- Investment Banner ---- */
.investment-banner {
  margin-top: 4rem;
  background: linear-gradient(135deg, #0077b6, #00a8e8);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
}

.investment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.investment-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.investment-amount {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.investment-detail {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* ---- Lines Section ---- */
.lines-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.lines-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.lines-intro .section-title {
  margin-left: auto;
  margin-right: auto;
}

.lines-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lines-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lines-table th {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.lines-table td {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-300);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.lines-table tbody tr:hover {
  background: rgba(0, 168, 232, 0.03);
}

.lines-table tfoot td {
  background: #f8fafc;
  font-size: 0.95rem;
  border-top: 2px solid rgba(0, 168, 232, 0.2);
  border-bottom: none;
}

.line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ---- Phases Section ---- */
.phases-section {
  background: #ffffff;
  border-top: 1px solid var(--dark-border);
}

.phases-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.phases-intro .section-title {
  margin-left: auto;
  margin-right: auto;
}

.phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.phase-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.phase-card:hover {
  border-color: rgba(0, 168, 232, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 168, 232, 0.08);
}

.phase-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-blue);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.phase-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phase-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0, 168, 232, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.phase-lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.phase-lines li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-300);
}

.line-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

@media (max-width: 968px) {
  .phases-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .investment-banner {
    padding: 2rem 1.5rem;
  }

  .lines-table th,
  .lines-table td {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .lines-table th:nth-child(4),
  .lines-table td:nth-child(4) {
    display: none;
  }
}

/* ---- Stations Section ---- */
.stations-section {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.stations-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.stations-intro .section-title {
  margin-left: auto;
  margin-right: auto;
}

.stations-traits {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.trait {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-300);
}

.trait .dot {
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
}

/* ---- Station Cards ---- */
.station-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.station-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.station-card:hover {
  border-color: rgba(0, 168, 232, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 40px rgba(0, 168, 232, 0.06);
}

.station-card-visual {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.station-card-visual .station-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-card-visual .station-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.station-bg-gradient {
  position: absolute;
  inset: 0;
}

.station-card-visual .station-label {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--blue-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  z-index: 2;
}

.station-card-visual svg.station-icon {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  opacity: 0.25;
  color: var(--blue-dark);
}

.station-card-body {
  padding: 1.75rem;
}

.station-card-body h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.station-card-body p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.7;
}

/* Station gradient themes */
.station-centro .station-bg-gradient {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 40%, #e0f2fe 100%);
}
.station-costanera .station-bg-gradient {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 40%, #dbeafe 100%);
}
.station-sanlorenzo .station-bg-gradient {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 40%, #e0e7ff 100%);
}
.station-luque .station-bg-gradient {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 40%, #ede9fe 100%);
}

/* Decorative lines inside station visuals */
.station-card-visual .deco-line {
  position: absolute;
  background: var(--blue);
  opacity: 0.15;
  z-index: 1;
}

.station-card-visual .deco-line-h {
  height: 1px;
  width: 100%;
  top: 50%;
}

.station-card-visual .deco-line-v {
  width: 1px;
  height: 100%;
  left: 50%;
}

.station-card-visual .deco-circle {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 168, 232, 0.2);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.station-card-visual .deco-circle-sm {
  width: 60px;
  height: 60px;
}

.station-card-visual .deco-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 168, 232, 0.4);
}

/* ---- Map Section ---- */
.map-section {
  background: #ffffff;
  border-top: 1px solid var(--dark-border);
}

.map-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.map-intro .section-title {
  margin-left: auto;
  margin-right: auto;
}

#map {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  border: 1px solid var(--dark-border);
  overflow: hidden;
  z-index: 1;
}

.station-marker {
  background: none;
  border: none;
}

.station-marker-inner {
  width: 20px;
  height: 20px;
  background: var(--blue);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 168, 232, 0.4), 0 0 0 3px rgba(0, 168, 232, 0.2);
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.leaflet-popup-content {
  margin: 0.75rem 1rem;
  line-height: 1.5;
}

.leaflet-popup-content strong {
  color: var(--dark);
  font-weight: 700;
}

@media (max-width: 768px) {
  #map {
    height: 350px;
    border-radius: 12px;
  }
}

/* ---- Final Section ---- */
.final-section {
  text-align: center;
  background: #f8fafc;
  padding: 8rem 2rem;
}

.final-section .section-title {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

.final-section .section-text {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

/* ---- Footer ---- */
footer {
  background: #f1f5f9;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--dark-border);
}

footer img {
  height: 36px;
  margin-bottom: 1rem;
  opacity: 0.7;
}

footer p {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .station-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 7rem 1.5rem 4rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--dark-border);
  }

  nav.open {
    display: flex;
  }

  nav a {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .project-highlights {
    grid-template-columns: 1fr;
  }

  .station-card-visual {
    height: 160px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .stations-traits {
    gap: 1rem;
  }

  .final-section {
    padding: 5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .station-cards {
    gap: 1rem;
  }

  .station-card-body {
    padding: 1.25rem;
  }

  .station-card-body h3 {
    font-size: 1.1rem;
  }
}
