/* 
   Altamis Team Plugin CSS
   Aplica los estilos Premium con microinteracciones y botones sociales.
*/

.altamis-team-grid {
    display: grid;
    grid-template-columns: 1fr; /* Móviles: 1 columna por defecto */
    gap: 40px; 
    align-items: start; /* FIX: Evita que las tarjetas se estiren a lo alto */
    margin: 30px 0;
    font-family: inherit;
}

/* Tablets clásicas en vertical/horizontal */
@media (min-width: 600px) {
    .altamis-team-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    }
}

/* Portátiles y Monitores grandes (Desktop Divi estándar: 981px) */
@media (min-width: 981px) {
    .altamis-team-grid {
        grid-template-columns: repeat(4, 1fr); /* BLOQUEADO a exactamente 4 columnas como máximo */
    }
}

.altamis-team-card {
    background: #ffffff;
    border: 1px solid #eaeaea; 
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* height: 100%; -> eliminado para que tengan altura independiente */
    
    /* Premium Hover Settings */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.altamis-team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); /* Sombra difusa y elegante al hacer hover */
}

/* Image matching portrait logic */
.altamis-team-image {
    width: 100%;
    position: relative;
    padding-top: 110%; /* 100% is square, 110% makes it slightly taller */
    background-color: #ededed;
    overflow: hidden; /* prevents image zooming outside bounds */
}

.altamis-team-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; 
    
    /* Image zoom on hover */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.altamis-team-content {
    padding: 24px 20px 15px;
    text-align: center;
    background: #ffffff;
    position: relative;
    z-index: 2; /* always above zooming image */
    
    /* La altura (min-height) ahora es inyectada automáticamente por JavaScript (script.js) */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center; /* keep contents centered horizontally */
}

.altamis-team-name {
    margin: 0 0 6px 0;
    font-size: 1.15rem; /* Un pelo más pequeño para encajar nombres largos */
    font-weight: 500;
    color: #333333;
    line-height: 1.2;
}

.altamis-team-role {
    margin: 0;
    font-size: 0.85rem; /* Más pequeño para que los cargos eternos (ej: CFO y CBDO - Chief...) quepan en menos líneas */
    color: #539EAE; /* Cyan branding color */
    font-weight: 400;
    line-height: 1.4;
}

/* Socials Config */
.altamis-team-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.altamis-team-socials .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f4f5; /* Light grey/cyan */
    color: #539EAE;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.altamis-team-socials .social-icon:hover {
    background-color: #0b2e35; /* Dark navy */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(11, 46, 53, 0.15);
}

.altamis-team-bio {
    background-color: #F4F8F9; /* Light grey/blue background for the BIO secton */
    /* margin-top: auto; -> eliminado para que se acople al texto naturalmente */
    border-top: 1px solid #f0f0f0;
}

.altamis-team-bio-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease;
}

.altamis-team-bio-toggle:hover {
    background-color: #e6eef0;
}

.altamis-team-bio-toggle .bio-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333333;
    letter-spacing: 0.5px;
}

.altamis-team-bio-toggle .bio-icon {
    position: relative;
    width: 22px;
    height: 22px;
    background-color: #0b2e35; /* Dark navy */
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.altamis-team-bio-toggle:hover .bio-icon {
    background-color: #3bb2c4; /* Brighter color on hover */
}

.bio-icon-h,
.bio-icon-v {
    position: absolute;
    background-color: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bio-icon-h {
    width: 10px;
    height: 2px;
}

.bio-icon-v {
    width: 2px;
    height: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.altamis-team-bio-toggle.is-open .bio-icon-v {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.altamis-team-bio-content {
    display: none; 
    padding: 0 20px 20px;
    font-size: 0.85rem;
    color: #5d6d71; 
    line-height: 1.6;
}

/* Bullet list styling to match the reference */
.altamis-team-bio-content ul {
    margin: 0;
    padding-left: 20px;
}

.altamis-team-bio-content li {
    margin-bottom: 8px;
}

.altamis-team-bio-content li:last-child {
    margin-bottom: 0;
}

.altamis-team-bio-content p {
    margin: 0 0 10px 0;
}

.altamis-team-bio-content p:last-child {
    margin-bottom: 0;
}
