:root {
  --bg-dark: #1e293b;
  --bg-darker: #0f172a;
  --surface-color: rgba(30, 41, 59, 0.5);
  --surface-border: rgba(255, 255, 255, 0.1);
  --primary: #40e0d0; /* Turquesa */
  --secondary: #b39ddb; /* Morado desvanecido */
  --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-hover: linear-gradient(135deg, #4debd7, #c4b5fd);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-glow: 0 0 20px rgba(64, 224, 208, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-darker);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    linear-gradient(135deg, rgba(64, 224, 208, 0.2) 0%, rgba(179, 157, 219, 0.2) 100%),
    radial-gradient(circle at 15% 50%, rgba(179, 157, 219, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(64, 224, 208, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

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

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-6 { margin-top: 1.5rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.justify-center { justify-content: center; }

/* ======== UI COMPONENTS ======== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 15px rgba(179, 157, 219, 0.3);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(64, 224, 208, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(64, 224, 208, 0.1);
  transform: translateY(-2px);
}

.btn-login {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: var(--primary);
  padding: 0.5rem 1.25rem;
}

.btn-login:hover {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
}

.glass-panel {
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 1.5rem;
}

.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: var(--gradient-main);
  z-index: -1;
  border-radius: inherit;
  filter: blur(10px);
  opacity: 0;
  transition: var(--transition);
}

.glow-effect:hover::before {
  opacity: 0.8;
}

.section-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: rgba(179, 157, 219, 0.15);
  color: var(--primary);
  border: 1px solid rgba(64, 224, 208, 0.2);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ======== NAVBAR ======== */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: var(--transition);
  padding: 1rem 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.logo .drop-icon {
  font-size: 2rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-main);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}


/* ======== HERO ======== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 10rem 1.5rem 4rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
  flex-wrap: wrap; /* Ensures wrapping on smaller screens */
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blur-blob {
  position: absolute;
  filter: blur(90px);
  opacity: 0.5;
  border-radius: 50%;
  animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
  top: 20%; left: -10%;
  width: 500px; height: 500px;
  background: rgba(179, 157, 219, 0.4);
}

.blob-2 {
  bottom: -10%; right: -10%;
  width: 600px; height: 600px;
  background: rgba(64, 224, 208, 0.3);
  animation-delay: -5s;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

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

.hero-visual {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 2rem;
  overflow: visible;
  padding: 1rem;
}

.image-wrapper img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 1.5rem;
  display: block;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: transform 0.5s ease;
}

.image-wrapper:hover img {
  transform: scale(1.02);
}

.floating-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: float 6s infinite ease-in-out alternate;
}

.badge-1 {
  top: 10%; left: -5%;
  color: var(--primary);
}

.badge-2 {
  bottom: 15%; right: -5%;
  color: var(--secondary);
  animation-delay: -3s;
}

/* ======== CALIDAD / STATS ======== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.stat-card {
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(64, 224, 208, 0.3);
}

.stat-card .icon-box {
  width: 60px; height: 60px;
  margin: 0 auto 1.5rem;
  background: rgba(64, 224, 208, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  transition: var(--transition);
}

.stat-card:hover .icon-box {
  background: var(--gradient-main);
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

.stat-card h4 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: var(--text-muted);
  font-weight: 500;
}


/* ======== ACCORDION PROCESOS ======== */

.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.process-card {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.process-card:hover {
  border-color: rgba(179, 157, 219, 0.4);
}

.process-number {
  position: absolute;
  top: -10px; right: -5px;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  font-family: var(--font-heading);
  pointer-events: none;
}

.process-icon {
  width: 60px; height: 60px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-darker);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  z-index: 2;
  box-shadow: 0 0 15px rgba(64, 224, 208, 0.4);
}

.process-card:nth-child(even) .process-icon {
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow: 0 0 15px rgba(179, 157, 219, 0.4);
}

.accordion-header {
  z-index: 2;
  width: 100%;
}

.accordion-header h4 {
  font-size: 1.5rem;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.acc-icon {
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.process-card.active .acc-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.process-card.active {
  background: rgba(64, 224, 208, 0.05);
  border-color: var(--primary);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  color: var(--text-muted);
}

.accordion-body p {
  padding-top: 1rem;
}

/* ======== CAROUSEL CASOS DE EXITO ======== */

.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: visible;
  padding: 1rem;
  display: flex;
  align-items: center;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  border-radius: 1rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  list-style: none;
  margin: 0; padding: 0;
}

.carousel-slide {
  min-width: 100%;
  padding: 0 1rem; 
}

.carousel-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid var(--surface-border);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--gradient-main);
  box-shadow: var(--shadow-glow);
}

.carousel-btn.prev {
  left: -20px;
}
.carousel-btn.next {
  right: -20px;
}

/* ======== UBICACIÓN & IFRAME MAP ======== */

.location-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem;
  align-items: center;
}

.location-visual.has-iframe {
  padding: 0;
  border: 2px solid var(--surface-border);
}

.location-visual.has-iframe iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 1.25rem;
  filter: invert(90%) hue-rotate(180deg) brightness(80%) contrast(120%); 
}

/* ======== MISC COMPONENTES / STATIC PAGES ======== */

.hero.sub-page {
  min-height: 50vh;
  padding: 10rem 1.5rem 4rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.content-page {
  padding: 4rem 1.5rem 8rem;
  max-width: 800px;
  margin: 0 auto;
}

.content-page p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.proc-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

.proc-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.proc-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid var(--surface-border);
}

.proc-content {
  padding: 1.5rem;
}

.proc-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
}


.content-page h3 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #fff;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 992px) {
  .hero { flex-direction: column; text-align: center; padding-top: 10rem; }
  .hero-buttons { justify-content: center; }
  .location-container { grid-template-columns: 1fr; padding: 2rem; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-title { font-size: 2.5rem; }
  .process-card { gap: 1rem; padding: 1.5rem; }
  .accordion-header h4 { font-size: 1.25rem; }
  .carousel-slide img { height: 300px; }
}

/* ======== MODAL & WHATSAPP ======== */

.fab-whatsapp {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 60px; height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  z-index: 100;
  transition: var(--transition);
}
.fab-whatsapp:hover { transform: scale(1.1) rotate(15deg); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px); z-index: 200; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { padding: 3rem; width: 100%; max-width: 400px; position: relative; transform: translateY(20px) scale(0.95); transition: var(--transition); }
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.close-modal { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: var(--transition); }
.close-modal:hover { color: #fff; transform: rotate(90deg); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-muted); font-size: 0.875rem; }
.form-group input { width: 100%; padding: 0.75rem 1rem; background: rgba(0,0,0,0.3); border: 1px solid var(--surface-border); border-radius: 0.5rem; color: #fff; transition: var(--transition); }
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.2); }

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.05); }
}
