/* Reseteo base */
body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  color: #000000;
  background: #fff;
  text-align: center;
}

/* Encabezado */
.header {
  background-color: #b89247;
  color: white;
  padding: 10px 0;
  font-weight: bold;
  font-size: 1.5rem;
}

.header span {
  display: block;
  font-size: 1.3rem;
}

.container {
  padding: 40px 20px;
}

.perfil {
  margin-bottom: 60px;
}

.perfil h2 {
  font-size: 2rem;
  margin: 10px 0 0;
  color: #222;
}

.subtitulo {
  color: #777;
  font-size: 1rem;
  margin-bottom: 30px;
}

/* Avatar */
.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto;
  margin-bottom: clamp(2px, 1vw, 6px);
  display: block;
  position: relative;
  z-index: 1;
}

/* Nombre */
.card em {
  font-style: italic;
  color: #444;
  margin: 0;
  padding: 0;
  line-height: 1.1;
  display: block;
}

/* Título */
.card h3 {
  font-weight: 700;
  font-size: 1.2rem;
  color: #333;
  text-transform: uppercase;
  margin: 10px 0 5px;
  position: relative;
  z-index: 2;
  background: #fff;
  display: inline-block;
  padding: 0 10px;
}

/* Texto */
.card p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 6px 0 0;
  color: #555;
}

/* Email */
.email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-style: italic;
  color: #666;
  font-size: 0.9rem;
  margin-top: 4px;
}

.correo-icon {
  width: 18px;
  height: 18px;
  filter: brightness(1.2) saturate(2);
}

/* Ubicación */
.ubicacion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #333;
  margin: 4px 0;
}

.mapa-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* Tarjeta */
.card {
  flex: 1 1 300px;
  max-width: 380px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

/* Grid de tres tarjetas */
.grid-tres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 40px;
  margin-bottom: 80px;
  text-align: center;
}

/* Layout especial para 3 tarjetas */
.grid-tres:has(.card:nth-child(3)):not(:has(.card:nth-child(4))) {
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
}

/* Footer */
.footer-custom {
  background-color: #1a1a1a;
  color: #f1f1f1;
  position: relative;
  font-size: 0.9rem;
}

.footer-custom .designer-link {
  color: #28a745;
  text-decoration: none;
}

.footer-custom .designer-link:hover {
  text-decoration: underline;
}

/* Botón scroll top */
.scroll-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.scroll-top-btn {
  background-color: #b89247;
  border-radius: 50%;
  padding: 0.5rem;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 0.3s ease;
}

.scroll-top-btn:hover {
  background-color: #053efa;
}

/* Grid horizontal para VIPS */
.grid-horizontal {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px;
  scrollbar-width: thin;
}

.grid-horizontal::-webkit-scrollbar {
  height: 8px;
}

.grid-horizontal::-webkit-scrollbar-thumb {
  background-color: #b89247;
  border-radius: 4px;
}

/* 🎯 Media query responsiva */
@media screen and (max-width: 768px) {
  .grid-tres {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .card {
    max-width: 90%;
    margin: 0 auto;
  }

  .avatar {
    width: 160px;
    height: 160px;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card em,
  .card p {
    font-size: 0.9rem;
  }

  .email,
  .ubicacion {
    font-size: 0.85rem;
    flex-wrap: wrap;
    text-align: center;
  }
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.ubicacion, .email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #333;
  margin: 4px 0;
}

.icon, .mapa-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.card-ajustada h3 {
  font-size: 1.05rem;           /* ↘️ más compacto horizontalmente */
  white-space: normal;          /* ↔️ permite múltiples líneas si es necesario */
  line-height: 1.3;             /* 🪜 mejora legibilidad */
  text-align: center;
  padding: 0 12px;
  word-break: break-word;
}

.info-directiva {
  display: flex;
  flex-direction: column;
  gap: 2px;
}