@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2');
}

/* ====== Reset ====== */
*,
::before,
::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    overflow-x: hidden;
}

/* ====== Typography ====== */
.text-center {
    text-align: center;
}

.text-white {
    color: #fff;
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

.text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-600 {
    color: #4b5563;
}

.text-4xl {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    line-height: 1.2;
    font-weight: 700;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
}

.text-lg {
    font-size: clamp(0.95rem, 2.5vw, 1.125rem);
    line-height: 1.6;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-2xl {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.35;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-indigo-600 {
    color: #4f46e5;
}

/* ====== Layout ====== */
.min-h-screen {
    min-height: 100vh;
    min-height: 100dvh;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.p-4 {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 1.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.25rem;
}

.mb-12 {
    margin-bottom: 2rem;
}

.mt-12 {
    margin-top: 2rem;
}

.gap-6 {
    gap: 1rem;
}

.max-w-4xl {
    width: 100%;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* ====== Grid (موبایل: یک ستون؛ تبلت به بالا: سه ستون) ====== */
.grid-cols-1 {
    grid-template-columns: minmax(0, 1fr);
}

/* ====== Rounded ====== */
.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

/* ====== Shadows ====== */
.shadow-xl {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ====== Width / Height ====== */
.w-full {
    width: 100%;
}

.w-40 {
    width: 10rem;
}

.h-40 {
    height: 10rem;
}

.object-contain {
    object-fit: contain;
    max-width: 100%;
}

/* ====== Backgrounds ====== */
.bg-white {
    background-color: #fff;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--from, #ec4899), var(--to, #ef4444));
}

.inline-block {
    display: inline-block;
}

.from-pink-500 {
    --from: #ec4899;
}

.to-red-500 {
    --to: #ef4444;
}

/* آیکون‌های کارت با گرادیان واقعی */
.card-icon-admin {
    background: linear-gradient(to bottom right, #ec4899, #ef4444);
}

.card-icon-teacher {
    background: linear-gradient(to bottom right, #3b82f6, #06b6d4);
}

.card-icon-student {
    background: linear-gradient(to bottom right, #22c55e, #14b8a6);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-teacher {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-student {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* ====== Buttons & Links ====== */
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-8 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* دکمه‌ها در موبایل تمام‌عرض */
.home-panel-link {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* ====== Hover (فقط دستگاه‌هایی که hover دارند) ====== */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .card-hover:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .btn-admin:hover,
    .btn-teacher:hover,
    .btn-student:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }
}

/* ====== Animation لوگو (ملایم‌تر روی موبایل) ====== */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo-container {
    animation: float 3s ease-in-out infinite;
}

.logo-badge {
    padding: clamp(1rem, 4vw, 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
    .logo-container {
        animation: none;
    }

    .card-hover,
    .btn-admin,
    .btn-teacher,
    .btn-student {
        transition: none;
    }
}

/* ====== Icons SVG ====== */
.w-12 {
    width: 3rem;
    height: 3rem;
}

.h-12 {
    height: 3rem;
}

/* ====== Breakpoint: تبلت به بالا ====== */
@media (min-width: 640px) {
    .p-8 {
        padding: 2rem;
    }

    .mb-12 {
        margin-bottom: 3rem;
    }

    .mt-12 {
        margin-top: 3rem;
    }

    .gap-6 {
        gap: 1.5rem;
    }

    .mb-6 {
        margin-bottom: 1.5rem;
    }

    .px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .home-panel-link {
        display: inline-block;
        width: auto;
        max-width: none;
    }
}

@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }

    .md\:w-48 {
        width: 12rem;
    }

    .md\:h-48 {
        height: 12rem;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    @keyframes float {
        0%,
        100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-20px);
        }
    }
}

@media (min-width: 1024px) {
    .max-w-4xl {
        padding-left: 0;
        padding-right: 0;
    }
}
