/* ============================================
   HadithWorld V2.0 - Final Sections
   ============================================ */

/* ============================================
   Authenticity Section
   ============================================ */
.authenticity-section {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.08) 50%, transparent 100%);
}

.authenticity-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.auth-card {
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-card.sahih::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.auth-card.hasan::before {
    background: linear-gradient(90deg, #eab308, #facc15);
}

.auth-card.daif::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.auth-card:hover {
    transform: translateY(-10px);
}

.auth-card.sahih:hover {
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.2);
}

.auth-card.hasan:hover {
    box-shadow: 0 10px 40px rgba(234, 179, 8, 0.2);
}

.auth-card.daif:hover {
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.2);
}

.auth-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.auth-card.sahih .auth-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.auth-card.hasan .auth-icon {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.auth-card.daif .auth-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.auth-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.arabic-text {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.auth-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.auth-stats {
    margin-bottom: 1.5rem;
}

.auth-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.auth-card.sahih .auth-count {
    color: #4ade80;
}

.auth-card.hasan .auth-count {
    color: #facc15;
}

.auth-card.daif .auth-count {
    color: #f87171;
}

.auth-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-link:hover {
    gap: 0.75rem;
}

.auth-card.sahih .auth-link:hover {
    color: #4ade80;
}

.auth-card.hasan .auth-link:hover {
    color: #facc15;
}

.auth-card.daif .auth-link:hover {
    color: #f87171;
}

/* ============================================
   Features Section - 3D Modern Design
   ============================================ */
/* PERFORMANCE OPTIMIZED - Dark Theme */
.features-section-3d {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    /* Dark gradient background with subtle neon glow */
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(139, 92, 246, 0.08) 20%,
            rgba(124, 58, 237, 0.12) 50%,
            rgba(6, 182, 212, 0.06) 80%,
            transparent 100%);
}

.features-bg-3d {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* PERFORMANCE: Static decorative elements only */
}

.features-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* PERFORMANCE: Removed heavy blur orbs - using simple static circles instead */
.features-orb {
    position: absolute;
    border-radius: 50%;
    /* No blur filter - just opacity */
    opacity: 0.15;
}

.features-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
    top: -50px;
    left: 10%;
    /* DISABLED heavy animation */
}

.features-orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    bottom: 0;
    right: 15%;
}

.features-orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: 40%;
    left: 45%;
}

/* Removed featureOrbMove animation - was causing lag */

.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* PERFORMANCE: Made floating icons static - removed animations */
.floating-icon {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(99, 102, 241, 0.15);
    /* Static - no animation for performance */
}

.floating-icon.icon-1 {
    top: 15%;
    left: 8%;
}

.floating-icon.icon-2 {
    top: 25%;
    right: 12%;
}

.floating-icon.icon-3 {
    bottom: 20%;
    left: 15%;
}

.floating-icon.icon-4 {
    bottom: 30%;
    right: 8%;
}

/* Removed floatIconMove animation for performance */

/* Coming Soon Badge - PERFORMANCE OPTIMIZED */
.coming-soon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Simplified glow - static */
.coming-soon-badge .badge-glow {
    display: none;
    /* Hidden for performance */
}

.coming-soon-badge i {
    position: relative;
    z-index: 2;
    color: var(--accent);
    /* Removed animation for performance */
}

.coming-soon-badge span {
    position: relative;
    z-index: 2;
}

/* Hidden particle animations for performance */
.badge-particles {
    display: none;
}

/* 3D Feature Cards Showcase */
.features-showcase-3d {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    perspective: 1000px;
}

.feature-card-3d {
    position: relative;
    /* PERFORMANCE: Simplified perspective */
}

