/* ========================================
   CONSULTORIO PSICOLÓGICO - ESTILOS DEL HOME
   ======================================== */

/* ========================================
   1. HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--spacing-4xl) 0;
  /* Efecto parallax fijo */
  background-image: url('../../assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.hero-bg {
  display: none; /* Ocultamos la imagen img porque usamos background-image para el parallax */
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(20, 30, 25, 0.9) 0%,
    rgba(20, 30, 25, 0.7) 40%,
    rgba(20, 30, 25, 0.3) 70%,
    rgba(20, 30, 25, 0.1) 100%
  );
}

.hero-container {
  position: relative;
  z-index: 1;
  padding-top: var(--spacing-5xl);
  padding-bottom: var(--spacing-5xl);
}

.hero-content {
  max-width: 600px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin-bottom: var(--spacing-2xl);
  padding: var(--spacing-sm) var(--spacing-xl);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-full);
  animation: fadeInDown 0.8s ease-out;
  backdrop-filter: blur(4px);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 5rem; /* Aún más grande para igualar Mindthera */
  color: var(--color-white);
  margin-bottom: var(--spacing-xl);
  line-height: 1.05;
  font-weight: var(--font-weight-light);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title em {
  font-style: italic;
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: var(--font-size-2xl);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-light);
  line-height: 1.4;
}

.hero-desc {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-3xl);
  line-height: 1.6;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-actions .btn-outline-dashed {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-actions .btn-outline-dashed:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

/* ========================================
   2. SECCIÓN PRESENTACIÓN
   ======================================== */

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

/* ========================================
   3. RECURSOS PREMIUM (GRID)
   ======================================== */

.recursos-premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

@media (min-width: 1024px) {
  .recursos-premium-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.recurso-premium-card {
  position: relative;
  height: 250px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  outline: none; /* for tabindex focus */
}

.recurso-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.4s ease;
  z-index: 1;
}

.recurso-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
  transition: opacity 0.4s ease;
}

.recurso-illustration-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto var(--spacing-3xl);
  text-align: center;
  overflow: hidden;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

.recurso-illustration-container:hover {
  transform: scale(1.02);
}

.recurso-illustration {
  width: 100%;
  height: auto;
  display: block;
}

/* Enhance header text */
.section-header.text-center.reveal {
  margin-bottom: var(--spacing-2xl);
}

.section-header.text-center.reveal .section-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
}

.section-header.text-center.reveal .section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header.text-center.reveal .section-desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
}


.recurso-premium-card:hover,
.recurso-premium-card:focus {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.recurso-premium-card:hover .recurso-bg,
.recurso-premium-card:focus .recurso-bg {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.recurso-premium-card:hover .recurso-title,
.recurso-premium-card:focus .recurso-title {
  transform: translateY(0);
  opacity: 1;
}

/* ========================================
   4. MEMBRESÍAS (ESTILO MINDTHERA)
   ======================================== */

.section-membership-parallax {
  position: relative;
  background-image: linear-gradient(rgba(27, 90, 71, 0.4), rgba(27, 90, 71, 0.6)), url('../../assets/images/membresias-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 160px 0 240px 0; /* Más espacio arriba y abajo */
  margin-bottom: 160px; /* Más espacio antes de la siguiente sección */
}  position: relative;
  padding-bottom: 80px;
}

.membership-cards-container {
  position: relative;
  z-index: 10;
  margin-bottom: -80px;
}

.section-membership-parallax .section-title,
.section-membership-parallax .section-desc {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-membership-parallax .section-desc {
  opacity: 1 !important;
}

.membership-grid {
  gap: var(--spacing-3xl);
  max-width: 1000px;
  margin: 0 auto;
}

.membership-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  border: none;
  color: var(--color-text-primary);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.membership-card:hover {
  transform: translateY(-12px);
}

.membership-card--featured {
  background-color: var(--color-white);
}

.membership-header {
  padding: var(--spacing-xl) var(--spacing-2xl);
  background-color: #62a378; /* Verde sólido como en Mindthera */
  color: var(--color-white);
}

.membership-card--featured .membership-header {
  background-color: #85c85b; /* Verde lima para la tarjeta destacada */
}

.membership-title {
  font-size: var(--font-size-xl);
  margin: 0;
  color: var(--color-white);
  font-weight: var(--font-weight-medium);
}

.membership-body {
  padding: var(--spacing-2xl);
  flex-grow: 1;
}

.membership-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.price-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.membership-price {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-xs);
}

.price-amount {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: var(--font-weight-medium);
  color: #85c85b; /* Verde lima para el precio */
  line-height: 1;
}

.membership-card--featured .price-amount {
  color: #85c85b;
}

.price-period {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.membership-img-col {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.membership-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.membership-desc {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-2xl);
}

.membership-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.membership-features li {
  padding: var(--spacing-sm) 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Checkmark verde */
.membership-features li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #85c85b;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.membership-footer {
  padding: 0 var(--spacing-2xl) var(--spacing-2xl);
}

.btn-membership {
  display: block;
  width: 100%;
  text-align: center;
  background-color: #f5f5f5;
  color: var(--color-text-primary);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius-full);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-membership:hover {
  background-color: #e0e0e0;
  color: var(--color-text-primary);
}

/* ========================================
   5. NEWSLETTER
   ======================================== */

.newsletter-section {
  background-color: var(--color-primary);
  padding: var(--spacing-5xl) 0;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-4xl);
  align-items: center;
}

.newsletter-title {
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

.newsletter-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-base);
}

.newsletter-fields {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.newsletter-fields .form-control {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-white);
}

.newsletter-fields .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-fields .form-control:focus {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--color-white);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.newsletter-fields .btn-primary {
  background-color: var(--color-white);
  color: var(--color-primary-dark);
}

.newsletter-fields .btn-primary:hover {
  background-color: var(--color-gray-100);
  color: var(--color-primary-dark);
}

/* ========================================
   6. SOBRE EL PORTAL
   ======================================== */

.sobre-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.sobre-text {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* ========================================
   7. SCROLL TO TOP BUTTON
   ======================================== */

.scroll-to-top {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: var(--z-fixed);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-3px);
}

/* ========================================
   8. ANIMACIONES DE SCROLL REVEAL
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  animation: revealFadeUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  animation: revealSlideLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-left.is-visible {
  transform: translateX(0);
}

.reveal-right {
  animation: revealSlideRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal-right.is-visible {
  transform: translateX(0);
}

/* Keyframes para animaciones suaves */
@keyframes revealFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes revealSlideRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Retrasos escalonados para grids - ahora usando animation-delay */
.grid-3 .reveal:nth-child(1),
.grid-4 .reveal:nth-child(1) {
  animation-delay: 0s;
}

.grid-3 .reveal:nth-child(2),
.grid-4 .reveal:nth-child(2) {
  animation-delay: 0.1s;
}

.grid-3 .reveal:nth-child(3),
.grid-4 .reveal:nth-child(3) {
  animation-delay: 0.2s;
}

.grid-3 .reveal:nth-child(4),
.grid-4 .reveal:nth-child(4) {
  animation-delay: 0.3s;
}

.grid-3 .reveal:nth-child(5) {
  animation-delay: 0.4s;
}

.grid-3 .reveal:nth-child(6) {
  animation-delay: 0.5s;
}

/* ========================================
   9. RESPONSIVE DEL HOME
   ======================================== */

@media (max-width: 1024px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
  }
  
  .hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
  
  .membership-grid {
    max-width: 100%;
  }
  
  .doc-stack {
    height: 200px;
  }
  
  .doc-card {
    width: 160px;
  }
}
