* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #d39a38;
  --gold-dark: #b98224;
  --ink: #1c1715;
  --text: #211913;
  --cream: #fff8ef;
  --white: #ffffff;
  --shadow: 0 10px 22px rgba(35, 27, 20, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: var(--cream);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
a {
  overflow-wrap: break-word;
}

.header {
  width: 100%;
  min-height: 96px;
  padding: 0 5%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.06);
}

.logo {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--gold-dark);
}

.logo img {
  width: 112px;
  height: auto;
  display: block;
}

.nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-left: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-family: "Great Vibes", cursive;
  font-size: 36px;
  transition: 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--gold);
}

.nav a.active {
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

.menu-btn {
  margin-left: auto;
  display: none;
  background: none;
  border: none;
  color: var(--gold-dark);
  cursor: pointer;
  font-size: 32px;
}

.about-hero,
.values-section {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("../img/imagenesSobreNosotros/fonde%20de%20piedras.png");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.about-hero {
  min-height: 1220px;
  padding: 62px 10% 78px;
  text-align: center;
}

.about-hero::after,
.values-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.about-content,
.values-content {
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 700;
  color: #f6f6f6;
  letter-spacing: 0.8px;
  line-height: 1.06;
  text-shadow:
    0 2px 0 #151515,
    0 5px 12px rgba(0, 0, 0, 0.5);
  margin-bottom: 34px;
}

.intro-copy {
  max-width: 990px;
  margin: 0 auto;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.65;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.72),
    0 5px 12px rgba(0, 0, 0, 0.38);
}

.intro-copy p + p {
  margin-top: 32px;
}

.priority-title {
  margin: 78px auto 8px;
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: clamp(29px, 3.4vw, 44px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.12;
  text-shadow:
    0 2px 0 #111,
    0 5px 10px rgba(0, 0, 0, 0.45);
}

.center-logo {
  width: min(440px, 72vw);
  margin: 0 auto 40px;
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
  display: block;
}

.mission-vision {
  max-width: 1040px;
  margin: 0 auto;
  text-align: left;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.74),
    0 5px 12px rgba(0, 0, 0, 0.36);
}

.mission-vision h2,
.values-content h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3.2vw, 43px);
  font-weight: 700;
  line-height: 1.12;
  margin: 30px 0 32px;
}

.mission-vision p,
.values-content p {
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.65;
}

.values-section {
  min-height: 620px;
  margin-top: -1px;
  background-position: center top;
  padding: 56px 12% 44px;
}

.values-content {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.74),
    0 5px 12px rgba(0, 0, 0, 0.36);
}

.values-content h2 {
  margin-bottom: 52px;
}

.values-content p {
  margin-bottom: 32px;
}

.team-section {
  position: relative;
  padding: 14px 4% 24px;
  background: url("../img/imagenesSobreNosotros/fondo-equipo.png") center /
    cover no-repeat;
  border-radius: 0 0 38px 38px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(70px) scale(0.86);
  transition:
    opacity 0.85s ease,
    transform 0.85s ease;
}

.team-section.show-team {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.team-section::before {
  content: none;
}

.team-heading {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 12px;
}

.team-heading img {
  width: 34px;
  opacity: 0.82;
}

.team-heading h2 {
  color: #3b2f2a;
  font-family: "Playfair Display", serif;
  font-size: clamp(36px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 10px;
}

.team-heading span {
  display: block;
  width: 130px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 12px;
  position: relative;
}

.team-heading p {
  color: #8b8179;
  font-size: 13px;
}

.team-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.05fr) minmax(
      230px,
      0.9fr
    );
  gap: clamp(22px, 2.4vw, 34px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.team-card {
  min-height: 365px;
  padding: 20px 26px 22px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(89, 69, 48, 0.1);
  text-align: center;
}

.person-photo {
  width: 100%;
  height: 235px;
  object-fit: cover;
  object-position: center top;
  border-radius: 72px 72px 18px 18px;
  display: block;
  margin-bottom: -34px;
}

.school-card {
  min-height: 245px;
  padding: 28px 36px;
  display: grid;
  place-items: center;
}

.school-card img {
  width: 90%;
  max-height: 175px;
  object-fit: contain;
}

.card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 25px;
  box-shadow: 0 5px 12px rgba(90, 64, 34, 0.2);
  position: relative;
  z-index: 2;
}

.doctor-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(90, 64, 34, 0.2);
  position: relative;
  z-index: 2;
}

.team-card h3,
.school-caption {
  color: #3d302a;
  font-family: "Playfair Display", serif;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 10px;
}

.team-card .line {
  width: 42px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 14px;
}

.team-card p {
  color: #867d75;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .about-hero {
    min-height: 1050px;
    padding: 50px 8% 64px;
  }

  .team-grid {
    gap: 24px;
  }
}

@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .nav {
    flex: none;
    margin-left: 0;
    justify-content: flex-start;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
  }

  .nav.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a.active {
    width: fit-content;
  }

  .about-hero {
    min-height: auto;
    padding: 42px 7% 58px;
    background-attachment: scroll;
    background-position: center top;
  }

  .values-section {
    min-height: auto;
    padding: 42px 7%;
    background-attachment: scroll;
    background-position: center;
  }

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

  .team-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .team-card {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    min-height: auto;
  }

  .school-card {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .about-hero {
    padding: 34px 6% 46px;
  }

  .page-title {
    font-size: clamp(32px, 9vw, 38px);
    line-height: 1.12;
    margin-bottom: 24px;
  }

  .intro-copy,
  .mission-vision,
  .values-content {
    text-shadow:
      0 2px 3px rgba(0, 0, 0, 0.78),
      0 4px 9px rgba(0, 0, 0, 0.38);
  }

  .intro-copy {
    font-size: 16px;
    line-height: 1.65;
  }

  .intro-copy p + p {
    margin-top: 22px;
  }

  .priority-title {
    margin-top: 42px;
    font-size: clamp(23px, 6.8vw, 28px);
    line-height: 1.18;
  }

  .center-logo {
    width: min(300px, 82vw);
    margin-bottom: 28px;
  }

  .mission-vision h2,
  .values-content h2 {
    font-size: clamp(26px, 7vw, 31px);
    margin: 26px 0 18px;
  }

  .mission-vision p,
  .values-content p {
    font-size: 16px;
    line-height: 1.65;
  }

  .values-section {
    padding: 34px 6%;
  }

  .values-content p {
    margin-bottom: 22px;
  }

  .team-section {
    padding: 24px 5% 34px;
    border-radius: 0 0 24px 24px;
  }

  .team-heading h2 {
    font-size: 34px;
  }

  .team-heading p {
    font-size: 14px;
    line-height: 1.45;
  }

  .team-card {
    min-height: auto;
    padding: 20px;
    border-radius: 16px;
  }

  .person-photo {
    height: 245px;
    border-radius: 48px 48px 16px 16px;
  }

  .doctor-icon {
    width: 56px;
    height: 56px;
  }

  .school-card img {
    width: 100%;
  }
}
