/* Import custom pagination styles */
@import url('components/custom-pagination.css');

/* --- Mobile header v3 - Simplified inline layout --- */
@media (max-width: 991.98px) {
    #mobile-header-v3 .mobile-header-actions {
        display: inline-flex !important;
        align-items: center !important;
        gap: 15px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #mobile-header-v3 .mobile-action-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 8px !important;
        background: none !important;
        border: none !important;
        color: #333 !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }

    #mobile-header-v3 .mobile-action-btn i {
        font-size: 1.4rem !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Mobile Header Slide Animation - Enhanced */
#mobile-header-v3 {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    transform: translateY(0) translateZ(0) !important;
    will-change: transform !important;
    backface-visibility: hidden !important;
}

#mobile-header-v3.header-hidden {
    transform: translateY(-100%) translateZ(0) !important;
}

/* Desktop Header Slide Animation - Smooth & Enhanced */
@media (min-width: 992px) {
  #header.bg-white.shadow-sm.sticky-top {
      transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
      transform: translateY(0) translateZ(0) !important;
      will-change: transform !important;
      backface-visibility: hidden !important;
  }

  #header.bg-white.shadow-sm.sticky-top.desktop-header-hidden {
      transform: translateY(-100%) translateZ(0) !important;
      opacity: 1 !important;
      pointer-events: none !important;
  }

  /* Ensure smooth animation on show */
  #header.bg-white.shadow-sm.sticky-top:not(.desktop-header-hidden) {
      transform: translateY(0) translateZ(0) !important;
      opacity: 1 !important;
      pointer-events: auto !important;
  }
}




/* ==================== GLOBAL FONT SETTINGS ==================== */
* {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

/* Homepage specific styles */
.homepage-content {
    margin-top: 0.5rem;
}

/* Remove extra spacing on homepage main content */
body .homepage-content .hero-carousel-section + * {
    margin-top: 0.5rem;
}

/* reCAPTCHA minimization styles */
/* Make reCAPTCHA challenge popup smaller but not invisible */
.grecaptcha-popup,
.grecaptcha-bubble,
div[style*="z-index: 2147483647"] {
    transform: scale(0.95) !important;
    opacity: 0.98 !important;
}

/* Mobile reCAPTCHA popup optimization */
@media (max-width: 768px) {
    .grecaptcha-popup,
    .grecaptcha-bubble,
    div[style*="z-index: 2147483647"] {
        transform: scale(0.9) !important;
        opacity: 0.95 !important;
    }

    /* Make reCAPTCHA overlays less intrusive on mobile */
    iframe[src*="recaptcha"] {
        transform: scale(0.95) !important;
        transform-origin: bottom right !important;
    }
}

/* Contact Page Responsive Enhancements */
@media (max-width: 768px) {
    /* Better spacing for contact page on mobile */
    .container .row.justify-content-center .col-12.col-lg-10 {
        padding: 0 1rem;
    }

    /* Contact cards better spacing */
    .card .card-body {
        padding: 1.5rem !important;
    }

    /* Contact info list better mobile layout */
    .list-unstyled li {
        word-break: break-word;
    }

    /* Contact buttons full width on mobile */
    .btn.w-100 {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    /* Very small screens - contact page */
    .container .row.justify-content-center .col-12.col-lg-10 {
        padding: 0 0.75rem;
    }

    .card .card-body {
        padding: 1rem !important;
    }

    /* Contact page title smaller */
    .text-center h1.fw-bold {
        font-size: 1.75rem !important;
    }

    .text-center p.text-muted {
        font-size: 0.9rem;
    }
}/* Global Styles */
body {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    background-color: #f8f9fa;
    line-height: 1.6;
    font-weight: 400;
}

/* Specific font weights for common elements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 600;
}

/* Διόρθωση για Font Awesome icons ώστε να μην επηρεάζονται από την καθολική γραμματοσειρά */
.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-light, .fa-duotone, .fa-brands,
[class*="fa-"]:before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block;
    text-decoration: inherit;
    text-align: center;
    /* Εξασφαλίζει σωστή εμφάνιση και στον text editor */
}

.navbar, .nav {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 500;
}

.btn {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 500;
}

.form-control, .form-select, .form-label {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 400;
}

.card, .card-body, .card-title, .card-text {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

.alert {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

.badge {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 500;
}

.breadcrumb {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

/* ==================== BREADCRUMB STYLES ==================== */
/* Basic breadcrumb styling for standard usage */
.breadcrumb {
    --bs-breadcrumb-divider: '>';
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb-item a {
    color: rgba(43, 43, 43, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: rgb(0, 90, 105);
    font-weight: 600;
}

.breadcrumb-item a:hover {
    text-decoration: underline !important;
    opacity: 0.8;
    color: rgb(0, 90, 105);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(17, 104, 155, 0.7);
    content: var(--bs-breadcrumb-divider, '>');
}
/* ==================== END BREADCRUMB STYLES ==================== */

.table, .table th, .table td {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

.dropdown-menu, .dropdown-item {
    font-family: 'Fira Sans', ui-sans-serif, system-ui, sans-serif !important;
}

/* Global dropdown spacing improvements */
.dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    line-height: 1.4;
}

.dropdown-menu .dropdown-divider {
    margin: 0.25rem 0;
}

/* Beta Notice Section */
.beta-notice-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border-bottom: 1px solid #fecaca;
}

.beta-notice-text {
    color: #dc2626 !important;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
    animation: pulseNotice 3s ease-in-out infinite;
}

.beta-notice-text i {
    color: #ef4444;
    animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes pulseNotice {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.01);
    }
}

@keyframes bounceIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* Mobile responsive for beta notice */
@media (max-width: 768px) {
    .beta-notice-text {
        font-size: 0.9rem;
    }

    .beta-notice-section {
        padding: 0.75rem 0;
    }
}


/* Top Header Styling with ease down effect */
#top-header {
  background-color: #e9e9e9;
  color: #292929;
  padding: 10px 0;
  font-size: 0.9rem;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s cubic-bezier(0.4,0,0.2,1);
  /* Αφαιρούμε το initial hidden state για να αποφύγουμε το flash effect */
  transform: translateY(0);
  opacity: 1;
}

#top-header.show {
  transform: translateY(0);
  opacity: 1;
}

#top-header .contact-info i {
  margin-right: 5px;
  color: #464646;
}

/* ABSOLUTELY FORCE INLINE LAYOUT */
#top-header .social-links {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    float: none !important;
    position: relative !important;
    z-index: 10 !important;
}

/* OVERRIDE ANY INHERITED STYLES THAT MIGHT CAUSE VERTICAL LAYOUT */
#top-header .social-links * {
    float: none !important;
    clear: none !important;
    display: flex !important;
}

#top-header .social-links::before,
#top-header .social-links::after {
    display: none !important;
}

/* Individual social link styling - FORCE INLINE */
#top-header .social-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    color: #daa002 !important;
    background: rgba(218, 160, 2, 0.1) !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid transparent !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hover effects */
#top-header .social-links a:hover {
    color: #ffffff;
    background: #daa002;
    transform: translateY(-1px) scale(1.05);
    border-color: rgba(218, 160, 2, 0.3);
    box-shadow: 0 2px 8px rgba(218, 160, 2, 0.3);
}
/* Focus states for accessibility */
#top-header .social-links a:focus {
    outline: 2px solid #daa002;
    outline-offset: 2px;
}

/* Active state */
#top-header .social-links a:active {
    transform: translateY(0) scale(0.98);
}

/* Individual platform colors (optional hover states) */
#top-header .social-links a.twitter:hover {
    background: #1da1f2;
    border-color: rgba(29, 161, 242, 0.3);
    box-shadow: 0 2px 8px rgba(29, 161, 242, 0.3);
}

#top-header .social-links a.facebook:hover {
    background: #1877f2;
    border-color: rgba(24, 119, 242, 0.3);
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

#top-header .social-links a.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: rgba(225, 48, 108, 0.3);
    box-shadow: 0 2px 8px rgba(225, 48, 108, 0.3);
}

#top-header .social-links a.linkedin:hover {
    background: #0077b5;
    border-color: rgba(0, 119, 181, 0.3);
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

