/* ==========================================================================
   CSS DESIGN SYSTEM - DR. JOSÉ MIGUEL LANDING PAGE
   ========================================================================== */

/* Variables */
:root {
  /* Colors */
  --color-primary-green: #1B4332;
  --color-primary-green-dark: #112A1F;
  --color-dark-charcoal: #2B2D31;
  --color-dark-charcoal-darker: #1E1F23;
  --color-medium-grey: #4A4D52;
  --color-accent-gold: #D4AF37;
  --color-accent-gold-hover: #E6C55C;
  --color-accent-gold-glow: rgba(212, 175, 55, 0.15);
  
  --color-text-white: #FFFFFF;
  --color-text-light: #E8E8E6;
  --color-text-muted: #B8BCC2;
  --color-text-dark: #1B4332; /* Used for dark text on light gold buttons */

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --section-padding-mobile: 60px 0;
  --section-padding-desktop: 100px 0;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-dark-charcoal-darker);
  color: var(--color-text-light);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grid & Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-text-white);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.2rem, 1.5rem);
  margin-bottom: 12px;
}

p {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.text-gold {
  color: var(--color-accent-gold);
}

.text-center {
  text-align: center;
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: 50px;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-cta {
  background-color: var(--color-accent-gold);
  color: var(--color-text-dark);
  box-shadow: 0 10px 25px -5px rgba(214, 175, 55, 0.3);
}

.btn-cta:hover, .btn-cta:focus {
  background-color: var(--color-accent-gold-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(214, 175, 55, 0.5);
}

.btn-cta:active {
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-accent-gold);
  color: var(--color-accent-gold);
}

.btn-outline:hover, .btn-outline:focus {
  background-color: var(--color-accent-gold);
  color: var(--color-text-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(214, 175, 55, 0.3);
}

/* Microcopy */
.microcopy {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50px;
  color: var(--color-text-light);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-gold);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--color-accent-gold);
}

/* Section Header styling */
.section-header {
  margin-bottom: 50px;
  text-align: center;
}

.header-divider {
  width: 60px;
  height: 3px;
  background-color: var(--color-accent-gold);
  margin: 16px auto 0 auto;
  border-radius: 2px;
}

/* ==========================================================================
   SECTIONS STYLING
   ========================================================================== */

/* 1. Hero Section */
.hero-section {
  background: radial-gradient(circle at 50% 30%, rgba(27, 67, 50, 0.65) 0%, rgba(17, 42, 31, 1) 100%);
  padding: 100px 0;
  border-bottom: 1px solid var(--color-medium-grey);
}

.hero-text-only {
  text-align: center;
}

.hero-text-only h1 {
  font-weight: 400;
}

.hero-text-only h1 strong {
  font-weight: 700;
}

.subheadline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 2. Trust Bar */
.trust-bar {
  background-color: var(--color-dark-charcoal);
  border-bottom: 1px solid var(--color-medium-grey);
  padding: 24px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.trust-icon {
  color: var(--color-accent-gold);
  flex-shrink: 0;
}

/* 3. Problem Section */
.problem-section {
  background: radial-gradient(circle at 50% 50%, rgba(27, 67, 50, 0.75) 0%, rgba(17, 42, 31, 1) 100%);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.problem-body {
  margin-bottom: 30px;
}

.problem-body p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  text-align: center;
}

.highlight-box {
  background-color: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--color-accent-gold);
  padding: 24px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 40px;
  text-align: center;
}

.bold-phrase {
  font-size: 1.25rem;
  font-style: italic;
}

.section-actions {
  display: flex;
  justify-content: center;
}

/* 4. Services Section */
.services-section {
  background-color: var(--color-dark-charcoal-darker);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.service-card {
  background-color: var(--color-dark-charcoal);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5), 0 0 20px rgba(212, 175, 55, 0.05);
}

.service-icon-wrapper {
  background-color: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-accent-gold);
}

