/* --- HEADER STYLES (Material 3 Inspired with Direct Color Codes) --- */

/* This body padding creates space for the floating header */
body {
  /* 75px for the header height + 20px margin = 95px */
  padding-top: 95px;
  font-family: "Poppins", sans-serif;
  background-color: #f0f2f5;
}

.main-header {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 98%;
  max-width: 1200px;
  z-index: 1000;
  height: 75px; /* --header-height */

  background: rgba(255, 255, 255, 0.808);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  display: flex;
  align-items: center;
  padding: 0 15px 0 30px;
  transition: all 0.3s ease-in-out;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* --- LOGO STYLING --- */
.logo img {
  height: 60px;
  transition: transform 0.3s ease;
  object-fit: cover; /* This crops the image to fill the container */
  border-radius: 50%;
}

.logo:hover img {
  transform: scale(1.05);
}

/* --- NAVIGATION STYLING (M3 Style) --- */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-link {
  color: #60696e; /* --text-muted-color */
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 100px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #000000; /* --text-color */
  background-color: rgba(255, 255, 255, 0.567);
}

.nav-link.active {
  color: #000000; /* --primary-color */
  background-color: rgb(145, 198, 60);
}

.nav-link .dropdown-arrow {
  font-size: 0.7em;
  transition: transform 0.3s ease;
}

/* --- DROPDOWN MENU (M3 Style) --- */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 125%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;

  background: rgba(40, 43, 51, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 16px;
  list-style: none;
  padding: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

.dropdown-menu li a {
  padding: 10px 15px;
  color: #bdc3c7; /* --text-muted-color */
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: rgba(145, 198, 60, 0.2);
  color: #91c63c; /* --primary-color */
}

/* --- CTA BUTTON --- */
.btn-cta {
  background: #91c63c; /* --primary-color */
  color: #1a1d24; /* --dark-bg */
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(145, 198, 60, 0.4);
}

.btn-cta:hover {
  background: #a4e04b; /* --primary-hover-color */
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(145, 198, 60, 0.6);
}

/* --- CSS-ONLY MOBILE MENU (M3 Style) --- */
.menu-toggle-checkbox {
  display: none;
}
.menu-toggle {
  display: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
}
.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ecf0f1; /* --text-color */
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
  .main-header {
    padding: 0 10px;
  }
  .nav-list {
    position: fixed;
    top: 90px; /* 75px header height + 15px gap */
    right: -100%;
    width: 320px;
    height: auto;
    max-height: calc(100vh - 105px);
    overflow-y: auto;

    background: rgba(26, 29, 36, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 20px;
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.2);

    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 10px;
    transition: right 0.3s ease-in-out;
  }

  .main-header {
    width: 95%;
  }

  .nav-link {
    justify-content: flex-start;
  }

  .cta-item {
    padding-top: 20px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
  }

  .btn-cta {
    width: 100%;
    justify-content: center;
    padding: 15px;
  }

  .dropdown-menu {
    position: static;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
    padding: 10px 0 0 20px;
    min-width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-item-dropdown:hover .dropdown-menu {
    display: block;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle-checkbox:checked ~ .nav-list {
    right: 2.5%;
  }

  .menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle-checkbox:checked + .menu-toggle .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}
