/*
Theme Name: EduPress
Theme URI: https://edupress.com
Author: EduPress Team
Author URI: https://edupress.com
Description: قالب ووردبريس تعليمي احترافي - مصمم للمواقع التعليمية مع دعم كامل للغة العربية، دروس، تمارين، وامتحانات
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edupress
Tags: education, rtl-language-support, blog, custom-menu, custom-logo, featured-images, theme-options, translation-ready

EduPress - Professional Educational WordPress Theme
*/

/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #a855f7;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    --bg-dark: #0f172a;
    --bg-darker: #1e1b4b;
    --bg-card: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(99, 102, 241, 0.25);
    
    --font-primary: 'Tajawal', sans-serif;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 50%, var(--bg-dark) 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ===== Utility Classes ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.btn-ghost {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.75rem; }
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-slide-in { animation: slideIn 0.5s ease-out forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ===== Header & Navigation ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header-inner {
        height: 4.5rem;
    }
}

/* Site Logo - Compact */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Logo Icon (SVG fallback) */
.logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-color);
}

@media (min-width: 768px) {
    .logo-icon {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.625rem;
    }
}

.logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .logo-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Logo Image (Custom Logo from WordPress) */
.site-logo img,
.custom-logo,
.site-logo .custom-logo-link img {
    height: auto;
    max-height: 70px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .site-logo img,
    .custom-logo,
    .site-logo .custom-logo-link img {
        max-height: 60px;
        max-width: 160px;
    }
}

.site-logo:hover img,
.site-logo:hover .custom-logo {
    transform: scale(1.02);
}

/* Hide logo-icon when custom logo exists */
.site-logo:has(.custom-logo-link) .logo-icon,
.site-logo:has(img) .logo-icon {
    display: none;
}

/* Logo Text */
.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 1.25rem;
    }
}

/* Hide text when image logo exists */
.site-logo:has(.custom-logo-link) .logo-text,
.site-logo:has(img:not(.logo-icon img)) .logo-text {
    display: none;
}

