/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - محدث للثبات */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: #2c5282;
    font-size: 2rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.header.scrolled .nav-brand h1 {
    transform: scale(0.9);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2c5282;
}

.header.scrolled .nav-menu a {
    color: #2c5282;
    font-weight: 600;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: #ed8936;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.cta-button:hover {
    background: #dd7324;
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f7fafc;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.about-content p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: #2c5282;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* Articles Section */
.articles {
    padding: 80px 0;
}

.articles h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-category {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.article-card h3 {
    color: #2c5282;
    margin: 1.5rem 2rem 1rem 2rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-card p {
    color: #666;
    margin: 0 2rem 1.5rem 2rem;
    line-height: 1.6;
}

.read-more {
    color: #ed8936;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin: 0 2rem 2rem 2rem;
    display: inline-block;
}

.read-more:hover {
    color: #dd7324;
}

.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #f7fafc;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-content > p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #666;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-method h3 {
    color: #2c5282;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.contact-method p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.contact-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.email-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.email-btn:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer - محدث */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: #cbd5e0;
    font-size: 0.95rem;
}

.footer-links .footer-section h4 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links .footer-section ul {
    list-style: none;
}

.footer-links .footer-section li {
    margin-bottom: 0.5rem;
}

.footer-links .footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links .footer-section a:hover {
    color: #667eea;
}

.footer-social h4 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #cbd5e0;
    font-size: 0.9rem;
}

/* Back to Top Button - جديد */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Article Page Styles */
.article-page {
    padding: 120px 0 80px;
    background: #f8f9fa;
}

.full-article {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2rem;
}

.article-header .article-category {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.article-header h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
}

.article-meta span {
    margin: 0 1rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

.article-content .lead {
    font-size: 1.3rem;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.article-content h2 {
    color: #2c5282;
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem 0;
    border-right: 4px solid #667eea;
    padding-right: 1rem;
}

.article-content h3 {
    color: #2c5282;
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: #2d3748;
    font-weight: 600;
}

.article-cta {
    background: linear-gradient(135deg, #f7fafc, #e2e8f0);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 3rem;
}

.social-share {
    margin-top: 1rem;
}

.share-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin: 0 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Related Articles */
.related-articles {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.related-articles h3 {
    color: #2c5282;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    gap: 1rem;
}

.related-card {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.related-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.related-card h4 {
    color: #2c5282;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about h2,
    .articles h2,
    .contact h2 {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Back to Top responsive */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Article page responsive */
    .full-article {
        padding: 2rem 1.5rem;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content .lead {
        font-size: 1.1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .share-btn {
        display: block;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .about,
    .articles,
    .contact {
        padding: 60px 0;
    }

    /* Back to Top mobile */
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
