/* ===== VARIABLES ===== */
:root {
  --bg-primary:    #08080F;
  --bg-secondary:  #0F0F1A;
  --bg-card:       #131320;
  --accent-blue:   #00AAFF;
  --accent-orange: #FF5500;
  --accent-green:  #7BFF00;
  --border-subtle: rgba(0, 170, 255, 0.15);
  --text-primary:  #FFFFFF;
  --text-secondary:#9090A8;
  --whatsapp:      #25D366;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

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

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

ul {
  list-style: none;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== SECTION COMMON ===== */
.section {
  padding: 60px 0;
}

.section-primary {
  background-color: var(--bg-primary);
}

.section-secondary {
  background-color: var(--bg-secondary);
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-primary);
  text-align: center;
}

.section-line {
  width: 48px;
  height: 3px;
  margin: 12px auto 40px;
  border-radius: 2px;
}

.section-line--orange { background-color: var(--accent-orange); }
.section-line--blue   { background-color: var(--accent-blue); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo img {
  max-height: 36px;
  width: auto;
}

.nav-links {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  z-index: 200;
  padding: 16px 0;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-links.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-links li {
  width: 100%;
}

.nav-link {
  display: block;
  padding: 14px 24px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-blue);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
}

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

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 201;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 600px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(to bottom,
      rgba(8,8,15,0.65) 0%,
      rgba(8,8,15,0.45) 50%,
      rgba(8,8,15,0.85) 100%),
    url('hero-bg.jpg') center center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  max-width: 700px;
}

.hero-logo {
  max-width: 180px;
  width: 100%;
}

.hero h1 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 8px;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.hero-subtitle .dot {
  color: var(--accent-blue);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--accent-blue);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
}

.badge svg {
  flex-shrink: 0;
}

.btn-cta {
  display: inline-block;
  background: var(--accent-green);
  color: #08080F;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 8px;
  padding: 14px 32px;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 24px rgba(123, 255, 0, 0.35);
}

.btn-cta--full {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

.hero-link-secondary {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  cursor: pointer;
}

.hero-link-secondary:hover {
  color: var(--accent-blue);
}

/* Hero entry animations */
.reveal-hero {
  opacity: 0;
  transform: scale(0.95) translateY(16px);
  animation: heroReveal 0.8s ease-out forwards;
}

.reveal-delay-1 { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.25s; }
.reveal-delay-3 { animation-delay: 0.35s; }
.reveal-delay-4 { animation-delay: 0.45s; }
.reveal-delay-5 { animation-delay: 0.55s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Bounce arrow */
.hero-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-blue);
  opacity: 0.6;
  animation: bounce 1.5s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: linear-gradient(135deg, #0055AA, #003080);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.stat-number {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  color: #FFFFFF;
  line-height: 1;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 32px rgba(0, 170, 255, 0.1);
}

.service-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

.service-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.card-cta {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--accent-blue);
  margin-top: 16px;
  transition: opacity 0.2s ease;
}

.card-cta:hover {
  opacity: 0.75;
}

/* ===== PROCESO ===== */
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.step-number {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 5rem;
  color: var(--accent-blue);
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.step-icon {
  position: relative;
  z-index: 1;
}

.process-step h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.process-step p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 240px;
  position: relative;
  z-index: 1;
}

/* ===== GALERÍA ===== */
.gallery-masonry {
  columns: 1;
  column-gap: 12px;
}

.gallery-img {
  width: 100%;
  margin-bottom: 12px;
  break-inside: avoid;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  object-fit: cover;
}

.gallery-img:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 1001;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== RESEÑAS ===== */
.reviews-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
  margin-top: 8px;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  scroll-snap-align: start;
  flex: 0 0 calc(100% - 0px);
  min-width: 0;
}

.review-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.review-name {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.review-stars {
  color: #FFD700;
  font-size: 0.9rem;
  line-height: 1.3;
}

.review-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: auto;
  white-space: nowrap;
}

.review-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(0, 170, 255, 0.1);
  border-color: var(--accent-blue);
}

.reviews-cta {
  text-align: center;
  margin-top: 32px;
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.btn-outline:hover {
  background: rgba(0, 170, 255, 0.08);
}

/* ===== CONTACTO ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 8px;
}

.contact-subtitle {
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-phone {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.contact-phone:hover {
  color: var(--accent-blue);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.social-link {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent-blue);
}

.contact-map {
  width: 100%;
}

.contact-map iframe {
  display: block;
  width: 100%;
}

/* ===== FOOTER ===== */
.footer {
  background: #050508;
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-logo {
  max-height: 50px;
  width: auto;
}

.footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer .social-links {
  margin-bottom: 0;
  justify-content: center;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

.whatsapp-float::after {
  content: '¡Consultanos!';
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8, 8, 15, 0.9);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--border-subtle);
}

.whatsapp-float:hover::after {
  opacity: 1;
}

/* ===== TABLET (768px+) ===== */
@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2.2rem;
  }

  /* Nav */
  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    width: auto;
    background: none;
    padding: 0;
    gap: 4px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 8px 14px;
    font-size: 0.95rem;
  }

  .hamburger {
    display: none;
  }

  .nav-overlay {
    display: none !important;
  }

  /* Hero */
  .hero-logo {
    max-width: 220px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Process */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }

  /* Gallery */
  .gallery-masonry {
    columns: 2;
  }

  /* Reviews */
  .review-card {
    flex: 0 0 calc(50% - 10px);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* WA float */
  .whatsapp-float {
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
  }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
  /* Hero */
  .hero-logo {
    max-width: 260px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Process */
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    align-items: start;
  }

  .process-grid::before {
    content: '';
    position: absolute;
    top: 52px;
    left: calc(12.5% + 16px);
    right: calc(12.5% + 16px);
    border-top: 2px dashed rgba(0, 170, 255, 0.3);
    pointer-events: none;
  }

  /* Gallery */
  .gallery-masonry {
    columns: 3;
  }

  /* Reviews */
  .review-card {
    flex: 0 0 calc(33.333% - 14px);
  }
}

/* ===== MOBILE ONLY (<480px) ===== */
@media (max-width: 479px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  .reveal,
  .reveal-hero {
    opacity: 1;
    transform: none;
  }
}
