﻿

/* ============ هدر ============ */
.page-header {
    max-width: 1300px;
    margin: 0 auto 2rem;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.9rem;
    position: relative;
    margin-bottom: 0.85rem;
}

    .page-title i {
        color: var(--gold);
        font-size: 2.1rem;
        filter: drop-shadow(0 6px 14px var(--gold-glow));
        animation: pulse 3s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.page-title span {
    background: linear-gradient(135deg, var(--ink) 20%, var(--gold) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--ink), var(--gold), transparent);
    border-radius: 4px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--ink-soft);
    font-weight: 500;
    max-width: 680px;
    margin: 0 auto;
}

/* ============ دکمه بازگشت ============ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    background: var(--white);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 40px;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    margin-bottom: 1.75rem;
}

    .back-btn:hover {
        border-color: var(--gold);
        color: var(--gold-dark);
        transform: translateX(-4px);
        box-shadow: var(--shadow-md);
    }

    .back-btn i {
        color: var(--gold);
    }

/* ============================================================
           حالت لیست
           ============================================================ */
.list-toolbar {
    max-width: 1300px;
    margin: 0 auto 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.stat-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    border: 1.5px solid var(--gold);
    border-radius: 60px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(212, 175, 55, 0.1);
}

    .stat-box i {
        color: var(--gold);
        font-size: 1.35rem;
        filter: drop-shadow(0 0 8px var(--gold-glow));
    }

.stat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

    .stat-text small {
        color: rgba(212, 175, 55, 0.75);
        font-size: 0.72rem;
        font-weight: 600;
    }

    .stat-text strong {
        color: var(--gold);
        font-size: 1.15rem;
        font-weight: 800;
    }

.search-box {
    position: relative;
    flex: 1 1 320px;
    max-width: 460px;
}

    .search-box i {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gold);
        font-size: 1.05rem;
        pointer-events: none;
    }

    .search-box input {
        width: 100%;
        padding: 0.9rem 3.2rem 0.9rem 1.2rem;
        font-family: inherit;
        font-size: 0.95rem;
        color: var(--ink);
        background: var(--white);
        border: 2px solid var(--ink);
        border-radius: 60px;
        outline: none;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-sm);
    }

        .search-box input::placeholder {
            color: var(--ink-muted);
        }

        .search-box input:focus {
            border-color: var(--gold);
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18), var(--shadow-md);
        }

/* گرید باشگاه‌ها */
.clubs-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

/* کارت باشگاه */
.club-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cardIn 0.55s cubic-bezier(0.2, 0.9, 0.4, 1) backwards;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.club-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
    z-index: 5;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.club-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

/* ============================================================
           Carousel (مشترک بین list و detail)
           ============================================================ */
