/* إعدادات عامة للصفحة الرئيسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* الألوان الحمراء */
    --primary-color: #c41e3a;
    --secondary-color: #8b1538;
    --accent-color: #dc143c;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --muted-color: #6c757d;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.2);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    direction: rtl;
    overflow-x: hidden;
}

main {
    padding-top: 20px;
    /* Base padding for all main content */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

/* اللوجو */
.logo {
    flex: 0 0 auto;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo h1 {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.logo-link:hover .logo h1 {
    transform: scale(1.05);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.logo .tagline {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
    font-family: 'Cairo', sans-serif;
    margin-top: -5px;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* إخفاء زر المينيو في الكمبيوتر */
.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Search Bar */
.search-bar {
    padding: 0.8rem 0;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    position: relative;
}

.search-bar.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-bar input {
    width: 100%;
    padding: 12px 60px 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    box-shadow: var(--shadow-light);
    background: white;
}

.search-bar button {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--secondary-color);
}

/* Navigation */
.nav {
    flex: 1;
    margin: 0 30px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.nav-list::-webkit-scrollbar {
    height: 4px;
}

.nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.nav-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nav-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.nav-list li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    display: none;
    list-style: none;
    padding: 10px 0;
    margin-top: 15px;
    z-index: 1001;
    border: 1px solid var(--border-color);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 30px;
    width: 15px;
    height: 15px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFade 0.3s ease forwards;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu li a {
    color: var(--text-color) !important;
    padding: 10px 20px !important;
    border-radius: 0 !important;
    font-size: 0.95rem !important;
    transition: var(--transition);
    display: block;
    text-align: right;
}

.dropdown-menu li a:hover {
    background-color: var(--light-color) !important;
    color: var(--primary-color) !important;
    transform: translateX(-5px) !important;
    box-shadow: none !important;
}

@media (max-width: 1024px) {
    .header-main {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        width: 100%;
        margin: 0;
    }

    .logo {
        width: 100%;
        text-align: center;
    }
}

/* زر المزيد */
.nav-more-btn {
    position: relative;
    margin-right: 10px;
}

.more-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

.more-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.more-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.more-btn i {
    transition: transform 0.3s ease;
}

.more-btn.active i {
    transform: rotate(180deg);
}

/* Breaking News Ticker */
.breaking-news {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-light);
}

.breaking-label {
    background: var(--secondary-color);
    padding: 10px 20px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.1);
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: ticker 40s linear infinite;
    gap: 150px;
    padding: 10px 20px;
    font-weight: 500;
}

.ticker-content span {
    white-space: nowrap;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Content */
.main-content {
    padding: 2.5rem 0;
    min-height: 100vh;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 4rem;
}

/* Featured News Section */
.special-news {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.special-news:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.special-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.special-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Featured Article */
.featured-article {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-article:hover .article-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: var(--muted-color);
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    color: var(--muted-color);
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.sidebar-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.sidebar-section .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--dark-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 8px;
    position: relative;
}

.sidebar-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 30px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Latest News */
.latest-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    transition: var(--transition);
}

.news-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.news-item:hover {
    transform: translateX(-5px);
}

.news-item:last-child .news-link {
    border-bottom: none;
    padding-bottom: 0;
}

.news-item img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-light);
}

.news-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    color: var(--text-color);
}

.news-time {
    font-size: 0.75rem;
    color: var(--muted-color);
}

/* Popular Articles */
.popular-list {
    list-style: none;
    counter-reset: popular-counter;
}

.popular-list li {
    counter-increment: popular-counter;
    margin-bottom: 15px;
    position: relative;
    padding-right: 35px;
    transition: var(--transition);
}

.popular-list li:hover {
    transform: translateX(-5px);
}

.popular-list li::before {
    content: counter(popular-counter);
    position: absolute;
    right: 0;
    top: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.popular-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
    line-height: 1.4;
    transition: var(--transition);
    font-size: 0.9rem;
}

.popular-list li a:hover {
    color: var(--primary-color);
}

.views-count {
    font-size: 0.75rem;
    color: var(--muted-color);
}

/* Weather Widget */
.weather-widget {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: weatherAnimation 20s linear infinite;
}

@keyframes weatherAnimation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.weather-widget .section-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.weather-info {
    position: relative;
    z-index: 2;
}

.weather-location {
    margin-bottom: 15px;
    font-size: 1rem;
}

.weather-temp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
}