/* Icons positioning */
#top-header .social-links a i {
    font-size: inherit;
    line-height: 1;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #top-header .social-links {
        gap: 6px;
    }

    #top-header .social-links a {
        width: 26px;
    .recent-events-section .card-text { font-size:0.68rem !important; line-height:1.15 !important; margin:0 0 0.35rem !important; }
    /* Clamp description to 8 lines with fade */
    .recent-events-section .event-description {
        position:relative;
        display:-webkit-box;
        -webkit-line-clamp:8;
        -webkit-box-orient:vertical;
        line-clamp:8;
        overflow:hidden;
    }
    /* Fade overlay */
    .recent-events-section .event-description:after {
        content:"";
        position:absolute;
        left:0; right:0; bottom:0;
        height:2.2em;
    background:linear-gradient(to bottom, rgba(255,255,255,0), #ffffff 80%);
        pointer-events:none;
    }
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    #top-header .social-links {
        gap: 4px;
    }

    #top-header .social-links a {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }
}

/* Animation for page load */
#top-header .social-links a {
    opacity: 0;
    animation: fadeInScale 0.4s ease forwards;
}

#top-header .social-links a:nth-child(1) { animation-delay: 0.1s; }
#top-header .social-links a:nth-child(2) { animation-delay: 0.2s; }
#top-header .social-links a:nth-child(3) { animation-delay: 0.3s; }
#top-header .social-links a:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Top header container adjustments for FORCED inline layout */
#top-header {
    position: relative !important;
    z-index: 1000 !important;
}

#top-header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: auto !important;
}

#top-header .contact-info {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    flex: 1 !important;
}

#top-header .contact-info span {
    white-space: nowrap !important;
}

#top-header .contact-info a {
    color: inherit;
    text-decoration: none;
}

#top-header .contact-info a:hover {
    color: #daa002;
}

/* Ensure social links stay inline even on smaller screens */
@media (max-width: 768px) {
    #top-header .container {
        justify-content: center;
        gap: 1rem;
    }

    #top-header .contact-info {
        display: none; /* Hide contact info on mobile to keep social inline */
    }

    #top-header .social-links {
        justify-content: center;
    }
}

/* === Modern Sticky Header === */
#header {
  background: rgba(255,255,255,0.98);
  color: #151515;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  min-height: 70px;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2040;
  padding: 18px 0;
  transition: padding 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s, box-shadow 0.3s;
  will-change: padding, background, box-shadow;
  backdrop-filter: blur(2px);
}

/* Header ease up (slide up & fade out) - NOT used for scroll animations */
#header.hide:not(.desktop-header-hidden) {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

#header.shrink {
  padding: 7px 0 !important;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  animation: headerShrinkIn 0.25s cubic-bezier(0.4,0,0.2,1);
}

@keyframes headerShrinkIn {
  from {
    padding: 18px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  to {
    padding: 7px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  }
}

/* Logo scaling */
#header .logo h1 {
  font-size: 1.7rem;
  font-weight: bold;
  color: #10afdf;
  margin: 0;
  transition: font-size 0.3s cubic-bezier(0.4,0,0.2,1);
}
#header.shrink .logo h1 {
  font-size: 1.25rem;
}

/* Responsive header padding */
@media (max-width: 768px) {
  #header {
    padding: 10px 0;
  }
  #header.shrink {
    padding: 4px 0 !important;
  }
  #header .logo h1 {
    font-size: 1.2rem;
  }
  #header.shrink .logo h1 {
    font-size: 1rem;
  }
}

/* Desktop Header Layout Fix - Simplified to prevent initial layout shift (FOUC) */
@media (min-width: 992px) {
    #header > .container {
        position: relative; /* needed for dropdown positioning */
        display: flex; /* establish flex from first paint */
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    /* Header main flex row */
    #header .d-flex.align-items-center.flex-wrap {
        flex-wrap: nowrap; /* keep single line */
        min-height: 50px;
        align-items: center;
        width: 100%;
        overflow: visible; /* allow dropdowns */
    }

  /* Logo section - fixed width */
  #header .logo,
  #header a[href*="home.index"]:first-child {
    flex-shrink: 0 !important;
    min-width: 120px !important;
    max-width: 220px !important;
  }

  /* Home icon - fixed width */
  #header a[title="Αρχική"] {
    flex-shrink: 0 !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 6px;
  }

  /* Home icon hover effect */
  #header a[title="Αρχική"]:hover {
    color: #10afdf !important;
    background-color: rgba(16, 175, 223, 0.1) !important;
  }

  /* List icon - fixed width */
  #header a.nav-link:has(i.bi-list) {
    flex-shrink: 0 !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 6px;
  }

  /* List icon hover effect */
  #header a.nav-link:has(i.bi-list):hover {
    color: #10afdf !important;
    background-color: rgba(16, 175, 223, 0.1) !important;
  }

  /* Search form container - flexible but constrained */
  #header .search-form {
    flex: 1 1 auto !important;
    max-width: 600px !important;
    min-width: 150px !important;
    margin: 0 0.5rem !important;
  }

  /* Auth section - fixed width, prevent wrapping */
  #header .d-flex.align-items-center.gap-2:last-child {
    flex-shrink: 0 !important;
    min-width: 180px !important;
    max-width: 300px !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
        overflow: visible !important; /* Μην κρύβεις τα dropdown menus */
  }

    /* Search form flexible area */
    #header .d-flex.align-items-center.flex-wrap > .search-form {
        flex: 1 1 400px; /* allow growth without sudden jump */
        min-width: 220px; /* avoid collapsing during first paint */
    }

    /* Avoid aggressive flex-shrink rules that caused width snapping */
    #header .d-flex.align-items-center.flex-wrap > *:not(.search-form) {
        flex: 0 0 auto; /* natural sizing, no forced shrink */
    }
}

/* Ensure all header elements stay inline on large screens */
@media (min-width: 1200px) {
  #header .search-form {
    max-width: 650px !important;
    min-width: 400px !important;
  }

  #header .d-flex.align-items-center.gap-2:last-child {
    min-width: 250px !important;
  }
}

/* Intermediate screen sizes - prevent wrapping */
@media (min-width: 992px) and (max-width: 1199px) {
  #header .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  #header .search-form {
    max-width: 250px !important;
    min-width: 120px !important;
  }

  #header .d-flex.align-items-center.gap-2:last-child {
    min-width: 160px !important;
    font-size: 0.9rem !important;
    gap: 0.4rem !important;
  }

  /* Compact the auth dropdown text on medium screens */
  #header .dropdown-toggle {
    font-size: 0.85rem !important;
  }

  /* Make user avatar smaller on medium screens */
  #header .rounded-circle {
    width: 26px !important;
    height: 26px !important;
  }

  /* Make icons smaller */
  #header .fas, #header .bi {
    font-size: 0.9rem !important;
  }

  /* Reduce logo size on medium screens */
  #header a[href*="home.index"]:first-child img {
    max-width: 180px !important;
    height: auto !important;
  }
}

/* Remove overlay from side menu on desktop */
@media (min-width: 992px) {
  #categoryModal {
    background: transparent;
  }

  .categories-modal-overlay {
    display: none;
  }

  .categories-bottom-modal .categories-modal-overlay {
    display: none;
  }

  /* Remove overlays from sub-modals on desktop */
  #businessSubModal,
  #articlesSubModal,
  #locationsSubModal {
    background: transparent;
  }
}

/* ==================== CATEGORY MODAL MENU STYLING ==================== */

/* Main modal container */
#categoryModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2050;
    display: none;
    background: transparent; /* Remove desktop overlay completely */
    transition: background 0.3s ease;
}

/* Modal panel */
#categoryModalPanel {
    position: relative;
    width: 85vw;
    max-width: 340px;
    min-width: 220px;
    height: 100%;
    background: #ffffff;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Panel header */
#categoryModalPanel .d-flex.align-items-center.justify-content-between {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

#categoryModalPanel .d-flex.align-items-center.justify-content-between::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

/* Logo in panel */
#categoryModalPanel img {
    transition: transform 0.2s ease;
}

#categoryModalPanel img:hover {
    transform: scale(1.05);
}

/* Close button */
#categoryModalPanel .btn.btn-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #6c757d;
}

#categoryModalPanel .btn.btn-link:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

/* Panel content */
#categoryModalPanel .px-3.pt-2.pb-4 {
    padding: 1.5rem 1.25rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#categoryModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar {
    width: 4px;
}

#categoryModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-track {
    background: transparent;
}

#categoryModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

#categoryModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Navigation items */
#categoryModalPanel .list-unstyled {
    margin: 0;
    padding: 0;
}

#categoryModalPanel .nav-item {
    margin-bottom: 0.25rem;
}

#categoryModalPanel .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#categoryModalPanel .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(16, 175, 223, 0.1) 50%, transparent 100%);
    transition: left 0.5s ease;
}

#categoryModalPanel .nav-link:hover {
    background: transparent;
    color: #495057;
    transform: translateX(4px);
    box-shadow: none;
}

#categoryModalPanel .nav-link:hover::before {
    left: 100%;
}

#categoryModalPanel .nav-link:active {
    transform: translateX(2px) scale(0.98);
}

/* Icons in navigation */
#categoryModalPanel .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

#categoryModalPanel .nav-link:hover i {
    transform: scale(1.1);
}

/* Chevron icons */
#categoryModalPanel .nav-link .bi-chevron-right {
    margin-left: auto;
    margin-right: 0;
    color: #6c757d;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

#categoryModalPanel .nav-link:hover .bi-chevron-right {
    transform: translateX(2px);
    color: #495057;
}

/* --- Unified menu & submenu link styling (Category + Sub panels) --- */
#businessSubModalPanel .nav-link,
#articlesSubModalPanel .nav-link,
#locationsSubModalPanel .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background: transparent; /* match main panel */
}

#businessSubModalPanel .nav-link::before,
#articlesSubModalPanel .nav-link::before,
#locationsSubModalPanel .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(16,175,223,0.1) 50%, transparent 100%);
    transition: left 0.5s ease;
}

#businessSubModalPanel .nav-link:hover,
#articlesSubModalPanel .nav-link:hover,
#locationsSubModalPanel .nav-link:hover {
    background: transparent;
    color: #495057;
    transform: translateX(4px);
    box-shadow: none;
}

#businessSubModalPanel .nav-link:hover::before,
#articlesSubModalPanel .nav-link:hover::before,
#locationsSubModalPanel .nav-link:hover::before {
    left: 100%;
}

#businessSubModalPanel .nav-link:active,
#articlesSubModalPanel .nav-link:active,
#locationsSubModalPanel .nav-link:active {
    transform: translateX(2px) scale(0.98);
}

/* Icons inside submenu links */
#businessSubModalPanel .nav-link i,
#articlesSubModalPanel .nav-link i,
#locationsSubModalPanel .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

#businessSubModalPanel .nav-link:hover i,
#articlesSubModalPanel .nav-link:hover i,
#locationsSubModalPanel .nav-link:hover i {
    transform: scale(1.1);
}

/* Chevron consistency */
#businessSubModalPanel .nav-link .bi-chevron-right,
#articlesSubModalPanel .nav-link .bi-chevron-right,
#locationsSubModalPanel .nav-link .bi-chevron-right {
    margin-left: auto;
    margin-right: 0;
    color: #6c757d;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

#businessSubModalPanel .nav-link:hover .bi-chevron-right,
#articlesSubModalPanel .nav-link:hover .bi-chevron-right,
#locationsSubModalPanel .nav-link:hover .bi-chevron-right {
    transform: translateX(2px);
    color: #495057;
}

/* Sub-modals styling - Desktop */
#businessSubModal,
#articlesSubModal,
#locationsSubModal {
    position: absolute;
    top: 0; /* Start from the top of the modal */
    left: 340px;
    width: calc(100vw - 340px);
    height: 100%; /* Full height of the parent modal */
    z-index: 2051;
    display: none;
    background: transparent; /* No overlay */
    pointer-events: none; /* Allow clicks to pass through */
}

/* Remove main modal overlay when submenu is open */
#categoryModal:has(#businessSubModal[style*="display: block"]),
#categoryModal:has(#articlesSubModal[style*="display: block"]),
#categoryModal:has(#locationsSubModal[style*="display: block"]) {
    background: transparent;
}

/* Alternative approach with classes */
#categoryModal.submenu-open {
    background: transparent;
}

#businessSubModalPanel,
#articlesSubModalPanel,
#locationsSubModalPanel {
    width: 85vw;
    max-width: 340px;
    min-width: 220px;
    height: calc(100% - 80px); /* Full height minus header space */
    margin-top: 80px; /* Offset for the header */
    background: #ffffff;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
    border-radius: 0 12px 12px 0;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.2s ease-in-out;
    pointer-events: auto; /* Allow clicks on the panel */
}

/* Sub-modal headers */
#businessSubModalPanel .d-flex.align-items-center.justify-content-between,
#articlesSubModalPanel .d-flex.align-items-center.justify-content-between,
#locationsSubModalPanel .d-flex.align-items-center.justify-content-between {
    padding: 1rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#businessSubModalPanel h6,
#articlesSubModalPanel h6,
#locationsSubModalPanel h6 {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

/* Back and close buttons in sub-modals */
#businessSubModalPanel .btn,
#articlesSubModalPanel .btn,
#locationsSubModalPanel .btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #6c757d;
}

#businessSubModalPanel .btn:hover,
#articlesSubModalPanel .btn:hover,
#locationsSubModalPanel .btn:hover {
    background: rgba(108, 117, 125, 0.1);
    transform: scale(1.1);
}

/* Responsive adjustments for mobile */
@media (max-width: 767px) {
    #categoryModal {
        background: transparent; /* Remove mobile overlay completely */
    }

    #categoryModalPanel {
        width: 100vw;
        max-width: none;
    }

    #businessSubModal,
    #articlesSubModal,
    #locationsSubModal {
        position: absolute;
        top: 0; /* Start from the top of the modal */
        left: 0;
        width: 100%;
        height: 100%; /* Full height of parent modal */
        background: transparent; /* No overlay on mobile either */
        pointer-events: none;
    }

    #businessSubModalPanel,
    #articlesSubModalPanel,
    #locationsSubModalPanel {
        width: 85vw;
        max-width: 340px;
        min-width: 220px;
        height: calc(100% - 80px); /* Full height minus header space */
        margin-top: 80px; /* Offset for the header */
        border-radius: 0;
        opacity: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        pointer-events: auto;
    }

    /* Mobile sub-modal show state with higher specificity */
    #businessSubModal.mobile-show #businessSubModalPanel,
    #articlesSubModal.mobile-show #articlesSubModalPanel,
    #locationsSubModal.mobile-show #locationsSubModalPanel {
        opacity: 1;
        transform: translateX(0);
    }

    /* Additional mobile-specific override */
    #businessSubModal[style*="display: block"].mobile-show #businessSubModalPanel,
    #articlesSubModal[style*="display: block"].mobile-show #articlesSubModalPanel,
    #locationsSubModal[style*="display: block"].mobile-show #locationsSubModalPanel {
        opacity: 1;
        transform: translateX(0);
    }

    /* Hide badges/counters on mobile */
    #categoryModalPanel .nav-link .badge,
    #businessSubModalPanel .nav-link .badge,
    #articlesSubModalPanel .nav-link .badge,
    #locationsSubModalPanel .nav-link .badge {
        display: none;
    }
}

/* Animation classes */
.show #businessSubModalPanel,
.show #articlesSubModalPanel,
.show #locationsSubModalPanel {
    opacity: 1;
}

/* Badge styling in modal menus */
#categoryModalPanel .badge,
#businessSubModalPanel .badge,
#articlesSubModalPanel .badge,
#locationsSubModalPanel .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.2);
    transition: all 0.2s ease;
}

/* Badge hover effects when parent nav item is hovered */
#categoryModalPanel .nav-link:hover .badge,
#businessSubModalPanel .nav-link:hover .badge,
#articlesSubModalPanel .nav-link:hover .badge,
#locationsSubModalPanel .nav-link:hover .badge {
    background: rgba(108, 117, 125, 0.25);
    color: #495057;
    border-color: rgba(108, 117, 125, 0.4);
    transform: scale(1.05);
}

/* Sub-modal content styling */
#businessSubModalPanel .px-3.pt-2.pb-4,
#articlesSubModalPanel .px-3.pt-2.pb-4,
#locationsSubModalPanel .px-3.pt-2.pb-4 {
    padding: 1.5rem 1.25rem;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(25, 118, 210, 0.3) transparent;
}

#businessSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar,
#articlesSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar,
#locationsSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar {
    width: 4px;
}

#businessSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-thumb,
#articlesSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-thumb,
#locationsSubModalPanel .px-3.pt-2.pb-4::-webkit-scrollbar-thumb {
    background: rgba(25, 118, 210, 0.3);
    border-radius: 2px;
}

/* Special styling for action links in sub-modals */
#businessSubModalPanel .nav-link.text-primary,
#articlesSubModalPanel .nav-link.text-primary,
#locationsSubModalPanel .nav-link.text-primary {
    color: #0d6efd;
    font-weight: 600;
    border: 1px solid rgba(13, 110, 253, 0.2);
    background: rgba(13, 110, 253, 0.05);
}

#businessSubModalPanel .nav-link.text-primary:hover,
#articlesSubModalPanel .nav-link.text-primary:hover,
#locationsSubModalPanel .nav-link.text-primary:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
    transform: translateX(6px);
}

#businessSubModalPanel .nav-link.text-info,
#articlesSubModalPanel .nav-link.text-info,
#locationsSubModalPanel .nav-link.text-info {
    color: #0dcaf0;
    font-weight: 600;
    border: 1px solid rgba(13, 202, 240, 0.2);
    background: rgba(13, 202, 240, 0.05);
}

#businessSubModalPanel .nav-link.text-info:hover,
#articlesSubModalPanel .nav-link.text-info:hover,
#locationsSubModalPanel .nav-link.text-info:hover {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.3);
    transform: translateX(6px);
}

/* Divider styling in sub-modals */
#businessSubModalPanel hr,
#articlesSubModalPanel hr,
#locationsSubModalPanel hr {
    margin: 0.5rem 0;
    border-color: rgba(25, 118, 210, 0.2);
    opacity: 0.7;
}

/* Focus accessibility improvements */
#categoryModalPanel .nav-link:focus,
#businessSubModalPanel .nav-link:focus,
#articlesSubModalPanel .nav-link:focus,
#locationsSubModalPanel .nav-link:focus {
    outline: 2px solid #10afdf;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 175, 223, 0.1);
}

/* Improved text contrast for better readability */
#categoryModalPanel .text-muted {
    color: #6c757d;
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

    /* Mobile-first responsive design for sub-modals */
    @media (max-width: 767px) {
        #businessSubModal, #articlesSubModal, #locationsSubModal {
            left: 0 !important;
            width: 100vw !important;
            background: rgba(0,0,0,0.35) !important;
        }

        #businessSubModalPanel, #articlesSubModalPanel, #locationsSubModalPanel {
            height: 100vh !important;
            transform: translateX(-100%);
            transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        }
    }

    @media (min-width: 768px) {
        #businessSubModal, #articlesSubModal, #locationsSubModal {
            left: 340px;
            width: calc(100vw - 340px);
            background: transparent !important;
        }

        #businessSubModalPanel, #articlesSubModalPanel, #locationsSubModalPanel {
            height: auto !important;
            min-height: 300px;
            max-height: 80vh;
            overflow-y: auto;
            opacity: 0;
            transform: translateX(0);
            transition: opacity 0.2s ease-in-out;
        }

        #businessSubModal.show #businessSubModalPanel,
        #articlesSubModal.show #articlesSubModalPanel,
        #locationsSubModal.show #locationsSubModalPanel {
            opacity: 1;
        }
    }


/* ==================== END CATEGORY MODAL MENU STYLING ==================== */

header .logo h1 {
  font-size: 1.6 rem;
  font-weight: bold;
  color: #10afdf;
  margin: 0;
  transition: font-size 0.3s ease;
}

#header.shrink .logo h1 {
  font-size: 1.2rem;
}

/* Header Styling  */

#header .logo img {
    max-height: 50px;

}

/**Search Bar Styles */


.search-bar .btn {
    border: none;
    padding: 10px 20px;
}

.search-form {
    max-width: 650px;
    width: 100%;
    min-width: 200px;
    margin: 0 auto;
    position: relative;
    flex: 1 1 400px;
}
.search-icon-header {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}
.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    line-height: 1.5;
}
.search-input::placeholder {
    color: #888;
    opacity: 1;
}
@media (max-width: 1400px) {
    .search-form {
        max-width: 350px;
        width: 100%;
        min-width: 200px;
        padding: 0;
    }
    .search-input {
        font-size: 0.95rem;
    }
    .search-icon-header {
        left: 10px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 1200px) {
    .search-form {
        max-width: 250px;
        min-width: 180px;
    }
}


.search-dropdown-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    min-width: 100%;
}
.search-dropdown-results .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background 0.15s;
}

.search-dropdown-results .dropdown-item:last-child {
    border-bottom: none;
}
.search-dropdown-results .dropdown-item:hover {
    background: #f8f9fa;
}
.search-dropdown-results .dropdown-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #f2f2f2;
}
.search-dropdown-results .dropdown-title {
    font-weight: 500;
    color: #222;
    font-size: 1rem;
}
.search-dropdown-results .dropdown-price {
    margin-left: auto;
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}



.search-form-mobile {
        position: relative;
    }
    .search-icon-mobile {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        z-index: 2;
        pointer-events: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .search-input-mobile {
        padding-left: 2.5rem !important;
        border-radius: 6px;
        border: 1px solid #ddd;
        font-size: 0.9rem;
    }
    .search-dropdown-results-mobile {
        position: fixed;
        left: 8px;
        right: 8px;
        top: 60px;
        z-index: 99999;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        max-height: 60vh;
        overflow-y: auto;
        display: none;
    }

    /* Mobile search dropdown styling */
    .search-dropdown-results-mobile .search-item-image {
        width: 40px !important;
        height: 40px !important;
        object-fit: cover;
        border-radius: 4px;
    }

    .search-dropdown-results-mobile .search-result-item {
        padding: 8px 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .search-dropdown-results-mobile .search-item-content {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .search-dropdown-results-mobile .search-item-details {
        flex: 1;
        min-width: 0;
    }

    .search-dropdown-results-mobile .search-item-title {
        font-size: 0.85rem;
        font-weight: 500;
        line-height: 1.2;
        margin-bottom: 2px;
        color: #333;
    }

    .search-dropdown-results-mobile .search-item-meta {
        font-size: 0.75rem;
        color: #666;
        line-height: 1.1;
    }

    .search-dropdown-results-mobile .search-section-title {
        font-size: 0.6rem;
        font-weight: 500;
        color: #414141;
        margin: 8px 12px 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .search-dropdown-results-mobile .search-footer {
        padding: 8px 12px;
        border-top: 1px solid #f0f0f0;
    }

    .search-dropdown-results-mobile .search-footer .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Mobile responsive adjustments */
    @media (max-width: 576px) {
        .search-dropdown-results-mobile {
            left: 4px;
            right: 4px;
            top: 55px;
        }

        .search-dropdown-results-mobile .search-item-image {
            width: 35px !important;
            height: 35px !important;
        }

        .search-dropdown-results-mobile .search-item-title {
            font-size: 0.8rem;
        }

        .search-dropdown-results-mobile .search-item-meta {
            font-size: 0.7rem;
        }
    }


/* Dropdown positioning (merged into earlier rule for large screens; kept generic for all sizes) */
#header > .container {
    overflow: visible;
    position: relative;
}

#header .d-flex {
    overflow: visible;
}

/* Ensure dropdown parents have proper stacking context */
#header .dropdown {
    position: relative;
    overflow: visible !important;
}

/* Fix Bootstrap container overflow that clips dropdowns */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    overflow: visible;
}

/* Unified Dropdown Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2100;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-menu.show {
    display: block;
    z-index: 2150;
}

/* Force dropdown to be visible when shown */
.dropdown.show .dropdown-menu {
    display: block;
    z-index: 2150;
}

/* Notification dropdown specific fixes */
.notifications-dropdown {
    position: absolute;
    z-index: 2150;
    right: 0;
    left: auto;
    top: 100%;
}

/* Language dropdown fixes */
#langDropdown + .dropdown-menu {
    position: absolute;
    z-index: 2150;
    right: 0;
    left: auto;
    top: 100%;
    min-width: 150px;
}

/* User dropdown fixes */
#navbarDropdown + .dropdown-menu {
    position: absolute;
    z-index: 2150;
    right: 0;
    left: auto;
    top: 100%;
    min-width: 250px;
}

/* Remove dropdown arrow for notifications */
#notificationsDropdown::after {
    display: none;
}

