  /* Custom styles to match OpenLink's brand palette and overall feel */
  body {
      font-family: 'Inter', sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
  }

  /* Defining brand colors for reuse in Tailwind config (or direct use) */
  :root {
      --ols-blue-dark: #003366;
      /* The classic OpenLink navy */
      --ols-blue-medium: #336699;
      /* A lighter, accent blue */
      --ols-button-hover: #002244;
      /* A slightly darker navy for hover states */
  }

  /* Applying brand colors using Tailwind's @apply directive for consistency */
  .bg-ols-blue-dark {
      background-color: var(--ols-blue-dark);
  }

  .bg-ols-blue-medium {
      background-color: var(--ols-blue-medium);
  }

  .text-ols-blue-dark {
      color: var(--ols-blue-dark);
  }

  .text-ols-blue-medium {
      color: var(--ols-blue-medium);
  }

  .border-ols-blue-dark {
      border-color: var(--ols-blue-dark);
  }

  .hover\:bg-ols-button-hover:hover {
      background-color: var(--ols-button-hover);
  }

  /* Custom style for the subtle hero pattern */
  .hero-pattern {
      background-image: linear-gradient(rgba(0, 51, 102, 0.95), rgba(0, 51, 102, 0.95)), url("https://www.transparenttextures.com/patterns/cubes.png");
  }

  /* Adding a subtle transition to buttons and links for a smoother feel */
  .btn,
  .nav-link {
      transition: all 0.2s ease-in-out;
  }

  header.bg-gradient {
      background: linear-gradient(to bottom, #698EB4, #369, #369, #698EB4) !important;
  }

  .second-level-nav .nav-link {
      color: #fff;
  }

  .second-level-nav .dropdown-menu {
      background-color: #2a4d6c;
  }

  .second-level-nav .dropdown-item {
      color: #fff;
  }

  .second-level-nav .dropdown-item:hover {
      background-color: #123;
  }

  .navbar .nav-link:hover {
      color: #000 !important;
  }


  body {
      font-family: Montserrat, Helvetica, Arial, "Noto Sans", sans-serif;
      font-weight: 200;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
      font-weight: 300;
  }

  .lead {
      font-weight: 300;
  }

  a {
      color: #0d6efd;
      text-decoration: none !important;
  }

/* CSS for dropdown submenu */

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .submenu {
    display: none;
    position: absolute;
    left: calc(100% - 4px);
    top: -0.5rem;
    min-width: 220px;
    z-index: 1000;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    margin-left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    animation: submenuSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes submenuSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dropdown-submenu:hover .submenu,
.dropdown-submenu .submenu:hover {
    display: block;
}

.dropdown-submenu:hover > .dropdown-toggle {
    background-color: #0071e3;
    color: #fff !important;
}

/* Float submenu carets to the right for uniform alignment */
.dropdown-submenu .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding-right: 2rem;
}

.dropdown-submenu .dropdown-toggle::after {
    position: absolute;
    right: 0.875rem;
    border: none;
    content: "";
    width: 0.4em;
    height: 0.4em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin: 0;
    flex-shrink: 0;
}

/* ========================================
   News Banner Styles
   ======================================== */

.news-banner {
    background-image: linear-gradient(rgba(0, 51, 102, 0.95), rgba(0, 51, 102, 0.95)), url("https://www.transparenttextures.com/patterns/cubes.png");
    transition: all 0.3s ease-in-out;
    min-height: 1.75rem;
    max-height: 3rem;
    overflow: hidden;
}

.news-banner.hidden {
    max-height: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Mobile-specific news banner adjustments */
@media (max-width: 768px) {
    .news-banner {
        min-height: 2rem;
        max-height: 4rem;
        padding: 0.375rem 1rem;
    }

    .news-banner-inner {
        min-height: 1.75rem;
        padding-right: 2.5rem;
    }

    .news-carousel-container {
        min-height: 1.75rem;
    }

    .news-item {
        padding: 0 0.5rem;
    }

    .news-title {
        font-size: 0.875rem;
    }

    .news-text {
        font-size: 0.8125rem;
    }
}

.news-banner-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    padding-right: 3rem;
}

.news-carousel-container {
    text-align: center;
    min-height: 1.5rem;
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-item {
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    padding: 0 1rem;
}

.news-link {
    color: #ffffff;
    text-decoration: none;
    display: inline;
    transition: opacity 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.news-title {
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline;
}

.news-text {
    font-weight: 400;
    font-size: 0.875rem;
    opacity: 0.95;
    display: inline;
}

.news-close-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    transition: color 0.2s ease;
    z-index: 10;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 400;
    transform: translateY(-50%);
}

.news-close-btn:hover {
    color: rgba(255, 255, 255, 1);
}

/* ========================================
   Apple-Inspired Menu Enhancements
   ======================================== */

/* Header refinements */
header.bg-white {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mainHeader {
    position: sticky;
    top: 0;
    z-index: 1040;
}

#mainHeader .bg-light {
    backdrop-filter: saturate(180%) blur(20px);
    background-color: rgba(255, 255, 255, 0.72) !important;
}

header .bg-light {
    background-color: rgba(248, 249, 250, 0.8) !important;
    backdrop-filter: saturate(180%) blur(20px);
}

/* Navbar brand logo refinement */
.navbar-brand {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Desktop layout - utilities on right */
@media (min-width: 992px) {
    .navbar {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }

    .navbar-brand {
        flex-shrink: 0;
        margin-right: 0 !important;
    }

    .navbar-toggler {
        display: none;
    }

    .navbar-collapse {
        flex-grow: 1;
        display: flex !important;
        justify-content: center;
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0 1rem;
    }

    #primaryNavMenu {
        display: flex;
        justify-content: center;
        width: auto;
    }

    #primaryNavMenu .navbar-nav {
        flex-direction: row;
        align-items: center;
        width: auto;
    }

    .desktop-utilities {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
        margin-left: auto;
    }

    .desktop-utilities .nav-link {
        color: #1d1d1f !important;
        padding: 0.5rem !important;
        border-radius: 0.5rem;
    }

    .desktop-utilities .nav-link:hover {
        color: #000 !important;
        background-color: rgba(0, 0, 0, 0.04);
    }

    .mobile-profile-menu {
        display: none !important;
    }

    /* Reset mobile-specific styles on desktop */
    .navbar-nav .nav-item {
        border-bottom: none;
        width: auto;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.875rem !important;
        width: auto;
    }

    .navbar-nav .dropdown-menu {
        position: absolute !important;
        width: auto;
    }
}

/* Primary navigation items */
.navbar-nav {
    gap: 0.25rem;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 0.5rem 0.875rem !important;
    color: #1d1d1f !important;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #000 !important;
}

.navbar-nav .nav-link:active {
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(0.98);
}

/* Dropdown toggle refinement */
.navbar-nav .dropdown-toggle::after {
    border: none;
    content: "";
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    margin-left: 0.4em;
    vertical-align: 0.1em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.navbar-nav .dropdown.show .dropdown-toggle::after {
    transform: rotate(-135deg);
}

/* Show dropdown on hover - Desktop only */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu,
    .navbar-nav .dropdown-menu:hover {
        display: block;
    }

    .navbar-nav .dropdown > .dropdown-menu {
        margin-top: 0 !important;
    }
}

/* Mobile dropdown behavior */
@media (max-width: 991px) {
    .navbar-nav .dropdown > .dropdown-menu {
        display: none;
    }

    .navbar-nav .dropdown.show > .dropdown-menu {
        display: block;
    }
}

/* Dropdown menu styling */
.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    margin-top: 0 !important;
    min-width: 220px;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1060;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    color: #1d1d1f;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.125rem;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item:hover {
    background-color: #0071e3;
    color: #fff !important;
    transform: translateX(2px);
}

