/* ========== Topbar Layout ========== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px;
    background: white;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
  }
  
  body.admin-bar .topbar {
    top: 32px;
  }
  @media screen and (max-width: 782px) {
    body.admin-bar .topbar {
      top: 46px;
    }
  }
  
  /* ========== Main Menu ========== */
  .main-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .main-menu li {
    position: relative;
  }
  
  .main-menu li a {
    font-family: 'Antic Didone', serif;
    font-weight: 700;
    font-size: 1em;
    text-decoration: none;
    color: black;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 10px 0;
  }
  
  .main-menu li a:hover {
    color: gray;
  }
  
  /* ========== Dropdown for Desktop ========== */
  .main-menu .menu-item-has-children:hover .sub-menu {
    display: block;
  }
  
  .main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 1rem;
    list-style: none;
    min-width: 200px;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  .main-menu .sub-menu li {
    margin-bottom: 10px;
  }
  
  .main-menu .sub-menu li a {
    font-weight: 600;
    padding: 8px 12px;
    display: block;
    color: black;
    transition: background 0.3s ease;
  }
  
  .main-menu .sub-menu li a:hover {
    background: #f5f5f5;
    color: gray;
  }
  
  /* ========== Hamburger Button ========== */
  .menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 2001;
  }
  
  .menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #000;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
  }
  
  .menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
    @media (min-width: 768px) {
    .logo {
        position: absolute;
        left: 50%;
        top: 50%; /* Adjust vertically as needed */
        transform: translateX(-50%) translateY(-50%);
        z-index: 1500; /* Make sure it sits above other elements */
      }
    }
  /* ========== Mobile Nav Styles ========== */
@media (max-width: 768px) {
    body {
      padding-top: 0px; /* Ensure space below fixed topbar */
    }
  
    .topbar {
      flex-direction: column;
      align-items: stretch;
      padding: 10px 20px;
      height: auto;
      overflow: visible;
      z-index: 1000;
      width: 92%;
      margin: 0 auto;
    }
  
    .logo {
      position: relative;
      transform: none;
      margin: 50px auto 0px 0px;
    }
  
    .social-top,
    .social-top-search {
      position: static;
      margin-top: 10px;
    }
  
    .menu-toggle {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 50px;
      height: 22px;
      background: none;
      border: none;
      cursor: pointer;
      position: absolute;
      right: 30px;
      top: 25px;
      z-index: 2001;
    }
  
    .menu-toggle .bar {
      height: 3px;
      width: 100%;
      background-color: #000;
      border-radius: 3px;
      transition: all 0.3s ease-in-out;
    }

    
  
    .menu-toggle.open .bar:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
  
    .menu-toggle.open .bar:nth-child(2) {
      opacity: 0;
    }
  
    .menu-toggle.open .bar:nth-child(3) {
      transform: rotate(-45deg) translate(7px, -7px);
    }
  
    .nav-links {
        position: relative; /* keep from your last fix */
        width: 100% !important; /* force full width */
        display: flex !important;  /* force flexbox display */
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
      flex-direction: column;
      z-index: 999;
    }
  
    .nav-links.open {
      max-height: 1000px; /* enough space for large menus */
    }

    .nav-links {
        min-width: 100%; /* avoid collapsing */
      }
      
  
    .main-menu {
      flex-direction: column;
      padding: 0;
      gap: 0;
    }
  
    .main-menu li {
      width: 100%;
      text-align: center;
      padding: 10px 0;
    }
  
    .main-menu li.menu-item-has-children > a::after {
      content: " ▼";
      font-size: 0.8em;
    }
  
    .main-menu .sub-menu {
      position: static;
      display: none;
      background: #f9f9f9;
      box-shadow: none;
      padding: 0;
    }
  
    .main-menu li.open > .sub-menu {
      display: flex;
      flex-direction: column;
    }
  
    .main-menu .sub-menu li a {
      padding-left: 20px;
      text-align: center;
    }
  }
  