/* ============================================
   AdSense Compliant Layout - Al-Marifa Trivia
   ============================================ */

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Alexandria, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
}

html, body {
    overflow-x: hidden;
}

/* ============================================
   Header Styles
   ============================================ */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    height: 65px;
    width: 65px;
    border-radius: 50%;
    margin-left: 10px;
    object-fit: cover;
}

header .logo h1 {
    font-family: Amiri, serif;
    font-size: 24px;
    color: #4ade80;
    margin-left: 10px;
}

/* Navigation */
header .navbar {
    display: flex;
    align-items: center;
    direction: rtl;
}

header .navbar ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

header .navbar ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    font-size: 14px;
}

header .navbar ul li a:hover,
header .navbar ul li a.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    transform: translateY(-2px);
}

/* Mobile Navigation */
.header-mobile {
    display: none;
}

.menu-toggle {
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.header-mobile .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 999;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-mobile .menu.active {
    display: flex;
}

.header-mobile .menu ul {
    list-style: none;
    direction: rtl;
}

.header-mobile .menu ul li a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
}

.header-mobile .menu-close {
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 15px;
}

@media (max-width: 1024px) {
    header .navbar {
        display: none;
    }

    .header-mobile {
        display: flex;
        margin-left: auto;
    }
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    background: #e2e8f0;
    padding: 12px 20px;
    direction: rtl;
}

.breadcrumbs .container {
    max-width: 1400px;
    margin: 0 auto;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.breadcrumbs ul li::after {
    content: "/";
    margin-right: 10px;
    color: #64748b;
}

.breadcrumbs ul li:last-child::after {
    content: "";
}

.breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #64748b;
}

/* ============================================
   Ad Placement Zones
   ============================================ */
.ad-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
}

.ad-slot {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    text-align: center;
    min-height: 90px;
}

.ad-slot-horizontal {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
}

.ad-slot-sidebar {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
}

.ad-slot-sidebar-large {
    width: 100%;
    max-width: 300px;
    min-height: 600px;
}

.ad-slot-inline {
    width: 100%;
    max-width: 336px;
    height: 280px;
    margin: 20px auto;
}

/* ============================================
   Main Layout with Sidebar
   ============================================ */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    direction: rtl;
}

.main-content-area {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sidebar-widget h3 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget ul li a {
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-widget ul li a:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

@media (max-width: 968px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }
}

/* ============================================
   Hero Banner
   ============================================ */
.hero-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 50%, #164e63 100%);
    color: white;
    padding: 50px 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::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"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>');
    background-size: 60px;
    opacity: 0.5;
}

.hero-banner > * {
    position: relative;
    z-index: 1;
}

.hero-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-banner .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

.hero-banner .stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
}

.hero-banner .stat-item {
    text-align: center;
}

.hero-banner .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
    display: block;
}

.hero-banner .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 30px 20px;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .hero-banner .stats {
        flex-direction: column;
        gap: 20px;
    }
}

/* ============================================
   Content Article Section
   ============================================ */
.content-article {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.content-article h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
    direction: rtl;
}

.content-article p {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 15px;
    direction: rtl;
    text-align: justify;
}

.content-article ul {
    direction: rtl;
    margin: 15px 0;
    padding-right: 25px;
}

.content-article ul li {
    margin-bottom: 10px;
    color: #475569;
    line-height: 1.7;
}

/* ============================================
   Quiz Content Section
   ============================================ */
.quiz-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    direction: rtl;
}

.quiz-header h2 {
    font-size: 1.3rem;
    color: #1e293b;
}

#search-box {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    width: 250px;
    direction: rtl;
    transition: all 0.3s;
}

#search-box:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

#pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin: 20px 0;
    direction: rtl;
}

#pagination button {
    padding: 8px 14px;
    border: none;
    background: #e2e8f0;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

#pagination button:hover {
    background: #3b82f6;
    color: white;
}

#pagination button.active {
    background: #1e3a5f;
    color: white;
}

/* Quiz Items */
#quiz-content {
    direction: rtl;
}

.quiz-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-right: 4px solid #3b82f6;
    transition: all 0.3s;
}

.quiz-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(-5px);
}

