/* styles.css - Diseño Final con Modal y Ajustes */
:root {
  --bg: #0b1220;
  --card: #0f1a33;
  --muted: #9fb0d0;
  --text: #eaf0ff;
  --brand: #4da3ff;
  /* Azul láser */
  --brand2: #6dffbf;
  /* Verde neón */
  --gold: #ffc107;
  /* Estrellas */
  --border: rgba(255, 255, 255, .10);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 18px;
  --max: 1120px;
  --nav-height: 100px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 20% 0%, rgba(77, 163, 255, .08), transparent),
    radial-gradient(900px 500px at 80% 20%, rgba(109, 255, 191, .05), transparent);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s
}

a:hover {
  color: var(--brand)
}

ul {
  list-style: none;
  padding: 0;
  margin: 0
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block
}

/* Utilidades */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, .10);
  transform: translateY(-2px)
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #04101f;
  border: none;
  box-shadow: 0 4px 15px rgba(77, 163, 255, .3);
}

/* Header & Logo */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(11, 18, 32, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center
}

.brand-logo {
  height: 80px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

.menu-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.menu-links a {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500
}

.menu-links a:hover,
.menu-links a.active {
  color: var(--text)
}

/* Hero con Video */
.hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(11, 18, 32, 0.8), rgba(11, 18, 32, 0.4), var(--bg));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding-top: 40px;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 20px;
  background: linear-gradient(to right, #fff, #b0c4de);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  font-size: 1.25rem;
  color: #d1d9e6;
  margin-bottom: 30px;
  max-width: 60ch
}

/* Grid de Servicios (Index) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px
}

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: var(--radius);
  transition: transform .3s ease, border-color .3s ease;
}

a.card:hover {
  transform: translateY(-5px);
  border-color: var(--brand);
  cursor: pointer;
}

a.card h3 {
  color: var(--text);
}

.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(77, 163, 255, .1);
  color: var(--brand);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* Página Servicios & Formulario */
.service-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border)
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.service-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.02);
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-media:hover .service-img {
  transform: scale(1.05);
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(109, 255, 191, .1);
  color: var(--brand2);
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 15px;
  border: 1px solid rgba(109, 255, 191, .2);
}

/* Formulario Contacto */
.form-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s, background 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(255, 255, 255, .1);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.pot-field {
  display: none;
  visibility: hidden;
  opacity: 0;
}

/* Reviews y Footer */
.reviews-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, .02);
  border-top: 1px solid var(--border);
}

.carousel-container {
  overflow: hidden;
  position: relative;
  max-width: 800px;
  margin: 40px auto 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.review-card {
  min-width: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stars {
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text);
}

.review-author {
  font-weight: bold;
  color: var(--brand);
}

.review-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  cursor: pointer;
  border: none;
}

.nav-dot.active {
  background: var(--brand);
}

footer {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--text);
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.contact-btn-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* --- MODAL / POPUP DE ÉXITO --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 18, 32, 0.85);
  /* Fondo oscuro semi-transparente */
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--brand);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 450px;
  width: 90%;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 3rem;
  color: var(--brand2);
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.5rem;
  margin: 0 0 15px 0;
  color: var(--text);
}

.modal-text {
  color: var(--muted);
  margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-grid .image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-logo {
    height: 60px;
    margin-bottom: 10px;
  }

  .menu-links {
    gap: 15px;
    font-size: 0.85rem;
  }

  .hero-wrapper {
    min-height: 70vh;
    text-align: center
  }

  .hero-content {
    margin: 0 auto
  }

  .cta-group {
    justify-content: center
  }
}