@import url('https://fonts.googleapis.com/css2?family=Happy+Monkey&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Merienda:wght@300..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
    --bg: #ffffff;
    --text: #000000;
    --main-bg-color: #2874f0;
    --card-bg: #ffffff;
}

:root.dark-mode {
    --bg: #121212;
    --text: #e0e0e0;
    --main-bg-color: #212830;
    --card-bg: #212830;
}

/* Ensure the root element is also dark to prevent light-colored edges or flashes */
html.dark-mode,
body.dark-mode {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Prevent animations on page load */
.no-transition * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    animation: none !important;
}

* {
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg) !important;
    color: var(--text);
    font-family: 'Lato', serif;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none;
}

/* ===============================
   STICKY HEADER REFINEMENT
================================ */

/* 1. Base Header (No shadow initially) */
header.sticky-top {
    /* Ensure the header has a solid background so content doesn't peek through */
    background-color: var(--main-bg-color);
    z-index: 1030;
    /* Ensures it stays above all other elements */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 2. Scrolled State (Shadow appears) */
header.sticky-top.header-scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark-mode header.sticky-top {
    background-color: #212830;
}

/* 3. Dark Mode Scrolled State */
.dark-mode header.sticky-top.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===============================
   MOBILE SEARCH CONTAINER
================================ */
.mobile-search-container {
    background-color: var(--main-bg-color);
    transition: background-color 0.3s ease;
    margin-top: -1px;
    /* Prevents any 1px white gap below the navbar */
}

.dark-mode .mobile-search-container {
    background-color: #212830 !important;
}

/* Optional: Shrink the mobile search area slightly on scroll */
header.sticky-top.header-scrolled .mobile-search-container {
    padding-bottom: 8px !important;
    transition: padding 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Vertical Spacing Tweak */
.mobile-search-container {
    /* Slight padding adjustment for a tighter mobile look */
    padding-top: 4px !important;
    padding-bottom: 12px !important;
}

.navbar {
    background-color: var(--main-bg-color) !important;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Optional: override Bootstrap elements */
.dark-mode .navbar {
    background-color: #212830 !important;
}

.navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler {
    /* border-color: rgba(255, 255, 255, 1) !important; */
    color: var(--main-bg-color) !important;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode .navbar-toggler {
    color: rgb(33 40 48) !important;
}

.navbar-nav {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.nav-link {
    transition: background 0.2s ease;
    border-radius: 4px;
}

.nav-item {
    position: relative;
}

/* Show dropdown */
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow */
.bx-chevron-down {
    margin-left: 4px;
    margin-top: 2px;
    font-size: 22px;
    will-change: transform;
    transition: transform 220ms cubic-bezier(0.4, 0.0, 0.2, 1);
    /* transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.25s ease !important; */
}

.dark-mode .bx-chevron-down {
    color: #e9ecef !important;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 220px;
    background-color: var(--main-bg-color) !important;
    box-shadow: -14px 9px 36px -14px #000000;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 1000;
}

/* Dropdown items */
.nav-dropdown a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    padding-left: 20px;
}

a,
img {
    text-decoration: none !important;
    border: none;
}

#logo {
    font-family: Arial, Helvetica, sans-serif;
    /* font-weight: bold; */
}

.TVd0Ah {
    display: block;
}

.MwbhDR {
    font-size: 11px;
    margin-top: -1px;
    /* margin-left: 2px; */
    color: rgb(239, 236, 236);
}

.MwbhDR:hover {
    text-decoration: underline !important;
}

.MwbhDR .s4NJ5L {
    color: #ffe500;
    font-weight: 600;
    margin-right: 2px;
}

/* ===============================
   SEARCH BOX STYLES
================================ */

/* The relative container allows absolute positioning of the icon */
.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-wrapper .form-control {
    width: 100%;
    height: 38px;
    /* Adjust height as needed */
    padding: 10px 75px 10px 15px !important;
    /* Right padding creates space for the icon */
    border: 1px solid #ccc;
    /* Or your preferred border color */
    border-radius: 4px;
    outline: none;
    font-size: 0.95rem;
}

.search-wrapper .form-control::placeholder {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.search-wrapper .form-control {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode .search-wrapper .form-control {
    background-color: #2a313c !important;
    color: #e9ecef !important;
    border: 1px solid #697385 !important;
}

.dark-mode .search-wrapper .form-control::placeholder {
    color: #b0b8c1 !important;
}

.search-wrapper .search-clear {
    position: absolute;
    right: 40px;
    /* Sits to the left of the 40px search button */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
    display: none;
    /* Hidden by default */
    padding: 5px !important;
    /* Increases clickable area */
    transition: color 0.3s ease;
}

.search-wrapper .search-clear:hover {
    color: #333;
}

/* --- Dark Mode Styles for X --- */
.dark-mode .search-wrapper .search-clear {
    color: #b0b8c1;
}

.dark-mode .search-wrapper .search-clear:hover {
    color: #fff;
}

.btn {
    margin-right: 5px;
}

/* The Icon Button */
.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    /* Clickable area width */
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-bg-color);
    font-size: 1.3rem;
    transition: color 0.3s ease, background-color 0.3s ease !important;
}

.dark-mode .search-btn {
    color: #b0b8c1 !important;
}

.dark-mode .search-btn:hover {
    color: #fff !important;
}

/* ===============================
    THEME TOGGLE BUTTON 
================================ */

.theme-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 50%;
    overflow: hidden !important;
    cursor: pointer;
    border: none;
    /* Glassy Background */
    background-color: rgba(255, 255, 255, 0.2);
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    /* Gives the 3D flip depth so it stays centered */
    perspective: 1000px;
}

/* Common Icon Styling - Centered Perfectly */
.theme-btn .bx {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 1.5rem;
    /* Center the icon without using translate values that cause overflow */
    margin-top: -0.75rem;
    margin-left: -0.75rem;
    /* Exit transition: disappear fast so the 'flip out' isn't messy */
    transition: opacity 0.15s ease-in, transform 0.3s ease-in;
    backface-visibility: hidden;
    /* Essential for clean flips */
}

/* --- LIGHT MODE (Moon Visible) --- */
.theme-btn .bx-moon {
    opacity: 1;
    transform: rotateY(0deg);
    color: #ffffff !important;
}

/* ONLY animate if the trigger class is present */
.theme-btn.animate-toggle .bx-moon {
    animation: coin-flip-pulse 0.4s ease-out forwards;
    /* SPEED ADJUSTMENT: 0.4s makes the flip feel energetic */
}

.theme-btn .bx-sun {
    opacity: 0;
    color: #95989e !important;
    transform: rotateY(-90deg);
}

/* --- DARK MODE (Sun Visible) --- */
.dark-mode .theme-btn .bx-moon {
    opacity: 0;
    transform: rotateY(90deg);
    /* Stops the animation so it can restart later */
    animation: none !important;
}

.dark-mode .theme-btn .bx-sun {
    opacity: 1;
    color: #95989e !important;
    transform: rotateY(0deg);
}

.dark-mode .theme-btn::after {
    background-color: #f5c542 !important;
    color: #000;
}

/* ONLY animate if the trigger class is present */
.dark-mode .theme-btn.animate-toggle .bx-sun {
    animation: coin-flip-pulse 0.4s ease-out forwards;
}

@keyframes coin-flip-pulse {
    0% {
        transform: rotateY(-90deg) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

main {
    /* min-height: calc(100vh - 12vh - 56px); */
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    background-color: #f1f2f4;
}

.dark-mode main {
    background-color: #151b23 !important;
}

main .container {
    /* max-width: 1200px; */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.carousel-img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 41/20;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1 !important;
}

.card {
    /* margin: 0 10px; */
    font-family: "Lato", serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode .card {
    background-color: #212830 !important;
    color: #e9ecef !important;
}

.cards {
    scroll-behavior: smooth;
}

.card .join {
    font-family: "Lato", serif;
    /* margin-left: 2vh; */
    /* color: black; */
    letter-spacing: 1px;
}

.lines {
    width: 10em;
    /* padding: 5px 10px; */
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lines .my-2 {
    letter-spacing: 1px;
    font-size: 0.95rem;
    font-weight: 600;
    /* Bolder to stand out */
    margin: 0 !important;
    /* Overriding Bootstrap's my-2 to let flex 'gap' do the work */
    color: #212121;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode .lines .my-2 {
    color: #f1f2f4;
}

/* ===============================
   CARD BORDER SPINNER EFFECT 
================================== */

/* 1. The Container: Clips the giant spinner */
.card-item {
    /* width: 20vw; */
    max-height: 250px;
    padding: 15px 12px !important;
    position: relative;
    justify-content: space-between !important;
    z-index: 0;
    /* Creates the stacking context for children */

    /* Clips the spinner without shrinking content */
    overflow: clip;
}

/* Adds a soft, subtle shadow behind the actual product shape */
.card-item img {
    object-fit: contain;
    transition: filter 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* 2. The Giant Spinner: Sits behind everything and spins */
.card-item::before {
    content: "";
    position: absolute;
    z-index: -2;
    /* Bottom layer */
    /* Behind the inner mask */
    left: -50%;
    top: -50%;
    width: 200%;
    /* Make it huge so corners don't show when spinning */
    height: 200%;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;

    /* Default Light Mode Gradient */
    background-image: conic-gradient(from 0deg, transparent 0%, transparent 20%, #5bc3d2 40%, transparent 55%);
    opacity: 0;
    /* Hidden until hover */
}

/* 3. The Inner Mask: Sits on top of the spinner to create the "Border" */
.card-item::after {
    content: "";
    position: absolute;
    z-index: -1;
    /* Middle layer (above spinner, behind text) */
    inset: 1.5px;
    /* Adjusted width/height calculation: 1.5px * 2 sides = 3px */
    width: calc(100% - 3px);
    height: calc(100% - 3px);

    /* CRITICAL FIX: This was missing in your file! */
    background: var(--card-bg);
    border-radius: 7px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 4. Hover State: Reveals and spins the gradient */
.card-item:hover::before {
    opacity: 1;
    /* Slowed down from 4s to 8s for a calmer effect */
    animation: rotate-border 8s linear infinite;
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 5. Hover Lift Effect */
.card-item:hover {
    box-shadow: 0 8px 20px 0 rgba(50, 180, 200, 0.4);
    transform: translateY(-2px);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.card-item:hover img {
    /* Adjust the colors and blur to your liking! */
    filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.3));
}

/* For an extra pop in dark mode, you can give it a faint white/blue glow */
.dark-mode .card-item:hover img {
    filter: drop-shadow(0px 8px 12px rgba(255, 255, 255, 0.1));
}

.card-item a {
    color: black;
}

/* ===============================
   PREMIUM CARD TEXT ANIMATIONS
================================ */

/* 1. Base states for the span elements */
.text-success span,
.text-danger span {
    /* display: inline-block is required for CSS transforms to work on inline text */
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. Style the "40% off" as a modern badge */
.card-item .text-success span {
    background: #e6f4ea;
    /* Soft green backdrop */
    color: #1e8e3e;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Dark mode adjustment for the green badge */
.dark-mode .card-item .text-success span {
    background: rgba(30, 142, 62, 0.2);
    color: #81c995;
}

/* 2. Hover state for Dark Mode Badge */
.dark-mode .card-item:hover .text-success span {
    background: rgba(34, 197, 94, 0.3);
    /* Becomes slightly more opaque */
    color: #ffffff;
    /* Turns white for maximum readability on hover */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.2);
    /* A soft, sophisticated glow */
    border-color: rgba(34, 197, 94, 0.5);
}

/* Bright state ONLY on hover */
.dark-mode .card-item:hover .text-danger span {
    color: #ff6b6b;
    /* Full vibrant red */
}

/* 3. Hide the "Order Now!" initially, making it look clean */
.card-item .text-danger {
    font-size: 14px;
    overflow: hidden;
    /* Keeps the layout from shifting when the text moves */
}

/* The "Order Now" text waits 0.1s before sliding up */
.card-item .text-danger span {
    opacity: 0.4;
    transform: translateY(10px);
    color: #d93025;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    /* Makes "ORDER NOW" look like a definitive button/tag */
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease 0.1s;
    /* The '0.1s' at the end is the delay */
}

/* Subtle state when NOT hovered */
.dark-mode .card-item .text-danger span {
    color: rgba(255, 107, 107, 0.6);
    /* Faded red */
}

/* 4. THE MAGIC: Animate when the user hovers over the card */
.card-item:hover .text-success span {
    transform: scale(1.08);
    /* A satisfying little pop */
    box-shadow: 0 4px 8px rgba(30, 142, 62, 0.15);
    background: #d3eadb;
}

.card-item:hover .text-danger span {
    opacity: 1;
    transform: translateY(0);
    /* Smoothly slides up into place */
}

/* .dark-mode .card-item {
    background-color: #2a313c !important;
} */

.dark-mode .card-item:hover {
    /* Changed opacity from 0.4 to 0.2 for a subtle, calm glow */
    box-shadow: 0 0 25px rgba(129, 201, 149, 0.2);
    /* Soft Sage glow */
    transform: translateY(-2px);
}

/* Update the gradient image, not the background shorthand */
.dark-mode .card-item::before {
    background-image: conic-gradient(from 0deg,
            transparent 0deg,
            #81c995 90deg,
            /* Bright Cyan for pop */
            transparent 180deg);
}

.dark-mode .card-item::after {
    background-color: #212830 !important;
}

.dark-mode .card-item a {
    color: #e9ecef !important;
}

/* ===============================
   FOOTER STYLES
================================ */
footer {
    background-color: #212121 !important;
    border-top: #3d444d solid 1px !important;
    font-family: "Lato", serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode footer {
    background-color: #172337 !important;
    border-top: #2c323a solid 1px !important;
}

.dark-mode footer .container {
    background-color: transparent !important;
}

/* Base text colors to override Bootstrap defaults inside footer */
footer .text-white {
    color: #f1f2f4 !important;
}

footer .text-secondary {
    color: #999b9f !important;
}

/* ===============================
   FOOTER CSS GRID LAYOUT
================================ */
.footer-grid {
    /* Default Mobile: 2 columns. Newsletter spans across both. */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.footer-newsletter {
    grid-column: span 2;
}

/* Tablet & Small Desktop (768px to 1199px) 
   Merged into a clean 3-column flow
   Newsletter spans 2 columns. */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-newsletter {
        grid-column: span 2;
    }
}

/* Large Desktop: 6 columns total. Links get 1 each, Newsletter gets 2. */
@media (min-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .footer-newsletter {
        grid-column: span 2;
    }
}

.footer-heading {
    font-family: "Lato", serif;
    font-size: 0.95rem;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #999b9f !important;
}

/* Link Styling */
.footer-link {
    color: #d1d7e0;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease !important;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline !important;
}

/* ===============================
   NEWSLETTER STYLES 
================================ */

/* Prevent the form from stretching too wide on large screens */
.newsletter-form {
    max-width: 500px;
}

.newsletter-form .form-control {
    font-size: 0.95rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.dark-mode .newsletter-input {
    background-color: transparent;
    /* Dark/blends with footer before click */
    border-color: #444c58;
    color: #f1f2f4;
}

.newsletter-input::placeholder {
    color: #6c757d;
    transition: color 0.3s ease;
}

.dark-mode .newsletter-input::placeholder {
    color: #b0b8c1;
    /* Light gray placeholder before click */
}

/* Focus State - Flips to white BG with dark text (both themes) */
.newsletter-input:focus,
.dark-mode .newsletter-input:focus {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Placeholder color on focus */
.newsletter-input:focus::placeholder,
.dark-mode .newsletter-input:focus::placeholder {
    color: #adb5bd !important;
}

/* Subscribe Button */
.subscribe-btn {
    background-color: var(--main-bg-color);
}

.subscribe-btn:hover {
    background-color: #1a5ac6;
}

/* Icons Animation */
.social-icons a svg,
.payment-icons i {
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
    opacity: 0.7;
}

.social-icons a:hover svg {
    transform: scale(1.15);
    opacity: 1;
}

.payment-icons i:hover {
    color: #f1f2f4 !important;
    transform: scale(1.1);
}

/* Override offcanvas animation duration */
.offcanvas {
    background-color: #f3f3f3 !important;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    will-change: transform;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease !important;
}

.offcanvas-header {
    border-bottom: 1px solid #e9ecef !important;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease !important;
}

.offcanvas-title {
    font-family: 'Lato', serif;
    font-weight: 600;
    color: #294563 !important;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.offcanvas-body {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Optional: Remove default Bootstrap backdrop transition delay */
.offcanvas-backdrop {
    transition: opacity 0.2s ease-in-out !important;
}

.dark-mode .offcanvas {
    background-color: #2a313c !important;
    color: #e9ecef !important;
}

.dark-mode .offcanvas-header {
    border-bottom: 1px solid #444c58 !important;
}

.dark-mode .offcanvas-title {
    color: #e9ecef !important;
}

.dark-mode .offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
}

.dark-mode .offcanvas .nav-link {
    color: #e9ecef !important;
}

/* ===============================
   ACCORDION ACTIVE STATE
================================ */
.offcanvas .nav-item.open .nav-link {
    background: rgba(255, 255, 255, 0.08);
}

/* body:not(.dark-mode) .offcanvas .nav-item.open .nav-link {
    background: rgba(0, 0, 0, 0.05);
} */

/* ===============================
   INNER DROPDOWN CARD
================================ */
.offcanvas .nav-dropdown {
    background: rgba(0, 0, 0, 0.12);
    pointer-events: auto;
}

.offcanvas .nav-dropdown.animating {
    pointer-events: none;
}

.dark-mode .offcanvas .nav-dropdown {
    background-color: #212830 !important;
}

.dark-mode .offcanvas .nav-dropdown a {
    color: #e9ecef !important;
}

.dark-mode .offcanvas .nav-dropdown a:hover {
    background-color: #212830 !important;
}

.theme-icon {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important;
}

/* Dark mode → Sun should be warm yellow */
.dark-mode .theme-icon {
    color: #f5c542 !important;
    /* Sun Yellow */
}

/* Light mode → Moon neutral */
body:not(.dark-mode) .theme-icon {
    color: #333 !important;
    /* Moon Black */
}

.btn-close {
    /* filter: invert(0); */
    transition: filter 0.3s ease !important;
}

.dark-mode .btn-close {
    /* border-color: #e9ecef !important;
    color: #e9ecef !important; */
    filter: invert(1);
}

/* ===============================
   BACK TO TOP BUTTON
================================ */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--main-bg-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: none;
    cursor: pointer;
    z-index: 1050;
    /* Sits above the header */

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);

    /* Smooth entrance/exit and hover transitions */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Shown state (triggered by JS) */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Dark Mode adjustment */
.dark-mode .back-to-top {
    background-color: #374151;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