.feature-card-inner {
    position: relative;
    padding: 2rem;
    /* PERFORMANCE: Removed backdrop-filter - using solid background instead */
    background: rgba(25, 25, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.feature-card-3d:hover .feature-card-inner {
    transform: translateY(-8px) translateZ(0);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(139, 92, 246, 0.1);
}

.feature-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card-3d:hover .feature-card-glow {
    opacity: 1;
}

.feature-number {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
}

.feature-card-3d:hover .feature-number {
    color: rgba(167, 139, 250, 0.12);
}

/* Hexagonal Icon */
.feature-icon-3d {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.icon-hexagon {
    position: relative;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.4s ease;
    z-index: 2;
}

.feature-card-3d:hover .icon-hexagon {
    transform: rotate(15deg) scale(1.1);
}

.icon-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(167, 139, 250, 0.35);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    /* PERFORMANCE: Removed infinite animation - only animate on hover */
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.feature-card-inner h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card-inner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Feature Progress Status */
.feature-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.status-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    position: relative;
    transition: width 1s ease-out;
}

.status-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    /* PERFORMANCE: Removed infinite animation for smoother scrolling */
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.feature-status span {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

/* More Features Teaser */
.more-features-teaser {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 3rem;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.15), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: var(--radius-xl);
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.more-features-teaser::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.12), transparent);
    /* PERFORMANCE: Removed infinite animation for smoother scrolling */
}

@keyframes teaserShine {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.teaser-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.teaser-icons {
    display: flex;
    gap: 0.5rem;
}

.teaser-icons span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--secondary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.teaser-icons span:hover {
    transform: translateY(-5px);
    background: var(--primary);
}

.teaser-content p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.teaser-content p strong {
    color: var(--secondary);
}

.notify-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-gold);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 2;
}

.notify-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.notify-btn i {
    animation: bellRing 2s ease-in-out infinite;
}

.notify-btn .btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.notify-btn:hover .btn-shine {
    left: 100%;
}


/* ============================================
   Footer
   ============================================ */
.footer {
    position: relative;
    padding: 5rem 2rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 15, 26, 0.9) 100%);
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column ul li a:hover {
    color: var(--text-primary);
    padding-left: 5px;
}

