/* =========================================================
ESTILOS DE LA PÁGINA OUR STAFF
========================================================= */

/* HERO SECTION */
/* =======================================================
   Estilos de la Sección HERO (Our Teams)
   ======================================================= */

   .teams-hero {
    /* Estructura principal y tamaño */
    /*margin-top: 125px;*/
    position: relative;
    width: 100%;
    height: 225px;

    /* Eliminamos todas las propiedades de background-image del CSS original */

    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

/* NUEVO: Estilo para la imagen insertada en HTML */
.hero-background-image-teams {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Simula background-size: cover */
    object-position: center; /* Simula background-position: center */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Capa inferior: la imagen */
}

/* Estilo del Overlay/Superposición (Usando el background consistente: 0.4 y 0.3) */
.teams-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Aplicamos el background de superposición consistente:
       linear-gradient (el tono oscuro/verde: rgba(28, 32, 17, 0.4))
       background-color (el tono gris: rgba(123, 122, 122, 0.3)) */
    background:
        linear-gradient(rgba(28, 32, 17, 0.4), rgba(28, 32, 17, 0.4)),
        rgba(123, 122, 122, 0.3);

    z-index: 2; /* Capa media: los filtros de color */
}

/* Estilo del Contenido (título) */
.teams-hero .hero-content {
    position: relative;
    z-index: 3; /* Asegura que el contenido esté por encima del overlay */
    padding-left: 10%;
}

.teams-hero h1 {
    font-family: "Baumans", sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    margin: 0;
    /* Mantenemos tu alineación compleja original */
    /*margin-left: 99.6%;*/
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

  /* TEAM DESCRIPTION */
  .team-description {
    background-color: #fff;
    padding: 30px 0;
  }

  .team-description .container {
    /* CLAVE: Eliminado max-width para que use todo el ancho */
    width: 100%;
    margin: 0 auto;
    padding: 0 10px; /* Espaciado de seguridad mínimo */
  }

  .team-description p {
    font-family: "Poppins", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: #333;
    text-align: left;
    margin-left: 80px;
    margin-right: 80px;
  }

  /* TEAM MEMBERS SECTION */
  .team-members {
    background-color: #fff;
    padding: 10px 0 80px;
  }

  .team-members .container {
    /* CLAVE: Eliminado max-width para que use todo el ancho */
    width: 100%;
    margin: 0 auto;
    padding: 0 10px; /* Espaciado de seguridad mínimo */
  }

  .team-grid {
    display: grid;
    /* CUADRÍCULA PREDETERMINADA DE 3 COLUMNAS */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

  /* TEAM CARD - LÓGICA DE ANCHO MODIFICADA */

  /* Miembros 1-3 (Primera Fila) - Tarjetas más anchas */
  .team-card:nth-child(-n+3) {
    grid-column: span 1;
  }

  /* Miembros 4 en adelante (Fila 2+) - Tarjetas más compactas */
  .team-card:nth-child(n+4) {
    grid-column: span 1;
    max-width: 320px; /* Ancho máximo para el efecto compacto */
    justify-self: center; /* Centra la tarjeta dentro del espacio de la cuadrícula */
  }


  .team-card {
    background-color: #fff;
      /* AJUSTE CLAVE: Bordes redondeados para las tarjetas */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  .member-image {
    width: 100%;
    /* Altura predeterminada para las tarjetas grandes (Fila 1) */
    height: 350px;
    overflow: hidden;
  }

  /* Ajuste de altura para las tarjetas más compactas (Fila 2 en adelante) */
  .team-card:nth-child(n+4) .member-image {
    height: 280px;
  }

  .member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .team-card:hover .member-image img {
    transform: scale(1.05);
  }

  .member-info {
    padding: 30px 25px;
    text-align: center;
  }

  .member-name {
    font-family: "Baumans", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
  }

  .member-position {
    font-family: "Baumans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin: 0 0 20px 0;
  }

  /* SOCIAL LINKS */
  .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
  }

  .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: transparent;
    color: #F48534;
    font-size: 18px;
    border-radius: 0;
    transition: all 0.3s ease;
  }

  .social-links a:hover {
    color: #fff;
    background-color: #F48534;
    transform: translateY(-3px);
  }

  .member-bio {
    font-family: "Poppins", sans-serif !important;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin: 0;
  }

  /* =========================================================
  RESPONSIVE
  ========================================================= */

  /* TABLET (≤ 991px) */
  @media (max-width: 991px) {
    .teams-hero h1 {
      font-size: 3rem;
    }

      /* For tablet, we reintroduce a max-width to keep content readable */
    .team-description .container,
    .team-members .container {
      max-width: 991px;
      padding: 0 20px;
    }

    .team-description p {
      font-size: 16px;
    }

    .team-grid {
      /* 2 columnas para tablet */
      grid-template-columns: repeat(2, 1fr);
      gap: 25px;
    }

      /* RESET: Eliminar estilos de compactación en tablet */
      .team-card:nth-child(n+4) {
          max-width: none;
          justify-self: stretch;
          height: auto;
      }

      .member-image {
          height: 320px;
      }

      .team-card:nth-child(n+4) .member-image {
          height: 320px;
      }

  }

  /* MÓVIL (≤ 768px) */
  @media (max-width: 768px) {
    .teams-hero h1 {
      font-size: 2.5rem;
    }

    .team-description {
      padding: 40px 0;
    }

      /* Alineación de margen y relleno responsivos - 20px para móvil */
    .team-description .container,
    .team-members .container {
      padding: 0 20px;
    }

    .team-description p {
      font-size: 15px;
      line-height: 1.6;
    }

    .team-members {
      padding: 30px 0 60px;
    }

    .team-grid {
      /* 1 columna para móvil */
      grid-template-columns: 1fr;
      gap: 20px;
    }

      /* RESET: Eliminar estilos de compactación en móvil */
      .team-card:nth-child(n+4) {
          max-width: none;
          justify-self: stretch;
          height: auto;
      }

      .member-image {
          height: 300px;
      }

      .team-card:nth-child(n+4) .member-image {
          height: 300px;
      }

    .member-image {
      height: 300px;
    }

    .member-info {
      padding: 25px 20px;
    }

    .member-name {
      font-size: 22px;
    }

    .member-position {
      font-size: 15px;
    }

    .member-bio {
      font-size: 14px;
    }
  }

  /* MÓVIL PEQUEÑO (≤ 480px) */
  @media (max-width: 480px) {
    .teams-hero h1 {
      font-size: 2rem;
    }

    .member-image {
      height: 280px;
    }
  }