.dropdown-item:active {
    background-color: #0077ed;
    transform: scale(0.98);
}

/* Submenu enhancements */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    display: none;
    position: absolute;
    left: calc(100% - 4px);
    top: -0.5rem;
    min-width: 220px;
    z-index: 1060;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    margin-left: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    animation: submenuSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes submenuSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dropdown-submenu:hover .dropdown-menu,
.dropdown-submenu .dropdown-menu:hover {
    display: block;
}

.dropdown-submenu:hover > .dropdown-toggle {
    background-color: #0071e3;
    color: #fff !important;
}

.dropdown-submenu .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding-right: 2rem;
}

.dropdown-submenu .dropdown-toggle::after {
    position: absolute;
    right: 0.875rem;
    border: none;
    content: "";
    width: 0.4em;
    height: 0.4em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin: 0;
}

/* Search and utility icons */
.nav-link .bi-search {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.nav-link:hover .bi-search {
    transform: scale(1.1);
}

/* Profile dropdown refinement */
#blogsDropdown {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem !important;
}

/* Secondary menu bar */
nav.navbar-light.flex-grow-1 {
    background-color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#SecondaryMenuHolder .navbar-nav {
    gap: 0.125rem;
}

#SecondaryMenuHolder .nav-link {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem !important;
    font-weight: 400;
}

/* Mobile menu refinements */
.navbar-toggler {
    border: none;
    padding: 0.375rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.navbar-toggler:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.navbar-toggler:focus {
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.06);
}

/* Smooth transitions for all interactive elements */
.nav-link,
.dropdown-item,
.navbar-brand,
.navbar-toggler {
    -webkit-tap-highlight-color: transparent;
}

/* Focus states for accessibility */
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Divider for dropdown sections (if needed) */
.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ========================================
   Responsive Menu Enhancements
   ======================================== */

