@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir-Regular.woff2') format('woff2'),
         url('fonts/Vazir-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir-Bold.woff2') format('woff2'),
         url('fonts/Vazir-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --secondary: #42A5F5;
    --accent: #64B5F6;
    --bg-gradient-start: #D6EAF8;
    --bg-gradient-end: #AED6F1;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-hover: rgba(255, 255, 255, 1);
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Vazir', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: normal;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: white;
    font-size: 1.25rem;
}

.exercise-section {
    margin-bottom: 1.5rem;
}

.exercise-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

.exercise-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.exercise-header.active {
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

.exercise-header.active:hover {
    transform: none;
}

.exercise-header h2 {
    font-size: 1.4rem;
    font-weight: bold;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.exercise-header.active .toggle-icon {
    transform: rotate(180deg);
}

.videos-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: rgba(230, 240, 250, 0.85);
    border-radius: 0 0 15px 15px;
    padding: 0;
    position: relative;
    z-index: 5;
}

.videos-container.active {
    max-height: 3000px;
    padding: 1.5rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.video-card h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-icon {
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.video-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.5);
}

.download-icon {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    color: white;
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .exercise-header h2 {
        font-size: 1.2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .exercise-header {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .video-card {
        padding: 1rem;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}
