:root {
  --crema: #FDFBF7;
  --azul: #1A5F7A;
  --verde: #22A699;
  --oscuro: #002B5B;
}

body {
  background-color: var(--crema);
  color: var(--oscuro);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* --- HERO CON VIDEO BACKGROUND --- */
.hero-video-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.3), rgba(26, 95, 122, 0.5));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

/* --- NAVBAR OFFCANVAS OLA TRANSPARENTE --- */
.custom-offcanvas {
  /* Fondo traslúcido con efecto esmerilado */
  background-color: rgba(253, 251, 247, 0.45) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: none;
  box-shadow: 4px 0 24px rgba(26, 95, 122, 0.12);
  width: 320px !important;

  /* Curvatura orgánica (Onda fluida en el lateral derecho) */
  border-radius: 0px 180px 280px 0px / 0px 350px 650px 0px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-link-custom {
  color: var(--oscuro);
  font-weight: 600;
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-link-custom:hover {
  color: var(--verde);
  padding-left: 30px;
}

/* Botón flotante para abrir el menú */
.menu-trigger {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1030;
  background-color: var(--azul);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease;
}

/* --- CARDS Y COMPONENTES --- */
.section-padding {
  padding: 80px 0;
}

.card-servicio {
  background: white;
  border: none;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.card-servicio:hover {
  transform: translateY(-5px);
}

.icon-box {
  font-size: 2.5rem;
  color: var(--verde);
  margin-bottom: 15px;
}

/* --- BOTONES FIJOS EN EL SCROLL --- */
.btn-whatsapp-fijo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-decoration: none;
}

/* 📸 Nuevo botón de Instagram en la posición intermedia */
/* 📸 Botón de Instagram ajustado al tamaño de WhatsApp */
.btn-instagram-fijo {
  position: fixed;
  bottom: 95px;
  right: 20px; /* Alineado a la misma distancia del borde que WhatsApp */
  z-index: 1000;
  /* Degradado oficial de Instagram */
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: white;
  width: 60px;      /* Escalado de 50px a 60px */
  height: 60px;     /* Escalado de 50px a 60px */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;  /* Ícono más grande para igualar a WhatsApp */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-decoration: none;
}

/* 🔼 Flecha superior reubicada para el nuevo tamaño */
.btn-top-fijo {
  position: fixed;
  bottom: 170px;    /* Subió a 170px para mantener la separación limpia */
  right: 25px;
  z-index: 1000;
  background-color: var(--azul);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-decoration: none;
}



/* --- ANIMACIONES DE SCROLL REVEAL --- */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease-out;
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s ease-out;
}

/* Estado activo cuando JS detecta el scroll */
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}


/* --- ANIMACIÓN DE TRAZO CALIGRÁFICO REAL --- */
.hero-title-svg-wrapper {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
}

.handwritten-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.animated-stroke-text {
  font-family: 'Dancing Script', cursive;
  font-size: 85px;
  font-weight: 700;
  fill: transparent;
  stroke: #ffffff;
  stroke-width: 2px;
  /* El valor 600 cubre la longitud total del contorno del texto */
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: dibujarLetras 4s ease-in-out forwards;
}

@keyframes dibujarLetras {
  0% {
    stroke-dashoffset: 600;
    fill: transparent;
  }
  75% {
    stroke-dashoffset: 0;
    fill: transparent;
  }
  100% {
    stroke-dashoffset: 0;
    fill: #ffffff; /* El color sólido aparece suavemente al finalizar el trazo */
  }
}
