/* Modern Style - Complete Fixed Version */

/* فونت‌های محلی Vazirmatn */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2'),
         url('/static/fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2'),
         url('/static/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-display: swap;
    font-weight: 700;
}

/* فونت Digi Madasi Bold */
@font-face {
    font-family: 'Digi Madasi';
    src: url('/static/fonts/Digi Madasi Bold.ttf') format('truetype');
    font-display: swap;
    font-weight: 700;
}

:root {
    --primary: #0D9488;
    --primary-light: #5EEAD4;
    --primary-dark: #0F766E;
    --secondary: #14B8A6;
    --secondary-light: #67E8F9;
    --success: #10B981;
    --warning: #FFC947;
    --danger: #EF4444;
    --dark: #0F766E;
    --light: #F0FDFC;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: #F8F9FA;
    -webkit-font-smoothing: antialiased;
}

/* ================== Wrapper ================== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding-bottom: 0;
    position: relative;
    overflow-x: hidden;
}

/* ================== Sidebar ================== */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: rgba(128, 128, 128, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease-out;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.sidebar::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.03);
    }
}

.sidebar-header {
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 1rem;
    z-index: 100;
    
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    
    /* Border */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    
    /* Shadows */
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.15) !important;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 
        0 10px 40px 0 rgba(0, 0, 0, 0.45),
        inset 0 1px 2px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

.sidebar-brand {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-brand i {
    margin-left: 0.5rem;
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(94, 234, 212, 0.3));
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* ================== Sidebar Navigation ================== */
.sidebar-nav {
    flex: 1;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.15), rgba(20, 184, 166, 0.1));
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link i {
    font-size: 1.1rem;
    margin-left: 0.75rem;
    width: 22px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(-3px);
    backdrop-filter: blur(10px);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover i {
    transform: scale(1.15);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.2), rgba(20, 184, 166, 0.15));
    color: white;
    box-shadow: 0 4px 15px rgba(94, 234, 212, 0.25);
    border-right: 3px solid #0D9488;
}

.nav-link.active i {
    color: #0D9488;
}

.nav-divider {
    padding: 1rem 1.25rem 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ================== Sidebar Footer ================== */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: 0.75rem;
    font-size: 1.1rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.group-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.group-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.btn-logout,
.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.btn-logout:hover,
.btn-login:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
}

/* ================== Main Content ================== */
.main-content {
    margin-right: var(--sidebar-width);
    flex: 1;
    width: 100%;
    min-height: calc(100vh - 0px);
    display: flex;
    flex-direction: column;
    background: #F8F9FA;
    overflow-x: hidden;
    max-width: 100%;
}

/* ================== Mobile Header ================== */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-user i {
    font-size: 1.5rem;
}

/* ================== Page Content ================== */
.page-content {
    flex: 1;
    padding: 1.5rem;
    width: 100%;
}