.carousel {
    position: relative;
    overflow: hidden;
    background: #000;
    user-select: none;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .carousel-slide.active {
        opacity: 1;
        position: relative;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* دکمه‌های ناوبری */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .carousel-prev:hover,
    .carousel-next:hover {
        background: var(--gold);
        color: var(--ink);
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 20px var(--gold-glow);
    }

.carousel-prev {
    right: 12px;
}

.carousel-next {
    left: 12px;
}

    .carousel-prev.hidden,
    .carousel-next.hidden {
        display: none;
    }

/* شمارنده */
.carousel-counter {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--gold);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(6px);
    z-index: 10;
    letter-spacing: 0.5px;
}

/* نقطه‌ها */
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

    .carousel-dot.active {
        background: var(--gold);
        width: 22px;
        border-radius: 4px;
        box-shadow: 0 0 8px var(--gold-glow);
    }

/* حالت بدون تصویر */
.carousel-empty {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--gold);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

    .carousel-empty i {
        font-size: 3rem;
        opacity: 0.7;
        filter: drop-shadow(0 0 12px var(--gold-glow));
    }

    .carousel-empty span {
        font-size: 0.85rem;
        font-weight: 600;
        color: rgba(212, 175, 55, 0.7);
    }

/* ---------- مینی کاروسل (کارت لیست) ---------- */
.club-card .carousel {
    aspect-ratio: 16 / 10;
}

.club-card .carousel-empty {
    aspect-ratio: 16 / 10;
}

.club-card .carousel-prev,
.club-card .carousel-next {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.club-card .carousel-prev {
    right: 8px;
}

.club-card .carousel-next {
    left: 8px;
}

/* اطلاعات کارت */
.club-body {
    padding: 1.4rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.club-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.5;
}

.club-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

    .meta-badge i {
        font-size: 0.82rem;
    }

.club-description {
    font-size: 0.87rem;
    color: var(--ink-soft);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.85em;
}

.club-footer {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.btn-view-detail {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--gold);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 40px;
    border: 1.5px solid var(--gold);
    transition: all 0.3s ease;
}

    .btn-view-detail:hover {
        background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
        color: var(--ink);
        border-color: var(--ink);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(212, 175, 55, 0.45);
    }

    .btn-view-detail i {
        font-size: 0.95rem;
    }

/* ============================================================
           حالت جزئیات (Detail)
           ============================================================ */
.detail-wrapper {
    max-width: 1300px;
    margin: 0 auto;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* کاروسل اصلی */
.detail-carousel-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    animation: cardIn 0.6s cubic-bezier(0.2, 0.9, 0.4, 1);
}

    .detail-carousel-wrapper::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
        background-size: 200% 100%;
        animation: shimmer 4s linear infinite;
        z-index: 15;
    }

    .detail-carousel-wrapper .carousel {
        aspect-ratio: 16 / 10;
    }

    .detail-carousel-wrapper .carousel-empty {
        aspect-ratio: 16 / 10;
    }

    .detail-carousel-wrapper .carousel-prev,
    .detail-carousel-wrapper .carousel-next {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .detail-carousel-wrapper .carousel-prev {
        right: 16px;
    }

    .detail-carousel-wrapper .carousel-next {
        left: 16px;
    }

/* Thumbnails */
.carousel-thumbnails {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1rem 1.25rem;
    overflow-x: auto;
    background: var(--white);
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

    .carousel-thumbnails::-webkit-scrollbar {
        height: 6px;
    }

    .carousel-thumbnails::-webkit-scrollbar-thumb {
        background: var(--gold);
        border-radius: 3px;
    }

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
    position: relative;
    background: #f0f0f0;
}

    .thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .thumbnail-item:hover {
        opacity: 1;
        transform: scale(1.05);
    }

    .thumbnail-item.active {
        opacity: 1;
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    }

/* اطلاعات باشگاه */
.detail-info {
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-md);
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    animation: cardIn 0.6s cubic-bezier(0.2, 0.9, 0.4, 1) 0.1s backwards;
}

    .detail-info::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
        background-size: 200% 100%;
        animation: shimmer 4s linear infinite;
    }

.detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1.5px dashed rgba(212, 175, 55, 0.35);
}

.detail-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--gold);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

    .detail-icon i {
        color: var(--gold);
        font-size: 2rem;
        filter: drop-shadow(0 0 8px var(--gold-glow));
    }

.detail-title-wrap {
    flex: 1;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.detail-city {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

    .detail-city i {
        font-size: 0.9rem;
    }

.detail-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.detail-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--gold-soft);
    border-radius: var(--radius-sm);
    border-right: 3px solid var(--gold);
}

    .detail-info-row > i {
        color: var(--gold-dark);
        font-size: 1.1rem;
        flex-shrink: 0;
        margin-top: 0.2rem;
    }

    .detail-info-row > div {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        flex: 1;
    }

.detail-info-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.detail-info-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.6;
}

.detail-description-block {
    padding-top: 1.25rem;
    border-top: 1.5px dashed rgba(212, 175, 55, 0.35);
}

.detail-description-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

    .detail-description-title i {
        color: var(--gold);
        font-size: 1.1rem;
    }

.detail-description-text {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.85;
    text-align: justify;
}

/* ============================================================
           حالت خالی
           ============================================================ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    border: 1.5px dashed rgba(212, 175, 55, 0.5);
}

    .empty-state i {
        font-size: 4rem;
        color: var(--gold);
        display: block;
        margin-bottom: 1rem;
        opacity: 0.6;
    }

    .empty-state h3 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--ink);
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: var(--ink-muted);
        font-size: 0.95rem;
    }

/* ============================================================
           رسپانسیو
           ============================================================ */
@media (max-width: 900px) {
    .page-title {
        font-size: 1.9rem;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-carousel-wrapper .carousel-prev,
    .detail-carousel-wrapper .carousel-next {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .detail-carousel-wrapper .carousel-prev {
        right: 10px;
    }

    .detail-carousel-wrapper .carousel-next {
        left: 10px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.75rem 1rem 3rem;
    }

    .page-title {
        font-size: 1.55rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

        .page-title i {
            font-size: 1.4rem;
        }

    .list-toolbar {
        gap: 0.75rem;
    }

    .stat-box {
        padding: 0.7rem 1.1rem;
        width: 100%;
        justify-content: center;
    }

    .clubs-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .detail-info {
        padding: 1.5rem 1.25rem;
    }

    .detail-title {
        font-size: 1.25rem;
    }

    .detail-icon {
        width: 56px;
        height: 56px;
    }

        .detail-icon i {
            font-size: 1.6rem;
        }

    .thumbnail-item {
        width: 68px;
        height: 50px;
    }
}
