/* Prophetic Remedies Academy - Design System */

:root {
    --primary: #1a5c3a;
    --primary-dark: #0d3d22;
    --primary-light: #2d7a52;
    --secondary: #c9a84c;
    --secondary-light: #e0c878;
    --secondary-dark: #a88a3a;
    --accent: #d4a574;
    --bg: #f8f6f1;
    --bg-dark: #1a1a1a;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --text-muted: #999;
    --white: #ffffff;
    --border: #e5e0d5;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Amiri', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* NAVIGATION */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); padding: 0 2rem;
    height: 70px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem;
    font-family: var(--font-arabic); font-weight: 700; font-size: 1.25rem; color: var(--primary); }
.logo { font-size: 1.5rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem;
    padding: 0.5rem 0; position: relative; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--secondary); transition: width 0.3s; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-auth { display: flex; gap: 0.75rem; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: var(--primary); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.95rem; cursor: pointer; transition: all 0.2s; border: none; text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--secondary); color: var(--primary-dark); }
.btn-secondary:hover { background: var(--secondary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-danger { background: #dc3545; color: var(--white); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; color: var(--text); }
.form-input, .form-textarea, .form-select { width: 100%; padding: 0.75rem 1rem;
    border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-primary); font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s; background: var(--white); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 92, 58, 0.1); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { color: #dc3545; font-size: 0.85rem; margin-top: 0.25rem; }

/* CARDS */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image { width: 100%; height: 200px; object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--primary)); }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.card-text { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; }
.card-price { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.card-price .original { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; margin-left: 0.5rem; }

/* GRID */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .nav-links, .nav-auth { display: none; }
    .mobile-menu-btn { display: block; }
}
@media (max-width: 480px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* HERO */
.hero { padding: 8rem 2rem 4rem; text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%); }
.hero-content { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-arabic); font-size: 3rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero .btn { margin: 0 0.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 3rem;
    padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); }
.hero-stat { text-align: center; }
.hero-stat .number { font-size: 2rem; font-weight: 700; color: var(--secondary); }
.hero-stat .label { font-size: 0.85rem; opacity: 0.8; }

/* SECTIONS */
.section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-family: var(--font-arabic); font-size: 2rem; font-weight: 700;
    text-align: center; margin-bottom: 0.5rem; color: var(--primary); }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 3rem; }