.page-content .container-fluid {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* ================== Modern Alert ================== */
.modern-alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ================== Modern Footer ================== */
.modern-footer {
    padding: 2rem 2rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 2px solid rgba(94, 234, 212, 0.3);
    margin-top: auto;
    color: #94a3b8;
    font-size: 0.875rem;
    width: 100%;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.modern-footer p,
.modern-footer small {
    color: #cbd5e1 !important;
}

.footer-link {
    color: #0D9488;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    background: rgba(94, 234, 212, 0.1);
    border: 1px solid rgba(94, 234, 212, 0.2);
}

.footer-link:hover {
    color: #6ee7b7;
    background: rgba(94, 234, 212, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(94, 234, 212, 0.3);
}

.footer-link i {
    font-size: 1.1rem;
}

/* ================== Sidebar Overlay (Mobile) ================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ================== Modern Cards ================== */
.modern-card {
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: 0 25px 60px -25px rgba(13, 148, 136, 0.35);
    border: 1px solid rgba(13, 148, 136, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: visible;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 70px -30px rgba(13, 148, 136, 0.45);
    border-color: rgba(13, 148, 136, 0.2);
}

/* ================== Modern Header ================== */
.modern-header {
    position: sticky;
    top: 1.5rem;
    z-index: 999;
    margin: 1.5rem 1.5rem 2rem 1.5rem;
    padding: 1rem 1.5rem;
    
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    /* Border & Shadow */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    
    /* Layout */
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    
    transition: all 0.3s ease;
}

.modern-header:hover {
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.header-menu-btn {
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.6rem 0.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.header-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: rotate(-5deg) scale(1.05);
}

.header-title {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.header-spacer {
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

.header-notification-btn {
    position: relative;
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.6rem 0.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.header-notification-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.notification-dropdown {
    position: relative;
}

.notification-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    max-height: 500px;
    z-index: 1000;
    overflow: hidden;
}

.notification-menu.active {
    display: flex;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0D9488, #5EEAD4);
    color: white;
}

.notification-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.btn-mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #eff6ff;
    border-right: 3px solid #3b82f6;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 0.25rem;
}

.notification-item-message {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.notification-loading,
.notification-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.notification-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Scrollbar styling */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .modern-header {
        margin: 1rem;
        padding: 0.75rem 0.5rem;
        top: 1rem;
        gap: 0.5rem;
        min-width: 0;
    }
    
    .header-title {
        font-size: 0.85rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .header-logo {
        gap: 0.5rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .header-notification-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        padding: 0.5rem;
        flex-shrink: 0;
    }
    
    .notification-menu {
        width: calc(100vw - 2rem);
        max-width: 350px;
        left: auto;
        right: 0;
    }
}

/* ================== Vertical Slider ================== */
.vertical-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(94, 234, 212, 0.3);
}

.vertical-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.5s ease-in-out;
    z-index: 1;
}

.slider-item.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.slider-item.prev {
    transform: translateX(100%);
    z-index: 0;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(94, 234, 212, 0.2));
    backdrop-filter: blur(2px);
    z-index: 1;
}

.slider-overlay h3 {
    color: white;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
    font-family: 'Digi Madasi', 'Vazirmatn', sans-serif;
}

.slider-overlay p {
    color: white;
    font-size: 1.8rem;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    font-family: 'Digi Madasi', 'Vazirmatn', sans-serif;
}

.slider-subtitle {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.2s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    margin-top: 0.5rem;
    margin-bottom: 0;
    letter-spacing: 1px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    width: 35px;
    border-radius: 10px;
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vertical-slider-container {
        height: 300px;
    }
    
    .slider-overlay h3 {
        font-size: 2.2rem;
    }
    
    .slider-overlay p {
        font-size: 1.3rem;
    }
    
    .slider-subtitle {
        font-size: 1.2rem;
        margin-top: 0.4rem;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .arrow-up {
        top: 15px;
    }
    
    .arrow-down {
        bottom: 15px;
    }
}

/* Slider Caption */
.slider-caption-text {
    color: #0D9488;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(94, 234, 212, 0.1));
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.15);
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    letter-spacing: 0.5px;
}

.slider-caption-text i {
    color: #0D9488;
    font-size: 1.3rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .slider-caption-text {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .slider-caption-text i {
        font-size: 1.1rem;
    }
}

/* ================== Gradient Hero ================== */
.gradient-hero {
    background: linear-gradient(135deg, 
        #0D9488 0%, 
        #5EEAD4 25%, 
        #0F766E 50%, 
        #5EEAD4 75%, 
        #0D9488 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease-in-out infinite;
    border-radius: 28px;
    padding: 3.5rem 2.5rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(13, 148, 136, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

.gradient-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
    }
    50% { 
        transform: translate(15px, 15px) scale(1.05);
    }
}

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero h3,
.gradient-hero h4,
.gradient-hero p {
    position: relative;
    z-index: 2;
    color: white !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.gradient-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease;
}

.gradient-hero h3 {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease;
    margin-bottom: 0.5rem !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description Collapse */
.description-wrapper {
    position: relative;
    z-index: 2;
}

.description-text {
    max-height: 1.8em;
    overflow: hidden;
    line-height: 1.8em;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    padding-bottom: 40px;
    position: relative;
    opacity: 1;
}

.description-text.expanded {
    max-height: 500px;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.description-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -30px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 3;
}

.description-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.description-toggle i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}

/* ================== Modern Buttons ================== */
.btn-modern {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    display: inline-block;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-gradient {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.7), rgba(13, 148, 136, 0.85), rgba(13, 148, 136, 0.95));
    color: white !important;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.8), rgba(13, 148, 136, 0.9), var(--primary));
    color: white !important;
}

/* ================== Stats Grid ================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(13, 148, 136, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(13, 148, 136, 0.25);
    border-color: rgba(13, 148, 136, 0.2);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 2.2rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    font-family: 'Vazirmatn', sans-serif;
}

.stat-label {
    color: #6B7280;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* ================== Tables ================== */
.table {
    background: white;
    color: #333;
    width: 100%;
}

.table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white !important;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table td {
    color: #333 !important;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 148, 136, 0.05);
    transform: scale(1.01);
}

.table-rankings {
    font-size: 0.95rem;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.table-responsive .table {
    margin-bottom: 0;
}

.card-body {
    overflow: hidden;
    padding: 1rem !important;
}

/* Fix for stage rankings cards */
.card .table-responsive {
    margin: 0;
    padding: 0;
}

.card .table-responsive .table {
    width: 100%;
    table-layout: auto;
}

.card .table-responsive .table td,
.card .table-responsive .table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Persian numbers with bold weight */
.badge.fw-bold {
    font-weight: 900 !important;
    font-family: 'Vazirmatn', sans-serif;
}

/* ================== Responsive ================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(100%);
        animation: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar:not(.active) {
        transform: translateX(100%);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .page-content {
        padding: 0.75rem;
    }
    
    .modern-card {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.2rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .gradient-hero {
        padding: 2rem 1.5rem;
    }
    
    .gradient-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .modern-card {
        padding: 1.5rem;
    }
    
    .table-rankings {
        font-size: 0.85rem;
    }
    
    .table-rankings td,
    .table-rankings th {
        padding: 0.75rem 0.5rem;
    }
    
    .table-responsive {
        overflow-x: visible !important;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: normal;
    }
    
    .member-avatar {
        width: 32px;
        height: 32px;
        margin-left: 0.5rem;
        font-size: 0.9rem;
    }
    
    .rank-badge {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
    }
}

/* ================== Utilities ================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fix for cards and alerts */
.card {
    background: white;
    color: #333;
}

.card-body {
    color: #333;
}

.alert {
    color: #333;
}

.alert-success {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15), rgba(94, 234, 212, 0.1));
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: #0F766E;
}

.alert-warning {
    background: linear-gradient(135deg, #FFF3CD, #FFE69C);
    border: none;
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(94, 234, 212, 0.1));
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: #0D9488;
}

.alert-danger {
    background: linear-gradient(135deg, #F8D7DA, #F5C6CB);
    border: none;
    color: #721c24;
}

/* Container fluid full width */
.container-fluid {
    width: 100%;
    max-width: 100%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    margin-right: auto;
    margin-left: auto;
}

.row {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.row > * {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}
