/* ==========================================================================
   Team Flip Cards — Matches Figma design exactly
   ========================================================================== */

/* Floating animation */
@keyframes ohwow-float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.ohwow-flip-card {
    perspective: 1000px;
    width: 100%;
    height: 500px;
    cursor: pointer;
    animation: ohwow-float 4s ease-in-out infinite;
}

.ohwow-flip-card:nth-child(2) {
    animation-delay: -1.3s;
}

.ohwow-flip-card:nth-child(3) {
    animation-delay: -2.6s;
}

.ohwow-flip-card:nth-child(3n+1) {
    animation-duration: 4.2s;
}

.ohwow-flip-card:nth-child(3n+2) {
    animation-duration: 3.8s;
}

.ohwow-flip-card:nth-child(3n+3) {
    animation-duration: 4.5s;
}

.ohwow-flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.ohwow-flip-card.is-flipped .ohwow-flip-card__inner {
    transform: rotateY(180deg);
}

/* ---- Both sides ---- */
.ohwow-flip-card__front,
.ohwow-flip-card__back {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================
   FRONT
   ============================ */
.ohwow-flip-card__front {
    z-index: 2;
    background: #F5F2ED;
    padding: 24px;
}

.ohwow-flip-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.ohwow-flip-card__tag {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    font-family: var(--ohwow-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    line-height: 1;
}

.ohwow-flip-card__toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
    padding: 0;
}

.ohwow-flip-card__toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ohwow-flip-card__toggle svg {
    width: 20px;
    height: 20px;
    stroke: #000;
    stroke-width: 2;
    fill: none;
}

/* Image area */
/* .ohwow-flip-card__image {
    flex: 1;
    min-height: 0;
    background: #d4d4d4;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ohwow-flip-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
} */

/* Placeholder when no image */
/* .ohwow-flip-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ohwow-flip-card__image--empty::after {
    content: '';
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
} */

/* Name + role */
.ohwow-flip-card__info {
    margin-bottom: 24px;
}

.ohwow-flip-card__name {
    font-family: var(--ohwow-font-display);
    font-size: 1.25rem;
    font-weight: 300;
    color: #000;
    margin: 0 0 4px;
    line-height: 1.3;
}

.ohwow-flip-card__role {
    font-family: var(--ohwow-font-body);
    font-size: 0.875rem;
    color: #525252;
    margin: 0;
}

/* CTA button */
.ohwow-flip-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: #BCED09;
    color: #000;
    font-family: var(--ohwow-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #000;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ohwow-flip-card__btn:hover {
    background: rgba(188, 237, 9, 0.9);
}

.ohwow-flip-card__btn svg {
    width: 16px;
    height: 16px;
    stroke: #000;
    stroke-width: 2;
    fill: none;
}

/* ============================
   FRONT - Imagen Responsiva con Ajuste Completo
   ============================ */
.ohwow-flip-card__image {
    flex: 1;
    min-height: 0;
    background: #d4d4d4;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
    height: 100%; /* Aseguramos que el contenedor tenga una altura de 100% */
    background-color: #d4d4d4; /* Color de fondo si la imagen no cubre todo el contenedor */
}

.ohwow-flip-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ajusta la imagen para que se vea completa dentro del contenedor */
    display: block;
}

