:root {
  --color-bg: #ffffff;
  --color-light: #f7f4ef;
  --color-primary: #1a5c53;
  --color-secondary: #b8a99a;
  --color-text: #3a3a3a;
  --color-accent: #d8c7b8;

  --max-width: 900px;
  --radius: 6px;
  --spacing: 3.5rem;

  --font-main: "Helvetica", Arial, sans-serif;
}

/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-light); 
  background-image: 
    linear-gradient(rgba(247, 244, 239, 0.75), rgba(247, 244, 239, 0.75)), 
    url('../img/oscar/fondoTortuga.png');
  background-repeat: repeat;
  background-size: 50%; 
  line-height: 1.6;
}

/* El bloque central que corta el fondo */
.site-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--color-bg); /* Fondo blanco sólido para que se lea perfecto */
  box-shadow: 0 0 30px rgba(0,0,0,0.1); /* Una sombra elegante para separar la caja del fondo maorí */
  min-height: 100vh;
}

/* LAYOUT: Escudo protector para el texto */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem; /* Un poco más de margen interior */
  background-color: var(--color-light); /* Color sólido que tapa el fondo */
  /* Sombra del mismo color para difuminar los bordes laterales suavemente */
  box-shadow: 0 0 60px 40px var(--color-light); 
}

/* UTILERÍAS */
.text-center {
  text-align: center;
}

.intro-text {
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
}

/* LAYOUT */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--spacing) 0;
}

.section.light {
  background: var(--color-light);
}

/* HERO */
.hero {
  text-align: center;
  padding: 6rem 1rem;
  background: var(--color-light);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.subtitle {
  max-width: 650px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* IMÁGENES */
/* --- NUEVO DISEÑO DE PERFIL --- */
.profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-img-modern {
  width: 100%;
  max-width: 280px;
  height: 280px; /* Forzamos un cuadrado perfecto */
  object-fit: cover; /* Evita que la cara se estire o se deforme */
  border-radius: 24px; /* Bordes redondeados modernos, sin llegar a círculo */
  box-shadow: 0 10px 25px rgba(26, 92, 83, 0.15); /* Sombra cálida con tu verde corporativo */
  border: none;
}

.profile-img-membrete {
  width: 100%;
  max-width: 500px;
}

.profile-content {
  text-align: center;
}

.profile-content h2 {
  margin-top: 0;
  color: var(--color-primary);
  font-size: 2rem;
}

.profile-content .intro-text {
  margin-bottom: 1.5rem;
}

/* Diseño en dos columnas para ordenadores y tablets */
@media (min-width: 768px) {
  .profile-wrapper {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }
  .profile-content {
    text-align: left;
  }
}

.card img {
  width: 100%;
  max-width: 180px; 
  height: auto; 
  display: block;
  margin: 0 auto 1.5rem auto;
}

.card-title-img {
  text-align: center;
  margin-top: 0;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 999px; 
  text-decoration: none;
  margin: 0.4rem;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.btn-primary:hover, .btn-secondary:hover {
  opacity: 0.8;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-secondary {
  background: var(--color-accent);
  color: var(--color-text);
}

/* LINKS */
.link, .locationLink {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
}

.link:hover, .locationLink:hover {
  text-decoration: underline;
}

/* CARDS */
.cards {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Enlaces dentro de las tarjetas */
.card .link {
  display: block;
  text-align: center;
  margin-top: 1rem;
}

/* TESTIMONIOS */
.testimonios {
  display: grid;
  gap: 1.5rem;
}

.testimonios blockquote {
  background: white;
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
  margin: 0;
  border-radius: var(--radius);
  font-style: italic;
}

.testimonios span {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
  color: var(--color-primary);
}

/* LISTAS */
ul {
  padding-left: 1.2rem;
}

/* FOOTER CTA */
#cta-final {
  text-align: center;
}

/* --- ESTILOS COMPLEMENTARIOS PARA PÁGINAS DE ESPECIALIDADES --- */

.header-especialidad {
  padding: 20px 40px;
}

.back-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.especialidad-hero {
  padding: 20px 40px 40px 40px;
}

.container-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
}

.badge-especialidad {
  display: inline-block;
  background-color: rgba(22, 167, 102, 0.1);
  color: #16a766;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.card-autoridad {
  background-color: #f7f4ef;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border-left: 4px solid #16a766;
}

.img-perfil {
  width: 100%;
  max-width: 180px;
  border-radius: 8px;
  object-fit: cover;
}

.puntos-dolor-list {
  list-style: none;
  padding-left: 0;
}

.puntos-dolor-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.puntos-dolor-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a766;
  font-weight: bold;
}

.cta-block {
  text-align: center;
  padding: 50px 20px;
  background-color: rgba(247, 244, 239, 0.5);
  margin-top: 40px;
}

/* --- ENLACE VOLVER A INICIO RESALTADO --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #16a766;
  background-color: rgba(22, 167, 102, 0.08);
  border: 1px solid rgba(22, 167, 102, 0.25);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-link:hover {
  background-color: #16a766;
  color: #ffffff;
}

/* --- ESPACIADO Y PADDING MEJORADO PARA SECCIONES --- */
.especialidad-body {
  padding: 40px 40px;
}

.puntos-dolor-container {
  background-color: #fcfbf9;
  border: 1px solid #eae6df;
  border-radius: 12px;
  padding: 30px 35px;
  margin: 25px 0 45px 0;
}

.puntos-dolor-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.puntos-dolor-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 18px;
  line-height: 1.6;
}

.puntos-dolor-list li:last-child {
  margin-bottom: 0;
}

.puntos-dolor-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #16a766;
  font-weight: bold;
  font-size: 1.1rem;
}

