/* Nunito Sans Expanded */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

/* Raleway */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  /* Colors */
  --color-surface: #F2F2F2;
  --color-surface-container: #ffffff;
  --color-surface-container-low: #EBEBEB;
  --color-primary: #FF9335;
  --color-primary-container: #FFE5D1;
  --color-on-primary-container: #934B00;
  --color-secondary: #1E4E6B;
  --color-secondary-container: #DCEAF4;
  --color-on-secondary-container: #0D2B3D;
  --color-tertiary: #58C964;
  --color-success-bg: #EAF7EC;
  --color-quaternary: #6CB0DD;
  --color-quaternary-bg: #EAF3FA;
  --color-danger: #E81642;
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #4A4A4A;

  /* Typography */
  --font-headline: 'Raleway', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  /* Shadows - ambient */
  --shadow-sm: 0 4px 24px rgba(30, 78, 107, 0.04);
  --shadow-md: 0 8px 32px rgba(30, 78, 107, 0.06);
  --shadow-lg: 0 16px 48px rgba(30, 78, 107, 0.08);

  /* Radius */
  --radius-md: 1rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  color: var(--color-secondary);
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
}

section {
  padding: 6rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

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

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

.font-bold {
  font-weight: 700;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 8px 24px rgba(255, 147, 53, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 147, 53, 0.35);
  background-color: #f08320;
}

.btn-secondary {
  background-color: var(--color-surface-container);
  color: var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
}

/* Card - Sanctuary Rule: No borders, pure background color contrast */
.card {
  background-color: var(--color-surface-container);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon.blue {
  background-color: var(--color-quaternary-bg);
  color: var(--color-secondary);
}

.card-icon.orange {
  background-color: var(--color-primary-container);
  color: var(--color-primary);
}

/* Tags */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  background-color: var(--color-surface-container);
  color: var(--color-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: var(--font-headline);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.tag:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-sm);
  padding: 0.25rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 101;
}

.logo img {
  height: 80px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-headline);
  font-weight: 700;
  color: #ffffff;
  position: relative;
}

.header.scrolled .nav-link {
  color: var(--color-secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: var(--transition-smooth);
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  margin-bottom: 5px;
  transition: var(--transition-smooth);
}

.header.scrolled .menu-toggle span {
  background-color: var(--color-secondary);
}

@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-surface-container);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links .btn {
    margin-top: 1rem;
  }

  .nav-link {
    font-size: 1.5rem;
    color: var(--color-secondary);
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.active span {
    background-color: var(--color-secondary);
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Sections */
/* 1. Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero-centered {
  background-image: url('../img/hero_therapy_inclusive.png');
  /* New generated image focusing on connection */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dark overlay for white text contrast */
  background: linear-gradient(135deg, rgba(13, 43, 61, 0.7) 0%, rgba(30, 78, 107, 0.55) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1100px;
  /* Increased to allow wider title */
  margin: 0 auto;
}

.hero-logo {
  height: clamp(100px, 16vh, 160px);
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  /* Subtle dark shadow for depth */
}

.hero-title {
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  width: 100%;
  /* Ensure it spans the container width */
  line-height: 1.1;
  /* Tighter line height for better balance */
  letter-spacing: -0.01em;
  /* Slightly wider spacing for elegance */
  max-width: 1100px;
  /* Balanced width for the phrase */
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  color: var(--color-primary);
}

.hero-subtitle {
  color: #ffffff;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 600;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

@media (max-width: 992px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    margin: 1.5rem auto 0;
  }
}

/* 2. Quienes Somos */
.about {
  background-color: var(--color-secondary);
  /* Updated to the dark blue requested (#1e4e6b) */
  margin: 4rem 1rem;
  border-radius: var(--radius-xl);
  padding: 7rem 0;
  color: white;
  /* General text color white */
}

.about .container {
  max-width: 1700px;
  padding: 0 2rem;
}

.about h2 {
  color: white;
  /* Heading white specifically */
}

.about-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  /* Reduced gap between collage and text */
  align-items: stretch;
  /* Stretches content for symmetrical top/bottom spacing */
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.1);
  /* Subtle translucent white for dark mode harmony */
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about-item svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  /* Changed to highlight color (orange) to contrast dark blue */
  flex-shrink: 0;
  margin-top: 2px;
}

.about-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  color: white;
  /* Item heading white for visibility */
}

.about-item p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  /* Paragraph white-ish */
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: visible;
  /* Allow overlaps to project slightly */
}

.collage-wrapper {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  /* Wider left column for more impact */
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  /* Reduced gap to use more space for images */
  height: 100%;
  min-height: 780px;
  /* Match parent height for symmetry */
  background-color: transparent;
}

.collage-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  border: none;
  /* Removed thick white borders to match image */
}

.collage-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.item-main {
  grid-row: 1 / span 2;
  grid-column: 1;
}

.item-overlap-1 {
  grid-row: 1;
  grid-column: 2;
}