.question-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.question-number {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.question-text {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.6;
}

.options {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.options li {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.options li:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.options li.correct-answer {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
    font-weight: 600;
}

@media (max-width: 768px) {
    .options {
        grid-template-columns: 1fr;
    }

    .quiz-header {
        flex-direction: column;
        align-items: stretch;
    }

    #search-box {
        width: 100%;
    }
}

/* ============================================
   Category Cards (Homepage)
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.category-card-header {
    padding: 25px;
    color: white;
    text-align: center;
}

.category-card-header.history { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.category-card-header.science { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.category-card-header.sport { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }
.category-card-header.general { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.category-card-header.adab { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.category-card-header.kids { background: linear-gradient(135deg, #db2777 0%, #be185d 100%); }
.category-card-header.quotes { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.category-card-header.test { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }

.category-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.category-card-header .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.category-card-body {
    padding: 20px 25px;
    direction: rtl;
}

.category-card-body p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-card-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

.category-card-footer .count {
    font-weight: 700;
    color: #3b82f6;
}

.category-card-footer .arrow {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    direction: rtl;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #4ade80;
}

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

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

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: #fbbf24;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: #fbbf24;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Image styling */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ============================================
   Featured Questions (Pre-rendered for SEO)
   ============================================ */
.featured-questions {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.featured-questions h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 20px;
    direction: rtl;
}

.featured-question-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border-right: 3px solid #fbbf24;
    direction: rtl;
}

.featured-question-item h4 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 8px;
}

.featured-question-item p {
    color: #10b981;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================
   About Page Specific
   ============================================ */
.about-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.about-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.about-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    direction: rtl;
}

.about-content h2 {
    font-size: 1.5rem;
    color: #1e3a5f;
    margin: 30px 0 15px;
}

.about-content p {
    line-height: 1.8;
    color: #475569;
    margin-bottom: 15px;
}

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

.team-member {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.team-member h4 {
    color: #1e293b;
    margin-bottom: 5px;
}

.team-member p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ============================================
   Featured Questions Q&A Section
   ============================================ */
.featured-questions .qa-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-right: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.featured-questions .qa-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.featured-questions .question {
    font-size: 1.05rem;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.7;
}

.featured-questions .answer {
    color: #059669;
    font-size: 0.98rem;
    line-height: 1.8;
    padding-right: 15px;
    border-right: 3px solid #10b981;
}

.explore-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.explore-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.4);
}

/* ============================================
   Did You Know Section
   ============================================ */
.did-you-know {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-right: 4px solid #eab308;
}

.did-you-know h2 {
    color: #854d0e;
    border-bottom-color: #eab308;
}

.did-you-know .facts-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.did-you-know .facts-list li {
    background: white;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    line-height: 1.8;
    color: #475569;
    border-right: 3px solid #fbbf24;
    transition: all 0.3s ease;
}

.did-you-know .facts-list li:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.did-you-know .facts-list li strong {
    color: #b45309;
    display: inline;
}

/* Featured Fact Styles */
.featured-fact {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 2px solid #f59e0b;
    position: relative;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.featured-fact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.featured-fact-content {
    flex: 1;
}

.featured-fact-content .featured-label {
    display: inline-block;
    background: #f59e0b;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.featured-fact-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #78350f;
    margin: 0;
    font-weight: 500;
}

.refresh-fact-btn {
    background: white;
    border: 2px solid #f59e0b;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.refresh-fact-btn:hover {
    background: #f59e0b;
    transform: rotate(180deg);
}

/* Facts Search Container */
.facts-search-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.facts-search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.facts-search-box:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.facts-search-box .search-icon {
    font-size: 1.2rem;
    margin-left: 12px;
    color: #9ca3af;
}

.facts-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: #1f2937;
}

.facts-search-box input::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    background: #ef4444;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.facts-count {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Facts List Enhancements */
.did-you-know .facts-list li.hidden {
    display: none;
}

.did-you-know .facts-list li.highlight {
    background: #fef3c7;
    border-right-color: #f59e0b;
}

.did-you-know .facts-list li .fact-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fbbf24;
    color: #78350f;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 12px;
    flex-shrink: 0;
}

.did-you-know .facts-list li .fact-text {
    flex: 1;
}

.did-you-know .facts-list li mark {
    background: #fde047;
    color: #78350f;
    padding: 1px 4px;
    border-radius: 3px;
}

.loading-placeholder {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px 20px !important;
}

/* Facts Actions */
.facts-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.load-more-facts-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.load-more-facts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.load-more-facts-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.facts-showing-info {
    color: #6b7280;
    font-size: 0.9rem;
}

