body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
}

/* ====== Header ====== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  background: #f5f1df;
  min-height: 48px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ====== Logos ====== */
.logo { /* Desktop Logo */
  width: 5%;
  max-width: 70px;
  min-width: 50px;
}
.mobile-logo { /* Mobile Logo */
  display: none; /* Hidden by default */
}
.logo img, .mobile-logo img {
  height: auto;
  width: 100%;
  display: block;
}

/* ====== Navbar (Desktop) ====== */
nav {
  flex: 1;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 7%;
}
nav ul li a {
  text-decoration: none;
 font-size: clamp(10px, 1.3vw, 20px);
  font-weight: bold;
  color: #DD4760;
  padding: 5px 0;
}


/* ====== Search Box ====== */
/* .search-container {
  position: relative;
  max-width: 300px;
  flex-shrink: 0;
}
.search-container input {
  width: 100%;
  padding: 8px 35px 8px 15px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
}
.search-container .fa-search {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  pointer-events: none;
  font-size: 16px;
} */

/* ====== Search Box ====== */
.search-container {
  position: relative;
  max-width: 300px;
  flex-shrink: 0;
}
.search-container input {
  width: 100%;
  padding: 8px 35px 8px 15px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
}
.search-container .fa-search {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  pointer-events: none;
  font-size: 16px;
}

/* ====== New Search Results Styling ====== */
.search-results-container {
  position: absolute;
  top: calc(100% + 5px); /* Position below the search bar */
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1100;

  /* Animation: Initially hidden */
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-results-container.active {
  /* Animation: Make it visible */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-result-item {
  padding: 12px 18px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: #333;
  display: block;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f9f9f9;
}

.result-title {
  font-weight: bold;
  font-size: 1em;
  color: #DD4760;
}

.result-snippet {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
  /* Truncate long snippets */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results {
    padding: 15px 18px;
    color: #888;
    text-align: center;
}


/* ====== Hamburger Menu ====== */
.menu-toggle {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* ======================================= */
/* ====== Mobile & Tablet Styles ====== */
/* ======================================= */
@media (max-width: 900px) {
  /* This value should be the height of your mobile header */
  :root {
    --header-height-mobile: 68px;
  }
  
  header {
    padding: 10px 20px;
    min-height: calc(var(--header-height-mobile) - 20px);
  }
  
  /* Show mobile elements and hide desktop ones */
  .logo { display: none; }
  .mobile-logo { 
    display: block; 
    height: 40px; /* Made the logo bigger */
    order: 2; 
    flex: 1; 
    text-align: center; 
  }
  .mobile-logo img { height: 100%; width: auto; }
  .menu-toggle { display: flex; order: 1; }
  .search-container { max-width: 120px; order: 3; }
  .menu-toggle .fa-bars { font-size: 24px; color: #DD4760; }
  
  /* Re-implementing the slide-in menu from the left */
  nav {
    display: flex;
    position: fixed;
    /* Positioned to start right below the header */
    top: var(--header-height-mobile); 
    left: 0;
    width: 70%;
    max-width: 320px;
    /* Fill the remaining vertical space */
    height: calc(100vh - var(--header-height-mobile)); 
    background: #f5f1df;
    flex-direction: column;
    padding: 40px 30px;
    box-sizing: border-box;
    box-shadow: 4px 0px 15px rgba(0, 0, 0, 0.15);
    z-index: 999; /* Below the header */

    /* Animation: Initially hidden off-screen */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  /* When active, slide the menu into view */
  nav.active {
    transform: translateX(0);
  }

  /* Style the links inside the side menu */
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
  }
  nav ul li a {
    padding: 0; /* Reset padding from desktop */
    font-size: 18px;
  }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}