@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@500;700;800&display=swap');

:root {
  /* Colors - Institucional & Serio (Pensiones/IMSS vibe) */
  --bg-dark: #ffffff;
  /* Ahora es blanco */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  --bg-card: #ffffff;

  /* Verdes Institucionales */
  --primary: #15803d;
  /* Green-700 */
  --primary-glow: rgba(21, 128, 61, 0.2);
  --secondary: #0f172a;
  /* Slate-900 (Azul marino muy oscuro) */
  --accent: #16a34a;
  /* Green-600 */

  --text-main: #1e293b;
  /* Slate-800 */
  --text-muted: #475569;
  /* Slate-600 */
  --border-light: #e2e8f0;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 18px;
  /* Slightly smaller for professional look */
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

header.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  height: 65px;
  width: auto;
  border-radius: 4px;
  /* Optional: if you want to remove the white box, we can try mixing modes or filters */
  /* filter: invert(1) grayscale(1) brightness(2); mix-blend-mode: screen; */
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-weight: 500;
  transition: color 0.3s;
  font-size: 1rem;
  color: var(--secondary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  color: white;
  border-radius: 8px;
  /* Less rounded, more corporate */
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(21, 128, 61, 0.3);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(21, 128, 61, 0.4);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 85vh;
  background-image: radial-gradient(circle at 100% 0%, rgba(22, 163, 74, 0.05) 0%, transparent 25%),
    radial-gradient(circle at 0% 100%, rgba(15, 23, 42, 0.03) 0%, transparent 25%);
}

/* Animated background blob */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.4) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.5;
  z-index: -1;
  animation: pulse 8s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }

  100% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.text-col {
  z-index: 2;
}

h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
  color: var(--secondary);
  /* Dark text */
  background: none;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 0 0 rgba(14, 165, 233, 0.2));
  /* Removed glow */
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  max-width: 540px;
  font-weight: 400;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Live Avatar Wrapper */
.avatar-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  /* Mantener formato de video */
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
  /* Sombra más fuerte y profunda */
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.avatar-wrapper:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.avatar-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Avatar Live Status */
.avatar-status {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #15803d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 20;
  pointer-events: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Services / Features */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 70px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--secondary);
  background: none;
  -webkit-text-fill-color: initial;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Card Glow Effect */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

/* Card Hover: Simple Lift */
.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card:hover::before {
  opacity: 0;
  /* Removed glow on hover */
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--secondary);
}

.card p {
  color: var(--text-muted);
  font-size: 1rem;
}

.icon-box {
  width: 64px;
  height: 64px;
  background: rgba(22, 163, 74, 0.1);
  /* Light green bg */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.75rem;
  border: none;
}

/* Feature Split (Text + Image) */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-img img {
  width: 100%;
  display: block;
}

/* Contact / CTA */
.cta-section {
  background: linear-gradient(135deg, #15803d 0%, #0f172a 100%), url('../assets/cta-bg.svg');
  /* Green to Navy */
  border-radius: 20px;
  padding: 5rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
  color: white;
  border: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  font-family: var(--font-heading);
  color: white;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-section .btn:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

/* Footer */
footer {
  background: #f1f5f9;
  /* Light grey footer */
  padding: 80px 0 30px;
  border-top: 1px solid var(--border-light);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
}

.footer-col h4 {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col a:hover {
  color: var(--primary);
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Menu Styles */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--secondary);
}

.mobile-menu-overlay {
  position: fixed;
  top: 90px;
  left: 0;
  width: 100%;
  background: white;
  padding: 2rem;
  border-bottom: 1px solid var(--border-light);
  transform: translateY(-150%);
  transition: transform 0.4s ease;
  z-index: 999;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.active {
  transform: translateY(0);
}

.mobile-menu-overlay ul li {
  margin-bottom: 1.5rem;
  text-align: center;
}

.mobile-menu-overlay ul li a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin: 0 auto 2rem;
  }

  .hero-btns {
    justify-content: center;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  /* Mobile menu simplified */

  .hamburger {
    display: block;
  }

  .hero-image {
    transform: none;
    margin-top: 2rem;
  }

  /* Feature Split */
  .feature-split {
    grid-template-columns: 1fr !important;
  }
}

/* Removed Glitch Effect entirely for seriousness */
.glitch {
  position: relative;
  color: var(--secondary);
}

.glitch::before,
.glitch::after {
  display: none;
}

/* 3D Tilt - Simplified to just utility */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.tilt-content {
  transform: translateZ(20px);
}

/* Button Shine Effect */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s;
}

.btn:hover::after {
  left: 100%;
}

/* Accordion Styles */
.accordion-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: #cbd5e1;
}

.accordion-header {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.accordion-header h3 {
  margin: 0 !important;
  font-size: 1.1rem;
  color: var(--secondary);
  font-weight: 600;
}

.accordion-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  background-color: #f8fafc;
  /* Slightly darker inside */
}

.accordion-content p {
  padding-bottom: 1.25rem;
  padding-top: 0.5rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-item.active .accordion-header h3 {
  color: var(--primary);
}

.accordion-item.active {
  border-color: var(--primary);
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: floatCheck 3s infinite ease-in-out;
}

.floating-whatsapp:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

@keyframes floatCheck {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Adjust Scroll Top to be to the left of WhatsApp */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 100px;
  width: 45px;
  height: 45px;
  background: var(--secondary);
  /* Dark Navy */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.scroll-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary);
  transform: translateY(-3px);
}