/*
Theme Name: Muzamna LMS
Theme URI: https://muzamna.com
Author: Muzamna Technical Solutions
Author URI: https://muzamna.com
Description: Arabic-first LMS theme for Tutor LMS Pro & WooCommerce. RTL-native, dark mode, WPML-ready.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.1
Tested up to: 6.5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: muzamna-lms
Domain Path: /languages
Tags: education, lms, rtl-language-support, translation-ready, custom-colors

Converted from: React/Vite LMS Theme (path-explorer)
*/

/* ==========================================================================
   Design System — CSS Custom Properties
   Extracted from React theme: src/index.css + tailwind.config.ts
   ========================================================================== */

:root {
    /* --- Colors (Light Mode) --- */
    --color-background: hsl(220, 14%, 96%);
    --color-foreground: hsl(270, 10%, 15%);

    --color-card: hsl(0, 0%, 100%);
    --color-card-foreground: hsl(270, 10%, 15%);

    --color-popover: hsl(0, 0%, 100%);
    --color-popover-foreground: hsl(270, 10%, 15%);

    --color-primary: hsl(285, 40%, 35%);
    --color-primary-foreground: hsl(0, 0%, 100%);

    --color-secondary: hsl(210, 20%, 97%);
    --color-secondary-foreground: hsl(270, 45%, 30%);

    --color-muted: hsl(220, 14%, 96%);
    --color-muted-foreground: hsl(220, 9%, 46%);

    --color-accent: hsl(320, 60%, 55%);
    --color-accent-foreground: hsl(0, 0%, 100%);

    --color-destructive: hsl(0, 84.2%, 60.2%);
    --color-destructive-foreground: hsl(210, 40%, 98%);

    --color-border: hsl(220, 13%, 91%);
    --color-input: hsl(220, 13%, 91%);
    --color-ring: hsl(285, 40%, 35%);

    --color-success: hsl(142, 76%, 36%);
    --color-warning: hsl(38, 92%, 50%);
    --color-error: hsl(0, 84%, 60%);

    /* Hero gradient */
    --color-hero-from: hsl(295, 40%, 25%);
    --color-hero-to: hsl(310, 45%, 16%);

    /* Sidebar */
    --color-sidebar-bg: hsl(210, 20%, 98%);
    --color-sidebar-fg: hsl(220, 9%, 46%);
    --color-sidebar-primary: hsl(285, 40%, 35%);
    --color-sidebar-accent: hsl(210, 20%, 97%);
    --color-sidebar-border: hsl(220, 20%, 95%);

    /* --- Typography --- */
    --font-display: 'Noto Kufi Arabic', sans-serif;
    --font-body: 'Noto Naskh Arabic', sans-serif;

    /* --- Spacing Scale --- */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* --- Border Radius --- */
    --radius: 0.75rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* --- Transitions --- */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* --- Container --- */
    --container-max: 1400px;
    --container-padding: 2rem;
}

/* --- Dark Mode Tokens --- */
.dark {
    --color-background: hsl(260, 20%, 10%);
    --color-foreground: hsl(220, 14%, 90%);

    --color-card: hsl(260, 18%, 14%);
    --color-card-foreground: hsl(220, 14%, 90%);

    --color-popover: hsl(260, 18%, 14%);
    --color-popover-foreground: hsl(220, 14%, 90%);

    --color-primary: hsl(285, 50%, 55%);
    --color-primary-foreground: hsl(0, 0%, 100%);

    --color-secondary: hsl(260, 15%, 18%);
    --color-secondary-foreground: hsl(280, 30%, 80%);

    --color-muted: hsl(260, 15%, 18%);
    --color-muted-foreground: hsl(220, 10%, 55%);

    --color-accent: hsl(320, 60%, 55%);
    --color-accent-foreground: hsl(0, 0%, 100%);

    --color-destructive: hsl(0, 84.2%, 60.2%);
    --color-destructive-foreground: hsl(210, 40%, 98%);

    --color-border: hsl(260, 15%, 20%);
    --color-input: hsl(260, 15%, 20%);
    --color-ring: hsl(285, 50%, 55%);

    --color-hero-from: hsl(280, 50%, 20%);
    --color-hero-to: hsl(300, 40%, 12%);

    --color-sidebar-bg: hsl(260, 20%, 12%);
    --color-sidebar-fg: hsl(220, 10%, 55%);
    --color-sidebar-primary: hsl(285, 50%, 55%);
    --color-sidebar-accent: hsl(260, 15%, 18%);
    --color-sidebar-border: hsl(260, 15%, 18%);
}