/* Main Navigation - Desktop */
.main-nav {
    display: none;
    flex: 1;
    justify-content: center;
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        flex: 0 1 auto;
        justify-content: center;
        margin-inline: auto;
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .main-nav {
        gap: 2rem;
    }
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.current-menu-item,
.main-nav .current_page_item a {
    color: var(--text-primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.current-menu-item::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.header-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.header-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.header-btn .hidden {
    display: none;
}

/* Search Toggle - Always visible */
.search-toggle {
    display: flex;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Search Overlay */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form-overlay {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form-overlay input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.search-form-overlay input::placeholder {
    color: var(--text-muted);
}

.search-form-overlay input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-form-overlay button {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-form-overlay button:hover {
    transform: scale(1.05);
}

.search-form-overlay button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu-inner {
    padding: 1.5rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-items li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-items li:last-child {
    border-bottom: none;
}

.mobile-menu-items a {
    display: block;
    padding: 1rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-menu-items a:hover,
.mobile-menu-items .current-menu-item a {
    color: var(--text-primary);
    padding-right: 0.5rem;
}

/* Mobile Search */
.mobile-search {
    margin-top: auto;
    padding-top: 1.5rem;
}

.mobile-search form {
    display: flex;
    gap: 0.75rem;
}

.mobile-search input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-search input::placeholder {
    color: var(--text-muted);
}

.mobile-search button {
    width: 3rem;
    height: auto;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Body class when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.hero-bg .blob-1 {
    top: 5rem;
    right: 2.5rem;
    width: 18rem;
    height: 18rem;
    background: rgba(139, 92, 246, 0.2);
}

.hero-bg .blob-2 {
    bottom: 5rem;
    left: 2.5rem;
    width: 24rem;
    height: 24rem;
    background: rgba(99, 102, 241, 0.1);
}

.hero-content {
    text-align: center;
    max-width: 56rem;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 4rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    color: #a5b4fc;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge .dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.hero-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.category-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.category-badge:hover {
    transform: scale(1.05);
}

.category-badge.programming {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.category-badge.math {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.category-badge.languages {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.category-badge.science {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* ===== Articles Section ===== */
.articles-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
}

.section-link {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: #818cf8;
}

@media (min-width: 768px) {
    .section-link {
        display: flex;
    }
}

.section-link:hover {
    color: #a5b4fc;
}

.section-link svg {
    width: 1.25rem;
    height: 1.25rem;
    transform: rotate(180deg);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.articles-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Article Card */
.article-card {
    border-radius: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px var(--shadow-color);
}

.article-card.featured .article-thumbnail {
    height: 16rem;
}

.article-thumbnail {
    position: relative;
    height: 10rem;
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.1);
}

.article-thumbnail .placeholder-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-thumbnail .placeholder-bg svg {
    width: 4rem;
    height: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.article-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.article-category.programming { background: #3b82f6; }
.article-category.math { background: #10b981; }
.article-category.languages { background: #f97316; }
.article-category.science { background: #06b6d4; }
.article-category.tech { background: #8b5cf6; }

.article-featured-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-meta svg {
    width: 1rem;
    height: 1rem;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: var(--transition);
    line-height: 1.4;
}

.article-title:hover {
    color: #818cf8;
}

.article-card:not(.featured) .article-title {
    font-size: 1.125rem;
}

.article-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
}

.author-name {
    color: var(--text-secondary);
}

.article-read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #818cf8;
    font-weight: 500;
}

.article-read-more:hover {
    color: #a5b4fc;
}

.article-read-more svg {
    width: 1rem;
    height: 1rem;
    transform: rotate(180deg);
}

/* Articles Grid Small */
.articles-grid-small {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .articles-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    border-radius: 1rem;
    padding: 1.25rem;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Search Widget */
.search-widget .search-form {
    position: relative;
}

.search-widget input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
}

.search-widget input::placeholder {
    color: var(--text-muted);
}

.search-widget input:focus {
    border-color: var(--primary-color);
}

.search-widget button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.search-widget button svg {
    width: 1rem;
    height: 1rem;
}

/* Categories Widget */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    transition: var(--transition);
}

.category-item:hover {
    color: #818cf8;
    padding-right: 0.625rem;
}

.category-count {
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Popular Posts Widget */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post {
    display: flex;
    gap: 0.75rem;
}

.popular-post:hover .popular-post-title {
    color: #818cf8;
}

.popular-post-thumbnail {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.popular-post-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.popular-post-views {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 2rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.pagination .page-numbers:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--text-primary);
}

.pagination .page-numbers svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ===== Lessons Section ===== */
.lessons-section {
    padding: 4rem 0;
    position: relative;
}

.lessons-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.lessons-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .lessons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lessons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lesson-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.lesson-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px var(--shadow-color);
}

.lesson-thumbnail {
    height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lesson-thumbnail svg,
.lesson-thumbnail span {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.lesson-count {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.lesson-content {
    padding: 1.25rem;
}

.lesson-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.lesson-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.lesson-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lesson-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.lesson-duration svg {
    width: 1rem;
    height: 1rem;
}

.lesson-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.lesson-badge.free {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* ===== Exercises Section ===== */
.exercises-section {
    padding: 4rem 0;
}

.exercises-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
    .exercises-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.exercise-card {
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.exercise-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px var(--shadow-color);
}

.exercise-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.exercise-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--text-primary);
}

.exercise-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.exercise-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.exercise-link {
    font-size: 0.875rem;
}

/* ===== Exams Section ===== */
.exams-section {
    padding: 4rem 0;
    position: relative;
}

.exams-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.exams-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .exams-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.exam-card {
    border-radius: 1rem;
    padding: 1.5rem;
    border-top: 4px solid;
    transition: var(--transition);
}

.exam-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px var(--shadow-color);
}

.exam-card.easy { border-top-color: var(--success-color); }
.exam-card.medium { border-top-color: var(--warning-color); }
.exam-card.hard { border-top-color: var(--danger-color); }

.exam-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.exam-level-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.exam-level-badge.easy {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.exam-level-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.exam-level-badge.hard {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.exam-duration {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.exam-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.exam-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.exam-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.exam-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    transition: var(--transition);
}

.exam-btn.easy {
    background: var(--success-color);
}

.exam-btn.easy:hover {
    background: #059669;
}

.exam-btn.medium {
    background: var(--warning-color);
}

.exam-btn.medium:hover {
    background: #d97706;
}

.exam-btn.hard {
    background: var(--danger-color);
}

.exam-btn.hard:hover {
    background: #dc2626;
}

/* ===== About Section ===== */
.about-section {
    padding: 4rem 0;
}

.about-card {
    border-radius: 1.5rem;
    padding: 2rem;
}

@media (min-width: 768px) {
    .about-card {
        padding: 3rem;
    }
}

.about-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.about-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-number.indigo { color: #818cf8; }
.stat-number.emerald { color: #34d399; }
.stat-number.orange { color: #fb923c; }
.stat-number.purple { color: #c084fc; }

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.about-image {
    position: relative;
}

.about-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-inner {
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-inner svg {
    width: 8rem;
    height: 8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== Footer ===== */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand .logo-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.footer-brand .logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-brand span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.social-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.back-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ===== Single Post ===== */
.single-post {
    padding: 6rem 0 4rem;
}

.single-post-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 3rem;
}

.single-post-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.single-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .single-post-title {
        font-size: 2.5rem;
    }
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.single-post-meta svg {
    width: 1.25rem;
    height: 1.25rem;
}

.single-post-thumbnail {
    max-width: 56rem;
    margin: 0 auto 3rem;
    border-radius: 1.5rem;
    overflow: hidden;
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post-content {
    max-width: 48rem;
    margin: 0 auto;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: var(--text-primary);
    margin-top: 2rem;
}

.single-post-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.single-post-content a {
    color: #818cf8;
}

.single-post-content a:hover {
    text-decoration: underline;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.single-post-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
}

.single-post-content ul li::before {
    content: '•';
    position: absolute;
    right: -1rem;
    color: var(--primary-color);
}

.single-post-content ol {
    counter-reset: item;
    list-style: none;
}

.single-post-content ol li::before {
    counter-increment: item;
    content: counter(item) '.';
    position: absolute;
    right: -1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.single-post-content blockquote {
    border-right: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: 0.5rem;
}

.single-post-content blockquote p {
    margin: 0;
    font-style: italic;
}

.single-post-content pre,
.single-post-content code {
    background: var(--bg-card);
    border-radius: 0.5rem;
    font-family: 'Fira Code', monospace;
}

.single-post-content code {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.single-post-content pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.single-post-content pre code {
    padding: 0;
    background: none;
}

.single-post-content img {
    border-radius: 0.75rem;
    margin: 2rem 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags a {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-tags a:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .post-navigation {
        grid-template-columns: repeat(2, 1fr);
    }
}

.post-nav-link {
    display: block;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 1rem;
    transition: var(--transition);
}

.post-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.post-nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.post-nav-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Comments ===== */
.comments-section {
    max-width: 48rem;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.comment-content p {
    margin: 0;
    color: var(--text-secondary);
}

.comment-reply {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #818cf8;
}

.comment-form {
    margin-top: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 8rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
}

.comment-form-fields {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .comment-form-fields {
        grid-template-columns: repeat(2, 1fr);
    }
}

.comment-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
}

.comment-form input:focus {
    border-color: var(--primary-color);
}

/* ===== Archive & Search Pages ===== */
.archive-header,
.search-header {
    text-align: center;
    padding: 8rem 0 4rem;
}

.archive-title,
.search-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.archive-description,
.search-description {
    color: var(--text-muted);
}

/* ===== 404 Page ===== */
.error-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-404-content {
    max-width: 32rem;
}

.error-404-number {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-404-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* ===== Screen Reader Text ===== */
.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;
}

/* ===== Alignments ===== */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 100%;
}

.alignfull {
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* ===== Legacy/Custom Classes Support ===== */

/* Grid System - Foundation Compatible */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.column, .columns {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    width: 100%;
}

/* Column Sizes */
.small-1 { width: 8.33333%; }
.small-2 { width: 16.66667%; }
.small-3 { width: 25%; }
.small-4 { width: 33.33333%; }
.small-5 { width: 41.66667%; }
.small-6 { width: 50%; }
.small-7 { width: 58.33333%; }
.small-8 { width: 66.66667%; }
.small-9 { width: 75%; }
.small-10 { width: 83.33333%; }
.small-11 { width: 91.66667%; }
.small-12 { width: 100%; }

@media (min-width: 640px) {
    .medium-1 { width: 8.33333%; }
    .medium-2 { width: 16.66667%; }
    .medium-3 { width: 25%; }
    .medium-4 { width: 33.33333%; }
    .medium-5 { width: 41.66667%; }
    .medium-6 { width: 50%; }
    .medium-7 { width: 58.33333%; }
    .medium-8 { width: 66.66667%; }
    .medium-9 { width: 75%; }
    .medium-10 { width: 83.33333%; }
    .medium-11 { width: 91.66667%; }
    .medium-12 { width: 100%; }
}

@media (min-width: 1024px) {
    .large-1 { width: 8.33333%; }
    .large-2 { width: 16.66667%; }
    .large-3 { width: 25%; }
    .large-4 { width: 33.33333%; }
    .large-5 { width: 41.66667%; }
    .large-6 { width: 50%; }
    .large-7 { width: 58.33333%; }
    .large-8 { width: 66.66667%; }
    .large-9 { width: 75%; }
    .large-10 { width: 83.33333%; }
    .large-11 { width: 91.66667%; }
    .large-12 { width: 100%; }
}

/* Color Boxes */
.bleu, .blue-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.bleu ul, .blue-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.bleu ul li, .blue-box ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.bleu ul li:hover, .blue-box ul li:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.bleu ul li a, .blue-box ul li a {
    color: #a5b4fc;
    font-weight: 500;
    transition: color 0.3s ease;
}

.bleu ul li a:hover, .blue-box ul li a:hover {
    color: #c7d2fe;
}

.vert, .green-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(20, 184, 166, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.vert ul li a, .green-box ul li a {
    color: #6ee7b7;
}

.vert ul li a:hover, .green-box ul li a:hover {
    color: #a7f3d0;
}

.rouge, .red-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.rouge ul li a, .red-box ul li a {
    color: #fca5a5;
}

.rouge ul li a:hover, .red-box ul li a:hover {
    color: #fecaca;
}

.orange, .orange-box {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(251, 146, 60, 0.15) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.orange ul li a, .orange-box ul li a {
    color: #fdba74;
}

.orange ul li a:hover, .orange-box ul li a:hover {
    color: #fed7aa;
}

.violet, .purple-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.violet ul li a, .purple-box ul li a {
    color: #c4b5fd;
}

.violet ul li a:hover, .purple-box ul li a:hover {
    color: #ddd6fe;
}

/* Widgets Icons */
.widgets, .widget-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: brightness(1.2);
}

li:hover .widgets, li:hover .widget-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Info Boxes */
.info-box, .notice-box {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--primary-color);
}

.info-box.warning, .notice-box.warning {
    border-right-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.info-box.success, .notice-box.success {
    border-right-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.info-box.error, .notice-box.error {
    border-right-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.info-box.info, .notice-box.info {
    border-right-color: var(--info-color);
    background: rgba(6, 182, 212, 0.1);
}

/* Download Buttons */
.download-btn, .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.download-btn:hover, .btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.download-btn img, .btn-download img {
    width: 24px;
    height: 24px;
}

/* Video Container */
.video-container, .embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
}

.video-container iframe,
.video-container video,
.embed-responsive iframe,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 1rem;
}

/* Tables */
.content-table, .styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
}

.content-table th, .styled-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    padding: 1rem;
    text-align: right;
    font-weight: 600;
}

.content-table td, .styled-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.content-table tr:last-child td, .styled-table tr:last-child td {
    border-bottom: none;
}

.content-table tr:hover td, .styled-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Accordion */
.accordion {
    margin-bottom: 1.5rem;
}

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    content: '−';
}

.accordion-content {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 1rem 1.25rem;
    max-height: 500px;
}

/* Tabs */
.tabs-container {
    margin-bottom: 1.5rem;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.tab-content {
    display: none;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

/* Subjects/Levels Links */
.subjects-grid, .levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.subject-card, .level-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.subject-card:hover, .level-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.subject-card img, .level-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
}

.subject-card h4, .level-card h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.subject-card p, .level-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }
.share-btn.linkedin { background: #0077b5; }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1rem;
    margin: 2rem 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-info {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

/* ===== White Box ===== */
.white, .white-box, .gray-box, .light-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.white ul, .white-box ul, .gray-box ul, .light-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.white ul li, .white-box ul li, .gray-box ul li, .light-box ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.white ul li:hover, .white-box ul li:hover, .gray-box ul li:hover, .light-box ul li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.white ul li a, .white-box ul li a, .gray-box ul li a, .light-box ul li a {
    color: #e2e8f0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.white ul li a:hover, .white-box ul li a:hover, .gray-box ul li a:hover, .light-box ul li a:hover {
    color: #ffffff;
}

/* ===== Dark Box ===== */
.dark, .dark-box, .black-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 27, 75, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.dark ul, .dark-box ul, .black-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dark ul li, .dark-box ul li, .black-box ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.dark ul li:hover, .dark-box ul li:hover, .black-box ul li:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.dark ul li a, .dark-box ul li a, .black-box ul li a {
    color: #cbd5e1;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dark ul li a:hover, .dark-box ul li a:hover, .black-box ul li a:hover {
    color: #a5b4fc;
}

/* ===== Yellow Box ===== */
.jaune, .yellow, .yellow-box {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.jaune ul, .yellow ul, .yellow-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.jaune ul li, .yellow ul li, .yellow-box ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.jaune ul li:hover, .yellow ul li:hover, .yellow-box ul li:hover {
    background: rgba(234, 179, 8, 0.2);
    transform: translateY(-2px);
}

.jaune ul li a, .yellow ul li a, .yellow-box ul li a {
    color: #fde047;
    font-weight: 500;
    transition: color 0.3s ease;
}

.jaune ul li a:hover, .yellow ul li a:hover, .yellow-box ul li a:hover {
    color: #fef08a;
}

/* ===== Cyan/Teal Box ===== */
.cyan, .cyan-box, .teal, .teal-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(20, 184, 166, 0.15) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.cyan ul li a, .cyan-box ul li a, .teal ul li a, .teal-box ul li a {
    color: #67e8f9;
}

.cyan ul li a:hover, .cyan-box ul li a:hover, .teal ul li a:hover, .teal-box ul li a:hover {
    color: #a5f3fc;
}

/* ===== Rose/Pink Box ===== */
.rose, .pink, .pink-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(244, 114, 182, 0.15) 100%);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.rose ul, .pink ul, .pink-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rose ul li, .pink ul li, .pink-box ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.rose ul li:hover, .pink ul li:hover, .pink-box ul li:hover {
    background: rgba(236, 72, 153, 0.2);
    transform: translateY(-2px);
}

.rose ul li a, .pink ul li a, .pink-box ul li a {
    color: #f9a8d4;
    font-weight: 500;
}

.rose ul li a:hover, .pink ul li a:hover, .pink-box ul li a:hover {
    color: #fbcfe8;
}

/* ===== Prof/Teacher Box ===== */
.prof, .teacher, .ostade, .enseignant {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-right: 4px solid #3b82f6;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.prof ul, .teacher ul, .ostade ul, .enseignant ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.prof ul li, .teacher ul li, .ostade ul li, .enseignant ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.prof ul li:hover, .teacher ul li:hover, .ostade ul li:hover, .enseignant ul li:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.prof ul li a, .teacher ul li a, .ostade ul li a, .enseignant ul li a {
    color: #93c5fd;
    font-weight: 500;
}

.prof ul li a:hover, .teacher ul li a:hover, .ostade ul li a:hover, .enseignant ul li a:hover {
    color: #bfdbfe;
}

/* ===== Student Box ===== */
.student, .tilmid, .eleve, .etudiant {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.12) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-right: 4px solid #10b981;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.student ul li a, .tilmid ul li a, .eleve ul li a, .etudiant ul li a {
    color: #6ee7b7;
}

.student ul li a:hover, .tilmid ul li a:hover, .eleve ul li a:hover, .etudiant ul li a:hover {
    color: #a7f3d0;
}

/* ===== Read Box ===== */
.read {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.read ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.read ul li,
.read > li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    list-style: none;
}

.read ul li:hover,
.read > li:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.read ul li a,
.read > li a {
    color: #a5b4fc;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read ul li a:hover,
.read > li a:hover {
    color: #c7d2fe;
}

/* Read box with direct li children (no ul wrapper) */
.read:not(:has(ul)) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Fallback for browsers that don't support :has() */
.read-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.read-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    list-style: none;
}

.read-list li:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.read-list li a {
    color: #a5b4fc;
    font-weight: 500;
}

/* ===== Download Box ===== */
.download, .telechargement {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.download ul, .telechargement ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.download ul li, .telechargement ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.download ul li:hover, .telechargement ul li:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateX(-5px);
}

.download ul li a, .telechargement ul li a {
    color: #6ee7b7;
    font-weight: 500;
}

.download ul li a:hover, .telechargement ul li a:hover {
    color: #a7f3d0;
}

/* ===== Exam/Exercise Box ===== */
.exercice, .exercise-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.exercice ul li a, .exercise-box ul li a {
    color: #fcd34d;
}

.exercice ul li a:hover, .exercise-box ul li a:hover {
    color: #fde68a;
}

.examen, .exam-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.examen ul li a, .exam-box ul li a {
    color: #fca5a5;
}

.examen ul li a:hover, .exam-box ul li a:hover {
    color: #fecaca;
}

/* ===== Cours/Lesson Box ===== */
.cours, .lesson-box, .doros {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(8, 145, 178, 0.15) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.cours ul, .lesson-box ul, .doros ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cours ul li, .lesson-box ul li, .doros ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.cours ul li:hover, .lesson-box ul li:hover, .doros ul li:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

.cours ul li a, .lesson-box ul li a, .doros ul li a {
    color: #67e8f9;
    font-weight: 500;
}

.cours ul li a:hover, .lesson-box ul li a:hover, .doros ul li a:hover {
    color: #a5f3fc;
}

/* ===== Video Box ===== */
.video, .video-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.video ul li a, .video-box ul li a {
    color: #d8b4fe;
}

.video ul li a:hover, .video-box ul li a:hover {
    color: #e9d5ff;
}

/* ===== Summary/Resume Box ===== */
.resume, .summary, .molakhas {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.resume ul li a, .summary ul li a, .molakhas ul li a {
    color: #f9a8d4;
}

.resume ul li a:hover, .summary ul li a:hover, .molakhas ul li a:hover {
    color: #fbcfe8;
}

/* ===== Important/Alert Box ===== */
.important, .alert, .mohim {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-right: 4px solid #fbbf24;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.important p, .alert p, .mohim p {
    color: #fef3c7;
    margin: 0;
}

/* ===== Note Box ===== */
.note, .remarque, .molahadha {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-right: 4px solid #6366f1;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.note p, .remarque p, .molahadha p {
    color: #e0e7ff;
    margin: 0;
}

/* ===== Solution Box ===== */
.solution, .correction, .tashih {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-right: 4px solid #22c55e;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.solution ul li a, .correction ul li a, .tashih ul li a {
    color: #86efac;
}

/* ===== Level/Class Boxes ===== */
.niveau, .level, .mostawa {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.niveau h3, .niveau h4, .level h3, .level h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* ===== Subject Boxes ===== */
.matiere, .subject, .madda {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.matiere:hover, .subject:hover, .madda:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* ===== Chapter/Unit Box ===== */
.chapitre, .chapter, .wahda {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.chapitre h4, .chapter h4, .wahda h4 {
    color: #93c5fd;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* ===== File Type Icons ===== */
.pdf-icon, .word-icon, .excel-icon, .ppt-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pdf-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.pdf-icon:hover {
    background: rgba(239, 68, 68, 0.3);
}

.word-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.word-icon:hover {
    background: rgba(59, 130, 246, 0.3);
}

.excel-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.excel-icon:hover {
    background: rgba(34, 197, 94, 0.3);
}

.ppt-icon {
    background: rgba(249, 115, 22, 0.2);
    color: #fdba74;
}

.ppt-icon:hover {
    background: rgba(249, 115, 22, 0.3);
}

/* ===== Semester/Term Boxes ===== */
.semestre1, .semester1, .dawra1 {
    border-right: 4px solid #3b82f6;
}

.semestre2, .semester2, .dawra2 {
    border-right: 4px solid #10b981;
}

/* ===== Year/Class Level ===== */
.premiere-annee, .first-year { border-right-color: #3b82f6; }
.deuxieme-annee, .second-year { border-right-color: #10b981; }
.troisieme-annee, .third-year { border-right-color: #f59e0b; }

/* ===== Buttons Variants ===== */
.btn-pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-word {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-video {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
}

.btn-link {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

/* ===== List Styles ===== */
.list-arrow ul li::before {
    content: '←';
    margin-left: 0.5rem;
    color: var(--primary-color);
}

.list-check ul li::before {
    content: '✓';
    margin-left: 0.5rem;
    color: var(--success-color);
}

.list-star ul li::before {
    content: '★';
    margin-left: 0.5rem;
    color: #fbbf24;
}

.list-number {
    counter-reset: item;
}

.list-number ul li::before {
    counter-increment: item;
    content: counter(item) '.';
    margin-left: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Spacing Utilities ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ===== Text Utilities ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

/* ===== Display Utilities ===== */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ===== Direct Li Support for All Boxes ===== */
/* Support for boxes with direct li children (without ul wrapper) */
.bleu:not(:has(ul)),
.blue-box:not(:has(ul)),
.vert:not(:has(ul)),
.green-box:not(:has(ul)),
.rouge:not(:has(ul)),
.red-box:not(:has(ul)),
.orange:not(:has(ul)),
.orange-box:not(:has(ul)),
.violet:not(:has(ul)),
.purple-box:not(:has(ul)),
.white:not(:has(ul)),
.white-box:not(:has(ul)),
.dark:not(:has(ul)),
.dark-box:not(:has(ul)),
.jaune:not(:has(ul)),
.yellow:not(:has(ul)),
.yellow-box:not(:has(ul)),
.cyan:not(:has(ul)),
.cyan-box:not(:has(ul)),
.teal:not(:has(ul)),
.teal-box:not(:has(ul)),
.rose:not(:has(ul)),
.pink:not(:has(ul)),
.pink-box:not(:has(ul)),
.prof:not(:has(ul)),
.teacher:not(:has(ul)),
.student:not(:has(ul)),
.download:not(:has(ul)),
.telechargement:not(:has(ul)),
.exercice:not(:has(ul)),
.examen:not(:has(ul)),
.cours:not(:has(ul)),
.doros:not(:has(ul)),
.video:not(:has(ul)),
.resume:not(:has(ul)),
.summary:not(:has(ul)),
.solution:not(:has(ul)),
.correction:not(:has(ul)) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Direct li styling for all color boxes */
.bleu > li,
.blue-box > li,
.vert > li,
.green-box > li,
.rouge > li,
.red-box > li,
.orange > li,
.orange-box > li,
.violet > li,
.purple-box > li,
.white > li,
.white-box > li,
.dark > li,
.dark-box > li,
.jaune > li,
.yellow > li,
.yellow-box > li,
.cyan > li,
.cyan-box > li,
.teal > li,
.teal-box > li,
.rose > li,
.pink > li,
.pink-box > li,
.prof > li,
.teacher > li,
.student > li,
.download > li,
.telechargement > li,
.exercice > li,
.examen > li,
.cours > li,
.doros > li,
.video > li,
.resume > li,
.summary > li,
.solution > li,
.correction > li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    list-style: none;
}

.bleu > li:hover,
.blue-box > li:hover,
.vert > li:hover,
.green-box > li:hover,
.rouge > li:hover,
.red-box > li:hover,
.orange > li:hover,
.orange-box > li:hover,
.violet > li:hover,
.purple-box > li:hover,
.white > li:hover,
.white-box > li:hover,
.dark > li:hover,
.dark-box > li:hover,
.jaune > li:hover,
.yellow > li:hover,
.yellow-box > li:hover,
.cyan > li:hover,
.cyan-box > li:hover,
.teal > li:hover,
.teal-box > li:hover,
.rose > li:hover,
.pink > li:hover,
.pink-box > li:hover,
.prof > li:hover,
.teacher > li:hover,
.student > li:hover,
.download > li:hover,
.telechargement > li:hover,
.exercice > li:hover,
.examen > li:hover,
.cours > li:hover,
.doros > li:hover,
.video > li:hover,
.resume > li:hover,
.summary > li:hover,
.solution > li:hover,
.correction > li:hover {
    transform: translateY(-2px);
}

/* Color-specific hover for direct li */
.bleu > li:hover, .blue-box > li:hover { background: rgba(99, 102, 241, 0.2); }
.vert > li:hover, .green-box > li:hover { background: rgba(16, 185, 129, 0.2); }
.rouge > li:hover, .red-box > li:hover { background: rgba(239, 68, 68, 0.2); }
.orange > li:hover, .orange-box > li:hover { background: rgba(249, 115, 22, 0.2); }
.violet > li:hover, .purple-box > li:hover { background: rgba(139, 92, 246, 0.2); }
.white > li:hover, .white-box > li:hover { background: rgba(255, 255, 255, 0.12); }
.dark > li:hover, .dark-box > li:hover { background: rgba(99, 102, 241, 0.2); }
.jaune > li:hover, .yellow > li:hover, .yellow-box > li:hover { background: rgba(234, 179, 8, 0.2); }
.cyan > li:hover, .cyan-box > li:hover, .teal > li:hover, .teal-box > li:hover { background: rgba(6, 182, 212, 0.2); }
.rose > li:hover, .pink > li:hover, .pink-box > li:hover { background: rgba(236, 72, 153, 0.2); }
.prof > li:hover, .teacher > li:hover { background: rgba(59, 130, 246, 0.2); }
.student > li:hover { background: rgba(16, 185, 129, 0.2); }
.download > li:hover, .telechargement > li:hover { background: rgba(16, 185, 129, 0.2); }
.exercice > li:hover { background: rgba(245, 158, 11, 0.2); }
.examen > li:hover { background: rgba(239, 68, 68, 0.2); }
.cours > li:hover, .doros > li:hover { background: rgba(6, 182, 212, 0.2); }
.video > li:hover { background: rgba(168, 85, 247, 0.2); }
.resume > li:hover, .summary > li:hover { background: rgba(236, 72, 153, 0.2); }
.solution > li:hover, .correction > li:hover { background: rgba(34, 197, 94, 0.2); }

/* Link colors for direct li */
.bleu > li a, .blue-box > li a { color: #a5b4fc; }
.vert > li a, .green-box > li a { color: #6ee7b7; }
.rouge > li a, .red-box > li a { color: #fca5a5; }
.orange > li a, .orange-box > li a { color: #fdba74; }
.violet > li a, .purple-box > li a { color: #c4b5fd; }
.white > li a, .white-box > li a { color: #e2e8f0; }
.dark > li a, .dark-box > li a { color: #cbd5e1; }
.jaune > li a, .yellow > li a, .yellow-box > li a { color: #fde047; }
.cyan > li a, .cyan-box > li a, .teal > li a, .teal-box > li a { color: #67e8f9; }
.rose > li a, .pink > li a, .pink-box > li a { color: #f9a8d4; }
.prof > li a, .teacher > li a { color: #93c5fd; }
.student > li a { color: #6ee7b7; }
.download > li a, .telechargement > li a { color: #6ee7b7; }
.exercice > li a { color: #fcd34d; }
.examen > li a { color: #fca5a5; }
.cours > li a, .doros > li a { color: #67e8f9; }
.video > li a { color: #d8b4fe; }
.resume > li a, .summary > li a { color: #f9a8d4; }
.solution > li a, .correction > li a { color: #86efac; }

/* ===== Tables - Easy Table ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
}

.easy-table,
.easy-table-default {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.easy-table thead tr,
.easy-table-default thead tr {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.easy-table th,
.easy-table-default th {
    padding: 1rem 1.25rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.easy-table td,
.easy-table-default td {
    padding: 0.875rem 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.easy-table tbody tr,
.easy-table-default tbody tr {
    transition: all 0.3s ease;
}

.easy-table tbody tr:nth-child(even),
.easy-table-default tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.easy-table tbody tr:hover,
.easy-table-default tbody tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

.easy-table td a,
.easy-table-default td a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.easy-table td a:hover,
.easy-table-default td a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Empty cells */
.easy-table td:empty,
.easy-table-default td:empty {
    background: rgba(255, 255, 255, 0.02);
}

.easy-table td:empty::after,
.easy-table-default td:empty::after {
    content: '—';
    color: var(--text-muted);
}

/* Responsive Table */
@media (max-width: 768px) {
    .easy-table th,
    .easy-table-default th,
    .easy-table td,
    .easy-table-default td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .easy-table td a,
    .easy-table-default td a {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ===== Pistach/Pistachio Box ===== */
.pistach, .pistachio, .pistache {
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.15) 0%, rgba(163, 230, 53, 0.15) 100%);
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.pistach ul, .pistachio ul, .pistache ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pistach ul li, .pistachio ul li, .pistache ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.pistach ul li:hover, .pistachio ul li:hover, .pistache ul li:hover {
    background: rgba(132, 204, 22, 0.2);
    transform: translateY(-2px);
}

.pistach ul li a, .pistachio ul li a, .pistache ul li a {
    color: #bef264;
    font-weight: 500;
    transition: color 0.3s ease;
}

.pistach ul li a:hover, .pistachio ul li a:hover, .pistache ul li a:hover {
    color: #d9f99d;
}

/* Direct li support for pistach */
.pistach:not(:has(ul)), .pistachio:not(:has(ul)), .pistache:not(:has(ul)) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pistach > li, .pistachio > li, .pistache > li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    list-style: none;
}

.pistach > li:hover, .pistachio > li:hover, .pistache > li:hover {
    background: rgba(132, 204, 22, 0.2);
    transform: translateY(-2px);
}

.pistach > li a, .pistachio > li a, .pistache > li a {
    color: #bef264;
    font-weight: 500;
}

/* ===== Mawad/Subjects Grid ===== */
.mawad {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    list-style: none;
}

@media (min-width: 480px) {
    .mawad {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .mawad {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .mawad {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mada {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    list-style: none;
}

.mada:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.mada img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    flex-shrink: 0;
}

.mada a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.mada:hover a {
    color: var(--text-primary);
}

/* Subject Icons with specific colors */
.mada .math,
.mada img.math {
    filter: hue-rotate(200deg) brightness(1.3);
}

.mada:has(.math):hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.mada .pc,
.mada img.pc {
    filter: hue-rotate(260deg) brightness(1.2);
}

.mada:has(.pc):hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.mada .svt,
.mada img.svt {
    filter: hue-rotate(100deg) brightness(1.2);
}

.mada:has(.svt):hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.mada .lang,
.mada img.lang {
    filter: hue-rotate(30deg) brightness(1.2);
}

.mada:has(.lang):hover {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

.mada .geo,
.mada img.geo {
    filter: hue-rotate(170deg) brightness(1.2);
}

.mada:has(.geo):hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.15);
}

.mada .islam,
.mada img.islam {
    filter: hue-rotate(140deg) brightness(1.2);
}

.mada:has(.islam):hover {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, 0.15);
}

.mada .info,
.mada img.info {
    filter: hue-rotate(270deg) brightness(1.2);
}

.mada:has(.info):hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}

.mada .si,
.mada img.si {
    filter: grayscale(0.3) brightness(1.2);
}

.mada:has(.si):hover {
    border-color: #64748b;
    background: rgba(100, 116, 139, 0.15);
}

.mada .philo,
.mada img.philo {
    filter: hue-rotate(300deg) brightness(1.2);
}

.mada:has(.philo):hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.15);
}

.mada .sport,
.mada img.sport {
    filter: hue-rotate(0deg) saturate(1.5) brightness(1.2);
}

.mada:has(.sport):hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.mada .art,
.mada img.art {
    filter: hue-rotate(320deg) brightness(1.2);
}

.mada:has(.art):hover {
    border-color: #f472b6;
    background: rgba(244, 114, 182, 0.15);
}

.mada .histoire,
.mada img.histoire {
    filter: sepia(0.5) brightness(1.2);
}

.mada:has(.histoire):hover {
    border-color: #a16207;
    background: rgba(161, 98, 7, 0.15);
}

/* Fallback for browsers without :has() support */
.mada.math-subject:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.15); }
.mada.pc-subject:hover { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.15); }
.mada.svt-subject:hover { border-color: #10b981; background: rgba(16, 185, 129, 0.15); }
.mada.lang-subject:hover { border-color: #f97316; background: rgba(249, 115, 22, 0.15); }
.mada.geo-subject:hover { border-color: #06b6d4; background: rgba(6, 182, 212, 0.15); }
.mada.islam-subject:hover { border-color: #14b8a6; background: rgba(20, 184, 166, 0.15); }
.mada.info-subject:hover { border-color: #a855f7; background: rgba(168, 85, 247, 0.15); }

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .back-to-top,
    .share-buttons,
    .comments-section,
    .post-navigation {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .single-post-content {
        max-width: 100% !important;
    }
}

/* ===== Mobile Responsive Fixes (User Experience) ===== */
@media (max-width: 767.98px) {
    /* Typography Scaling */
    html {
        font-size: 15px;
    }
    
    h1, .hero-title {
        font-size: 2rem !important;
        line-height: 1.3;
    }
    
    h2, .section-title {
        font-size: 1.6rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    /* Header Compact Mode */
    .site-header {
        height: auto;
        min-height: 60px;
    }

    .header-inner {
        height: 60px; /* Smaller height on mobile */
        padding: 0;
    }
    
    /* Logo Constraints */
    .site-logo {
        flex: 0 1 auto;
        max-width: 60%;
    }
    
    .site-logo img, 
    .custom-logo,
    .site-logo .custom-logo-link img {
        max-height: 45px !important; /* Ensure it fits nicely */
        width: auto;
        max-width: 100%;
    }

    /* Layout Adjustments */
    .hero-section {
        padding-top: 5rem; /* Give space for header + spacing */
        padding-bottom: 2rem;
        min-height: auto;
    }
    
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Grid Spacing */
    .articles-grid, 
    .lessons-grid, 
    .exercises-grid, 
    .exams-grid, 
    .footer-grid {
        gap: 1.5rem;
    }
    
    /* Mobile Menu Position */
    .mobile-menu {
        top: 60px; /* Match new header height */
    }
    
    /* Better Touch Targets */
    .header-btn {
        width: 44px;
        height: 44px;
    }
    
    .mawad {
        grid-template-columns: 1fr; /* Single column for subjects */
        gap: 0.5rem;
    }
    
    /* Prevent Horizontal Scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .articles-grid{
max-width: 100% ;
overflow: hidden ;
	display: flex ;
flex-direction: column
}
.articles-main{
min-width: 0 ;
width: 100% ;
position: relative ;
overflow-wrap: break-word ;
}


}