/* ============================================
   Ayat Isyarat — Custom CSS (No Build Required)
   ============================================ */

/* Custom CSS Variables (converted from Tailwind @theme) */
:root {
    /* Islamic Color Palette - Cheerful & Calm */
    --color-primary: oklch(0.55 0.15 165);
    /* Soft emerald green */
    --color-primary-dark: oklch(0.45 0.18 165);
    /* Darker emerald */
    --color-secondary: oklch(0.65 0.12 165);
    /* Light emerald */
    --color-accent: oklch(0.75 0.10 165);
    /* Very light emerald */

    --color-bg: oklch(0.98 0.01 165);
    /* Soft green-white */
    --color-card: oklch(1 0 0);
    /* Pure white */
    --color-surface: oklch(0.96 0.01 165);
    /* Light gray-green */

    --color-text-primary: oklch(0.25 0.01 260);
    /* Dark charcoal */
    --color-text-secondary: oklch(0.50 0.01 260);
    /* Medium gray */
    --color-text-muted: oklch(0.65 0.01 260);
    /* Light gray */

    --color-success: oklch(0.60 0.15 150);
    /* Success green */
    --color-warning: oklch(0.70 0.15 90);
    /* Warm yellow */
    --color-danger: oklch(0.60 0.18 25);
    /* Soft red */
    --color-info: oklch(0.60 0.15 240);
    /* Soft blue */

    /* Typography */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Spacing for touch targets */
    --touch-target-min: 48px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ── Base Styles ── */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 16px;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* ── Accessibility Focus ── */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* ── Buttons ── */
.btn {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
}

/* ── Cards ── */
.card {
    background-color: var(--color-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-2px);
}

/* ── Progress Bar ── */
.progress-bar {
    height: 0.75rem;
    background-color: var(--color-surface);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ── Pattern Background ── */
.pattern-bg {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
}

/* ── Loading Spinner ── */
.spinner {
    border: 3px solid var(--color-surface);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ── Module Card ── */
.module-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ── Hero Gradient ── */
.hero-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    position: relative;
}

/* ── Backdrop Blur ── */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Line Clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Custom Scrollbar ── */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ── Huruf Hijaiyah ── */
.hijaiyah {
    font-family: 'Times New Roman', serif;
    font-weight: normal;
    line-height: 1.2;
}

.hijaiyah-large {
    font-family: 'Times New Roman', serif;
    font-weight: normal;
    font-size: 3rem;
    line-height: 1;
}

.hijaiyah-xl {
    font-family: 'Times New Roman', serif;
    font-weight: normal;
    font-size: 4rem;
    line-height: 1;
}

/* ── Utilities ── */
.touch-target {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

.text-accessible {
    font-size: 1.125rem;
    line-height: 1.75;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}