.service-card h3 {
  margin-bottom: 16px;
  font-weight: 600;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 0;
  flex-grow: 1;
}

/* 5. Why Choose Section */
.why-choose-section {
  background: radial-gradient(circle at 10% 80%, rgba(27, 67, 50, 0.6) 0%, rgba(17, 42, 31, 1) 100%);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.why-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.why-icon-container {
  background-color: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent-gold);
}

.why-content h3 {
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.15rem;
}

.why-content p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 1rem;
}

/* 6. How It Works Section */
.how-it-works-section {
  background-color: var(--color-dark-charcoal);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 48px;
  position: relative;
}

.step-card {
  background-color: var(--color-dark-charcoal-darker);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  transition: all var(--transition-normal);
}

.step-card:hover {
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateY(-3px);
}

.step-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent-gold);
  opacity: 0.9;
  line-height: 1;
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
}

.step-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 1rem;
}

/* 7. FAQ Section */
.faq-section {
  background: radial-gradient(circle at 90% 90%, rgba(27, 67, 50, 0.6) 0%, rgba(17, 42, 31, 1) 100%);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-medium-grey);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item:hover {
  border-color: rgba(212, 175, 55, 0.3);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 24px;
  color: var(--color-text-white);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-trigger:hover, .faq-trigger:focus {
  color: var(--color-accent-gold);
  outline: none;
}

.faq-icon {
  color: var(--color-accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.faq-content-inner {
  padding: 0 24px 24px 24px;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.faq-content-inner p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* Accordion Active States */
.faq-item.active {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--color-accent-gold);
}

.faq-item.active .faq-trigger {
  color: var(--color-accent-gold);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg); /* Rotates the + icon so it looks like an x */
}

/* 8. Cierre Final Section */
.cierre-section {
  background: linear-gradient(180deg, var(--color-primary-green-dark) 0%, var(--color-dark-charcoal-darker) 100%);
  padding: var(--section-padding-mobile);
  border-bottom: 1px solid var(--color-medium-grey);
}

.cierre-text {
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.cierre-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 9. Footer */
.main-footer {
  background-color: var(--color-dark-charcoal-darker);
  padding: 60px 0 40px 0;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-white);
  margin-bottom: 4px;
}

.footer-subtitle {
  color: var(--color-accent-gold);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0;
}

.footer-contact p {
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-link {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent-gold);
}

.footer-legal {
  border-top: 1px solid var(--color-medium-grey);
  padding-top: 30px;
}

.legal-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.copyright-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.6;
  margin-bottom: 0;
}

/* Fixed WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(37, 211, 102, 0.2);
  z-index: 1000;
  transition: all var(--transition-normal);
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 211, 102, 0.4);
}

/* WhatsApp Pulse Animation */
@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ==========================================================================
   ANIMATIONS & SCROLL UTILITIES
   ========================================================================== */

/* Classes for scroll animations */
.animate-on-scroll {
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: transform, opacity;
}

.fade-in-animation.visible {
  opacity: 1;
}

.slide-up-animation {
  transform: translateY(30px);
}

.slide-up-animation.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   MEDIA QUERIES (DESKTOP - Responsive Overrides)
   ========================================================================== */
@media (min-width: 768px) {
  :root {
    --section-padding-mobile: var(--section-padding-desktop);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Text-only hero layout remains centered, no grid modifications needed on desktop */

  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
  }

  .services-grid {
    grid-template-columns: repeat(2, 2fr);
    gap: 30px;
  }

  .why-list {
    gap: 40px;
  }

  .why-item {
    gap: 24px;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

  /* Connecting line between steps */
  .steps-grid::before {
    content: '';
    position: absolute;
    top: 55px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.4) 50%, rgba(212, 175, 55, 0) 100%);
    z-index: 0;
  }

  .step-card {
    z-index: 1;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .footer-legal {
    border-top: none;
    padding-top: 0;
  }
}