/* Ensure all dropdowns have proper positioning */
.dropdown {
    position: relative;
}

/* Bootstrap dropdown override fixes */
.dropdown-toggle::after { /* keep default arrow, no layout side-effects */
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Header optimization for dropdown positioning */
#header,
#header .d-flex { /* avoid applying to .container to reduce early reflow */
    transform: none;
    filter: none;
    perspective: none;
    contain: none;
}

/* Ensure proper z-index stacking for header and its children */
#header {
    z-index: 2050;
    contain: layout style;
}

/* Reset any potential clipping or masking */
#header .dropdown,
#header .dropdown-menu {
    clip: none;
    clip-path: none;
    mask: none;
    -webkit-clip-path: none;
    -webkit-mask: none;
}

/* Mobile dropdown fixes */
@media (max-width: 991.98px) {
    #mobile-header .dropdown-menu {
        position: absolute;
        z-index: 2150;
        right: 0;
        left: auto;
        top: 100%;
        min-width: 200px;
    }

    #mobile-header .dropdown {
        position: relative;
        overflow: visible;
    }

    .modal.show {
        z-index: 1055;
    }

    .modal-backdrop {
        z-index: 1050;
    }
}

/* Dropdown animation */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* User dropdown menu width for desktop */
#header .dropdown-menu[aria-labelledby="navbarDropdown"] {
    min-width: 280px;
    width: 280px;
}

/* User dropdown menu width for mobile */
#mobile-header .dropdown-menu[aria-labelledby="navbarDropdownMobile"] {
    min-width: 250px;
    width: 250px;
}

/* Enhanced dropdown styling for user menu */
#header .dropdown-menu[aria-labelledby="navbarDropdown"] .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

#header .dropdown-menu[aria-labelledby="navbarDropdown"] .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.2rem;
    transform: translateX(2px);
}

#header .dropdown-menu[aria-labelledby="navbarDropdown"] .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Dropdown divider styling */
#header .dropdown-menu[aria-labelledby="navbarDropdown"] .dropdown-divider {
    margin: 0.25rem 0;
    border-color: #e9ecef;
}

/* Badge styling in user dropdown */
#header .dropdown-menu[aria-labelledby="navbarDropdown"] .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Notification dropdown width and styling */
#header .notifications-dropdown {
    min-width: 420px;
    max-width: 560px;
    width: 480px;
}

/* XL screens and up (≥1200px): wider notifications */
@media (min-width: 1200px) {
    #header .notifications-dropdown {
        min-width: 500px;
        width: 520px;
    }
}

/* Language dropdown width */
#header .dropdown-menu[aria-labelledby="langDropdown"] {
    min-width: 150px;
    width: 150px;
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
    #header .dropdown-menu[aria-labelledby="navbarDropdown"] {
        min-width: 250px;
        width: 250px;
    }

    #header .notifications-dropdown {
        min-width: 380px;
        width: 420px;
    }
}

@media (max-width: 991.98px) {
    #header .dropdown-menu[aria-labelledby="navbarDropdown"] {
        min-width: 220px;
        width: 220px;
    }

    #header .notifications-dropdown {
        min-width: 340px;
        width: 360px;
    }
}


    /* Homepage Specific Styles */
.homepage-content {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

#scrollToTopBtn {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1200;
  background: #f29e17;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
#scrollToTopBtn:hover {
  background: #b97912;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}


/* Sidebar sticky positioning - Left Side */
.col-lg-4.col-xl-3.order-lg-1 {
    position: sticky;
    top: 20px;
    height: fit-content;
    padding-right: 2rem;
}

/* Main content area adjustments */
.col-lg-8.col-xl-9.order-lg-2 {
    padding-left: 1rem;
}



/* === Enhanced Sidebar Styling === */
.sidebar-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.sidebar-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.sidebar-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    border: none;
    position: relative;
    border-bottom: 2px solid rgba(16, 175, 223, 0.1);
}

.sidebar-card .card-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.3) 100%);
}

.sidebar-card .list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.875rem 1.25rem;
    transition: all 0.3s ease;
    background: transparent;
}

.sidebar-card .list-group-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
    padding-left: 1.5rem;
}

.sidebar-card .list-group-item:last-child {
    border-bottom: none;
}

.sidebar-card .list-group-item a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar-card .list-group-item:hover a {
    color: #10afdf;
    font-weight: 600;
}

