/* v2/css/site.css - V2 sayfalarının ortak iskeleti: üst menü, sayfa başlığı, filtreler, arama, alt bilgi */

[hidden] {
    display: none !important;
}

body.site-page {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
}

/* ---------- Top navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px max(20px, calc((100% - 1200px) / 2));
    background: rgba(10, 14, 23, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #a275f0);
    display: grid;
    place-items: center;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(99, 80, 242, 0.35);
}

.nav-links {
    display: flex;
    gap: 4px;
    margin-right: auto;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: #fff;
    background: rgba(99, 80, 242, 0.16);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 9px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.btn-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.nav-links a i {
    font-size: 13px;
    margin-right: 3px;
    opacity: 0.8;
}

/* ---------- Member area in the nav ---------- */
.nav-member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rights-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 9px;
    background: rgba(26, 213, 152, 0.1);
    border: 1px solid rgba(26, 213, 152, 0.35);
    color: var(--success);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.rights-pill:hover {
    background: rgba(26, 213, 152, 0.18);
}

.profile-menu {
    position: relative;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.profile-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-btn:focus-visible {
    outline: 2px solid #a275f0;
    outline-offset: 2px;
}

.profile-btn .fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #a275f0);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 12px;
    color: #fff;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    padding: 8px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    z-index: 60;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-head strong {
    display: block;
    font-size: 14px;
    color: #fff;
}

.profile-head small {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-dropdown a,
.profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: none;
    color: #ced4e2;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover,
.profile-dropdown a:focus-visible,
.profile-dropdown button:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
}

.profile-dropdown i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.profile-dropdown .profile-logout,
.profile-dropdown .profile-logout i {
    color: #f87171;
}

.profile-mobile-only {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Toasts ---------- */
.toast-stack {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    animation: toast-in 0.25s ease;
}

.toast-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--primary);
}

.toast.success .toast-icon {
    background: #059669;
}

.toast.error .toast-icon {
    background: #dc2626;
}

.toast.warning .toast-icon {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Page layout & header ---------- */
.page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 20px 64px;
    flex: 1;
}

.page-header {
    margin-bottom: 28px;
}

.eyebrow,
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.eyebrow {
    margin-bottom: 10px;
}

.page-header h1 {
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 6px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Filter chips ---------- */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 9px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.filter-chip:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.filter-chip:focus-visible {
    outline: 2px solid #a275f0;
    outline-offset: 2px;
}

.chip-count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.filter-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.22);
}

/* ---------- Search ---------- */
.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field i {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 15px;
    padding: 16px 18px 16px 48px;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field input::placeholder {
    color: var(--text-muted);
}

.search-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 80, 242, 0.18);
}

/* ---------- Empty state ---------- */
.empty-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.empty-card i {
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.empty-card h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 6px;
}

.empty-card p {
    font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.site-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 10px;
}

.site-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}

.site-footer-links a:hover {
    color: #fff;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .site-nav {
        gap: 8px;
        padding: 12px 16px;
    }

    .brand {
        margin-right: auto;
    }

    .brand-name {
        display: none;
    }

    .nav-links {
        margin-right: 0;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 13px;
    }

    .btn-cta {
        padding: 9px 12px;
        font-size: 13px;
    }

    .page {
        padding: 28px 16px 48px;
    }

    .nav-links a i {
        display: none;
    }

    .site-nav.is-member .nav-links,
    .site-nav:not(.is-member) .nav-links a[href="/redeem"] {
        display: none;
    }

    .profile-label {
        display: none;
    }

    .profile-mobile-only {
        display: flex !important;
    }

    .toast-stack {
        top: 70px;
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .btn-cta,
    .filter-chip {
        transition: none;
    }

    .toast {
        animation: none;
    }
}