.abordaje-block {
  background-color: rgba(247, 244, 239, 0.6);
  border-left: 4px solid #16a766;
  padding: 30px 35px;
  border-radius: 0 12px 12px 0;
  margin-top: 25px;
}

/* --- BOTÓN DE RETORNO Y COHERENCIA DE BOTONES --- */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #16a766;
  background-color: #ffffff;
  border: 2px solid #16a766;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
}

.btn-back:hover {
  background-color: #16a766;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 167, 102, 0.2);
}

/* --- VÍNCULO VISUAL CON LA IMAGEN DE SERVICIO --- */
.especialidad-thumb {
  margin-bottom: 20px;
}

.img-servicio-link {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* --- ESTILOS PARA LAS MIGAS DE PAN (BREADCRUMBS) --- */
.breadcrumb-nav {
  margin: 1.5rem 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-secondary);
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item:not(:last-child):after {
  content: "/";
  color: var(--color-accent);
  font-weight: normal;
}

.breadcrumb-item a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.breadcrumb-item span {
  color: var(--color-text);
  font-weight: normal;
}

/* Estilos específicos para la disposición horizontal del equipo */
    .equipo-list {
      display: flex;
      flex-direction: column;
      gap: 25px;
      margin-top: 30px;
    }
    .card-horizontal {
      display: flex;
      flex-direction: row;
      align-items: center;
      background: #ffffff;
      border-radius: 12px;
      padding: 30px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.04);
      gap: 30px;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .card-horizontal:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }
    .card-horizontal .member-photo {
      flex-shrink: 0;
      text-align: center;
    }
    .card-horizontal .member-photo img {
      width: 130px;
      height: 130px;
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .card-horizontal .member-info {
      flex-grow: 1;
    }
    .card-horizontal .member-info h3 {
      margin: 0 0 5px 0;
      font-size: 1.3rem;
    }
    .card-horizontal .member-role {
      font-size: 0.9rem;
      color: #16a766;
      font-weight: bold;
      margin-bottom: 12px;
    }
    .card-horizontal .member-info p {
      margin: 0 0 10px 0;
      line-height: 1.6;
      color: var(--color-text);
    }

    /* Ajuste para dispositivos móviles */
    @media (max-width: 768px) {
      .card-horizontal {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
      }
    }

/* Responsivo para móviles */
@media (max-width: 768px) {
  .container-2col {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE TIPOGRAFÍA Y ESPACIADO */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 1rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0.5rem auto;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 2.5rem 0;
  }
}