/* ===========================
   Global Vars
=========================== */
:root {
  --primary-color: #ed1b24;
  /* Orange */
  --dark-color: #343a40;
  /* Dark grey */
  --black: #000000;
  --white: #ffffff;
  --font-family: 'Montserrat', sans-serif;
}

/* ===========================
   Header Base
=========================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 1000;
  position: relative;
  width: 100%;
  top: 0;
  transition: all 0.3s ease;
}

/* When scrolling */
.site-header.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  /* Slight transparent background */
  backdrop-filter: blur(10px);
  /* Glassy effect */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Optional - adjust for dark headers */
.site-header.scrolled.dark {
  background: rgba(34, 34, 34, 0.8);
  color: #fff;
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  padding: 12px 20px;
}

.logo {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.logo img {
  display: block;
  width: 179px;
  height: auto;
  position: relative;
  max-height: 100px;
}

/* Shimmer overlay */
.logo::after {
  content: "";
  position: absolute;
  top: -100%;
  right: -100%;
  width: 100%;
  height: 20%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(15deg);
  animation: silver-shine 2s linear infinite;
}

/* Animation path — bottom-right to top-left */
@keyframes silver-shine {
  0% {
    top: 100%;
    right: 100%;
  }

  100% {
    top: -100%;
    right: -100%;
  }
}

/* ===========================
   Desktop Nav
=========================== */
.main-nav ul {
  list-style: none;
  display: flex;
  column-gap: 14px;
  margin: 0;
  padding: 0;
}

.main-nav ul li {
  position: relative;
}

.main-nav ul li a {
  color: var(--dark-color);
  font-family: var(--font-family);
  text-decoration: none;
  padding: 6px 4px;
  transition: all 0.3s ease;
  font-weight: 500;
}

@media (min-width: 900px) {
  .main-nav ul li a {
    font-size: 1.1rem;
  }
}

.main-nav ul li a:hover {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* ===========================
   Dropdown
=========================== */
.main-nav .has-dropdown>.dropdown {
  display: none;
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 999;
}

@media (min-width: 900px) {
  li.has-dropdown ul li a {
    font-size: 16px;
  }

  .main-nav .has-dropdown>.dropdown {
    min-width: 300px !important;
  }
}

/* Carrot Arrow */
.main-nav .has-dropdown>.dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 24px;
  /* adjust to align under parent */
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--primary-color);
}

/* Show Dropdown */
.main-nav .has-dropdown:hover>.dropdown,
.main-nav .has-dropdown:focus-within>.dropdown {
  display: block;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown Items */
.dropdown li {
  margin: 0;
}

.dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--black);
  font-family: var(--font-family);
  text-decoration: none;
  transition: all 0.1s ease;
}

.dropdown li a:hover {
  background: var(--light);
  color: var(--primary-color);
}

/* ===========================
   Donate Button
=========================== */
.btn-donate {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-family);
  transition: all 0.3s ease;
  font-weight: 600;
  display: inline-block;
  box-shadow: 5px 5px 1px 0 var(--secondary-color);
  border: 2px solid white;
}

.btn-donate:hover {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 1px 1px 1px 0 var(--secondary-color);
}

/* Donate (inside mobile nav) */
.mobile-nav .btn-donate {
  display: block;
  margin: 0;
  font-size: 1.5rem;
  padding: 10px 12px;
  width: 40%;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--white);
}

/* ===========================
   Hamburger (Mobile)
=========================== */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary-color);
  z-index: 9999;
}

.hamburger .close-icon {
  display: none;
}

.hamburger.active .open-icon {
  display: none;
}

.hamburger.active .close-icon {
  display: inline;
}

/* ===========================
   Mobile Nav
=========================== */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: var(--white);
  transition: left 0.3s ease-in-out;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1em 0 0 1em;
}

.mobile-submenu.open {
  display: block;
}

.mobile-nav.active {
  left: 0;
}

/* Optional caret rotate */
.mobile-dropdown.open>a i {
  transform: rotate(180deg);
  transition: transform 0.25s ease;
}

.mobile-nav ul {
  list-style: none;
  text-align: left;
  margin: 0;
  padding: 0;
}

.mobile-nav ul li {
  margin: 20px 0;
}

.mobile-nav ul li a {
  color: var(--dark-color);
  font-size: 1.5rem;
  font-family: var(--font-family);
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  column-gap: 8px;
}

.mobile-nav ul li a:hover {
  color: var(--primary-color);
}

/* Mobile Dropdown */
.mobile-dropdown .mobile-submenu {
  display: none;
  background: rgba(0, 0, 0, 0.05);
  margin-top: 10px;
  padding-left: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.mobile-dropdown.active .mobile-submenu {
  display: block;
}

.mobile-dropdown .mobile-submenu li {
  margin: 15px 0;
}

.mobile-dropdown .mobile-submenu a {
  font-size: 1.2rem;
  color: var(--dark-color);
  display: block;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.mobile-dropdown .mobile-submenu a:hover {
  color: var(--primary-color);
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 992px) {

  .main-nav,
  .donate-btn {
    display: none !important;
  }

  .hamburger {
    display: block !important;
  }

  .header-grid {
    grid-template-columns: 1fr auto auto;
  }
}

@media (max-width: 500px) {
  .logo img {
    max-height: 60px;
    width: 100px;
  }
}

/* Drawer Styles (Moved from header.php) */
.submenu-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  max-width: 350px;
  height: 100%;
  background: #fff;
  z-index: 9999;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.has-dropdown svg {
  height: 0.8em;
}

.submenu-drawer.open {
  left: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.submenu-header {
  background: var(--primary-color);
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.submenu-header h3 {
  font-size: 1.2rem;
  margin: 0;
}

.close-submenu {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.submenu-list {
  list-style: none;
  padding: 20px;
  margin: 0;
}

.submenu-list li {
  border-bottom: 1px solid #eee;
}

.submenu-list a {
  display: block;
  padding: 12px 0;
  color: #333;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.submenu-list a:hover {
  color: var(--primary-color);
}