/* COURSE DETAIL */
.course-detail { padding-top: 90px; max-width: 1200px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.course-header { display: grid; grid-template-columns: 1fr 350px; gap: 3rem; margin-bottom: 3rem; }
.course-image { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.course-info h1 { font-family: var(--font-arabic); font-size: 2rem; margin-bottom: 1rem; }
.course-meta { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; color: var(--text-light); font-size: 0.9rem; }
.course-price-box { background: var(--white); padding: 2rem; border-radius: var(--radius);
    box-shadow: var(--shadow); position: sticky; top: 90px; }
.course-price-box .price { font-size: 2rem; font-weight: 700; color: var(--primary); }
.course-price-box .original-price { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.lessons-list { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lesson-item { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 1rem; cursor: pointer; transition: background 0.2s; }
.lesson-item:hover { background: var(--bg); }
.lesson-item:last-child { border-bottom: none; }
.lesson-number { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--white);
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; flex-shrink: 0; }
.lesson-item.completed .lesson-number { background: var(--secondary); }
.lesson-title { flex: 1; font-weight: 500; }
.lesson-duration { color: var(--text-muted); font-size: 0.85rem; }
.lesson-lock { color: var(--text-muted); }

/* LESSON VIEWER */
.lesson-viewer { padding-top: 90px; max-width: 900px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.lesson-video { width: 100%; aspect-ratio: 16/9; background: var(--bg-dark); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; color: var(--white); margin-bottom: 2rem; }
.lesson-content { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.8; }
.lesson-content h2 { font-family: var(--font-arabic); color: var(--primary); margin-bottom: 1rem; }
.lesson-content p { margin-bottom: 1rem; }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 2rem; }

/* DEAN PANEL */
.dean-panel { padding-top: 90px; max-width: 1400px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }
.dean-sidebar { width: 260px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.5rem; position: fixed; top: 90px; left: 2rem; bottom: 2rem; overflow-y: auto; }
.dean-sidebar h3 { font-family: var(--font-arabic); color: var(--primary); margin-bottom: 1.5rem;
    padding-bottom: 0.75rem; border-bottom: 2px solid var(--secondary); }
.dean-nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; margin-bottom: 0.5rem;
    color: var(--text); text-decoration: none; }
.dean-nav-item:hover, .dean-nav-item.active { background: var(--primary); color: var(--white); }
.dean-main { margin-left: 300px; padding: 0 0 2rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-light); font-size: 0.9rem; }
.data-table { width: 100%; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--primary); color: var(--white); font-weight: 600; font-size: 0.9rem; }
.data-table tr:hover { background: var(--bg); }
.data-table .actions { display: flex; gap: 0.5rem; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 2rem; }
.modal { background: var(--white); border-radius: var(--radius); max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto; padding: 2rem; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { font-family: var(--font-arabic); color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }

/* AI CHAT */
.ai-chat { position: fixed; bottom: 2rem; right: 2rem; width: 380px; max-height: 600px;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; z-index: 1500; overflow: hidden; }
.ai-chat-header { background: var(--primary); color: var(--white); padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center; }
.ai-chat-header h3 { font-family: var(--font-arabic); font-size: 1rem; }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.ai-message { padding: 0.75rem 1rem; border-radius: var(--radius-sm); max-width: 85%; font-size: 0.9rem; }
.ai-message.user { background: var(--primary); color: var(--white); align-self: flex-end; }
.ai-message.bot { background: var(--bg); color: var(--text); align-self: flex-start; }
.ai-chat-input { display: flex; padding: 1rem; border-top: 1px solid var(--border); gap: 0.5rem; }
.ai-chat-input input { flex: 1; padding: 0.75rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-primary); }
.ai-chat-input input:focus { outline: none; border-color: var(--primary); }
.ai-chat-toggle { position: fixed; bottom: 2rem; right: 2rem; width: 60px; height: 60px;
    border-radius: 50%; background: var(--primary); color: var(--white); border: none;
    font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 1500;
    display: flex; align-items: center; justify-content: center; }

/* TOAST */
.toast-container { position: fixed; top: 90px; right: 2rem; z-index: 3000;
    display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 1rem 1.5rem; border-radius: var(--radius-sm); color: var(--white);
    font-weight: 500; animation: slideIn 0.3s ease; box-shadow: var(--shadow); max-width: 400px; }
.toast.success { background: var(--primary); }
.toast.error { background: #dc3545; }
.toast.warning { background: var(--secondary); color: var(--primary-dark); }
.toast.info { background: #6c757d; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* LOADING */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9); display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 5000; }
.loading-overlay.hidden { display: none; }
.spinner { width: 50px; height: 50px; border: 4px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* AUTH */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card h1 { font-family: var(--font-arabic); color: var(--primary); text-align: center; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-light); margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-light); font-size: 0.9rem; }
.auth-footer a { color: var(--primary); font-weight: 600; cursor: pointer; }

/* FOOTER */
.footer { background: var(--primary-dark); color: var(--white); padding: 3rem 2rem 1rem; margin-top: 4rem; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 2fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand .logo { font-size: 2rem; }
.footer-brand p { font-family: var(--font-arabic); font-size: 1.25rem; font-weight: 700; margin: 0.5rem 0; }
.footer-quote { font-style: italic; opacity: 0.8; font-size: 0.9rem; max-width: 400px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1rem; color: var(--secondary); }
.footer-links a { display: block; color: rgba(255,255,255,0.7); text-decoration: none;
    margin-bottom: 0.5rem; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; opacity: 0.7; }

/* UTILITIES */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Print protection */
@media print {
    .lesson-content { display: none !important; }
    .ai-chat, .ai-chat-toggle { display: none !important; }
    .nav-auth { display: none !important; }
}

/* Content protection */
.lesson-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