/* Mobile-first responsive adjustments */
@media (max-width: 991.98px) {
    /* Hide secondary menu on mobile */
    nav.navbar-light.flex-grow-1 {
        display: none;
    }

    /* Top navbar adjustments */
    .navbar {
        flex-wrap: nowrap;
    }

    .navbar-brand {
        margin-right: auto !important;
    }

    .navbar-toggler {
        order: 3;
        margin-left: 0.5rem;
        border: none;
        padding: 0.5rem;
    }

    /* Mobile shop cart holder */
    #mobileShopCartHolder {
        display: flex;
        align-items: center;
        order: 2;
        margin-left: auto;
    }

    #mobileShopCartHolder #oplShopCart {
        margin-right: 0.5rem;
    }

    /* Mobile collapsed menu styling */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(20px);
        margin-top: 0;
        padding: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 1000;
    }

    /* Mobile profile menu at top */
    .mobile-profile-menu {
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
        padding: 0;
    }

    .mobile-profile-menu .nav-item {
        border-bottom: none;
    }

    .mobile-profile-menu .nav-item > .d-flex {
        background-color: rgba(0, 0, 0, 0.02);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .mobile-profile-menu .navbar-link {
        color: #1d1d1f;
        text-decoration: none;
    }

    .mobile-profile-menu #mobileProfilelink {
        color: #0071e3;
        font-weight: 500;
    }

    /* Stack navigation items vertically */
    .navbar-nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin: 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    /* Mobile navigation links - full width */
    .navbar-nav .nav-link {
        padding: 1rem 1.25rem !important;
        font-size: 1.0625rem;
        font-weight: 400;
        color: #1d1d1f !important;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active {
        background-color: rgba(0, 0, 0, 0.04);
        transform: none;
    }

    /* Mobile dropdown toggle arrow */
    .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.2s ease;
    }

    .navbar-nav .dropdown.show > .dropdown-toggle::after {
        transform: rotate(-135deg);
    }

    /* Mobile dropdown menu - inline expansion */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.02);
        padding: 0;
        margin: 0;
        width: 100%;
        animation: none;
        float: none;
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 0.875rem 1.25rem 0.875rem 2.5rem;
        font-size: 1rem;
        font-weight: 400;
        border-radius: 0;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        color: #424245;
        width: 100%;
        text-align: left;
    }

    .navbar-nav .dropdown-menu .dropdown-item:last-child {
        border-bottom: none;
    }

    .navbar-nav .dropdown-menu .dropdown-item:hover,
    .navbar-nav .dropdown-menu .dropdown-item:active {
        background-color: rgba(0, 0, 0, 0.04);
        color: #1d1d1f !important;
        transform: none;
    }

    /* Mobile submenu styling - deeper indentation */
    .dropdown-submenu .dropdown-menu {
        position: static !important;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.02);
        backdrop-filter: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        opacity: 1;
        transform: none;
        animation: none;
        border: none;
        float: none;
    }

    .dropdown-submenu .dropdown-menu .dropdown-item {
        padding-left: 3.5rem;
        background-color: transparent;
    }

    .dropdown-submenu.show > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu.show > .dropdown-toggle {
        background-color: rgba(0, 0, 0, 0.04);
        color: #1d1d1f !important;
    }

    .dropdown-submenu .dropdown-toggle::after {
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .dropdown-submenu.show > .dropdown-toggle::after {
        transform: rotate(-135deg);
    }

    /* Ensure proper nesting display */
    #primaryNavMenu {
        width: 100%;
    }

    #primaryNavMenu > .navbar-nav {
        width: 100%;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }

    .dropdown-menu {
        min-width: 200px;
    }
}

/* Large desktop optimizations */
@media (min-width: 1200px) {
    .navbar-nav {
        gap: 0.375rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }

    .dropdown-menu {
        min-width: 240px;
    }

    .dropdown-submenu .submenu {
        min-width: 240px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .navbar-nav .nav-link:hover {
        background-color: transparent;
    }

    .dropdown-submenu:hover > .dropdown-toggle {
        background-color: transparent;
        color: inherit;
    }

    /* Adjust for touch targets */
    .navbar-nav .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Keep active states for touch feedback */
    .navbar-nav .nav-link:active,
    .dropdown-item:active {
        background-color: rgba(0, 113, 227, 0.1);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on retina displays */
    .dropdown-menu,
    .dropdown-submenu .submenu {
        border: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .dropdown-menu,
    .dropdown-submenu .submenu {
        animation: none !important;
        transition: none !important;
    }

    .navbar-brand,
    .nav-link,
    .dropdown-item {
        transition: none !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* These styles would be applied if dark mode is implemented */
    /* .dropdown-menu { background-color: rgba(0, 0, 0, 0.9); } */
    /* .dropdown-item { color: #fff; } */
}

/* Landscape mobile adjustments */
@media (max-width: 767.98px) and (orientation: landscape) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }

    .dropdown-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Print styles */
@media print {
    .dropdown-menu,
    .dropdown-submenu .submenu {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        background: white !important;
        border: 1px solid #ccc !important;
    }
}

