/* ========== ÜBER UNS - PÁGINA SOBRE NOSOTROS ========== */
/* ----- Links ----- */
#uber-uns {
    color: var(--neon-blue);
}

/* Depende de styles.css (variables :root, animaciones globales) */

/* ========== GLOBAL SITE CONTAINER — override por página ========== */
.global-site-container {
    padding-top: 16vh;
    padding-bottom: 5vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    max-width: 1800px;
}

@media (max-width: 1024px) {
    .global-site-container { padding-top: 14vh; }
}

@media (max-width: 768px) {
    .global-site-container {
        padding-top: 13vh;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .global-site-container { padding-top: 12vh; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .global-site-container { padding-top: 16vh; }
}

/* ----- Team Flex Grid ----- */
.team-container {
    width: 90%;
    max-width: 95%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.team-container-title {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    font-size: 5rem;
    font-weight: 600;
    text-align: center;
    z-index: 102;
    margin-bottom: 5vh;
    animation: titleAppear 1s ease-out 2.5s forwards;
}

/* ----- Card base (sin alturas fijas) ----- */
.content-block-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: calc(33.333% - 1.34rem);
}

.image-wrapper {
    width: 80%;
    aspect-ratio: 1 / 1;
    perspective: 60rem;
    margin: 0 auto;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    border-radius: 27%;
    border: 0.8rem solid rgba(255, 255, 255, 0.55);
}

.flip-card.is-flipped {
    transform: rotateX(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 25%;
    overflow: hidden;
}

.flip-front img,
.flip-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-back {
    transform: rotateX(180deg);
}

/* ----- Card text ----- */
.text-card-wrapper {
    position: relative;
    perspective: 600px;
    width: 100%;
    text-align: center;
}

.content-text-card {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    text-align: center;
    margin-top: 0;
    transition: transform 0.4s ease 0.25s, opacity 0.3s ease 0.25s;
    transform-origin: center top;
    backface-visibility: hidden;
}

.content-text-card strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.extra-text-card {
    text-align: center;
    font-size: 1rem;
    color: #444;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.extra-text-card p {
    margin: 0;
}

/* --- Texto flipped --- */
.flipped-text-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    text-align: center;
    opacity: 0;
    transform: rotateX(-90deg);
    transform-origin: center top;
    backface-visibility: hidden;
    transition: transform 0.4s ease 0.25s, opacity 0.3s ease 0.25s;
    pointer-events: none;
}

.flipped-text-card strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* --- Estado activo (hover / click) --- */
.content-block-card.is-flipped .content-text-card {
    transform: rotateX(90deg);
    opacity: 0;
    pointer-events: none;
}

.content-block-card.is-flipped .flipped-text-card {
    transform: rotateX(0deg);
    opacity: 1;
    pointer-events: auto;
}

/* ----- Responsive ----- */

/* Tablet: 2 columnas */
@media (max-width: 900px) {
    .team-container {
        gap: 1.5rem;
    }

    .content-block-card {
        width: calc(50% - 1rem);
    }

    .image-wrapper {
        width: 75%;
    }
}

/* Móvil: 1 columna */
@media (max-width: 768px) {
    .team-container {
        gap: 10vh;
        width: 100%;
    }

    .team-container-title {
        font-size: 2rem;
        margin-bottom: 4vh;
    }

    .content-block-card {
        max-width: 480px;
        width: 100%;
        margin: 0 auto;
    }

    .image-wrapper {
        width: 72%;
        max-width: 72vw;
    }

    .content-block-uber-uns {
        padding: 1.5rem 2rem 2rem 2rem;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {

    .team-container-title {
        font-size: 1.6rem;
        margin-bottom: 1.5vh;
    }

    .content-block-uber-uns {
        padding: 1.2rem 1.5rem 1.8rem 1.5rem;
    }

    .image-wrapper {
        width: 78%;
        max-width: 78vw;
    }

    .content-text-card {
        font-size: 1.1rem;
    }
}

/* Paisaje móvil pequeño */
@media (max-width: 767px) and (orientation: landscape) {
    .team-container-title {
        font-size: 1.8rem;
        margin-bottom: 1.5vh;
    }

    .team-container {
        gap: 1.5rem;
    }

    .content-block-card {
        width: calc(50% - 0.75rem);
    }

    .image-wrapper {
        width: 65%;
    }
}

/* Tablet paisaje: volver a 3 columnas */
@media (max-width: 932px) and (orientation: landscape) {

    .team-container-title {
        font-size: 2.2rem;
        margin-bottom: 1.5vh;
    }

    .team-container {
        gap: 1.2rem;
    }

    .content-block-card {
        width: calc(33.333% - 0.8rem);
    }

    .image-wrapper {
        width: 70%;
    }

    .content-text-card {
        margin-top: 0;
    }
}

/* Tablet portrait */
@media (min-width: 768px) and (max-width: 1023px) {
    .team-container {
        gap: 3rem;
    }

    .team-container-title {
        font-size: 2.5rem;
        margin-bottom: 5vh;
    }

    .content-block-uber-uns {
        padding: 1.5rem 3rem 2rem 3rem;
    }
}

/* Desktop: 3 columnas, imagen al 80% */
@media (min-width: 1024px) {
    .team-container {
        gap: 2rem;
    }

    .image-wrapper {
        width: 80%;
    }

    .content-text-card {
        font-size: 1.2rem;
    }

    .extra-text-card {
        font-size: 0.95rem;
        line-height: 1.4;
    }
}

/* Desktop landscape */
@media (min-width: 1024px) and (orientation: landscape) {
    .global-site-container {
        justify-content: space-between;
    }

    .team-container-title {
        font-size: clamp(2.5rem, 4vw, 3rem);
        margin: 3vh auto 5vh auto;
    }

    .content-block-uber-uns {
        flex: 1;
        min-height: 0;
        padding: 2vh 4rem;
        overflow: hidden;
    }

    .team-container {
        gap: 3rem;
    }

    .content-block-card {
        width: calc(33.333% - 2rem);
    }

    .image-wrapper {
        width: 80%;
    }
}

@media (min-width: 1901px) {
    .content-text-card,
    .content-text-card strong,
    .flipped-text-card,
    .flipped-text-card strong {
        font-size: 1.28rem;
    }

    .extra-text-card {
        font-size: 1.05rem;
    }
}
