body {
    margin: 0;
    font-family: sans-serif;
    background: #f5f5f5;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    background: #f7b500;
    z-index: 1000;
}

/* TOPBAR (FIXED ICON ALIGNMENT) */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* This pins icons to edges and logo to center */
    padding: 10px 15px;
}

/* ICONS */
.menu-icon, .search-icon {
    font-size: 22px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    width: 40px; /* Fixed width to ensure center is true center */
}

.search-icon {
    justify-content: flex-end;
}

/* LOGO */
.logo {
    flex: 1; /* Allows logo container to take up middle space */
    text-align: center;
}

.logo img {
    height: 45px; /* Slightly smaller to fit better on mobile */
    vertical-align: middle;
}


/* LOGO & DATE STACKING */
.logo {
    display: flex;
    flex-direction: column; /* Stacks logo image and date vertically */
    align-items: center;    /* Centers both horizontally */
    flex: 1;                /* Takes up the middle space of the topbar */
}

.logo img {
    height: 50px;           /* Adjust this based on your image size */
    width: auto;
    margin-bottom: 5px;     /* Space between logo and date */
}

/* DATE INFO STYLING */
.current-date {
    font-size: 14px;        /* Matches the look in your image */
    font-weight: bold;
    color: #4b0082;         /* The purple/indigo color from your image */
    white-space: nowrap;    /* Prevents the date from breaking into two lines */
}

/* MOBILE ADJUSTMENT */
@media (max-width: 768px) {
    .logo img {
        height: 35px;       /* Shrinks logo on mobile */
    }
    .current-date {
        font-size: 11px;    /* Shrinks date text on mobile */
    }
}

/* NAVBAR */
/* NAVBAR (GOLDEN TO WHITE GRADIENT) */
.navbar {
    display: flex;
    overflow-x: auto;
    /* Golden to White gradient from left to right */
    background: linear-gradient(to right, #f7b500, #ffffff); 
    border-bottom: 1px solid #ddd;
    scrollbar-width: none; /* Hides scrollbar on Firefox */
}

/* Hide scrollbar for Chrome/Safari */
.navbar::-webkit-scrollbar {
    display: none;
}

/* NAVBAR LINKS (BLUE AND BOLD) */
.navbar a {
    padding: 12px 15px;
    text-decoration: none;
    color: #0044cc;      /* Deep Blue */
    font-weight: bold;   /* Bold text */
    white-space: nowrap; /* Keeps text on one line */
    text-transform: uppercase; /* Optional: makes it look more professional */
    font-size: 14px;

    /* Animation */
    opacity: 0;
    transform: translateY(-10px);
    animation: navFade 0.5s forwards;
}

.navbar a:hover {
    color: #002266;      /* Darker blue on hover */
    background: rgba(255, 255, 255, 0.3); /* Subtle light hover effect */
}


/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background: #222;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar a {
    display: block;
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    border-bottom: 1px solid #444;
}

.sidebar a:hover {
    background: #444;
    padding-left: 25px;
}

/* সাইডবার ক্লোজ বাটন */
.close-sidebar {
    color: white;
    font-size: 28px;
    padding: 10px 20px;
    cursor: pointer;
    text-align: right; /* X বাটনটি ডানপাশে থাকবে */
}

.close-sidebar:hover {
    color: #f7b500; /* হোভার করলে হলুদ হবে */
}


/* BODY */
main {
    padding: 20px;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* CARD */
.card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* SEARCH */
.search-box {
    display: none;
    text-align: center;
    padding: 10px;
    background: #f7b500;
}

.search-box input {
    width: 80%;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

/* FOOTER */
/* FOOTER BOTTOM SECTION */
.footer-bottom {
    background: #f7b500; /* Yellow background matching your header */
    color: #333;         /* Dark text for readability */
    text-align: center;
    padding: 15px 10px;
    margin-top: 20px;    /* Space between the grid and the yellow bar */
    font-size: 14px;
    line-height: 1.6;
}

.footer-bottom p {
    margin: 5px 0;       /* Tight spacing between the two lines */
    font-weight: 500;
}

/* Ensure the main footer padding doesn't cut off the yellow bar */
footer {
    padding: 20px 0 0 0; /* Remove bottom padding so yellow bar hits the edge */
}

footer h3, footer .grid {
    padding-left: 20px;  /* Restore padding for the content above the yellow bar */
    padding-right: 20px;
}


/* ===== ANIMATION BASE ===== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* STAGGER DELAY */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* NAVBAR ANIMATION */
@keyframes navFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .logo img {
        height: 40px;
    }

    .navbar a {
        font-size: 13px;
        padding: 8px 10px;
    }

    .sidebar {
        width: 200px;
    }

    main {
        padding: 10px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* তারিখের স্টাইল */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.current-date {
    font-size: 16px;
    font-weight: bold;
    color: #4b0082; /* গাঢ় বেগুনি/নীল শেড যা ইমেজে দেখা যাচ্ছে */
    margin-top: 5px;
}

/* মোবাইল রেসপন্সিভ */
@media (max-width: 768px) {
    .current-date {
        font-size: 14px;
    }
}

/* CARD BORDER STYLING */
.card {
    border-left: 5px solid #ccc; /* Default thickness and position */
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

/* DIFFERENT BORDER COLORS FOR EACH CARD */
.grid .card:nth-child(5n+1) { border-left-color: #007bff; } /* Blue */
.grid .card:nth-child(5n+2) { border-left-color: #e83e8c; } /* Pink/Red */
.grid .card:nth-child(5n+3) { border-left-color: #28a745; } /* Green */
.grid .card:nth-child(5n+4) { border-left-color: #fd7e14; } /* Orange */
.grid .card:nth-child(5n+5) { border-left-color: #6f42c1; } /* Purple */

/* HOVER EFFECT: Border glows or thickens */
.card:hover {
    border-left-width: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background-color: #fffdf5; /* Very light yellow tint on hover */
}


/* POPUP CARD STYLING */
.popular-popup {
    position: fixed;
    bottom: -5000px; /* Initially hidden below screen */
    right: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 3000;
    transition: bottom 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #f7b500;
    overflow: hidden;
}

.popular-popup.show {
    bottom: 20px; /* Slide up after 1 minute */
}

.popup-header {
    background: #f7b500;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    font-weight: bold;
}

.popup-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.popup-body {
    padding: 10px;
}

.popup-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: 0.2s;
}

.popup-item:last-child { border-bottom: none; }

.popup-item:hover {
    background: #fff9e6;
    padding-left: 15px;
}

.p-title {
    font-size: 13px;
    font-weight: 600;
}

.p-views {
    font-size: 11px;
    color: #ff0000;
    font-weight: bold;
    margin-top: 3px;
}


