.nav-brand {
    color: var(--text-def);
}

.nav-brand:hover {
    color: var(--text-def);

}

.floating-btn {
    display: none;
    position: fixed;
    bottom: 0;
    right: 1em;
    z-index: 1000;
    padding: 0.5em;
    /* border: 1px solid black; */
    background-color: rgb(0 0 0 / 50%);
    border-radius: 5px;
    margin-bottom: 15vh;

/* Animation Properties */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;    
}

/* The class our JavaScript will toggle */
.floating-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.floating-btn:hover{
    background-color: rgba(0, 0, 0, 0.397);;
}

.fa-arrow{
    color: #2694d9;
}



.f-btn {
    display: none;
    position: fixed;
    bottom: 0;
    right: 1em;
    padding-bottom: 1em;
    z-index: 1000;
}

.my-button {
    anchor-name: --my-button;
}

#my-element {
    position: fixed;
    position-anchor: --my-button;
    position-area: top span-right;
    text-align: center;
}


.nav-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px 0px;
}

.nav-section-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 1rem;
}

.nav-section-links {
    display: flex;
    gap: 0.2rem;
    text-decoration: none;
    list-style: none;
    height: 100%;
}

.nav-section-link-mobile{
    display: flex;
    flex-direction: column;
}

.nav-section-links li {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    height: 100%;
    align-content: center;
}

.nav-section-links li:hover {
    background-color: var(--text-def-hover);
}

.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    /* left: 0; */
    min-width: 190px;
    background: var(--evhrdc-bg);
    /* border: 1px solid rgba(255, 255, 255, 0.08); */
    /* border-top: 2px solid var(--rust); */
    /* border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.4); */
    z-index: 200;
    padding: 0.4rem 0;
    list-style: none;
    margin: 0;
    transform: translateX(-0.5rem);
    padding-bottom: 10px;
}

/* .nav-item.has-sub:hover>.submenu {
    display: block;
} */

.nav-item.has-sub:hover>.nav-submenu {
    display: block;
}

/* .nav-item:hover{
    cursor: pointer;
} */



.nav-item > a {
    color: var(--text-def);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    align-content: center;
}

.sub-menu { display: none; }

.sub-menu.is-open { 
    display: block; 
    background: white;
}

.sub-menu.is-open > li:hover{
    background:#dfdfdf;
}

.sub-menu-item>a {
    color: var(--text-def);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    align-content: center;    
}

li.sub-menu-item {
    line-height: 2.5rem;
}

/* Search Form */

/* ── HEADER SEARCH ──────────────────────────────── */
.header-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    max-height: 2.5rem;
    height: 100%;
}



.header-search-input {
    background: transparent;
    border: none !important;
    outline: none !important;
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    /* font-size: 0.82rem; */
    /* padding: 0.45rem 0.85rem; */
    width: 200px;
    transition: width 0.3s ease;
    padding: 0;
    padding-left: 0.5rem;
    height: 100%;
}

.header-search-input::placeholder {
    color: var(--text-def);
}

.mobile-container{
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Mobile navigation rules */
/* 1. The Container - Now floats over the content */
.mobile-nav {
    display: none;
    position: sticky;
    /* Keeps the absolute menu pinned to the header */
    z-index: 1000;
    /* Ensures it stays on top of images/text */
}

.mobile-section {
    position: absolute;
    /* This is the magic fix for the "vibration" */
    top: 100%;
    /* Starts exactly at the bottom of the nav bar */
    left: 0;
    right: 0;
    background: white;
    /* Give it a solid background so text doesn't overlap */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    /* Optional: adds depth */

    max-height: calc(100vh - 120px);
    overflow-y: auto;



    /* Animation Logic */
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-in-out;
    /* overflow: hidden; */

    /* padding: 1.5rem; */
}

/* 2. The Inner Wrapper */
.mobile-section-inner {
    min-height: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    /* padding-bottom: 20px; */
}


.mobile-section-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    /* text-align: center; */
}

.mobile-section-inner li {
    margin-bottom: 2px;
}

.mobile-section-inner a {
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    color: inherit;
    /* Keeps your current text color */
    /* border: 1px solid black; */
}

/* Indent the nested sub-menu (Who Are We, etc.) slightly */
.mobile-section-inner ul ul {
    /* padding-left: 20px; */
    margin-top: 5px;
}


/* 3. The Open State */
.mobile-section.is-open {
    grid-template-rows: 1fr;
}

.mobile-section.is-open .mobile-section-inner {
    opacity: 1;
}


.mobile-search-container {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.mobile-search-container input {
    width: 100%;
    height: 60px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 1.5rem;
}



.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--text-def);
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-def);
  font-size: 1.1rem;
}

/* Optional: Rotate the hamburger icon when open */
.nav-toggle.active {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.sub-menu li {
    padding-left: 2rem;
}


/* Responsive layouts */
@media (max-width: 1024px) {
    .sub-header{
        display: none;
    }

    .f-btn{
        display: flex;
    }
    
    .web-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        flex-direction: row;
    }

    .nav-toggle {
        display: flex;
    }

    .ts-div {
        display: none;
    }
}

/* floating theme switcher */
/*  */
.ts-div {
    position: fixed;   /* Makes it float on the screen */
    top: 50%;      /* Distance from bottom */
    right: 20px;       /* Distance from right */
    z-index: 2000;
}

.ts-btn {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 50px;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ts-menu {
    position: absolute;
    bottom: calc(100% + 10px); /* Pops UP. Change to 'top: 100%' to pop DOWN */
    right: 0;
    
    /* Reset List Styles */
    list-style: none;
    padding: 10px 0;
    margin: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 120px;

    /* Animation Logic */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
}

/* Shown State */
.ts-menu.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ts-menu li {
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.ts-menu li:hover {
    background: #f0f0f0;
}

.sub-nav{
    z-index: 10;
}


/* Hover effects */

.mobile-menu > li:hover{
    background: rgb(223, 223, 223);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="high-contrast"] .site-nav {
  border-bottom: 2px solid var(--border-strong);
  backdrop-filter: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.nav-brand {
  /* font-family: 'Playfair Display', Georgia, serif; */
  font-size: 1.50rem;
  font-weight: 700;
  color: var(--text-inverse);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Lora', Georgia, serif;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

/* Mobile drawer — hidden on desktop */
.mobile-drawer {
    display: none;
}

/* Mobile search hidden on desktop */
.mobile-search {
    display: none;
}


@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .sidebar-content{
    border-top: 2px solid gray;
    padding-top: 2.5em;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-default);
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.6rem 0.75rem;
  }
}


/* @media (max-width: 400px){
    .custom-announcement{
        height: 150px;
    }
} */

.mobile-search-btn {
    display: flex;
    font-size: 1.5rem;
    align-items: center;
    width: 70px;
    justify-content: center;
}



/* my floating theme button */
