/* Core Variables */
:root {
  --primary-color: #CC1C1C;
  --bg-color: #000000;
  --bg-dark: #121212;
  --surface-color: #1E1E1E;
  --text-color: #FFFFFF;
  --text-muted: #AAAAAA;
  --transition-speed: 0.3s;
}

/* Global Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.btn-outline-nav {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 8px 20px;
  font-size: 0.9rem;
  border-radius: 4px;
}

.nav-links .btn-outline-nav:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background-color var(--transition-speed);
}

.navbar.scrolled {
  background-color: var(--bg-color);
  padding: 15px 5%;
}

/* Hamburger button — oculto en desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 6px 8px;
  z-index: 1002;
  line-height: 1;
}

/* Overlay oscuro detrás del menú móvil */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  backdrop-filter: blur(2px);
}

.logo-container img {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  transition: color var(--transition-speed);
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  background-color: #1a0000;
  background-image: url('./assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: 20px;
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 40px;
  color: #DDDDDD;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Sections General */
section {
  padding: 80px 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  font-weight: 700;
}

.section-title span {
  color: var(--primary-color);
}

/* Aliados / Partners Carousel */
.aliados {
  background-color: var(--bg-color);
  overflow: hidden;
}

.slider {
  height: 120px;
  margin: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slider::before,
.slider::after {
  background: linear-gradient(to right, var(--bg-color) 0%, rgba(0, 0, 0, 0) 100%);
  content: "";
  height: 120px;
  position: absolute;
  width: 100px;
  z-index: 2;
}

.slider::after {
  right: 0;
  top: 0;
  transform: rotateZ(180deg);
}

.slider::before {
  left: 0;
  top: 0;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-250px * 6));
  }
}

.slide-track {
  animation: scroll 22s linear infinite;
  display: flex;
  width: calc(250px * 18);
}

.slide {
  height: 100px;
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.slide img {
  max-height: 80px;
  max-width: 100%;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 0.3s;
}

.slide img:hover {
  transform: scale(1.1);
}

/* Services */
.servicios {
  background-color: var(--bg-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

/* Row 1: 3 cards, each span 2 of 6 columns */
.service-card:nth-child(-n+3) {
  grid-column: span 2;
}

/* Row 2: 2 cards centered (columns 2-4 and 4-6, leaving col 1 and 6 empty) */
.service-card:nth-child(4) {
  grid-column: 2 / 4;
}

.service-card:nth-child(5) {
  grid-column: 4 / 6;
}

.service-card {
  background-color: var(--surface-color);
  padding: 40px;
  border-radius: 8px;
  transition: all var(--transition-speed);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.service-card p {
  flex: 1;
}

.btn-service {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 24px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all var(--transition-speed);
}

.btn-service:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(204, 28, 28, 0.3);
  box-shadow: 0 10px 30px rgba(204, 28, 28, 0.1);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-muted);
}

/* Technology */
.tecnologia {
  background-color: var(--bg-color);
}

.tech-header {
  text-align: center;
  margin-bottom: 20px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-top: -40px;
  margin-bottom: 60px;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tech-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tech-features-left,
.tech-features-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 350px;
}

.tech-features-left {
  text-align: right;
  align-items: flex-end;
}

.tech-features-right {
  text-align: left;
  align-items: flex-start;
}

.tech-image-center {
  flex: 0 0 auto;
  width: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 20px;
}

.app-mockup-large {
  width: 100%;
  height: auto;
  max-width: 420px;
  filter: drop-shadow(0 10px 40px rgba(204, 28, 28, 0.25)) drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
  border-radius: 16px;
}

.tech-feature {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

.tech-features-left .tech-feature {
  flex-direction: row-reverse;
}

.feature-icon {
  font-size: 1.4rem;
  color: var(--primary-color);
  background: rgba(204, 28, 28, 0.1);
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(204, 28, 28, 0.2);
}

.tech-feature h3 {
  font-size: 1.1rem;
  color: #fff;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.tech-feature p {
  font-size: 0.9rem;
  color: #bbb;
  margin: 0;
  line-height: 1.5;
}

/* Convenios */
.convenios {
  background-color: var(--bg-dark);
}

.convenios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.convenio-card {
  background-color: #161616;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.convenio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(204, 28, 28, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.convenio-card img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  margin-bottom: 25px;
  filter: brightness(0.9);
  transition: filter 0.3s;
  border-radius: 12px;
}

.convenio-card:hover img {
  filter: brightness(1.05);
}

.convenio-card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.convenio-card p {
  color: #999;
  font-size: 0.95rem;
  padding: 0 10px;
  line-height: 1.5;
}

/* Flota */
.flota {
  background-color: var(--bg-color);
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.fleet-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 280px;
  background-color: var(--surface-color);
}

.fleet-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.fleet-item:hover img {
  transform: scale(1.1);
}

.fleet-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 20px;
}

.fleet-info h3 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

/* Contact */
.contacto {
  background-color: var(--bg-dark);
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
}

.contact-info,
.contact-form-container {
  flex: 1;
  min-width: 300px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.info-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: var(--surface-color);
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-speed);
  border-radius: 4px 4px 0 0;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Footer */
footer {
  background-color: black;
  padding: 40px 5%;
  text-align: center;
  border-top: 1px solid #333;
}

.footer-content p {
  color: var(--text-muted);
  margin-top: 10px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1000;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-float:hover {
  background-color: #20b958;
  transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .tech-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .tech-features-left,
  .tech-features-right {
    text-align: center;
    align-items: center;
    max-width: 100%;
  }

  .tech-feature,
  .tech-features-left .tech-feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .tech-image-center {
    order: -1;
    margin: 0;
  }
}


@media (max-width: 768px) {
  /* Hero */
  .hero h1 { font-size: 2.4rem; }
  .hero p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }

  /* Navbar mobile: logo izq, hamburguesa der */
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    background-color: var(--bg-color);
  }

  .hamburger {
    display: flex;
    align-items: center;
  }

  .nav-overlay.open {
    display: block;
  }

  /* Menú lateral derecho */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 72%;
    max-width: 280px;
    height: 100vh;
    background-color: #111111;
    flex-direction: column;
    padding: 90px 30px 40px;
    gap: 28px;
    z-index: 1001;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.6);
    border-left: 1px solid #2a2a2a;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
  }

  .nav-links .btn-outline-nav {
    margin-top: 10px;
    text-align: center;
    padding: 12px 20px;
  }

  /* Services: stack all cards full width on mobile */
  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(-n+3),
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: 1 / -1; }

  /* Slider logos más pequeños en mobile */
  .slider { height: 80px; }
  .slider::before, .slider::after { height: 80px; width: 60px; }
  .slide { height: 70px; width: 160px; padding: 0 12px; }
  .slide img { max-height: 50px; padding: 6px; }
  .slide-track { width: calc(160px * 18); animation: scroll-mobile 20s linear infinite; }

  /* App mockup más pequeña en mobile */
  .tech-image-center { width: 100%; max-width: 280px; margin: 0 auto; }
  .app-mockup-large { max-width: 280px; }
}

@keyframes scroll-mobile {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-160px * 6)); }
}
