/* ============================================
   WHERE WE ARE - Presencia Internacional
   ============================================ */

.where-we-are {
    position: relative;
    padding: var(--spacing-2xl) 0;
    background-color: #ffffff;
    overflow: hidden;
    text-align: center;
}

/* Background decorativo */
.where-we-are__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/where-we-are/world-map-dots-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.where-we-are__container {
    max-width: 1540px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header de la sección */
.where-we-are__header {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
}

.where-we-are__subtitle {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.where-we-are__title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
    margin-bottom: 0;
}

/* Grid de países */
.where-we-are__countries {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-3xl);
    padding: var(--spacing-xl) 0;
}

/* Tarjeta de país */
.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: translateY(-10px);
}

/* Contenedor de la silueta del país */
.country-card__shape {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagen con máscara SVG */
.country-card__image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: transform 0.3s ease;
    filter: brightness(1);
}

.country-card:hover .country-card__image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Bandera */
.country-card__flag {
    position: relative;
    width: 80px;
    height: 80px;
    margin-top: calc(var(--spacing-lg) * -1);
    margin-bottom: var(--spacing-md);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    padding: 8px;
    z-index: 2;
}

.country-card__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Nombre del país */
.country-card__name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

/* Responsive - Tablets */
@media (max-width: 1024px) {
    .where-we-are {
        padding: var(--spacing-2xl) 0;
    }

    .where-we-are__header {
        margin-bottom: var(--spacing-3xl);
    }

    .where-we-are__title {
        font-size: var(--font-size-3xl);
    }

    .where-we-are__countries {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }

    .country-card__shape {
        max-width: 240px;
    }

    .country-card__flag {
        width: 70px;
        height: 70px;
    }

    .country-card__name {
        font-size: var(--font-size-lg);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .where-we-are {
        padding: var(--spacing-2xl) 0;
    }

    .where-we-are__header {
        margin-bottom: var(--spacing-2xl);
    }

    .where-we-are__subtitle {
        font-size: var(--font-size-xs);
        letter-spacing: 1.5px;
    }

    .where-we-are__title {
        font-size: var(--font-size-2xl);
    }

    .where-we-are__countries {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        max-width: 320px;
        margin: 0 auto;
    }

    .country-card__shape {
        max-width: 220px;
    }

    .country-card__flag {
        width: 60px;
        height: 60px;
        margin-top: calc(var(--spacing-md) * -1);
    }

    .country-card__name {
        font-size: var(--font-size-base);
    }

    .country-card:hover {
        transform: translateY(-5px);
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .where-we-are {
        padding: var(--spacing-2xl) 0;
    }

    .where-we-are__countries {
        max-width: 280px;
    }

    .country-card__shape {
        max-width: 200px;
    }
}
