/* ====== Main Site Global Styles ====== */
body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif; font-size: 1rem; color: #222; transition: background 0.3s, color 0.3s; }
.topbar-mobile { display: flex; align-items: center; justify-content: space-between; background: #222; color: #fff; padding: 0.7rem 1rem; border-radius: 0 0 1.2rem 1.2rem; width: 100%; position: fixed; top: 0; right: 0; left: 0; z-index: 1101; margin-bottom: 0; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.topbar-mobile .site-title { font-weight: 700; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-mobile .toggle-switch { position: relative; width: 44px; height: 24px; margin-right: 0.5rem; }
.topbar-mobile .toggle-switch input { opacity: 0; width: 0; height: 0; }
.topbar-mobile .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #444; border-radius: 24px; transition: .4s; }
.topbar-mobile .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .4s; }
.topbar-mobile input:checked + .slider { background: #4caf50; }
.topbar-mobile input:checked + .slider:before { transform: translateX(20px); }
@media (max-width: 767.98px) {
    .topbar-mobile { position: fixed; top: 0; right: 0; left: 0; z-index: 1101; width: 100%; border-radius: 0 0 1.2rem 1.2rem; margin-bottom: 0; }
    body, .main-content { padding-top: 64px !important; }
}
@media (min-width: 768px) {
    .topbar-mobile { border-radius: 1.2rem; margin: 2rem auto 2rem auto; max-width: 700px; position: static; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
}

/* ====== Persian Numbers ====== */
.fa-num {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* ====== Session Cards Grid Layout ====== */
.sessions-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .sessions-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Layout */
@media (max-width: 767px) {
    .sessions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.session-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.session-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.session-card.locked {
    opacity: 0.6;
    background: #f8f9fa;
    transform: none !important;
}

.session-card.locked:hover {
    transform: none !important;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.session-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2ed573;
    background: linear-gradient(45deg, #2ed573, #1e90ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.session-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
}

.session-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-book {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-book:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.status-locked {
    background: #dc3545;
    color: white;
}

.status-booked {
    background: #6c757d;
    color: white;
}

/* ====== Dark Theme ====== */
body.dark-theme { background: #181c24 !important; color: #f8f9fa !important; }
body.dark-theme, body.dark-theme .main-content { color: #f8f9fa !important; }
body.dark-theme .topbar-mobile { background: #232946 !important; color: #fff !important; }
body.dark-theme .topbar-mobile .site-title { color: #fff !important; }
body.dark-theme .toggle-switch .slider { background: #444 !important; }
body.dark-theme .toggle-switch input:checked + .slider { background: #4caf50 !important; }

/* Dark theme for cards and containers */
body.dark-theme .card { background: #232946 !important; color: #f8f9fa !important; border-color: #444 !important; }
body.dark-theme .header { background: rgba(35, 41, 70, 0.95) !important; color: #f8f9fa !important; }
body.dark-theme .date-nav { background: #232946 !important; color: #f8f9fa !important; }
body.dark-theme .date-item { background: #2d3748 !important; color: #f8f9fa !important; border-color: #444 !important; }
body.dark-theme .date-item:hover { background: #374151 !important; }
body.dark-theme .date-item.active { background: linear-gradient(45deg, #667eea, #764ba2) !important; color: #fff !important; }
body.dark-theme .date-item.border-primary { border-color: #667eea !important; }

/* Dark theme for session cards */
body.dark-theme .session-card { background: #232946 !important; color: #f8f9fa !important; border-color: #444 !important; }
body.dark-theme .session-card.locked { background: #1a202c !important; opacity: 0.7 !important; }
body.dark-theme .session-card .badge { background: #374151 !important; color: #f8f9fa !important; }
body.dark-theme .session-card .time-badge { background: linear-gradient(45deg, #ff6b6b, #ee5a24) !important; color: #fff !important; }
body.dark-theme .session-card .price-badge { background: linear-gradient(45deg, #2ed573, #1e90ff) !important; color: #fff !important; }

/* Dark theme for session card details */
body.dark-theme .detail-item { background: #2d3748 !important; border-color: #444 !important; color: #f8f9fa !important; }
body.dark-theme .detail-label { color: #a0aec0 !important; }
body.dark-theme .detail-value { color: #f8f9fa !important; }

/* Dark theme for buttons */
body.dark-theme .btn-primary { background: linear-gradient(45deg, #667eea, #764ba2) !important; border-color: #667eea !important; color: #fff !important; }
body.dark-theme .btn-primary:hover { background: linear-gradient(45deg, #5a67d8, #6b46c1) !important; }
body.dark-theme .btn-outline-primary { border-color: #667eea !important; color: #667eea !important; }
body.dark-theme .btn-outline-primary:hover { background: #667eea !important; color: #fff !important; }
body.dark-theme .btn-outline-light { border-color: #f8f9fa !important; color: #f8f9fa !important; }
body.dark-theme .btn-outline-light:hover { background: #f8f9fa !important; color: #181c24 !important; }

/* Dark theme for form elements */
body.dark-theme .form-control { background: #2d3748 !important; border-color: #444 !important; color: #f8f9fa !important; }
body.dark-theme .form-control:focus { border-color: #667eea !important; box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important; }
body.dark-theme .form-label { color: #f8f9fa !important; }
body.dark-theme input::placeholder { color: #a0aec0 !important; }

/* Dark theme for alerts */
body.dark-theme .alert-info { background: #2c5282 !important; border-color: #3182ce !important; color: #bee3f8 !important; }
body.dark-theme .alert-warning { background: #744210 !important; border-color: #d69e2e !important; color: #faf089 !important; }
body.dark-theme .alert-danger { background: #742a2a !important; border-color: #e53e3e !important; color: #fed7d7 !important; }
body.dark-theme .alert-success { background: #22543d !important; border-color: #38a169 !important; color: #c6f6d5 !important; }

/* Dark theme for text colors */
body.dark-theme .text-muted { color: #a0aec0 !important; }
body.dark-theme .text-primary { color: #667eea !important; }
body.dark-theme .text-success { color: #68d391 !important; }
body.dark-theme .text-danger { color: #fc8181 !important; }
body.dark-theme .text-warning { color: #f6e05e !important; }
body.dark-theme .text-info { color: #63b3ed !important; }

/* Dark theme for badges */
body.dark-theme .badge.bg-primary { background: #667eea !important; }
body.dark-theme .badge.bg-success { background: #38a169 !important; }
body.dark-theme .badge.bg-danger { background: #e53e3e !important; }
body.dark-theme .badge.bg-warning { background: #d69e2e !important; }
body.dark-theme .badge.bg-info { background: #3182ce !important; }
body.dark-theme .badge.bg-secondary { background: #4a5568 !important; }

/* Dark theme for links */
body.dark-theme a { color: #667eea !important; }
body.dark-theme a:hover { color: #5a67d8 !important; }

/* Dark theme for lists */
body.dark-theme .list-unstyled li { color: #f8f9fa !important; }
body.dark-theme ol li, body.dark-theme ul li { color: #f8f9fa !important; }

/* Dark theme for hr */
body.dark-theme hr { border-color: #444 !important; }

/* Dark theme for modal */
body.dark-theme .modal-content { background: #232946 !important; color: #f8f9fa !important; border-color: #444 !important; }
body.dark-theme .modal-header { border-bottom-color: #444 !important; }
body.dark-theme .modal-footer { border-top-color: #444 !important; }

/* Dark theme for table */
body.dark-theme .table { color: #f8f9fa !important; }
body.dark-theme .table th { background: #2d3748 !important; color: #f8f9fa !important; border-color: #444 !important; }
body.dark-theme .table td { border-color: #444 !important; }
body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(45, 55, 72, 0.5) !important; }

/* Dark theme for navigation */
body.dark-theme .nav-link { color: #f8f9fa !important; }
body.dark-theme .nav-link:hover { background: rgba(102, 126, 234, 0.1) !important; }
body.dark-theme .nav-link.active { background: #667eea !important; color: #fff !important; }

/* Dark theme for pagination */
body.dark-theme .page-link { background: #2d3748 !important; border-color: #444 !important; color: #f8f9fa !important; }
body.dark-theme .page-link:hover { background: #374151 !important; color: #fff !important; }
body.dark-theme .page-item.active .page-link { background: #667eea !important; border-color: #667eea !important; }

/* Dark theme for dropdown */
body.dark-theme .dropdown-menu { background: #232946 !important; border-color: #444 !important; }
body.dark-theme .dropdown-item { color: #f8f9fa !important; }
body.dark-theme .dropdown-item:hover { background: #374151 !important; color: #fff !important; }

/* ====== Week/Day Navigation - Modern Design ====== */
.date-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.week-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.week-title::before {
    content: '📅';
    font-size: 1.2rem;
}

.week-nav .btn {
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.week-nav .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.week-nav .btn:hover::before {
    left: 100%;
}

.week-nav .btn-outline-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.week-nav .btn-outline-primary:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.week-nav .btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

.week-nav .btn-primary:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* ====== Date Scroll Container ====== */
.date-scroll {
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f5f9;
    justify-content: center;
    align-items: center;
}

/* Desktop centering - no scroll needed */
@media (min-width: 768px) {
    .date-scroll {
        justify-content: center;
        overflow-x: visible;
        max-width: none;
        margin: 0 auto;
        gap: 1rem;
        flex-wrap: nowrap;
    }
    
    .date-item {
        min-width: 85px;
        max-width: 95px;
        flex: 0 0 auto;
    }
}

/* Mobile - keep horizontal scroll */
@media (max-width: 767.98px) {
    .date-scroll {
        justify-content: flex-start;
        max-width: none;
        margin: 0;
        overflow-x: auto;
        gap: 0.6rem;
    }
    
    .date-item {
        min-width: 70px;
        max-width: 75px;
        flex-shrink: 0;
    }
}

.date-scroll::-webkit-scrollbar {
    height: 6px;
}

.date-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.date-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 3px;
}

.date-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

/* ====== Modern Date Items ====== */
.date-item {
    min-width: 75px;
    max-width: 85px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.date-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.date-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.date-item:hover::before {
    opacity: 1;
}

.date-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.date-item.active::before {
    opacity: 0;
}

.date-item.border-primary {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.date-item .day-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #64748b;
    transition: color 0.3s ease;
}

.date-item.active .day-name {
    color: rgba(255, 255, 255, 0.9);
}

.date-item .day-date {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: #1e293b;
    transition: color 0.3s ease;
    line-height: 1;
}

.date-item.active .day-date {
    color: white;
}

.date-item .jalali-date {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #64748b;
    transition: color 0.3s ease;
    font-weight: 600;
    margin-top: 0.1rem;
}

.date-item.active .jalali-date {
    color: rgba(255, 255, 255, 0.9);
}

/* ====== Today Indicator ====== */
.date-item.border-primary::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ====== Mobile Optimizations ====== */
@media (max-width: 767.98px) {
    .date-nav {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 15px;
    }
    
    .week-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-bottom: 1rem;
    }
    
    .week-title {
        text-align: center;
        font-size: 1rem;
        justify-content: center;
    }
    
    .week-nav .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .date-scroll {
        gap: 0.6rem;
        padding: 0.3rem;
    }
    
    .date-item {
        min-width: 70px;
        max-width: 75px;
        padding: 0.8rem 0.3rem;
        border-radius: 12px;
    }
    
    .date-item .day-name {
        font-size: 0.8rem;
    }
    
    .date-item .day-date {
        font-size: 1.2rem;
    }
    
    .date-item .jalali-date {
        font-size: 0.7rem;
    }
    
    .date-item:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* ====== Dark Theme for Date Navigation ====== */
body.dark-theme .date-nav {
    background: rgba(35, 41, 70, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .week-title {
    color: #f8f9fa !important;
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.dark-theme .date-scroll::-webkit-scrollbar-track {
    background: #2d3748 !important;
}

body.dark-theme .date-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
}

body.dark-theme .date-item {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    border-color: #4a5568 !important;
    color: #f8f9fa !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .date-item::before {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%) !important;
}

body.dark-theme .date-item:hover {
    border-color: #667eea !important;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2) !important;
}

body.dark-theme .date-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

body.dark-theme .date-item .day-name {
    color: #a0aec0 !important;
}

body.dark-theme .date-item.active .day-name {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .date-item .day-date {
    color: #f8f9fa !important;
}

body.dark-theme .date-item.active .day-date {
    color: white !important;
}

body.dark-theme .date-item .jalali-date {
    color: #a0aec0 !important;
}

body.dark-theme .date-item.active .jalali-date {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .date-item.border-primary {
    border-color: #667eea !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
}

body.dark-theme .date-item.border-primary::after {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
}

/* ====== Mobile Session Cards Adjustments ====== */
@media (max-width: 767.98px) {
    /* Mobile session cards adjustments */
    .session-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .session-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .session-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .session-actions {
        margin-top: 1rem;
    }
    
    .btn-book {
        width: 100%;
        justify-content: center;
    }
} 