.item-overlap-2 {
  grid-row: 2;
  grid-column: 2;
}

@media (max-width: 992px) {
  .collage-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    height: auto;
    min-height: auto;
    gap: 1.5rem;
  }

  .item-main, 
  .item-overlap-1, 
  .item-overlap-2 {
    grid-row: auto;
    grid-column: auto;
    aspect-ratio: 16/10; /* Making all have the same size/ratio */
  }
}

@media (max-width: 576px) {
  .collage-wrapper {
    gap: 1rem;
  }
}

@media (max-width: 992px) {
  .about {
    margin: 2.5rem 0;
    padding: 3rem 0;
    border-radius: 0;
  }

  .about .container {
    padding: 0 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image {
    order: -1;
  }
}

/* 3. Terapias */
.therapies {
  background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('../img/pattern.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.therapies-header {
  max-width: 800px;
  margin: 0 auto 5rem auto;
  text-align: center;
}

.therapies-header p {
  font-weight: 700; /* Bold as requested for high contrast */
  color: var(--color-secondary); /* Using secondary color for more punch */
  font-size: 1.25rem;
}

.therapies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.therapy-card {
  background-color: white; /* Cards are now pure white for clarity */
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: var(--radius-xl);
  transition: var(--transition-smooth);
}

.therapy-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(240, 131, 32, 0.2);
  background-color: var(--color-primary); /* Turns orange on selection/hover */
}

.therapy-card:hover h4,
.therapy-card:hover p {
  color: white; /* Text turns white on orange background */
}

.therapy-card:hover .therapy-icon {
  background-color: white; /* Icon circle turns white for contrast */
}

.therapy-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  /* Circle icons as in image */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
  background-color: rgba(232, 22, 66, 0.08); /* Light tint of the palette red */
  color: var(--color-danger); /* Palette red #E81642 */
  transition: var(--transition-smooth);
}

.therapy-icon svg {
  width: 24px;
  height: 24px;
}

.therapy-card h4 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--color-secondary);
  transition: var(--transition-smooth);
}

.therapy-card p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  font-weight: 600; /* Bold as requested to avoid getting lost */
  transition: var(--transition-smooth);
}

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

/* 4. Evaluaciones */
.evaluations {
  background-color: var(--color-secondary-container);
  border-radius: var(--radius-xl);
  margin: 2rem;
  padding: 6rem 0;
}

.evaluations-header {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 4rem;
  text-align: center;
}

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

.eval-card {
  padding: 3rem 2.5rem;
  transition: var(--transition-smooth);
}

.eval-card h4,
.eval-card p {
  color: white;
  /* Contrast for solid backgrounds */
}

.eval-orange {
  background-color: #FF9335;
}

.eval-green {
  background-color: #58C964;
}

.eval-blue {
  background-color: #6CB0DD;
}

.eval-red {
  background-color: #E81642;
}

.eval-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 5. Por qué elegirnos */
.features {
  background-color: var(--color-surface);
}

.features-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: stretch;
}

.features-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.features-image-single {
  display: block;
  width: 100%;
}

.feature-img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.feature-img-wrapper:first-child {
  transform: translateY(2rem);
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background-color: var(--color-surface-container);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  color: var(--color-primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-text h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.feature-text p {
  margin: 0;
}

@media (max-width: 992px) {
  .features-content {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .feature-img-wrapper:first-child {
    transform: none;
  }
}

/* 6. Contacto */
.contact {
  padding: 10rem 0;
  margin: 4rem 0 0 0;
  background-color: var(--color-secondary);
  color: white;
}

.contact-content-simple {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: stretch;
}

.contact-info-panel h2 {
  color: white;
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.contact-details-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 3.5rem;
}

.contact-detail-item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.contact-icon-circle {
  width: 56px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.contact-icon-circle svg {
  width: 24px;
  height: 24px;
}

.contact-detail-item h4 {
  margin: 0;
  font-size: 1.25rem;
  color: white;
}

.contact-detail-item p {
  margin: 0;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info-panel .mt-12 {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
}

.contact-btn-custom {
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.95rem;
}

@media (max-width: 992px) {
  .contact {
    padding: 6rem 0;
  }

  .contact-content-simple {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .contact-info-panel h2 {
    font-size: 2.5rem;
  }
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: white;
  padding: 2.4rem 0;
  /* Substantial height increase as requested */
  font-size: 1.1rem;
  line-height: 1;
}

.footer a {
  color: white;
}

.footer-credit a {
  font-weight: 700;
  text-decoration: underline;
}

/* Floating Action Button */
.fab-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
  z-index: 99;
  transition: var(--transition-smooth);
}

.fab-whatsapp:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
}

.fab-whatsapp svg {
  width: 32px;
  height: 32px;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}

/* FAQ Section Styling */
.faq-section {
  padding: 8rem 0;
  background-color: #f8fafc;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-question {
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #fff;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 2rem 1.5rem 2rem;
  color: #64748b;
  line-height: 1.6;
}