/* ==========================================================================
   Base Reset & Globals
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: var(--color-border);
}

html {
    direction: rtl;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-display);
    background-color: var(--color-background);
    color: var(--color-foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.muzamna-container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 768px) {
    .muzamna-container {
        padding-inline: var(--container-padding);
    }
}

.muzamna-grid {
    display: grid;
    gap: var(--space-lg);
}

.muzamna-grid--2 { grid-template-columns: repeat(1, 1fr); }
.muzamna-grid--3 { grid-template-columns: repeat(1, 1fr); }
.muzamna-grid--4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
    .muzamna-grid--2 { grid-template-columns: repeat(2, 1fr); }
    .muzamna-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .muzamna-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .muzamna-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .muzamna-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.font-display {
    font-family: var(--font-display);
}

.font-body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-foreground);
}

/* ==========================================================================
   Custom Utility Classes (ported from React index.css)
   ========================================================================== */

.hero-gradient {
    background: linear-gradient(to bottom right, var(--color-hero-from), var(--color-hero-to));
}

.accent-line {
    background: linear-gradient(to right, hsl(340, 80%, 55%), hsl(270, 60%, 55%));
}

.glass-pill {
    background: hsla(0, 0%, 100%, 0.1);
    border: 1px solid hsla(0, 0%, 100%, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-pill {
    background: hsla(280, 30%, 60%, 0.1);
    border-color: hsla(280, 30%, 60%, 0.15);
}

.glass-card-light {
    background: hsla(0, 0%, 100%, 0.05);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark .glass-card-light {
    background: hsla(280, 30%, 60%, 0.08);
    border-color: hsla(280, 30%, 60%, 0.12);
}

.image-frame {
    border: 8px solid hsla(0, 0%, 100%, 0.1);
    box-shadow: 0 25px 50px -12px hsla(0, 0%, 0%, 0.25);
}

.dark .image-frame {
    border-color: hsla(280, 30%, 60%, 0.15);
}

.nav-item-active {
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    box-shadow: 0 10px 15px -3px hsla(285, 40%, 35%, 0.3);
    transform: translateX(-4px);
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.fade-up,
.fade-left,
.fade-right,
.scale-in {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up {
    transform: translateY(40px);
}

.fade-left {
    transform: translateX(-60px);
}

.fade-right {
    transform: translateX(60px);
}

.scale-in {
    transform: scale(0.85);
}

.fade-up.is-visible,
.fade-left.is-visible,
.fade-right.is-visible,
.scale-in.is-visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.24s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.36s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.48s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.72s; }

/* ==========================================================================
   WordPress Core Overrides
   ========================================================================== */

/* Screen reader text (WP accessibility) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-card);
    clip: auto !important;
    clip-path: none;
    color: var(--color-foreground);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* WordPress alignment classes */
.alignnone { margin: var(--space-md) var(--space-xl) var(--space-md) 0; }
.aligncenter { display: block; margin: var(--space-md) auto; }
.alignright { float: right; margin: 0 0 var(--space-md) var(--space-xl); }
.alignleft { float: left; margin: 0 var(--space-xl) var(--space-md) 0; }

/* WP caption */
.wp-caption {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    max-width: 100%;
    padding: var(--space-sm);
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    padding-top: var(--space-xs);
}
