* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #010e2e 0%, #021f43 50%, #1a5689 100%);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    /* background: white; */
    border-radius: 50%;
    animation: twinkle 8s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 1));
    border-radius: 50%;
    animation: shootingStar 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
}

@keyframes shootingStar {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(45deg);
    }

    70% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: translate3d(400px, 400px, 0) rotate(45deg);
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.hero>picture {
    display: block;
    width: 100%;
    margin: 0;
}

.header-large-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.members-section {
    border-radius: 30px;
    padding: 3rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 181, 239, 0.22);
    position: relative;
    margin-top: 3rem;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
}

.members-grid-container {
    position: relative;
    max-height: 720px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

.members-grid-container::-webkit-scrollbar {
    width: 8px;
}

.members-grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.members-grid-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.members-grid-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.7);
}

.members-section:hover .members-grid-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
}

[dir="rtl"] .member-card {
    text-align: right;
}

[dir="rtl"] .footer-links,
[dir="rtl"] .footer-social {
    direction: rtl;
}

.scroll-indicator {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    color: #D4AF37;
    font-size: 2rem;
    animation: bounce 2s infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.scroll-indicator.show {
    opacity: 1;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #D4AF37;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.members-count {
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #64B5EF;
    text-shadow: 0 2px 10px rgba(100, 181, 239, 0.25);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.member-card {
    border-radius: 20px;
    padding: 1.4rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 181, 239, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 1rem;
    text-align: right;
    position: relative;
}

.member-card.empty {
    justify-content: center;
    text-align: center;
    background: rgba(5, 16, 40, 0.35);
    border-style: dashed;
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    border-color: rgba(120, 190, 255, 0.40);
    z-index: 10;
}

.member-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background: rgba(100, 181, 239, 0.18);
    border: 1px solid rgba(120, 190, 255, 0.22);
    border-radius: 50%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
}

.member-info {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0;
}

.member-joined {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    font-size: 0.85rem;
    opacity: 0.8;
}

.join-button {
    background: linear-gradient(135deg, #D4AF37 0%, #C5A028 50%, #B8941E 100%);
    color: #1a1a1a;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 3rem;
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.35);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

.join-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(212, 175, 55, 0.48);
    background: linear-gradient(135deg, #E5C158 0%, #D4AF37 50%, #C5A028 100%);
}

/* Responsive Design */

/* Large Monitors - 1920px and above */
@media (min-width: 1920px) {
    .members-section {
        max-width: 1400px;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* Show banner image on large screens */
@media (min-width: 1200px) {
    .header-large-img {
        display: block;
        height: 220px;
    }
}

/* Tablets Landscape - 768px to 1024px */
@media (max-width: 1024px) {
    .members-section {
        width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .members-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .member-card {
        padding: 1.1rem;
        gap: 0.75rem;
    }

    .member-avatar {
        width: 56px;
        height: 56px;
        min-width: 56px;
        font-size: 1.1rem;
    }

    .member-name {
        font-size: 1.05rem;
    }

    .member-info-text {
        min-width: 0;
    }

    .member-name,
    .member-joined {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Tablets Portrait - 600px to 768px */
@media (max-width: 768px) {
    .members-section {
        padding: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .members-grid-container {
        max-height: 550px;
    }

    .join-button {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
    }
}

/* Mobile Landscape - 480px to 600px */
@media (max-width: 600px) {
    .members-section {
        margin-left: 1rem;
        margin-right: 1rem;
        margin-bottom: 0;
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .members-grid-container {
        max-height: min(900px, 70vh);
    }
}

/* Mobile Portrait - 320px to 480px */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .hero {
        padding: 0;
    }

    .members-section {
        padding: 1.5rem;
        border-radius: 20px;
        margin-bottom: 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .member-card {
        padding: 1rem;
    }

    .member-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 1rem;
    }

    .member-name {
        font-size: 1rem;
    }

    .member-joined {
        font-size: 0.8rem;
    }

    .members-grid-container {
        max-height: min(900px, 70vh);
    }

    .join-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        margin-top: 2rem;
    }
}

/* Small Mobile - 320px and below */
@media (max-width: 360px) {
    .section-title {
        font-size: 1.4rem;
    }

    .join-button {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
}

/* Footer */
.footer {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 2rem 1rem 2rem;
    min-height: 300px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./assest/herat-pattern.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
    filter: grayscale(100%) brightness(0.5) blur(3px);
}

.footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 12, 20, 0.5) 0%, transparent 100%);
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #D4AF37;
}

.footer-copyright {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.footer-social-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    color: #D4AF37;
    transform: translateY(-3px);
}