/* ============================================
   MIEMBROS POR PAÍS
   ============================================ */

/* Hero */
.members-hero {
    margin-top: 80px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(6, 182, 212, 0.85)),
                url('images/hero-paises.jpg') center/cover;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
}

.members-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.members-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb span {
    opacity: 0.8;
}

/* Selector de Países */
.countries-selector {
    padding: 5rem 2rem;
    background: var(--bg-light);
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.country-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.country-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.flag-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.country-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.flag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(6, 182, 212, 0.3));
    opacity: 0;
    transition: var(--transition);
}

.country-card:hover .flag-overlay {
    opacity: 1;
}

.country-card:hover .country-flag {
    transform: scale(1.1);
}

.country-card h3 {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.member-count {
    padding: 0 1rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.member-count::before {
    content: '\f0c0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

/* Sección de Miembros */
.members-section {
    padding: 5rem 2rem;
    background: var(--white);
    display: none;
}

.members-section.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-5px);
}

#country-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.member-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    border: 2px solid transparent;
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.member-card-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.member-card:hover .member-photo {
    transform: scale(1.1);
}

.member-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.member-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #808080);
}

.member-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1f2937;
}

.member-badge.platinum {
    background: linear-gradient(135deg, #e5e4e2, #a8a8a8);
}

.member-card-body {
    padding: 1.5rem;  /* Reducido de 2rem a 1.5rem */
}

.member-name {
    font-size: 1.4rem;  /* Ligeramente más pequeño */
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.member-role {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.member-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;  /* Aumentado para separar de los botones */
}

.member-location i {
    color: var(--secondary-color);
}

.member-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;  /* Añadido para mejor separación */
}

.btn-view-profile {
    flex: 1;
    padding: 0.875rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-profile:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-contact {
    flex: 1;
    padding: 0.875rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-contact:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .members-hero-content h1 {
        font-size: 2.5rem;
    }

    .countries-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .members-hero {
        padding: 3rem 1rem;
    }

    .members-hero-content h1 {
        font-size: 2rem;
        flex-direction: column;
    }

    .countries-selector {
        padding: 3rem 1rem;
    }

    .countries-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .flag-container {
        height: 150px;
    }

    .members-section {
        padding: 3rem 1rem;
    }

    .members-header {
        flex-direction: column;
        text-align: center;
    }

    #country-title {
        font-size: 2rem;
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .member-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .countries-grid {
        grid-template-columns: 1fr;
    }

    .flag-container {
        height: 180px;
    }

    .member-card-header {
        height: 200px;
    }
}
/* Enlace de la foto del miembro */
.member-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 16px 16px 0 0; /* Mantiene las esquinas redondeadas arriba */
    overflow: hidden;
}

.member-card-link:hover .member-photo {
    transform: scale(1.1);
}
/* ============================================
   BOTÓN VER PERFIL - CENTRADO
   ============================================ */
.member-actions-single {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-view-profile-centered {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    min-width: 180px;
    justify-content: center;
}

.btn-view-profile-centered:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.btn-view-profile-centered i {
    font-size: 1.1rem;
}