/* ===========================
   Pages Styling
   =========================== */

.page-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.page-hero {
    background: linear-gradient(135deg, #0066cc 0%, #00a86b 100%);
    color: #ffffff;
    padding: 3rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.quiz-section {
    margin: 2rem auto;
}

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

.category-selection h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-selection p {
    color: #666666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-option {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-option:hover {
    border-color: #0066cc;
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.2);
}

.category-option .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-option h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.category-option p {
    color: #999999;
    font-size: 0.9rem;
}

/* Current Affairs Page */
.current-affairs-section {
    padding: 2rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.news-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #e0e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-category {
    display: inline-block;
    background: #0066cc;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-date {
    color: #999999;
    font-size: 0.85rem;
}

.news-body {
    padding: 1.5rem;
}

.news-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.news-body p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Daily Facts Page */
.daily-facts-section {
    padding: 2rem 0;
}

.facts-timeline { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
    padding: 2rem 0; 
}

.fact-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fact-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: transform 0.2s ease, border-radius 0.2s ease;
}

.fact-item {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.fact-item:hover .fact-thumbnail {
    border-radius: 0;
}

.fact-topic {
    display: inline-block;
    color: var(--text-muted, #606060);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}



.fact-content {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-dark, #0f0f0f);
}

.fact-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    /* Limit title to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide the long description paragraph completely to match YouTube style */
.fact-item .fact-content p {
    display: none;
}

/* About Page */
.about-section {
    padding: 2rem 0;
}

.about-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.about-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
}

.about-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: #0066cc;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #666666;
    margin-bottom: 1rem;
}

.about-list {
    list-style: none;
    padding-left: 0;
}

.about-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: #666666;
}

.about-list li::before {
    content: "âœ“";
    position: absolute;
    left: 0;
    color: #00a86b;
    font-weight: bold;
    font-size: 1.2rem;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    padding: 1.5rem;
    background: #f8f9fb;
    border-radius: 8px;
}

.feature-item h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #666666;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-hero {
        padding: 2rem 1rem;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

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

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    .about-content {
        padding: 1.5rem;
    }

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

@media (max-width: 480px) {
    .page-hero h1 {
        font-size: 1.4rem;
    }

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

    .category-option {
        padding: 1.5rem;
    }

    .about-list li {
        padding-left: 1.5rem;
    }
}


/* Fact Detail Page CSS */
.fact-article {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    background: transparent;
}
.fact-article-header {
    text-align: center;
    margin-bottom: 30px;
}
.fact-article-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark, #111);
    margin-bottom: 15px;
    line-height: 1.2;
}
.fact-article-meta {
    color: var(--text-muted, #666);
    font-size: 1rem;
    margin-bottom: 20px;
}
.fact-article-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.fact-article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark, #222);
}
.fact-article-body p {
    margin-bottom: 20px;
}


/* Current Affairs Layout */
.ca-layout {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 15px;
    gap: 2rem;
}
.ca-sidebar {
    flex: 1 1 280px;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    align-self: flex-start;
}
.ca-main {
    flex: 3 1 600px;
    min-width: 0; /* Prevents overflow */
}
.archive-list a {
    display: block;
    padding: 0.8rem 1rem;
    background: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-left: 3px solid #0066cc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.archive-list a:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #0066cc;
}
