/* ============================================================
   MEMBERS.CSS — MIRA Division (Sections + Animated Borders)
   ============================================================ */

/* ---------- SECTION CONTAINER ---------- */
.member-section {
    max-width: 1300px;
    width: 100%;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

/* ---------- SECTION HEADING (INCREASED SPACING) ---------- */
.section-heading {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-family: var(--font-primary);
    color: var(--cyan);
    text-shadow: var(--cyan-glow);
    margin-bottom: 50px;        /* Increased spacing below title */
    position: relative;
    text-align: center;
    display: block;
}

.section-heading::after {
    content: '';
    display: block;
    margin: 12px auto 0;
    height: 3px;
    width: 80px;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
    box-shadow: var(--cyan-glow);
}

/* ---------- GRID LAYOUT: 3 PER ROW ON DESKTOP ---------- */
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ---------- MEMBER CARD WITH ANIMATED ORANGE BORDER ---------- */
.member-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 85, 0, 0.4);
    border-radius: 30px;
    padding: 40px 25px 35px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.1, 1), box-shadow 0.4s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 85, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: borderPulse 2.5s infinite alternate;
}

@keyframes borderPulse {
    0% {
        border-color: rgba(255, 85, 0, 0.4);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 85, 0, 0.3);
    }
    100% {
        border-color: rgba(255, 85, 0, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 85, 0, 0.8);
    }
}

.member-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}

.member-card:hover {
    transform: scale(1.05) translateY(-10px);
    border-color: var(--cyan);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 255, 0.4), 0 0 80px rgba(255, 85, 0, 0.2);
    animation: none;
}

.member-card:hover::before {
    opacity: 1;
}

/* ---------- MEMBER IMAGE ---------- */
.member-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--cyan);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transition: all 0.4s;
    position: relative;
    z-index: 1;
}

.member-card:hover .member-image {
    border-color: var(--orange);
    box-shadow: 0 0 40px rgba(255, 85, 0, 0.6);
    transform: scale(1.02);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.member-card:hover .member-image img {
    transform: scale(1.1);
}

/* ---------- MEMBER INFO ---------- */
.member-info {
    position: relative;
    z-index: 1;
}

.member-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.member-name {
    font-size: 1.8rem;
    color: var(--cyan);
    text-shadow: var(--cyan-glow);
    margin: 0;
}

.member-card:hover .member-name {
    color: var(--white);
    text-shadow: 0 0 15px var(--cyan), 0 0 5px var(--orange);
}

.member-badges {
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-flag img,
.game-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 4px rgba(0,255,255,0.5));
    transition: transform 0.2s;
}

.country-flag img:hover,
.game-icon img:hover {
    transform: scale(1.2);
}

.member-role {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--orange);
    margin-bottom: 15px;
    font-weight: 600;
}

.member-desc {
    font-size: 0.95rem;
    color: var(--gray-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ---------- SOCIAL BUTTONS ---------- */
.member-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
}

.member-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--cyan);
    font-size: 1.2rem;
    transition: all 0.2s;
    text-decoration: none;
}

.member-socials a:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--black);
    box-shadow: 0 0 15px var(--orange);
    transform: translateY(-3px);
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 1000px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .members-grid {
        grid-template-columns: 1fr;
    }
    .member-card {
        max-width: 400px;
        margin: 0 auto;
    }
    .section-heading {
        margin-bottom: 40px;      /* Slightly smaller on mobile */
    }
}