/* No Results Message */
.no-facts-found {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-facts-found .no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.no-facts-found p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Styles for Facts Section */
@media (max-width: 768px) {
    .featured-fact {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .featured-fact-icon {
        font-size: 2rem;
    }

    .refresh-fact-btn {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
    }

    .facts-search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .facts-search-box {
        min-width: unset;
    }

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

/* ============================================
   Question of the Day Section
   ============================================ */
.question-of-day {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 50%, #164e63 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.3);
}

.question-of-day::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.qod-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.qod-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    direction: rtl;
    position: relative;
    z-index: 1;
}

.qod-icon {
    font-size: 4rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.qod-text {
    flex: 1;
}

.qod-text h2 {
    color: white;
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.qod-answer {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.qod-answer .answer-label {
    color: #fbbf24;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.qod-answer p {
    color: rgba(255,255,255,0.95);
    line-height: 1.8;
    margin: 0;
}

.qod-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.qod-category {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.qod-cta {
    background: white;
    color: #1e3a5f;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qod-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .qod-content {
        flex-direction: column;
        text-align: center;
    }

    .qod-icon {
        align-self: center;
    }

    .qod-meta {
        justify-content: center;
    }
}

/* ============================================
   On This Day Section
   ============================================ */
.on-this-day {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.on-this-day::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0 0 0 100%;
    opacity: 0.5;
}

.otd-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.otd-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.otd-title h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin: 0 0 5px 0;
}

.otd-date {
    color: #b45309;
    font-weight: 600;
    font-size: 1.1rem;
}

.otd-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.otd-event {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
    border-right: 4px solid #fbbf24;
}

.otd-event:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.otd-year {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    min-width: 60px;
    text-align: center;
}

.otd-event p {
    color: #475569;
    line-height: 1.7;
    margin: 0;
    font-size: 0.98rem;
}

.otd-more {
    display: inline-block;
    color: #1e3a5f;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.otd-more:hover {
    border-bottom-color: #1e3a5f;
}

/* On This Day - Tabs */
.otd-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.otd-tab {
    background: #f1f5f9;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.otd-tab:hover {
    background: #e2e8f0;
    color: #1e3a5f;
}

.otd-tab.active {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* On This Day - Footer */
.otd-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.otd-source {
    color: #94a3b8;
    font-size: 0.85rem;
}

.otd-source a {
    color: #64748b;
    text-decoration: none;
}

.otd-source a:hover {
    color: #1e3a5f;
    text-decoration: underline;
}

/* On This Day - Events with Thumbnails */
.otd-event.has-thumbnail {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

/* Image wrapper for title below image */
.otd-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    max-width: 100px;
}

.otd-thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: #e2e8f0;
}

.otd-image-title {
    font-size: 0.75rem;
    color: #475569;
    text-align: center;
    line-height: 1.4;
    max-width: 100px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.otd-thumbnail[src=""],
.otd-thumbnail:not([src]) {
    display: none;
}

.otd-event-content {
    flex: 1;
    min-width: 0;
}

.otd-event-content .otd-year {
    display: inline-block;
    margin-bottom: 8px;
}

.otd-event-content p {
    color: #475569;
    line-height: 1.7;
    margin: 0 0 8px 0;
    font-size: 0.98rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.otd-wiki-link {
    color: #3b82f6;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.otd-wiki-link:hover {
    text-decoration: underline;
}

/* On This Day - Loading State */
.otd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 15px;
}

.otd-loading p {
    color: #64748b;
    font-size: 0.95rem;
}

/* On This Day - Error State */
.otd-error {
    text-align: center;
    padding: 30px 20px;
}

.otd-error p {
    color: #64748b;
    margin-bottom: 15px;
}

.otd-retry-btn {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c4a6e 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.otd-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* On This Day - Empty State */
.otd-empty {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
}

/* On This Day - Tablet Responsive */
@media (max-width: 992px) {
    .otd-tabs {
        gap: 8px;
    }

    .otd-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* On This Day - Mobile Responsive */
@media (max-width: 768px) {
    .on-this-day {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .otd-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .otd-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }

    .otd-title h2 {
        font-size: 1.2rem;
    }

    .otd-date {
        font-size: 0.95rem;
    }

    .otd-tabs {
        gap: 6px;
        justify-content: center;
    }

    .otd-tab {
        padding: 8px 12px;
        font-size: 0.75rem;
        flex: 1;
        text-align: center;
        min-width: 0;
    }

    .otd-events {
        gap: 12px;
    }

    .otd-event {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
    }

    .otd-event.has-thumbnail {
        flex-direction: column;
    }

    .otd-image-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .otd-thumbnail {
        width: 100%;
        height: 150px;
        min-width: unset;
        border-radius: 8px;
    }

    .otd-image-title {
        max-width: 100%;
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }

    .otd-event-content {
        width: 100%;
    }

    .otd-year {
        padding: 6px 12px;
        font-size: 0.85rem;
        display: inline-block;
    }

    .otd-event-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .otd-wiki-link {
        font-size: 0.8rem;
    }

    .otd-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin-top: 15px;
        padding-top: 12px;
    }

    .otd-more {
        font-size: 0.9rem;
    }
}

/* On This Day - Small Mobile */
@media (max-width: 480px) {
    .on-this-day {
        padding: 15px 12px;
    }

    .otd-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .otd-tabs {
        flex-wrap: wrap;
    }

    .otd-tab {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .otd-thumbnail {
        height: 120px;
    }

    .otd-image-title {
        font-size: 0.75rem;
    }

    .otd-event {
        padding: 12px;
    }

    .otd-year {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: auto;
    }
}

/* ============================================
   Category Spotlight Section
   ============================================ */
.category-spotlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    direction: rtl;
    position: relative;
    overflow: hidden;
    border: 2px solid #a7f3d0;
}

.category-spotlight::before {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.spotlight-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.spotlight-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.spotlight-header h2 {
    color: #065f46;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.spotlight-header p {
    color: #047857;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.spotlight-questions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.spotlight-q {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.spotlight-q:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.sq-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sq-content h4 {
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.sq-answer {
    color: #059669;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.spotlight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.spotlight-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.spotlight-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.spotlight-count {
    color: #065f46;
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .spotlight-footer {
        justify-content: center;
        text-align: center;
    }
}

/* ============================================
   Ad Label for AdSense Compliance
   ============================================ */
.ad-label {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 500;
}

.ad-slot-sidebar .ad-label,
.ad-slot-inline .ad-label {
    margin-bottom: 8px;
}

/* ============================================
   Did You Know Section (History Page)
   ============================================ */
.did-you-know-section {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    border: 2px solid #fde68a;
    direction: rtl;
}

.did-you-know-section h2 {
    color: #92400e;
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: center;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.fact-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid #f59e0b;
}

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

.fact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.fact-card p {
    color: #475569;
    line-height: 1.8;
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   Historical Figures Section
   ============================================ */
.historical-figures {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    direction: rtl;
}

.historical-figures h2 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid #7c3aed;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.figure-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid #7c3aed;
}

.figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
}

.figure-card h4 {
    color: #5b21b6;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.figure-card .figure-title {
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.figure-card p:last-child {
    color: #475569;
    line-height: 1.7;
    font-size: 0.92rem;
    margin: 0;
}

@media (max-width: 768px) {
    .facts-grid,
    .figures-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Major Historical Events Section
   ============================================ */
.major-events-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    direction: rtl;
    position: relative;
    overflow: hidden;
    border: 2px solid #ddd6fe;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.1);
}

.major-events-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.major-events-section::after {
    content: "";
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.major-events-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.me-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.me-title-wrapper h2 {
    color: #4c1d95;
    font-size: 1.6rem;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.me-subtitle {
    color: #6d28d9;
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

/* Era Filter Buttons */
.era-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.era-btn {
    background: white;
    border: 2px solid #ddd6fe;
    color: #6d28d9;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Alexandria, sans-serif;
}

.era-btn:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    transform: translateY(-2px);
}

.era-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border-color: #7c3aed;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

/* Events Timeline */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

/* Timeline vertical line */
.events-timeline::before {
    content: "";
    position: absolute;
    right: 35px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #a78bfa, #7c3aed, #5b21b6);
    border-radius: 3px;
}

.event-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: white;
    padding: 22px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    margin-right: 15px;
}

.event-card::before {
    content: "";
    position: absolute;
    right: -23px;
    top: 28px;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-radius: 50%;
    border: 3px solid #f3e8ff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.event-card:hover {
    transform: translateX(-8px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.event-card[data-era="ancient"]::before {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
}

.event-card[data-era="medieval"]::before {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.event-card[data-era="modern"]::before {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.event-time-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.event-card[data-era="ancient"] .event-time-badge {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.event-card[data-era="medieval"] .event-time-badge {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

.event-card[data-era="modern"] .event-time-badge {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.event-content {
    flex: 1;
}

.event-content h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.event-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6d28d9;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: #ede9fe;
    padding: 4px 12px;
    border-radius: 15px;
}

.event-importance {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Loading State */
.loading-events {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ede9fe;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-events p {
    color: #6d28d9;
    font-weight: 600;
}

/* Events Footer */
.events-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.load-more-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Alexandria, sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.load-more-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.load-more-btn:disabled:hover {
    transform: none;
}

.events-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.explore-history-link {
    color: #5b21b6;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.explore-history-link:hover {
    border-bottom-color: #5b21b6;
}

/* Era Badge Colors */
.era-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.era-badge.ancient {
    background: #fef3c7;
    color: #b45309;
}

.era-badge.medieval {
    background: #cffafe;
    color: #0e7490;
}

.era-badge.modern {
    background: #dcfce7;
    color: #15803d;
}

@media (max-width: 768px) {
    .major-events-section {
        padding: 25px 20px;
    }

    .major-events-header {
        flex-direction: column;
        text-align: center;
    }

    .me-icon {
        margin: 0 auto;
    }

    .era-filters {
        justify-content: center;
    }

    .events-timeline::before {
        display: none;
    }

    .event-card {
        flex-direction: column;
        margin-right: 0;
    }

    .event-card::before {
        display: none;
    }

    .event-time-badge {
        align-self: flex-start;
    }

    .events-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .ad-slot,
    .sidebar,
    header,
    footer,
    .ad-label {
        display: none !important;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }
}