/* Placeholder when no image */
.ohwow-flip-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.ohwow-flip-card__image--empty::after {
    content: '';
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

/* ============================
   Responsive Adjustments
   ============================ */
@media (max-width: 1024px) {
    .ohwow-flip-card__image {
        height: 300px; /* Ajustamos la altura en tabletas */
    }
}

@media (max-width: 767px) {
    .ohwow-flip-card__image {
        height: 200px; /* Ajustamos la altura en dispositivos móviles */
    }
}


/* ============================
   Responsive Adjustments
   ============================ */
@media (max-width: 1024px) {
    .ohwow-flip-card__image {
        height: 300px; /* Ajustamos la altura en tabletas */
    }
}

@media (max-width: 767px) {
    .ohwow-flip-card__image {
        height: 200px; /* Ajustamos la altura en dispositivos móviles */
    }
}


/* ============================
   Team Button */
.ohwow-flip-card__btn.team-btn {
    background: #BCED09;
    color: #000;
    border: 1px solid #000;
}

.ohwow-flip-card__btn.team-btn:hover {
    background: rgba(188, 237, 9, 0.9);
}

/* Project Button */
.ohwow-flip-card__btn.project-btn {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

.ohwow-flip-card__btn.project-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
}


/* ============================
   BACK
   ============================ */
.ohwow-flip-card__back {
    transform: rotateY(180deg);
    z-index: 1;
    background: #000;
    padding: 32px;
}

.ohwow-flip-card__back .ohwow-flip-card__tag {
    background: #BCED09;
    color: #000;
    border-color: #BCED09;
    display: inline-block;
    width: auto;
    align-self: flex-start;
}

.ohwow-flip-card__back .ohwow-flip-card__name {
    color: #fff;
    margin-bottom: 8px;
}

.ohwow-flip-card__back .ohwow-flip-card__role {
    color: #a3a3a3;
    margin-bottom: 16px;
}

.ohwow-flip-card__back .ohwow-flip-card__info {
    margin-bottom: 16px;
}

/* Skills list */
.ohwow-flip-card__skills {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ohwow-flip-card__skill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--ohwow-font-body);
    font-size: 0.875rem;
    color: #fff;
}

.ohwow-flip-card__skill svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

/* Back header */
.ohwow-flip-card__back .ohwow-flip-card__header {
    margin-bottom: 24px;
}

.ohwow-flip-card__back .ohwow-flip-card__toggle svg {
    stroke: #fff;
}

.ohwow-flip-card__back .ohwow-flip-card__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Back: project year */
.ohwow-flip-card__year {
    font-family: var(--ohwow-font-body);
    font-size: 0.8125rem;
    color: #a3a3a3;
    margin: 0;
}

/* Back: project description */
.ohwow-flip-card__desc {
    font-family: var(--ohwow-font-body);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0 0 20px;
}

/* Back: project skill chips */
.ohwow-flip-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ohwow-flip-card__chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #BCED09;
    border-radius: 50px;
    font-family: var(--ohwow-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: #BCED09;
    line-height: 1;
    white-space: nowrap;
}

/* Back CTA button */
.ohwow-flip-card__back .ohwow-flip-card__btn {
    margin-top: auto;
}

.ohwow-flip-card__back .ohwow-flip-card__btn.team-btn,
.ohwow-flip-card__back .ohwow-flip-card__btn.project-btn {
    background: #BCED09 !important;
    color: #000 !important;
    border: 1px solid #BCED09 !important;
}

.ohwow-flip-card__back .ohwow-flip-card__btn.project-btn:hover {
    background: rgba(188, 237, 9, 0.9) !important;
}

/* Team Button */
.ohwow-flip-card__btn.team-btn {
    background: #BCED09;
    color: #000;
    border: 1px solid #000;
}

.ohwow-flip-card__btn.team-btn:hover {
    background: rgba(188, 237, 9, 0.9);
}

/* Project Button */
.ohwow-flip-card__btn.project-btn {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

.ohwow-flip-card__btn.project-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 767px) {
    .ohwow-flip-card {
        height: 460px;
    }
}

/* ============================
   Card Grid — max 3 per row, centered last row
   ============================ */
.ohwow-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-items: center;
    width: 100%;
}

/* Center last row when not full */
.ohwow-card-grid .ohwow-flip-card {
    width: 100%;
}

/* When 2 items on last row of 3-col grid, center them */
.ohwow-card-grid .ohwow-flip-card:last-child:nth-child(3n - 1) {
    grid-column-end: -2;
}

.ohwow-card-grid .ohwow-flip-card:nth-last-child(2):nth-child(3n + 1) {
    grid-column-end: 2;
}

/* Responsive grid */
@media (max-width: 1024px) {
    .ohwow-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .ohwow-card-grid {
        grid-template-columns: 1fr !important;
    }
}
