﻿html {
    font-size: 14px;
    scroll-behavior: smooth;
}
body {
    animation: fadeInPage 0.25s ease-in;
}

@keyframes fadeInPage {
    from {
        opacity: 0.85;
    }

    to {
        opacity: 1;
    }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* ===== NEWS IMAGE FIX ===== */
.banner-img {
    height: 380px;
    width: 100%;
    object-fit: cover;
}

.news-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

/* Optional polish for kids */
.card:hover {
    transform: translateY(-4px);
    transition: 0.2s ease;
}

.top-news-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.top-news-img {
    width: 70px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.top-news-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.top-news-meta {
    font-size: 0.75rem;
    color: #6c757d;
}


/* ===== HORIZONTAL NEWS CAROUSEL ===== */
.news-carousel-wrapper {
    position: relative;
    overflow: hidden; /* KEY FIX */
}

.news-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

    .news-scroll::-webkit-scrollbar {
        display: none;
    }

.news-item {
    scroll-snap-align: start;
    flex: 0 0 85%;
}

/* Tablet: 2 items */
@media (min-width: 576px) {
    .news-item {
        flex: 0 0 45%;
    }
}

/* Desktop: 3 items */
@media (min-width: 992px) {
    .news-item {
        flex: 0 0 30%;
    }
}

/* ===== ARROW BUTTONS (DESKTOP ONLY) ===== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    z-index: 5;
    cursor: pointer;
}

/* Hide arrows on mobile & tablet */
@media (max-width: 991px) {
    .carousel-btn {
        display: none;
    }
}

/* Desktop positioning */
@media (min-width: 992px) {
    .carousel-btn.left {
        left: 8px;
    }

    .carousel-btn.right {
        right: 8px;
    }
}


/* ===== ARTICLE DETAIL ===== */

.article-hero {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 8px;
}

.article-intro {
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Key points */
.key-points {
    padding-left: 1.2rem;
}

    .key-points li {
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

/* Vocabulary box */
.vocabulary-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

    .vocabulary-box dt {
        font-weight: 700;
        margin-top: 0.5rem;
    }

    .vocabulary-box dd {
        margin-left: 0;
        margin-bottom: 0.5rem;
        color: #555;
    }

/* Start===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 37px; 
    background: #ffffff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}

    .mobile-bottom-nav .nav-item {
        text-align: center;
        text-decoration: none;
        color: #555;
        font-size: 0.65rem; /* ↓ smaller text */
        line-height: 1;
    }

        .mobile-bottom-nav .nav-item span {
            display: block;
            font-size: 1.05rem; /* ↓ slightly smaller icon */
            line-height: 1.1;
        }

        .mobile-bottom-nav .nav-item.active,
        .mobile-bottom-nav .nav-item:hover {
            color: #0d6efd;
        }

/* End===== MOBILE BOTTOM NAV ===== */

/* Start===== QUIZ PAGE ===== */

.quiz-container {
    max-width: 600px;
    margin: auto;
}

.quiz-progress {
    font-size: 0.9rem;
    text-align: center;
    color: #666;
}

.quiz-card {
    border-radius: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}

    .quiz-option input {
        margin-right: 12px;
        transform: scale(1.2);
    }

    .quiz-option:hover {
        background: #f8f9fa;
    }

    .quiz-option span {
        font-size: 1rem;
    }
/* End===== QUIZ PAGE ===== */

