/* المرصد العالمي للفقه الحنفي - التصميم العصري */

/* الألوان الرسمية */
:root {
    --bg-primary: #F2F8FF;
    --interactive: #98D8D8;
    --heading: #60A9A9;
    --border-text: #2E7575;
    --white: #FFFFFF;
    --shadow: rgba(46, 117, 117, 0.1);
    --shadow-hover: rgba(46, 117, 117, 0.2);
    --gradient-primary: linear-gradient(135deg, #98D8D8 0%, #60A9A9 100%);
    --gradient-secondary: linear-gradient(135deg, #F2F8FF 0%, #E8F4F8 100%);
}

/* إعادة تعيين الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Cairo', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--border-text);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

/* الحاوي الرئيسي */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الهيدر العصري */
.modern-header {
    background: var(--white);
    box-shadow: 0 4px 20px var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--border-text);
    opacity: 0.8;
}

/* التنقل العصري */
.modern-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--border-text);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--interactive);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--shadow);
}

/* زر القائمة المحمولة */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.mobile-menu-btn i {
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* الأزرار العصرية */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--heading);
    border: 2px solid var(--interactive);
}

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

/* القسم الرئيسي */
.hero-section {
    background: var(--gradient-secondary);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%2360A9A9" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--heading);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--border-text);
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* قسم المميزات */
.features-section {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 60px;
}

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

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(152, 216, 216, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 2rem;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--border-text);
    opacity: 0.8;
    line-height: 1.6;
}

/* قسم الاشتراكات */
.subscription-section {
    padding: 80px 0;
    background: var(--gradient-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.pricing-card {
    background: var(--white);
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    transform: scale(1.05);
    border: 3px solid var(--interactive);
}

.pricing-card.featured::before {
    content: 'الأكثر شعبية';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-hover);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 15px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--interactive);
    margin-bottom: 10px;
}

.plan-period {
    color: var(--border-text);
    opacity: 0.7;
    margin-bottom: 30px;
}

.plan-features {
    list-style: none;
    margin-bottom: 40px;
}

.plan-features li {
    padding: 10px 0;
    color: var(--border-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li i {
    color: var(--interactive);
    width: 20px;
}

/* قسم أحدث الكتب */
.latest-books-section {
    padding: 80px 0;
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--border-text);
    opacity: 0.8;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.book-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-hover);
}

.book-cover {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.1);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 117, 117, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-info {
    padding: 20px;
}

.book-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 10px;
    line-height: 1.3;
}

.book-author {
    color: var(--border-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.book-category {
    background: var(--interactive);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.book-date {
    color: var(--border-text);
    opacity: 0.7;
}

.loading-books {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--border-text);
}

.loading-books i {
    font-size: 2rem;
    color: var(--interactive);
    margin-bottom: 15px;
}

.text-center {
    text-align: center;
}

.no-books, .error-message {
    text-align: center;
    padding: 40px;
    color: var(--border-text);
    font-size: 1.1rem;
}

.error-message {
    color: #e74c3c;
}

/* الفوتر العصري */
.modern-footer {
    background: var(--border-text);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--interactive);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-description {
    line-height: 1.6;
    opacity: 0.8;
    margin-top: 15px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--interactive);
    transform: translateX(-5px);
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.contact-info i {
    color: var(--interactive);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--interactive);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--heading);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(152, 216, 216, 0.2);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* تحريكات خفيفة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* تأثيرات التمرير */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* تأثيرات إضافية */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* التجاوب */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .modern-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .modern-nav.mobile-active {
        display: flex;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow);
        z-index: 1000;
        border-radius: 0 0 20px 20px;
    }

    .modern-nav.mobile-active .nav-link {
        padding: 15px 0;
        border-bottom: 1px solid rgba(152, 216, 216, 0.2);
        border-radius: 0;
        text-align: center;
        width: 100%;
    }

    .modern-nav.mobile-active .nav-link:last-child {
        border-bottom: none;
    }

    .modern-nav.mobile-active .btn {
        margin-top: 15px;
        align-self: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .pricing-card.featured {
        transform: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
