:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #475569;
    --accent: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(124, 58, 237, 0.08);
    --shadow-hover: 0 20px 50px rgba(124, 58, 237, 0.15);
    --radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

html { direction: rtl; }

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'IRANSans', Tahoma, Arial, sans-serif;
    color: var(--dark);
    min-height: 100vh;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
    opacity: 0.9;
    font-weight: 300;
}

.stats-bar {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.stats-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stats-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stats-box i {
    margin-left: 10px;
    color: var(--accent);
}

.controls-sec {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 25px;
    align-items: end;
}

.control-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(124, 58, 237, 0.1);
    position: relative;
    overflow: hidden;
}

.control-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.control-box:hover::before {
    transform: scaleY(1);
}

.control-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.control-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.control-input, .control-select {
    width: 100%;
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.control-input:focus, .control-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.search-input {
    padding-right: 45px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-input:focus + .search-icon {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.instructor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.instructor-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 30px 25px;
    position: relative;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.instructor-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.instructor-card:hover::before {
    transform: scaleX(1);
}

.instructor-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.instructor-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 25px;
    border: 5px solid var(--light);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
    transition: var(--transition);
    position: relative;
}

.instructor-card:hover .instructor-avatar {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.25);
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.instructor-card:hover .instructor-avatar img {
    transform: scale(1.1);
}

.instructor-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instructor-meta {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 25px;
    line-height: 1.6;
    padding: 0 10px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.socials a {
    color: var(--primary);
    font-size: 1.4rem;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
}

.socials a:hover {
    color: var(--white);
    background: var(--primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.detail-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.detail-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.detail-btn:hover::before {
    opacity: 1;
}

.detail-btn span {
    position: relative;
    z-index: 1;
}

.contact-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.contact-fab:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.6);
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--gray);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 5rem;
    color: var(--light-gray);
    margin-bottom: 25px;
    opacity: 0.7;
}

.empty-state h6 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.instructor-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}