/* ============================================================
   QURAN PATH ACADEMY - Custom Stylesheet
   ============================================================ */

/* ── Geometric Pattern Background ─────────────────────────── */
.pattern-bg {
    background-color: #f9fafb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.05'%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");
}

.islamic-pattern {
    background-image: 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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 30%, #047857 60%, #059669 100%);
}

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('/assets/images/hero-pattern.svg') repeat;
    opacity: 0.06;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.animate-fade-up { animation: fadeInUp 0.7s ease-out forwards; }
.animate-fade-left { animation: fadeInLeft 0.7s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ── Cards ────────────────────────────────────────────────── */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.course-card {
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.course-card:hover {
    border-bottom-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.15);
}

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #059669, #10b981, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #047857, #059669);
}

.btn-secondary {
    background: white;
    color: #059669;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid #059669;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

/* ── Stats Counter ────────────────────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.12);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #059669;
    line-height: 1;
    margin-bottom: 6px;
}

/* ── Testimonials Slider ──────────────────────────────────── */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-top: 4px solid #10b981;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    color: #d1fae5;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ── FAQ Accordion ────────────────────────────────────────── */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #10b981;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 24px;
    background: white;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover { background: #f0fdf4; color: #059669; }
.faq-question.active { background: #f0fdf4; color: #059669; }
.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background: #fafafa;
    color: #4b5563;
    line-height: 1.7;
}
.faq-answer.open { padding: 16px 24px 20px; max-height: 300px; }

/* ── Form Styles ──────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #1f2937;
    background: white;
    outline: none;
}

.form-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error { color: #ef4444; font-size: 12px; margin-top: 4px; }

/* ── Section Headings ─────────────────────────────────────── */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* ── Pricing Cards ────────────────────────────────────────── */
.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover, .pricing-card.popular {
    border-color: #10b981;
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15);
}

.pricing-card.popular {
    background: linear-gradient(135deg, #065f46, #047857);
    color: white;
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white;
    padding: 4px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Arabic Flashcards ────────────────────────────────────── */
.flashcard {
    width: 160px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard:hover .flashcard-inner,
.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.flashcard-front {
    background: linear-gradient(135deg, #064e3b, #065f46);
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, #f0fdf4, #d1fae5);
    color: #065f46;
    transform: rotateY(180deg);
    border: 2px solid #10b981;
}

/* ── Dashboard Styles ─────────────────────────────────────── */
.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0fdf4;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ── Admin Sidebar ────────────────────────────────────────── */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #064e3b, #065f46);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #a7f3d0;
    border-radius: 10px;
    margin: 2px 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f9fafb;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 50px;
    transition: width 0.8s ease;
}

/* ── Table ────────────────────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f0fdf4;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #065f46;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #d1fae5;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 14px;
}

.admin-table tr:hover td { background: #f9fafb; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ── Smooth Scroll ────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #10b981; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #059669; }

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .admin-content { margin-left: 0; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
}

@media (max-width: 768px) {
    .section-title { font-size: 1.6rem; }
    .stat-number { font-size: 2rem; }
}

/* ── RTL Support ──────────────────────────────────────────── */
[dir="rtl"] .admin-sidebar { left: auto; right: 0; }
[dir="rtl"] .admin-content { margin-left: 0; margin-right: 260px; }
[dir="rtl"] .faq-question { text-align: right; }
