* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

:root {
    --primary-color: #0056b3;
    --secondary-color: #e3f2fd;
    --text-color: #333;
    --border-color: #1565c0;
    /* Blue border */
    --header-bg: linear-gradient(to bottom, #42a5f5, #1976d2);
    --white: #ffffff;
    --red: #d32f2f;
    --green: #2e7d32;
    --blue-text: #0d47a1;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgb(150, 217, 230);
    min-height: 100vh;
}


/* Header Styles */
.site-header-wrapper {
    background: transparent;
    max-width: 1200px;
    /* Constrain width */
    margin: 0 auto;
    /* Center align */
    margin-bottom: 20px;
    border-bottom: 3px double #1565c0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.top-header-content {
    /* Max width removed here as wrapper handles it */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
}

.nav-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 5px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    transition: transform 0.2s;
    max-width: 110px;
}

.nav-item:hover {
    transform: scale(1.05);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* Icon Colors */
.home-icon {
    color: #1976d2;
}

.durga-icon {
    color: #d32f2f;
}

.laxmi-icon {
    color: #e91e63;
}

.bibah-icon {
    color: #ffa000;
}

.calendar-icon {
    color: #2e7d32;
}

.converter-icon {
    color: #1565c0;
}

.download-icon {
    color: #f57c00;
}

.newyear-icon {
    color: #7b1fa2;
}

.nav-text {
    line-height: 1.2;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* Responsive Mobile Header Layout */
@media (max-width: 768px) {
    .site-header-wrapper {
        position: relative;
        z-index: 1002;
        /* Ensure header is above the menu overlay (z-999) */
        margin-bottom: 0;
        border-bottom: 1px solid #e0e0e0;
        /* Single separator line */
    }

    .top-header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 15px;
    }

    /* Official Bangla Calendar Info - Top Center */
    .header-right-info {
        order: -1;
        /* Visualize first */
        width: 100%;
        text-align: center;
        margin-top: 5px;
        margin-bottom: 5px;
        font-size: 14px;
    }

    /* Logo - Left Aligned */
    .logo-section {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Hamburger - Flex based alignment */
    .hamburger {
        display: flex;
        position: relative;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        cursor: pointer;
        z-index: 1001;
        margin-left: auto;
        /* Push to right if not in flex-between container, but parent handles it */
    }

    /* Nav Container */
    .nav-bar-container {
        position: static;
        display: block;
        width: 100%;
        min-height: 0;
        margin-top: 0;
    }

    /* Mobile Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        /* Dimmed background */
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        display: flex;
        /* Changed from none to flex for transition support */
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 100%;
        /* Below header */
        left: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        /* Professional Dropdown Shadow */
        padding: 10px 0;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;

        /* Transition States */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        /* transition moved to .animatable class to prevent resize blink */
    }

    .nav-links.animatable {
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    .nav-links.responsive {
        /* Active State */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item {
        flex-direction: row;
        width: 100%;
        max-width: none;
        padding: 15px 25px;
        /* Increased vertical padding */
        /* Comfortable touch target */
        border-bottom: 1px solid #f0f0f0;
        justify-content: flex-start;
        text-align: left;
        font-size: 15px;
        /* Slightly larger text */
        color: #444;
        transition: background 0.2s;
        align-items: center;
        /* Vertically align icon and text */
    }

    .nav-icon {
        margin-bottom: 0;
        margin-right: 15px;
        /* Spacing between icon and text */
        width: 25px;
        /* Fixed width for alignment */
        text-align: center;
        font-size: 20px;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item:active {
        background: #f5f5f5;
    }
}

/* Global Logo Styles */
.logo-text-blue {
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    /* Added Arial Bold fallback */
    font-weight: 900;
    /* Force extra bold */
    color: #0d47a1;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 5px 0 #aaa,
        0 6px 1px rgba(0, 0, 0, .1),
        0 0 5px rgba(0, 0, 0, .1),
        0 1px 3px rgba(0, 0, 0, .3),
        0 3px 5px rgba(0, 0, 0, .2),
        0 5px 10px rgba(0, 0, 0, .25),
        0 10px 10px rgba(0, 0, 0, .2),
        0 20px 20px rgba(0, 0, 0, .15);
    line-height: 1.1;
    margin-bottom: 5px;
}

/* Desktop Only Header Enhancements */
@media (min-width: 769px) {
    .logo-text-blue {
        font-size: 42px;
        /* Fallback */
    }

    .header-right-info {
        font-weight: bold;
        color: #0056b3;
    }

    .nav-bar-container {
        background: rgb(224, 247, 250);
        background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(224, 247, 250, 1) 50%, rgba(178, 235, 242, 1) 100%);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        margin-top: 10px;
        border: 1px solid #b2ebf2;
    }

    .nav-item:hover {
        transform: scale(1.1);
    }

    /* Hide overlay on desktop */
    .menu-overlay {
        display: none;
    }

    /* Hide hamburger on desktop */
    .hamburger {
        display: none;
    }
}

/* Hamburger Animation */
/* ... removed old ... */

/* Contact Form Styles... (leaving this context if needed, but I'm targeting the block below) */
/* ... */
/* Hamburger Animation - Refined & Sharp */
/* Hamburger Animation - Refined & Sharp */
.hamburger div {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center;
    position: relative;
    /* Ensure transforms work relative to current pos */
}

/* Transform Logic for Smooth Reversibility */
.hamburger.open div:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.open div:nth-child(2) {
    opacity: 0;
    transform: scale(0.5);
    /* Shrink effect */
}

.hamburger.open div:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}


/* Contact Form Styles */
.contact-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background: #004494;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: var(--white);
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    gap: 10px;
    /* Mobile/Tablet: Flexbox for wrapping/stacking */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Desktop Grid Layout (>1000px) */
/* Fixes layout shift by reserving sidebar space immediately */
@media (min-width: 1000px) {
    .container {
        display: grid;
        grid-template-columns: 250px 1fr 250px;
        align-items: start;
        /* Prevent full height stretching if not needed */
        flex-wrap: nowrap;
        /* Reset flex property */
    }

    .sidebar,
    .right-sidebar {
        width: 100% !important;
        /* Let Grid control the width (250px track) */
        flex: none;
    }

    .main-content {
        width: 100% !important;
        flex: none;
        min-width: 0;
        /* Allow shrinking if needed inside grid */
    }

    .content-extension {
        grid-column: 2;
        /* Stay in center column */
        width: 100%;
        margin-top: 10px;
    }
}

/* Sidebar / Current Time */
.sidebar {
    width: 250px;
    background: #f0f4c3;
    /* Light yellowish bg */
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    padding: 0;
}

.sidebar-header {
    background: var(--header-bg);
    /* Gradient blue */
    /* Pure White */
    padding: 5px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid white;
    text-align: center;
}

.current-date-box {
    padding: 10px 0;
    background: #e8f5e9;
    /* Light green tint */
    border-bottom: 2px solid var(--primary-color);
}

.big-date {
    font-size: 60px;
    font-weight: bold;
    color: #2e7d32;
    /* Green */
    margin: 0;
    line-height: 1;
}

.day-name {
    font-size: 24px;
    color: #2e7d32;
    font-weight: bold;
}

.clock {
    font-size: 20px;
    color: #2e7d32;
    margin-top: 5px;
    top: 2px;
    right: 2px;
    line-height: 1;
}

/* Main Calendar */
.main-content {
    flex: 1;
    min-height: 100px;
    /* Ensure main content doesn't shrink too much before wrapping triggers */
    min-width: 460px;
    padding: 2px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-cell.empty {
    background: #fff;
}

.tithi-text {
    font-size: 10px;
    color: var(--green);
    text-align: left;
    line-height: 1.4;
    font-weight: bold;
    margin-bottom: 2px;
    padding-right: 2px;
    padding-top: 2px;
    width: 100%;
}

.tithi-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tithi-time {
    display: block;
    width: 100%;
    font-size: 9px;
    color: #555;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
}

.bengali-date {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    color: black;
    line-height: 1;
    margin-top: 0;
    flex-grow: 1;
}

.english-date {
    font-size: 14px;
    color: blue;
    text-align: right;
    font-weight: bold;
    position: absolute;
    bottom: 15px;
    right: 2px;
    margin-bottom: 0;
}

.day-cell .moon-symbol {
    font-size: 12px;
    position: absolute;
    top: 2px;
    right: 0px;
    line-height: 1;
}

/* Calendar Grid & Headers (Base Styles) */
.calendar-header {
    display: flex;
    justify-content: space-between;
    background: #1976d2;
    color: white;
    padding: 10px;
    font-weight: bold;
    font-size: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    background: #fff;
    width: 100%;
}

.day-header {
    background: #e3f2fd;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.day-cell {
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    min-height: 80px;
    position: relative;
    padding: 2px;
    padding-bottom: 25px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    min-width: 0;
}

.day-cell:hover {
    background-color: #b3e5fc !important;
    /* Highlighter Blue */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.today {
    background: radial-gradient(circle, #e0f7fa 20%, #4dd0e1 100%);
    border: 2px solid #0097a7;
}

.day-cell.highlight-date {
    background-color: #fff9c4 !important;
    /* Yellowish background */
    border: 2px solid #fbc02d !important;
    /* Darker yellow/orange border */
    animation: pulse 2s infinite;
    z-index: 10;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(251, 192, 45, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0);
    }
}

.holiday .bengali-date {
    color: red;
}

.festival-text {
    font-size: 10px;
    color: red;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0px;
    box-sizing: border-box;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Panjika & Navigation */
.panjika-box {
    padding: 5px;
}

.panjika-title {
    font-weight: bold;
    color: #d32f2f;
    border-bottom: 1px solid #ccc;
    margin-bottom: 5px;
}

.bottom-nav {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f1f1f1;
    margin-top: 10px;
}

.bottom-nav-btn,
.today-btn,
.nav-btn-round {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}

.bottom-nav-btn {
    background: #1976d2;
}

.nav-btn-round {
    background: #e0e0e0;
    /* Light gray background */
    color: #333;
    /* Dark text */
    border-radius: 20px;
    /* Rounded corners */
    border: 1px solid #ccc;
    transition: background 0.3s;
}

.nav-btn-round:hover {
    background: #d5d5d5;
}

.today-btn {
    background: #2e7d32;
}

/* AdSense Containers */
.ad-container {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
}

.sidebar-ad {
    min-height: 250px;
}

.top-ad,
.bottom-ad {
    min-height: 90px;
}

/* Right Sidebar */
.right-sidebar {
    width: 250px;
    background: #f0f4c3;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.embed-box {
    padding: 10px;
    background: #fff;
}

.embed-textarea {
    width: 100%;
    height: 150px;
    font-size: 12px;
    resize: none;
    border: 1px solid #ccc;
    padding: 5px;
    cursor: pointer;
}

/* Download Button */
.download-btn {
    display: block;
    width: auto;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #ff9800;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    max-width: 90%;
}

.download-btn:hover {
    background-color: #f57c00;
}

/* Footer */
.footer {
    background: #1976d2;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    width: 100%;
}

.footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

/* SEO Section */
.seo-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.seo-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

.seo-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    text-align: justify;
}

/* Mobile adjustments for SEO text */
@media (max-width: 768px) {
    .seo-title {
        font-size: 16px;
        text-align: center;
    }

    .seo-text {
        font-size: 13px;
        text-align: left;
    }
}

/* Visibility Utilities */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {

    /* Mobile Layout Reordering */
    /* Ensure Main Content is First, then Left Sidebar, then Right Sidebar */
    .container {
        flex-direction: column;
    }

    .main-content {
        order: 1;
        width: 100%;
        min-width: auto;
        /* Reset min-width for mobile */
    }

    .sidebar {
        order: 2;
        width: 100%;
    }

    .right-sidebar {
        order: 3;
        width: 100%;
    }

    .content-extension {
        order: 4;
        width: 100%;
    }

    /* Typography Scaling for Mobile */
    .big-date {
        font-size: 40px;
    }

    .day-name {
        font-size: 20px;
    }

    .clock {
        font-size: 16px;
    }

    .bengali-date {
        font-size: 32px;
    }

    .calendar-header {
        font-size: 16px;
        padding: 8px;
    }

    /* Navigation Improvements */
    .nav-item {
        padding: 12px 20px;
        /* Larger touch targets */
    }

    /* Layout Safety */
    .container {
        padding: 2px;
    }

    .ad-container {
        max-width: 100%;
        overflow: hidden;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Mobile Day Cell Optimizations */
    .day-cell {
        padding-top: 1px;
        padding-left: 0px !important;
        padding-right: 0px !important;
        /* Minimize padding to maximize space */
        padding-bottom: 20px;
        /* Keep space for english date but reduce slightly if needed */
        min-height: 60px;
        /* Reduce min-height */
    }

    .tithi-text {
        font-size: 8px;
        /* Smaller font for Tithi */
        line-height: 1.1;
        margin-bottom: 1px;
        white-space: normal;
        /* Allow text to wrap */
        word-wrap: break-word;
        /* Break long words if necessary */
        overflow: hidden;
        /* Hide anything that still overflows */
        padding-right: 0;
        /* User Req: Utilize full width to avoid clipping */
    }

    /* Inline Tithi for Mobile (All cells) */
    /* Inline Tithi REMOVED to force block stacking */
    /* .tithi-text .tithi-name,
    .tithi-text .tithi-time {
        display: inline;
    } */

    .tithi-text .tithi-name::after {
        content: "";
        /* Remove space content */
    }

    .tithi-time {
        display: block !important;
        width: 100% !important;
        font-size: 8px;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap;
        /* Force single line as requested */
    }

    .english-date {
        font-size: 10px;
        /* Smaller English date */
        bottom: 2px;
        right: 2px;
    }

    .day-cell .moon-symbol {
        font-size: 10px;
        top: 1px;
    }
}

/* Festivals and Holidays Section */
.festivals-section {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #ccc;
    font-family: Arial, sans-serif;
}

.festivals-header-bar {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
    color: white;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 16px;
}

.festivals-layout {
    display: flex;
    padding: 10px;
    gap: 20px;
}

.festivals-left {
    flex: 1;
    border-right: 1px solid #eee;
    padding-right: 10px;
}

.festivals-right {
    width: 250px;
    padding-left: 10px;
}

/* Left Column Styles */
.festivals-sub-header {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
    color: white;
    padding: 5px 10px;
    font-weight: bold;
    margin-bottom: 0;
    font-size: 14px;
}

.festivals-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 20px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
    /* Mobile smooth scroll */
}

/* Webkit Scrollbar Styling */
.festivals-list::-webkit-scrollbar {
    width: 6px;
}

.festivals-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.festivals-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.festivals-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.festival-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.festival-date-box {
    background: #0056b3;
    color: white;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border-radius: 2px;
    font-size: 15px;
}

.festival-name {
    color: #0056b3;
    font-size: 15px;
}

.no-festivals {
    color: #777;
    font-style: italic;
    padding: 10px;
}

/* Legend */
.festival-legend {
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    padding-left: 5px;
}

.legend-item {
    /* Removed flex to fix multi-line alignment */
    margin-bottom: 5px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    /* Align with text */
    margin-right: 5px;
    position: relative;
    top: -1px;
}

.legend-dot.public {
    background-color: red;
}

.legend-dot.sectional {
    background-color: magenta;
}

.legend-dot.state {
    background-color: brown;
}

/* Right Column Styles */
.discover-header {
    color: #555;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    font-style: italic;
}

.discover-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discover-btn {
    display: block;
    border: 1px solid #add8e6;
    border-radius: 20px;
    padding: 5px 15px;
    text-align: center;
    color: #0056b3;
    text-decoration: none;
    font-size: 13px;
    background: white;
    transition: background 0.2s;
}

.discover-btn:hover {
    background: #e3f2fd;
}

/* Shuvodinr Nirghonto Table */
.shuvodinr-section {
    margin-top: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    font-family: Arial, sans-serif;
}

.shuvodinr-header {
    background: #81d4fa;
    color: black;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid #ccc;
}

.shuvodinr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.shuvodinr-table th,
.shuvodinr-table td {
    border: 1px solid #000;
    padding: 4px 8px;
}

.shuvodinr-table th {
    background: #e0e0e0;
    text-align: center;
    font-weight: bold;
}

.shuvodinr-table td:first-child {
    background: #e0e0e0;
    width: 40%;
}

.shuvodinr-table td:last-child {
    background: #fff;
}

/* Converter Section */
.converter-section {
    margin-top: 10px;
    background: #e3f2fd;
    border: 1px solid #ccc;
    font-family: Arial, sans-serif;
}

.converter-header {
    color: blue;
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #ccc;
}

.converter-box {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.converter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.converter-row label {
    font-weight: bold;
    color: blue;
    font-size: 14px;
    text-align: center;
}

.convert-btn {
    background: blue;
    color: white;
    border: 1px solid darkblue;
    padding: 2px 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

/* Calendar Selector Bar */
.calendar-selector-bar {
    background-color: #81d4fa;
    /* Light blue matching screenshot */
    padding: 5px;
    text-align: center;
    border: 1px solid #4fc3f7;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: Arial, sans-serif;
}

.calendar-selector-bar label {
    color: blue;
    font-weight: bold;
    font-size: 14px;
}

.calendar-selector-bar select {
    padding: 2px;
    border: 1px solid #0288d1;
    color: #01579b;
    font-weight: bold;
    font-size: 14px;
}

.calendar-selector-bar button {
    background-color: white;
    color: blue;
    border: 1px solid blue;
    padding: 2px 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.calendar-selector-bar button:hover {
    background-color: #e1f5fe;
}

/* Responsive (Must be at the end to override base styles) */
@media (max-width: 1200px) {
    .bengali-date {
        font-size: 32px;
    }

    .day-cell {
        min-height: 70px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }


    .container {
        flex-direction: column;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
    }

    .sidebar,
    .right-sidebar {
        width: 100%;
        margin-bottom: 10px;
        border: none;
        border-radius: 0;
    }

    .main-content {
        order: 1;
    }

    .sidebar {
        order: 2;
    }

    .right-sidebar {
        order: 3;
    }

    .big-date {
        font-size: 40px;
    }

    .day-name {
        font-size: 20px;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 10px;
    }

    .day-header {
        font-size: 12px;
        padding: 2px;
    }

    .day-cell {
        min-height: 60px;
        padding: 2px;
        padding-bottom: 20px;
    }

    .tithi-text {
        font-size: 8px;
        line-height: 1;
    }

    .bengali-date {
        font-size: 20px;
    }

    .english-date {
        font-size: 9px;
        bottom: 15px;
    }

    .festival-text {
        font-size: 8px;
        bottom: 0;
    }

    .moon-symbol {
        font-size: 10px;
        top: 3px;
        right: 1px;
    }

    .festivals-layout {
        flex-direction: column;
        padding: 5px;
        gap: 10px;
    }

    .festivals-left {
        border-right: none;
        padding-right: 0;
        padding-bottom: 5px;
    }

    .festivals-right {
        width: 100%;
        padding-left: 0;
        margin-top: 10px;
    }


}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .bengali-date {
        font-size: 25px;
    }

    .day-cell {
        min-height: 50px;
    }

    .tithi-text,
    .festival-text {
        font-size: 8px;
    }
}

/* Mobile Navigation and Scroll Fixes (Appended) */
@media (max-width: 768px) {

    /* Mobile Navigation Fixes */
    .bottom-nav {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }

    .nav-btn-round,
    .today-btn {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1 1 auto;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 45%;
    }

    .today-btn {
        max-width: 60px;
    }

}

/* Fixes for Festivals Section */
/* Fixes for Festivals Section */
.festival-item {
    gap: 15px !important;
    align-items: center !important;
}

.festival-date-box {
    flex-shrink: 0;
}

/* Remove footer space on mobile */
@media (max-width: 768px) {
    .footer {
        margin-top: 0;
        padding-top: 10px;
        /* Adjust padding if needed for visual balance */
    }
}

/* Reference Section (Above Footer) */
.reference-section {
    background-color: #1a237e;
    /* Deep Blue */
    color: white;
    padding: 30px 20px;
    margin-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ref-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.ref-col {
    display: flex;
    flex-direction: column;
}

.ref-header {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 1px solid #3949ab;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.month-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 30px;
    grid-row-gap: 10px;
    /* Spacing between rows */
}

.fest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ref-link {
    color: #e3f2fd;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    width: fit-content;
    /* Ensure clickable area is only text width */
}

.ref-link:hover {
    color: #fff;
    text-decoration: none;
    /* No underline on hover */
}

.contact-email {
    font-size: 14px;
}

/* Responsive for Reference Section */
@media (max-width: 768px) {
    .ref-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* First column (Months) spans full width */
    .ref-col:nth-child(1) {
        grid-column: 1 / -1;
    }

    .month-grid {
        grid-template-columns: 1fr 1fr;
        /* Stack on mobile */
        gap: 10px;
    }

    /* Remove top margin on mobile as requested */
    .reference-section {
        margin-top: 0;
    }
}

/* Remove Footer Margin globally or specifically */
.footer {
    margin-top: 0 !important;
    /* Force remove space */
}

/* Ensure Reference Section touches footer */
.reference-section {
    margin-bottom: 0 !important;
}

/* Modern Page Title Style */
.page-title-modern {
    color: #333;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: none !important;
}

.page-title-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #0056b3;
    border-radius: 2px;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .page-title-modern {
        font-size: 24px;
        margin-bottom: 25px;
    }
}