.sidebar-card .list-group-item.active {
    background: linear-gradient(135deg, #10afdf 0%, #059c9c 100%);
    color: white;
    font-weight: 600;
}

.sidebar-card .list-group-item.active a {
    color: white;
}

.sidebar-card .badge {
    background: linear-gradient(135deg, #10afdf 0%, #059c9c 100%);
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 24px;
    text-align: center;
}

.sidebar-card .list-group-item:hover .badge {
    transform: scale(1.15);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 2px 8px rgba(238, 90, 82, 0.3);
}

.sidebar-card .list-group-item.active .badge {
    background: rgba(255, 255, 255, 0.95);
    color: #10afdf;
    border: 1px solid rgba(16, 175, 223, 0.3);
    font-weight: 800;
}

/* === Sticky Sidebar Enhancement === */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    transition: all 0.3s ease;
}



/* Filter Group Styling */
.filter-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-title {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-title:hover {
    color: #10afdf;
}

.filter-title i {
    transition: transform 0.3s ease;
}

.filter-title[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

.attribute-values-container .form-check {
    margin-bottom: 0.5rem;
}

.attribute-values-container .form-check-input {
    cursor: pointer;
}

.attribute-values-container .form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: color 0.3s ease;
}

.attribute-values-container .form-check-input:checked + .form-check-label {
    color: #10afdf;
    font-weight: 500;
}

/* Sort Filter Card - exclude articles grid cards */
.card:not(.articles-grid .card) {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.card:not(.articles-grid .card):hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Responsive Design */
@media (max-width: 768px) {

    .categories-modal-content {
        max-height: 80vh;
    }

    .categories-modal-body {
        max-height: calc(80vh - 80px);
    }

    .categories-bottom-modal .list-group-item {
        padding: 0.8rem 1rem;
    }
}

/* Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==================== END ENHANCED ARTICLES INDEX STYLING ==================== */

/* Notification selection styling */
.notification-item.selected {
    background-color: #e7f3ff;
    border-color: #007bff;
}

/* Selection buttons styling */
#deleteSelected {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#deleteSelected:hover {
    animation: none;
    transform: scale(1.05);
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* ==================== END NOTIFICATIONS MODAL SECTION ==================== */

/* ==================== SEARCH RESULTS PAGE STYLES ==================== */
/* Articles Results Info */
.articles-results-info {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.articles-results-count {
    font-weight: 600;
    color: #495057;
}

/* Search Results Specific Styles */
.search-results-header {
    margin-bottom: 1.5rem;
}

.search-results-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.search-results-meta {
    color: #6c757d;
    font-size: 1rem;
}

/* Enhanced grid styles - consistent across all pages */
.articles-grid {
    margin-bottom: 2rem;
}

.articles-grid > .col > .card {
    transition: all 0.38s cubic-bezier(0.25,0.46,0.45,0.94);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
    background: #fff;
}
.articles-grid > .col > .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 54px rgba(0,0,0,0.22);
    border-color: rgba(0,123,255,0.25);
}

/* Media */
.articles-grid > .col > .card .card-img-top { width:100%; object-fit:cover; max-height:210px; transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94); }
.articles-grid > .col > .card:hover .card-img-top { transform: scale(1.06); }
@media (max-width: 576px) { .articles-grid > .col > .card .card-img-top { max-height:170px !important; } }
@media (max-width: 420px) { .articles-grid > .col > .card .card-img-top { max-height:160px !important; } }

/* Body / Hover */
.articles-grid > .col > .card .card-body { transition: background 0.3s ease; }
.articles-grid > .col > .card:hover .card-body { background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(248,249,250,0.96) 100%); }

/* Title */
.articles-grid > .col > .card .card-title { font-size:1.05rem; font-weight:600; line-height:1.25; margin-bottom:0.65rem; transition:color .3s ease; }
.articles-grid > .col > .card .card-title a { color:#333; text-decoration:none; transition:color .3s ease; }
.articles-grid > .col > .card:hover .card-title a { color:#007bff !important; }

/* Read More / Primary buttons inside grid */
.articles-grid .card .btn-outline-primary,
.articles-grid .mobile-read-more {
    transition: all 0.3s ease;
    background: linear-gradient(135deg,#2a77ac 0%, #225f88 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.30);
}
.articles-grid .card .btn-outline-primary:hover,
.articles-grid .mobile-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,123,255,0.40);
    background: linear-gradient(135deg,#2a77ac 0%, #256894 100%);
}

/* Meta / Compact tweaks */
.articles-grid .author-name { font-size:0.72rem; }
.articles-grid time { font-size:0.62rem; }
.articles-grid .card .card-text { font-size:0.8rem; line-height:1.35; }

/* Utility: Ensure badges inside grid remain small */
.articles-grid .badge { font-size:0.55rem; letter-spacing:.5px; }

/* Remove legacy duplicate .articles-grid rules below by neutralizing (if any remain after build) */
/* (Intentionally left minimal; older definitions were deleted in consolidation step.) */

/* Mobile Read More Button for Articles Index */
@media (max-width: 767px) {
    .articles-grid .btn-outline-primary.btn-sm {
        border-radius: 8px !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        padding: 8px 16px !important;
        margin-top: 8px !important;
        transition: all 0.3s ease !important;
        border: 1.5px solid #007bff !important;
    }

    .articles-grid .btn-outline-primary.btn-sm:hover {
        background: #007bff !important;
        color: white !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
    }

    .articles-grid .btn-outline-primary.btn-sm:active {
        transform: translateY(0) !important;
    }
}

/* === Trending & Events Sidebar Compact Layout (scoped to avoid grid/footer impact) === */
.trending-sidebar .trending-list { display:flex; flex-direction:column; gap:0.85rem; }
.trending-sidebar .trending-item { display:flex; align-items:flex-start; gap:0.65rem; }
.trending-sidebar .trending-image { flex:0 0 70px; width:70px; height:55px; border-radius:8px; overflow:hidden; position:relative; background:#f1f3f5; }
.trending-sidebar .trending-thumbnail { width:100%; height:100%; object-fit:cover; display:block; }
.trending-sidebar .trending-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#e9ecef; color:#adb5bd; font-size:1.2rem; }
.trending-sidebar .trending-content { flex:1 1 auto; min-width:0; }
.trending-sidebar .trending-title { font-size:0.78rem; line-height:1.2; margin:0 0 4px; font-weight:600; }
.trending-sidebar .trending-title a { color:#222; text-decoration:none; }
.trending-sidebar .trending-title a:hover { color:#0d6efd; }
.trending-sidebar .trending-meta { font-size:0.62rem; color:#666; display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:2px; }
.trending-sidebar .trending-category i { font-size:0.55rem; }
.trending-sidebar .trending-author { font-size:0.6rem; color:#888; line-height:1.1; }
.trending-sidebar .trending-date { color:#999; }
.trending-sidebar .trending-card .card-body { padding:1rem 1rem 0.75rem; }

/* Homepage (index) mobile: equal card heights + tighter spacing */
@media (max-width: 576px){
    .homepage-content .articles-grid { --bs-gutter-x: .6rem; --bs-gutter-y: .6rem; }
    .homepage-content .articles-grid > .col > .card { display:flex; flex-direction:column; min-height: 320px; }
    .homepage-content .articles-grid > .col > .card .card-body { display:flex; flex-direction:column; }
        .homepage-content .articles-grid > .col > .card .card-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.6em; line-clamp:2; }
    .homepage-content .articles-grid > .col > .card .card-text { margin-top:auto; }
}

/* Events (reuse compact pattern) */
.events-card .events-list { display:flex; flex-direction:column; gap:0.9rem; }
.events-card .event-item { display:flex; align-items:flex-start; gap:0.65rem; }
.events-card .event-image { flex:0 0 70px; width:70px; height:55px; border-radius:8px; overflow:hidden; position:relative; background:#f1f3f5; }
.events-card .event-thumbnail { width:100%; height:100%; object-fit:cover; display:block; }
.events-card .event-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#e9ecef; color:#adb5bd; font-size:1.2rem; }
.events-card .event-status { position:absolute; top:4px; left:4px; }
.events-card .event-content { flex:1 1 auto; min-width:0; }
.events-card .event-title { font-size:0.75rem; line-height:1.2; margin:0 0 4px; font-weight:600; }
.events-card .event-title a { color:#222; text-decoration:none; }
.events-card .event-title a:hover { color:#0d6efd; }
.events-card .event-meta { font-size:0.6rem; color:#666; display:flex; flex-wrap:wrap; gap:0.55rem; margin-bottom:2px; }
.events-card .event-location { font-size:0.6rem; color:#666; margin-bottom:2px; }
.events-card .event-organizer { font-size:0.6rem; color:#888; line-height:1.1; }
.events-card .event-views { color:#888; }

/* Recent Events Section (mobile responsive) */
/* Structure: we'll treat the event-card as a flex column; image wrapper gets 50% height on mobile */
.recent-events-section .event-card { position:relative; display:flex; flex-direction:column; }
.recent-events-section .event-card .position-relative { position:relative; }
.recent-events-section .mobile-img-adjust { width:100%; height: 200px; object-fit:cover; display:block; }
.recent-events-section [data-mobile-height] { height:200px; }
.recent-events-section .event-card .event-card-body { flex:1 1 auto; display:flex; flex-direction:column; }

@media (max-width: 767px) {
    /* Card overall height target ~280px; image ~50% (increased) */
    .recent-events-section .event-card { min-height: 260px; }
    .recent-events-section .mobile-img-adjust { height: 240px !important; border-top-left-radius:8px; border-top-right-radius:8px; }
    .recent-events-section [data-mobile-height] { height:240px !important; border-top-left-radius:8px; border-top-right-radius:8px; overflow:hidden; }
    .recent-events-section .event-card-body { padding:0.55rem 0.65rem 0.15rem !important; }
    .recent-events-section .card-title { font-size:1.50rem !important; line-height:1.4 !important; margin:0 0 0.35rem !important; }
    .recent-events-section .card-text { font-size:0.95rem !important; line-height:1.4 !important; margin:0 0 0.35rem !important; }
    .recent-events-section .event-date-info, .recent-events-section .event-location-info { padding:0.22rem 0.4rem !important; font-size:0.62rem !important; margin:0 0 0.3rem !important; }
    .recent-events-section .event-date-info i, .recent-events-section .event-location-info i { font-size:0.7rem !important; }
    .recent-events-section .btn-sm { font-size:0.85rem !important; padding:0.35rem 0.6rem !important; }
}

/* Ensure images do not stretch full width accidentally inside generic .card rules */
.trending-sidebar .trending-image img,
.events-card .event-image img { display:block; }

/* Slight hover emphasis */
.trending-sidebar .trending-item:hover .trending-title a,
.events-card .event-item:hover .event-title a { color:#0d6efd; }

/* === Refined Stats Card (4 equal horizontal boxes) === */
.stats-card .card-body { padding:0.9rem 0.9rem 0.75rem; }
.stats-card .row { margin:0; }
.stats-card .stat-item { flex:1 1 0; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:0.55rem 0.35rem; border-radius:10px; border:1px solid #d8e4f1; background:linear-gradient(180deg,#ffffff 0%, #f0f6fb 100%); box-shadow:0 2px 4px rgba(15,23,42,0.05); transition:.25s ease; }
@media (min-width:992px){ .stats-card .row.g-3 { --bs-gutter-x:0.85rem; --bs-gutter-y:0.85rem; } }
.stats-card .stat-item:nth-child(1){ background:linear-gradient(135deg,#1d72f3 0%, #4797ff 100%); color:#fff; border:none; }
.stats-card .stat-item:nth-child(2){ background:linear-gradient(135deg,#0d9488 0%, #14b8a6 100%); color:#fff; border:none; }
.stats-card .stat-item:nth-child(3){ background:linear-gradient(135deg,#6366f1 0%, #818cf8 100%); color:#fff; border:none; }
.stats-card .stat-item:nth-child(4){ background:linear-gradient(135deg,#f59e0b 0%, #fbbf24 100%); color:#fff; border:none; }
/* Stats panel specific colors - targeting col divs */
.stats-card .col-6:nth-child(1) .stat-item{ background:linear-gradient(135deg,#1d72f3 0%, #4797ff 100%); color:#fff; border:none; }
.stats-card .col-6:nth-child(2) .stat-item{ background:linear-gradient(135deg,#0d9488 0%, #14b8a6 100%); color:#fff; border:none; }
.stats-card .col-6:nth-child(3) .stat-item{ background:linear-gradient(135deg,#6366f1 0%, #818cf8 100%); color:#fff; border:none; }
.stats-card .col-6:nth-child(4) .stat-item{ background:linear-gradient(135deg,#f59e0b 0%, #fbbf24 100%); color:#fff; border:none; }
.stats-card .stat-number { font-size:0.95rem; font-weight:700; color:inherit; margin-bottom:2px; }
.stats-card .stat-label { font-size:0.55rem; text-transform:uppercase; letter-spacing:.7px; font-weight:600; opacity:.95; color:rgba(255,255,255,0.95); }
.stats-card .stat-item:hover { transform:translateY(-3px); box-shadow:0 6px 18px rgba(0,0,0,0.18); }
.stats-card .stat-item:hover .stat-number { text-shadow:0 1px 2px rgba(0,0,0,0.15); }
.stats-card [data-stat="last-updated"] { margin-top:0.55rem; }
/* Mobile compact stats card adjustments */
@media (max-width: 991.98px){
    .mobile-stats-section .stats-card.my-4 { margin:0.35rem 0 0 !important; }
    .mobile-stats-section .stats-card { margin:0.35rem 0 0; }
    .mobile-stats-section .stats-card .card-header { padding:0.45rem 0.6rem 0.4rem; }
    .mobile-stats-section .stats-card .card-header .card-title { font-size:0.9rem; }
    .mobile-stats-section .stats-card .card-header .btn { padding:0.2rem 0.4rem; line-height:1; }
    .mobile-stats-section .stats-card .card-body { padding:0.45rem 0.55rem 0; }
    .mobile-stats-section .stats-card .row { --bs-gutter-x:0.65rem; --bs-gutter-y:0.55rem; }
    .mobile-stats-section .stats-card .stat-item { padding:0.4rem 0.25rem; }
    .mobile-stats-section .stats-card .stat-number { font-size:0.82rem; }
    .mobile-stats-section .stats-card .stat-label { font-size:0.48rem; }
    .mobile-stats-section .stats-card [data-stat="last-updated"] { display:block; margin:0.2rem 0 0 !important; font-size:0.55rem; }
}

/* Unified stats panel component */
.stats-panel { position:relative; }
.stats-panel-body { padding:0.75rem 0.9rem 0.35rem; }
.stats-panel--mobile .stats-panel-body { padding:0.4rem 0.55rem 0.15rem; }
.stats-panel--mobile { margin:0.25rem 0 0 !important; }
@media (max-width: 991.98px){
    .stats-panel--mobile .card-body { padding:0.45rem 0.55rem 0 !important; }
    .stats-panel--mobile [data-stat="last-updated"] { margin:0.18rem 0 0 !important; }
}

/* Further compact spacing for mobile stats panel */
@media (max-width: 991.98px){
    .stats-panel--mobile .card-header { padding:0.42rem 0.6rem 0.35rem !important; }
    .stats-panel--mobile .card-header .m-3 { margin:0.25rem !important; }
    .stats-panel--mobile .card-body { padding:0.35rem 0.45rem 0 !important; }
    .stats-panel--mobile .stat-item { padding:0.34rem 0.25rem !important; }
    .stats-panel--mobile .text-center.mt-3 { margin-top:0.28rem !important; }
    .stats-panel--mobile [data-stat="last-updated"] { margin:0.12rem 0 0 !important; }
}

/* Minimal Top Progress Bar (non-blocking) */
.top-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #2b8a3e, #12b886, #2b8a3e); box-shadow: 0 1px 3px rgba(0,0,0,.15); z-index: 3000; transition: width .2s ease; }
.top-progress.active { width: 80%; }
.top-progress.done { width: 100%; transition: width .15s ease; }

/* reCAPTCHA badge: minimized but still visible */
.grecaptcha-badge {
    position: fixed !important;
    right: 8px !important;
    bottom: 8px !important;
    transform: translateX(70%) scale(0.8) !important;
    opacity: 0.3 !important;
    transition: transform 0.3s ease, opacity 0.3s ease, scale 0.3s ease !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}
.grecaptcha-badge:hover,
.grecaptcha-badge:focus,
.grecaptcha-badge:focus-within {
    transform: translateX(0) scale(0.9) !important;
    opacity: 0.9 !important;
}

/* Mobile: smaller but still visible */
@media (max-width: 768px) {
    .grecaptcha-badge {
        transform: translateX(80%) scale(0.7) !important;
        opacity: 0.25 !important;
        right: 6px !important;
        bottom: 6px !important;
    }
    .grecaptcha-badge:hover,
    .grecaptcha-badge:focus,
    .grecaptcha-badge:focus-within {
        transform: translateX(0) scale(0.8) !important;
        opacity: 0.8 !important;
    }
}

/* On devices without hover (touch), make it reasonably visible */
@media (hover: none) {
    .grecaptcha-badge {
        transform: translateX(60%) scale(0.8) !important;
        opacity: 0.4 !important;
    }
}

/* Hero Carousel Mobile Fixes */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 3rem !important;
        line-height: 1.15 !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.75rem !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 320px) {
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.25 !important;
    }
}

/* Hero Description Mobile Truncation */
@media (max-width: 996px) {
    .hero-description {
        position: relative !important;
        max-width: 800px !important;
        margin: 0 auto 2rem auto !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
        text-align: center !important;
        word-wrap: break-word !important;
        overflow: hidden !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        max-height: none !important;
    }

    .hero-description::after {
        content: '' !important;
        position: absolute !important;
        bottom: 0 !important;
        right: 0 !important;
        width: 50px !important;
        height: 1.5em !important;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.8)) !important;
        pointer-events: none !important;
    }
}

/* Footer flush to bottom for mobile stats */
@media (max-width: 991.98px){
    .stats-panel--mobile .stats-footer { margin-top:0.2rem !important; padding-bottom:0 !important; }
    .stats-panel--mobile .stats-footer small[data-stat="last-updated"] { display:inline-block; padding-bottom:0; }
    .stats-panel--mobile.stats-card, .stats-panel--mobile.stats-card .card-body { margin-bottom:0 !important; }
}

/* =============================================================
     Global Mobile Card Body Compression
     Goal: Μείωση περιττού κάθετου κενού σε όλες τις κάρτες σε μικρές οθόνες.
     - Από προεπιλογή: μειώνεται το padding.
     - .tight-mobile ή wrapper .tight-mobile => ακόμη πιο «σφιχτό».
     - .no-mobile-compact => επιστροφή στο αρχικό (opt-out per card).
     Προσαρμόσιμο χωρίς να πειράξουμε κάθε Blade.
============================================================= */
@media (max-width: 767.98px){
    /* Default reduction */
    .card-body { padding:0.65rem 0.8rem 0.45rem; }
    /* Generic last child margin cleanup */
    .card-body > :last-child { margin-bottom:0 !important; }
    /* Tighter variant (add class either on card-body or any ancestor) */
    .card-body.tight-mobile, .tight-mobile .card-body { padding:0.5rem 0.65rem 0.35rem !important; }
    /* Ultra tight (if ever needed) */
    .card-body.xs-tight-mobile, .xs-tight-mobile .card-body { padding:0.4rem 0.55rem 0.25rem !important; }
    /* Opt-out / restore (apply to card-body) */
    .no-mobile-compact.card-body, .no-mobile-compact .card-body { padding:1rem 1.25rem 1rem !important; }
}

/* === Social Card Colored List === */
.sidebar-card.social-card .card-body { padding:1rem 1rem 1.1rem; }
.sidebar-card.social-card .sidebar-social-links { display:flex; flex-direction:column; gap:0.55rem; }
.sidebar-card.social-card .sidebar-social-link { display:flex; align-items:center; gap:0.55rem; font-size:0.75rem; font-weight:600; padding:0.55rem 0.75rem; border-radius:8px; color:#1e293b; text-decoration:none; position:relative; overflow:hidden; line-height:1.1; transition:.25s ease; }
.sidebar-card.social-card .sidebar-social-link i { width:22px; height:22px; display:flex; align-items:center; justify-content:center; font-size:1rem; }
.sidebar-card.social-card .sidebar-social-link.facebook { background:linear-gradient(135deg,#e8f1ff 0%, #cfe3ff 100%); }
.sidebar-card.social-card .sidebar-social-link.twitter { background:linear-gradient(135deg,#e6f6ff 0%, #c9ecff 100%); }
.sidebar-card.social-card .sidebar-social-link.instagram { background:linear-gradient(135deg,#fce3ff 0%, #f8c8ff 45%, #ffd1d1 100%); }
.sidebar-card.social-card .sidebar-social-link.youtube { background:linear-gradient(135deg,#ffe4e4 0%, #ffc9c9 100%); }
.sidebar-card.social-card .sidebar-social-link:hover { transform:translateX(4px); box-shadow:0 4px 10px rgba(0,0,0,0.08); }
.sidebar-card.social-card .sidebar-social-link:hover.facebook { color:#0b60d0; }
.sidebar-card.social-card .sidebar-social-link:hover.twitter { color:#0c7496; }
.sidebar-card.social-card .sidebar-social-link:hover.instagram { color:#c026d3; }
.sidebar-card.social-card .sidebar-social-link:hover.youtube { color:#b91c1c; }

/* Smaller screens tighten spacing */
@media (max-width: 991.98px){
  .trending-sidebar .stats-card .stat-number { font-size:0.9rem; }
  .sidebar-card.social-card .sidebar-social-link { font-size:0.72rem; }
}

/* === Footer Styling === */
.site-footer { background:#0f172a; color:#cbd5e1; padding:3rem 0 2rem; margin-top:3rem; font-size:0.85rem; }
.site-footer a { color:#e2e8f0; text-decoration:none; transition:color .25s ease; }
.site-footer a:hover { color:#38bdf8; }
.footer-container { width:100%; max-width:1240px; margin:0 auto; padding:0 1.25rem; }
.footer-content { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:2.25rem 2rem; margin-bottom:2.2rem; }
.footer-section h3 { font-size:1.05rem; font-weight:600; margin-bottom:0.85rem; color:#fff; position:relative; }
.footer-section h3::after { content:""; position:absolute; left:0; bottom:-6px; width:38px; height:2px; background:linear-gradient(90deg,#38bdf8,#0ea5e9); border-radius:2px; }
.footer-section p { line-height:1.4; margin:0 0 0.6rem; }
.footer-links { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:0.45rem; }
.footer-links li { line-height:1.2; }
.footer-links li a { font-size:0.78rem; }
.site-footer .social-links { margin:0.75rem 0 0; }
.site-footer .social-links a { width:34px; height:34px; border-radius:50%; border:1px solid rgba(255,255,255,0.18); display:flex; align-items:center; justify-content:center; font-size:0.95rem; background:rgba(255,255,255,0.06); backdrop-filter:blur(4px); transition:all .3s ease; }
.site-footer .social-links a:hover { background:#1e293b; border-color:#38bdf8; color:#38bdf8; }
.footer-bottom { border-top:1px solid rgba(148,163,184,0.2); padding-top:1.2rem; text-align:center; font-size:0.7rem; letter-spacing:.5px; }
.footer-bottom p { margin:0; color:#94a3b8; }

/* Footer responsive */
@media (max-width: 640px){
  .site-footer { padding:2.25rem 0 1.5rem; }
  .footer-content { gap:1.75rem 1.2rem; }
  .footer-section h3 { font-size:0.95rem; }
  .footer-links li a { font-size:0.72rem; }
  .site-footer .social-links { justify-content:flex-start; gap:0.4rem; }
}

/* ==================== PRODUCTION FIX: STAT-ITEM COLORS ==================== */
/* Force stat-item colors to apply in production - Added Nov 5, 2025 */
.stats-card .stat-item:nth-child(1) {
    background: linear-gradient(135deg, #1d72f3 0%, #4797ff 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .stat-item:nth-child(2) {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .stat-item:nth-child(3) {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .stat-item:nth-child(4) {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: #fff !important;
    border: none !important;
}

/* Alternative targeting for Bootstrap grid columns with !important */
.stats-card .col-6:nth-child(1) .stat-item {
    background: linear-gradient(135deg, #1d72f3 0%, #4797ff 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .col-6:nth-child(2) .stat-item {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .col-6:nth-child(3) .stat-item {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    color: #fff !important;
    border: none !important;
}

.stats-card .col-6:nth-child(4) .stat-item {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: #fff !important;
    border: none !important;
}

/* ==================== PRODUCTION FIX: MARKER POPUP STYLES ==================== */
/* Force marker popup styles to apply in production - Added Nov 5, 2025 */

/* Article map popup styles */
.leaflet-popup-content .article-map-popup,
.map-locations-wrapper .article-map-popup,
.article-map-popup {
    width: 100% !important;
    min-width: 250px !important;
    max-width: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.leaflet-popup-content .article-map-popup .popup-header,
.map-locations-wrapper .article-map-popup .popup-header,
.article-map-popup .popup-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.leaflet-popup-content .article-map-popup .popup-image,
.leaflet-popup-content .article-map-popup .popup-icon,
.map-locations-wrapper .article-map-popup .popup-image,
.map-locations-wrapper .article-map-popup .popup-icon,
.article-map-popup .popup-image,
.article-map-popup .popup-icon {
    flex-shrink: 0 !important;
    width: 50px !important;
    height: 40px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

.leaflet-popup-content .article-map-popup .popup-info,
.map-locations-wrapper .article-map-popup .popup-info,
.article-map-popup .popup-info {
    flex-grow: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.leaflet-popup-content .article-map-popup .popup-info h6,
.map-locations-wrapper .article-map-popup .popup-info h6,
.article-map-popup .popup-info h6,
.article-map-popup h6 {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin: 0 0 2px 0 !important;
    color: #212529 !important;
}

.leaflet-popup-content .article-map-popup .popup-info small,
.map-locations-wrapper .article-map-popup .popup-info small,
.article-map-popup .popup-info small,
.article-map-popup small {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin: 0 0 2px 0 !important;
    color: #6c757d !important;
}

.leaflet-popup-content .article-map-popup .popup-actions,
.map-locations-wrapper .article-map-popup .popup-actions,
.article-map-popup .popup-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.leaflet-popup-content .article-map-popup .popup-actions .btn,
.map-locations-wrapper .article-map-popup .popup-actions .btn,
.article-map-popup .popup-actions .btn,
.article-map-popup .btn {
    font-size: 10px !important;
    padding: 2px 6px !important;
    line-height: 1.4 !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

/* Business map popup styles */
.leaflet-popup-content .business-map-popup,
.map-locations-wrapper .business-map-popup,
.business-map-popup {
    width: 100% !important;
    min-width: 280px !important;
    max-width: 320px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.business-map-popup .popup-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.business-map-popup .popup-image,
.business-map-popup .popup-icon {
    flex-shrink: 0 !important;
    width: 60px !important;
    height: 45px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

/* Generic popup content styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 12px !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* === AJAX Sidebar Category Filtering Styles === */

/* Sidebar loading state */
.sidebar-card .sidebar-content.sidebar-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.sidebar-card .sidebar-content.sidebar-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Content loading state */
#articles-container.content-loading {
    position: relative;
    min-height: 200px;
}

/* Sidebar category hover effects */
.sidebar-card .list-group-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-card .list-group-item:hover {
    background-color: #f8f9fa;
}

.sidebar-card .list-group-item.active {
    background-color: #e3f2fd;
    border-color: #1976d2;
}

.sidebar-card .list-group-item.active a {
    color: #1976d2 !important;
    font-weight: 600;
}

/* Category image/icon styles */
.category-image-small,
.category-placeholder-small {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.category-placeholder-small {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-placeholder-small .category-icon {
    font-size: 12px;
    color: #6c757d;
}

/* Smooth transitions for category changes */
.sidebar-card .list-group-item a {
    transition: color 0.2s ease;
    text-decoration: none !important;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced active state for better visibility */
.sidebar-card .list-group-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #1976d2;
    border-radius: 0 2px 2px 0;
}

/* Mobile responsive adjustments for sidebar */
@media (max-width: 768px) {
    .sidebar-card .list-group-item {
        padding: 12px 16px;
    }

    .category-image-small,
    .category-placeholder-small {
        width: 20px;
        height: 20px;
    }

    .category-placeholder-small .category-icon {
        font-size: 10px;
    }
}