.contact-list li a i {
    color: var(--secondary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.made-with i {
    color: #ef4444;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 100;
    box-shadow: var(--shadow-glow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 0;
        margin-bottom: 2rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        justify-content: center;
    }

    .topics-explorer {
        grid-template-columns: 1fr;
    }

    .topic-preview {
        margin: 0 auto;
    }

    .knowledge-content {
        grid-template-columns: 1fr;
    }

    .knowledge-text .section-title,
    .knowledge-text .section-description {
        text-align: center;
    }

    .knowledge-features {
        max-width: 500px;
        margin: 0 auto 2rem;
    }

    .knowledge-actions {
        justify-content: center;
    }

    .features-showcase-3d {
        grid-template-columns: repeat(2, 1fr);
    }

    .more-features-teaser {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .authenticity-cards {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .book-cover {
        width: 200px;
        height: 280px;
    }

    .arabic-large {
        font-size: 3rem;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .topic-circle-container {
        width: 380px;
        height: 380px;
    }

    .topic-item {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-150px) rotate(calc(-1 * var(--angle)));
    }

    .topic-icon {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }

    .topic-label {
        font-size: 0.75rem;
    }

    .center-circle {
        width: 130px;
        height: 130px;
        padding: 0.75rem;
    }

    .center-content i {
        font-size: 1.4rem;
        margin-bottom: 0.3rem;
    }

    .center-content span {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .narrator-cards {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* 3D Features Section Responsive */
    .features-section-3d {
        padding: 4rem 1.5rem;
    }

    .features-showcase-3d {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card-inner {
        padding: 1.5rem;
    }

    .feature-number {
        font-size: 2rem;
    }

    .icon-hexagon {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .icon-ring {
        width: 70px;
        height: 70px;
    }

    .coming-soon-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .teaser-icons {
        display: none;
    }

    .notify-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .search-container {
        padding: 1rem;
    }
}

/* Scroll Reveal Animations */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Styles for New 3D Sections
   ============================================ */

/* Books Section Responsive */
@media (max-width: 1200px) {
    .books-showcase-3d {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .books-section-3d {
        padding: 4rem 1.5rem;
    }

    .books-showcase-3d {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 350px;
        margin: 0 auto 2rem;
    }

    .book-card-inner {
        height: 280px;
    }

    .book-arabic {
        font-size: 1.5rem;
    }

    .book-title {
        font-size: 1.15rem;
    }

    .book-stats {
        gap: 1rem;
    }

    .book-card-3d:hover .book-explore-btn {
        transform: translateX(-50%) translateY(15px);
    }
}

/* Narrators Section 3D Responsive */
@media (max-width: 1200px) {
    .narrator-cards-3d {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .narrators-section-3d {
        padding: 4rem 1.5rem;
    }

    .narrator-cards-3d {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .narrator-avatar-3d {
        width: 85px;
        height: 85px;
    }

    .avatar-core {
        width: 65px;
        height: 65px;
    }

    .avatar-core .arabic {
        font-size: 1.75rem;
    }

    .narrator-name-3d {
        font-size: 1.15rem;
    }

    .narrator-timeline-bar {
        padding: 0;
    }

    .timeline-track-3d {
        display: none;
    }
}

/* Hadith of the Day Responsive */
@media (max-width: 992px) {
    .hadith-day-section {
        padding: 4rem 1.5rem;
    }

    .hadith-card-inner {
        padding: 2rem;
    }

    .hadith-arabic-text {
        font-size: 1.5rem;
    }

    .hadith-english {
        font-size: 1.1rem;
    }

    .hadith-source {
        flex-direction: column;
        gap: 1rem;
    }

    .source-info {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hadith-arabic-container {
        padding: 1rem 1.5rem;
    }

    .arabic-quote-mark {
        font-size: 3rem;
    }

    .hadith-arabic-text {
        font-size: 1.25rem;
        line-height: 1.8;
    }

    .hadith-english {
        font-size: 1rem;
    }

    .hadith-actions {
        gap: 0.75rem;
    }

    .hadith-action-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .hadith-action-btn span {
        display: none;
    }

    .hadith-action-btn i {
        font-size: 1rem;
    }

    .hadith-navigation {
        gap: 1rem;
    }

    .nav-date {
        font-size: 0.85rem;
    }

    .view-all-hadiths-btn {
        padding: 0.85rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    .books-section-3d,
    .narrators-section-3d,
    .hadith-day-section {
        padding: 3rem 1rem;
    }

    .book-card-inner {
        height: 260px;
    }

    .book-cover-3d {
        padding: 1.5rem;
    }

    .hadith-card-inner {
        padding: 1.5rem;
    }

    .hadith-arabic-text {
        font-size: 1.1rem;
    }

    .hadith-english {
        font-size: 0.95rem;
    }

    .source-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hadith-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   Floating Library Section - Responsive
   ============================================ */
@media (max-width: 992px) {
    .library-section {
        padding: 4rem 1.5rem;
    }

    .bookshelf-container {
        gap: 5px;
    }

    .library-book {
        width: 55px;
        height: 240px;
    }

    .library-book .book-spine {
        width: 55px;
        padding: 15px 8px;
    }

    .spine-title {
        font-size: 0.85rem;
    }

    .spine-author {
        font-size: 0.5rem;
    }

    .library-book .book-cover {
        width: 180px;
        left: 38px;
    }

    .cover-inner {
        padding: 20px;
    }

    .book-arabic-title {
        font-size: 1.1rem;
    }

    .cover-content h3 {
        font-size: 1rem;
    }

    .shelf-front {
        height: 20px;
    }
}

@media (max-width: 768px) {
    .library-section {
        padding: 3.5rem 1rem;
    }

    .floating-bookshelf {
        padding: 2rem 0;
    }

    .bookshelf-container {
        gap: 4px;
        padding: 0 1rem;
        min-height: 280px;
    }

    .library-book {
        width: 48px;
        height: 220px;
    }

    .library-book .book-spine {
        width: 48px;
        padding: 12px 6px;
    }

    .spine-title {
        font-size: 0.75rem;
    }

    .spine-author {
        font-size: 0.45rem;
    }

    .spine-decor {
        width: 30px;
        height: 2px;
    }

    .library-book .book-cover {
        width: 160px;
        left: 32px;
    }

    .cover-inner {
        padding: 15px;
    }

    .book-arabic-title {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .cover-content h3 {
        font-size: 0.9rem;
    }

    .book-imam {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .book-meta {
        gap: 15px;
        margin-bottom: 10px;
    }

    .book-meta span {
        font-size: 0.65rem;
    }

    .explore-text {
        padding: 6px 12px;
        font-size: 0.6rem;
    }

    .library-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    /* Mobile Auto-Carousel Animation for Books */
    .bookshelf-container {
        animation: mobileBookShowcase 18s infinite;
    }

    @keyframes mobileBookShowcase {

        0%,
        100% {
            --active-book: 1;
        }

        16.66% {
            --active-book: 2;
        }

        33.33% {
            --active-book: 3;
        }

        50% {
            --active-book: 4;
        }

        66.66% {
            --active-book: 5;
        }

        83.33% {
            --active-book: 6;
        }
    }

    /* Book 1 */
    .library-book:nth-child(1) {
        animation: book1Reveal 18s infinite;
    }

    @keyframes book1Reveal {

        0%,
        12%,
        88%,
        100% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }

        14%,
        86% {
            transform: none;
            z-index: 1;
        }
    }

    /* Book 2 */
    .library-book:nth-child(2) {
        animation: book2Reveal 18s infinite;
    }

    @keyframes book2Reveal {

        0%,
        14%,
        28%,
        100% {
            transform: none;
            z-index: 1;
        }

        16%,
        26% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }
    }

    /* Book 3 */
    .library-book:nth-child(3) {
        animation: book3Reveal 18s infinite;
    }

    @keyframes book3Reveal {

        0%,
        30%,
        44%,
        100% {
            transform: none;
            z-index: 1;
        }

        30%,
        42% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }
    }

    /* Book 4 */
    .library-book:nth-child(4) {
        animation: book4Reveal 18s infinite;
    }

    @keyframes book4Reveal {

        0%,
        46%,
        60%,
        100% {
            transform: none;
            z-index: 1;
        }

        48%,
        58% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }
    }

    /* Book 5 */
    .library-book:nth-child(5) {
        animation: book5Reveal 18s infinite;
    }

    @keyframes book5Reveal {

        0%,
        62%,
        76%,
        100% {
            transform: none;
            z-index: 1;
        }

        64%,
        74% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }
    }

    /* Book 6 */
    .library-book:nth-child(6) {
        animation: book6Reveal 18s infinite;
    }

    @keyframes book6Reveal {

        0%,
        78%,
        92%,
        100% {
            transform: none;
            z-index: 1;
        }

        80%,
        90% {
            transform: translateY(-15px) translateZ(50px) rotateY(-20deg);
            z-index: 10;
        }
    }

    /* Show covers during animation */
    .library-book:nth-child(1) .book-cover {
        animation: cover1Reveal 18s infinite;
    }

    @keyframes cover1Reveal {

        0%,
        12%,
        88%,
        100% {
            transform: rotateY(0deg);
            opacity: 1;
        }

        14%,
        86% {
            transform: rotateY(-90deg);
            opacity: 0;
        }
    }

    .library-book:nth-child(2) .book-cover {
        animation: cover2Reveal 18s infinite;
    }

    @keyframes cover2Reveal {

        0%,
        14%,
        28%,
        100% {
            transform: rotateY(-90deg);
            opacity: 0;
        }

        16%,
        26% {
            transform: rotateY(0deg);
            opacity: 1;
        }
    }

    .library-book:nth-child(3) .book-cover {
        animation: cover3Reveal 18s infinite;
    }

    @keyframes cover3Reveal {

        0%,
        30%,
        44%,
        100% {
            transform: rotateY(-90deg);
            opacity: 0;
        }

        32%,
        42% {
            transform: rotateY(0deg);
            opacity: 1;
        }
    }

    .library-book:nth-child(4) .book-cover {
        animation: cover4Reveal 18s infinite;
    }

    @keyframes cover4Reveal {

        0%,
        46%,
        60%,
        100% {
            transform: rotateY(-90deg);
            opacity: 0;
        }

        48%,
        58% {
            transform: rotateY(0deg);
            opacity: 1;
        }
    }

    .library-book:nth-child(5) .book-cover {
        animation: cover5Reveal 18s infinite;
    }

    @keyframes cover5Reveal {

        0%,
        62%,
        76%,
        100% {
            transform: rotateY(-90deg);
            opacity: 0;
        }

        64%,
        74% {
            transform: rotateY(0deg);
            opacity: 1;
        }
    }

    .library-book:nth-child(6) .book-cover {
        animation: cover6Reveal 18s infinite;
    }

    @keyframes cover6Reveal {

        0%,
        78%,
        92%,
        100% {
            transform: rotateY(-90deg);
            opacity: 0;
        }

        80%,
        90% {
            transform: rotateY(0deg);
            opacity: 1;
        }
    }

    /* Pause animation on hover */
    .bookshelf-container:hover .library-book,
    .bookshelf-container:hover .library-book .book-cover {
        animation-play-state: paused;
    }
}

@media (max-width: 480px) {
    .library-section {
        padding: 3rem 0.75rem;
    }

    .bookshelf-container {
        gap: 3px;
    }

    .library-book {
        width: 42px;
        height: 200px;
    }

    .library-book .book-spine {
        width: 42px;
        padding: 10px 5px;
    }

    .spine-title {
        font-size: 0.65rem;
    }

    .spine-author {
        display: none;
    }

    .library-book .book-cover {
        width: 140px;
        left: 28px;
    }

    .cover-inner {
        padding: 12px;
    }

    .cover-pattern {
        inset: 5px;
    }

    .library-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .library-cta {
        margin-top: 2rem;
    }
}

/* ============================================
   Newsletter Section Responsive
   ============================================ */
@media (max-width: 1200px) {
    .newsletter-content {
        gap: 3rem;
    }

    .newsletter-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 992px) {
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-text {
        max-width: 600px;
        margin: 0 auto;
    }

    .newsletter-icon-wrapper {
        margin: 0 auto 1.5rem;
    }

    .newsletter-features {
        justify-content: center;
    }

    .newsletter-form-card {
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .newsletter-section {
        padding: 4rem 1.5rem;
    }

    .newsletter-title {
        font-size: 1.75rem;
    }

    .newsletter-description {
        font-size: 1rem;
    }

    .newsletter-features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .newsletter-features li {
        justify-content: flex-start;
    }

    .newsletter-form-card {
        padding: 2rem 1.5rem;
    }

    .newsletter-form-card h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .newsletter-section {
        padding: 3rem 1rem;
    }

    .newsletter-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .newsletter-icon-wrapper i {
        font-size: 1.5rem;
    }

    .newsletter-title {
        font-size: 1.5rem;
    }

    .newsletter-form-card {
        padding: 1.5rem 1rem;
    }

    .input-wrapper {
        padding: 0.75rem;
    }

    .subscribe-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   Premium Footer Responsive
   ============================================ */
@media (max-width: 1200px) {
    .footer-top-premium {
        gap: 3rem;
    }

    .footer-links-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .footer-top-premium {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand-premium {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo-premium {
        justify-content: center;
    }

    .footer-description-premium {
        max-width: 500px;
    }

    .footer-stats {
        justify-content: center;
    }

    .footer-links-premium {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer-column-premium h4 {
        justify-content: flex-start;
    }

    .contact-list-premium li {
        justify-content: flex-start;
    }

    .footer-bottom-content {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer-wave {
        height: 80px;
    }

    .footer-top-premium {
        padding: 2rem 0;
        gap: 2rem;
    }

    .footer-links-premium {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-stat {
        padding: 0.5rem 0.75rem;
    }

    .footer-stat .stat-value {
        font-size: 1rem;
    }

    .social-links-premium {
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-link-premium {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-wave {
        height: 60px;
    }

    .footer-container-premium {
        padding: 0 1rem;
    }

    .footer-links-premium {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-column-premium {
        text-align: center;
    }

    .footer-column-premium h4 {
        justify-content: center;
    }

    .footer-column-premium ul li a {
        justify-content: center;
    }

    .contact-list-premium li {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-stats {
        gap: 0.75rem;
    }

    .footer-stat {
        flex: 1;
        min-width: 70px;
    }

    .logo-text-premium {
        font-size: 1.25rem;
    }

    .logo-tagline {
        font-size: 0.65rem;
    }

    .copyright {
        font-size: 0.8rem;
    }

    .made-with-love {
        font-size: 0.8rem;
    }

    .footer-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    /* Topic Circle Mobile Fixes */
    .topics-explorer {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .topic-circle-container {
        width: 320px;
        height: 320px;
    }

    .topic-item {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-125px) rotate(calc(-1 * var(--angle)));
    }

    .topic-item:hover {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-130px) rotate(calc(-1 * var(--angle))) scale(1.05);
    }

    .topic-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .topic-label {
        font-size: 0.65rem;
        max-width: 60px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
        display: block;
    }

    .center-circle {
        width: 110px;
        height: 110px;
        padding: 0.5rem;
    }

    .center-content i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .center-content span {
        font-size: 0.6rem;
        line-height: 1.15;
    }

    .topic-preview {
        padding: 1.5rem;
        margin: 0 auto;
    }

    .preview-header h3 {
        font-size: 1.25rem;
    }

    .preview-description {
        font-size: 0.9rem;
    }
}