.temp {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-icon {
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 12px;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

/* Stats Widget */
.stats-widget {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-item i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Home Sections */
.home-sections {
    margin-top: 3rem;
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-medium);
}

.sections-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.sections-title i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.section-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.1), transparent);
    transition: left 0.5s ease;
}

.section-card:hover::before {
    left: 100%;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: white;
    transition: var(--transition);
}

.section-card:hover .section-icon {
    transform: scale(1.1);
}

/* Section Colors */
.section-card.politics .section-icon {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

.section-card.economy .section-icon {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.section-card.sports .section-icon {
    background: linear-gradient(135deg, #FF5722, #D84315);
}

.section-card.technology .section-icon {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.section-card.health .section-icon {
    background: linear-gradient(135deg, #E91E63, #C2185B);
}

.section-card.education .section-icon {
    background: linear-gradient(135deg, #3F51B5, #303F9F);
}

.section-card.culture .section-icon {
    background: linear-gradient(135deg, #795548, #5D4037);
}

.section-card.travel .section-icon {
    background: linear-gradient(135deg, #009688, #00796B);
}

.section-card.entertainment .section-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.section-card.science .section-icon {
    background: linear-gradient(135deg, #607D8B, #455A64);
}

.section-card.fashion .section-icon {
    background: linear-gradient(135deg, #E91E63, #AD1457);
}

.section-card.automotive .section-icon {
    background: linear-gradient(135deg, #424242, #212121);
}

.section-card.realestate .section-icon {
    background: linear-gradient(135deg, #8BC34A, #689F38);
}

.section-card.food .section-icon {
    background: linear-gradient(135deg, #FF5722, #E64A19);
}

.section-card.local .section-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.section-card.world .section-icon {
    background: linear-gradient(135deg, #673AB7, #512DA8);
}

.section-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.section-card p {
    color: var(--muted-color);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.section-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

/* More Sections Button */
.more-sections-btn {
    text-align: center;
    margin: 30px 0;
}

.load-more-sections {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

.load-more-sections:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Hidden Home Sections */
.hidden-home-sections {
    display: none;
    opacity: 0;
    transition: all 0.5s ease;
}

.hidden-home-sections.show {
    display: grid;
    opacity: 1;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-color), #2c3e50);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    font-weight: 600;
    color: white;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
    padding: 3px 0;
    display: block;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(-5px);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.social-links a {
    color: #bdc3c7;
    font-size: 1.2rem;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: white;
    background: var(--primary-color);
    transform: translateY(-3px);
}

.newsletter {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.newsletter input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 0.85rem;
}

.newsletter button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.85rem;
}

.newsletter button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1.5rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bdc3c7;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sections-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

    .nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* ====== MOBILE HEADER LAYOUT ====== */
    .header-main {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 0 !important;
        height: 58px !important;
        gap: 0 !important;
    }

    .logo {
        flex: 0 0 auto !important;
        max-width: calc(100% - 100px) !important;
    }

    .logo h1 {
        font-size: 1.15rem !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    /* THE KEY: Nav is a FIXED sidebar from the LEFT (RTL layout) */
    .nav {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        right: auto !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        z-index: 99999 !important;
        flex: none !important;
        margin: 0 !important;
        transition: left 0.35s ease !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .nav.active {
        left: 0 !important;
    }

    .header-controls {
        flex: 0 0 auto !important;
        display: flex !important;
        gap: 8px !important;
    }

    .menu-toggle {
        display: flex !important;
    }

    /* ====== MOBILE SIDEBAR NAV ====== */
    .nav-list {
        flex-direction: column !important;
        gap: 0 !important;
        align-items: stretch !important;
        max-height: none !important;
        overflow-y: auto !important;
        background: white !important;
        border-radius: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 20px !important;
        position: static !important;
    }

    /* Hide "More" button on mobile - all categories shown directly */
    .nav-more-btn {
        display: none !important;
    }

    /* Show the hidden extra categories directly in sidebar */
    .mobile-only-categories {
        display: block !important;
    }



    /* Scrollbar for mobile sidebar */
    .nav::-webkit-scrollbar {
        width: 4px;
    }

    .nav::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .nav::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    .nav::-webkit-scrollbar-thumb:hover {
        background: var(--primary-color, #c41e3a);
    }

    /* للمتصفحات التي تدعم scrollbar-width */
    .nav-list.active {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.4) rgba(255, 255, 255, 0.1);
    }

    /* إضافة ظل داخلي لتوضيح إمكانية التمرير */
    .nav-list.active::before,
    .nav-list.active::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 10px;
        pointer-events: none;
        z-index: 10;
    }

    .nav-list.active::before {
        top: 0;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    }

    .nav-list.active::after {
        bottom: 0;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.1), transparent);
    }

    .nav-hidden {
        width: 100%;
        text-align: center;
    }

    /* Mobile sidebar nav links */
    .nav-list li a {
        width: 100% !important;
        text-align: right !important;
        margin: 0 !important;
        display: block !important;
        padding: 15px 20px !important;
        color: #1e293b !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        box-sizing: border-box !important;
    }

    .more-btn {
        width: 85%;
        justify-content: center;
        margin: 8px auto;
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    .breaking-news {
        flex-direction: column;
        align-items: stretch;
    }

    .breaking-label {
        text-align: center;
        padding: 8px 15px;
    }

    .ticker-content {
        justify-content: center;
        text-align: center;
        animation-duration: 25s;
        padding: 8px 15px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .article-image {
        height: 180px;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .special-news {
        padding: 20px;
    }

    .sections-grid {
        grid-template-columns: 1fr;
    }

    .home-sections {
        padding: 25px 20px;
    }

    .sections-title {
        font-size: 1.6rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .newsletter {
        flex-direction: column;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .sidebar {
        gap: 20px;
    }

    .sidebar-section {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.6rem;
    }

    .logo .tagline {
        font-size: 0.75rem;
    }

    .article-title {
        font-size: 1rem;
    }

    .article-image {
        height: 160px;
    }

    .sections-title {
        font-size: 1.4rem;
    }

    .section-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .section-card h3 {
        font-size: 1.1rem;
    }

    .section-card p {
        font-size: 0.85rem;
    }

    .weather-temp .temp {
        font-size: 2rem;
    }

    .news-item .news-link {
        flex-direction: column;
        text-align: center;
    }

    .news-item img {
        width: 100%;
        height: 120px;
        align-self: center;
    }

    .popular-list li {
        padding-right: 30px;
    }

    .popular-list li::before {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .more-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .load-more-sections {
        font-size: 0.9rem;
        padding: 12px 24px;
    }

    /* تحسين المينيو للشاشات الصغيرة جداً */
    .nav-list.active {
        max-height: 60vh;
    }

    .nav-list li a {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), #661122);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(196, 30, 58, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0);
    }
}

.featured-article,
.section-card {
    animation: slideInUp 0.6s ease forwards;
}

.sidebar-section {
    animation: slideInRight 0.6s ease forwards;
}

.breaking-label {
    animation: pulse 2s infinite;
}

/* Global Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--muted-color);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff5f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.page-numbers {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-num {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-num.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.page-num:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.page-dots {
    color: var(--muted-color);
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 576px) {
    .page-btn span {
        display: none;
    }

    .page-btn {
        padding: 12px;
    }

    .pagination {
        gap: 8px;
    }

    .page-num {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}