/* AmSnacks — base reset & shared interactive styles */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  color: #201F1D;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ---------- Header navigation ---------- */

.nav-link {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 0.94rem;
  text-decoration: none;
  color: #201F1D;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: #1A3A73;
  border-bottom: 2px solid #E0332B;
}

.nav-active {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  color: #1A3A73;
  padding-bottom: 4px;
  border-bottom: 2px solid #E0332B;
  white-space: nowrap;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown .dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(26, 58, 115, 0.16);
  padding: 8px;
  min-width: 160px;
  z-index: 200;
}

.nav-dropdown.dropdown-right .dropdown-panel {
  left: auto;
  right: 0;
}

.nav-dropdown:hover .dropdown-panel {
  display: block;
}

.dropdown-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: #201F1D;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-panel a:hover {
  background: #F2E8D6;
  color: #1A3A73;
}

.btn-partner {
  transition: background 0.15s ease;
}

.btn-partner:hover {
  background: #C22820 !important;
}

/* ---------- Footer links ---------- */

footer a {
  transition: color 0.15s ease;
}

footer a:hover {
  color: #FFFFFF;
}

/* ---------- Generic content hover effects ---------- */

.hover-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(26, 58, 115, 0.14);
}

.hover-lift {
  transition: transform 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
}

.brand-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.brand-card:hover {
  box-shadow: 0 16px 36px rgba(26, 58, 115, 0.14);
  transform: translateY(-4px);
}

.btn-red {
  transition: background 0.15s ease;
}

.btn-red:hover {
  background: #C22820 !important;
}

.link-hover {
  transition: color 0.15s ease;
}

.link-hover:hover {
  color: #E0332B !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1A3A73;
  border-radius: 2px;
}

.dropdown-toggle {
  display: none;
}

/* Tablets and small laptops: the full nav bar fits, it just needs
   tighter spacing than the desktop default to avoid wrapping. */
@media (min-width: 768px) and (max-width: 1040px) {
  header > div {
    gap: 16px !important;
  }

  .main-nav {
    gap: 14px !important;
  }

  .nav-link,
  .nav-active {
    font-size: 0.86rem !important;
  }

  .btn-partner {
    padding: 0.6rem 1.1rem !important;
    font-size: 0.82rem !important;
  }
}

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

  .main-nav {
    display: none !important;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
    padding: 16px 0 4px;
    border-top: 1px solid rgba(26, 58, 115, 0.1);
    margin-top: 14px;
  }

  .main-nav.nav-open {
    display: flex !important;
  }

  .main-nav .nav-dropdown {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    width: 100%;
  }

  .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    background: none;
    border: none;
    color: #1A3A73;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    transition: transform 0.15s ease;
  }

  .nav-dropdown.dropdown-open .dropdown-toggle {
    transform: rotate(180deg);
  }

  .main-nav .dropdown-panel {
    display: none;
    width: 100%;
    position: static;
    box-shadow: none;
    padding: 4px 0 0 12px;
    min-width: 0;
  }

  .nav-dropdown.dropdown-open .dropdown-panel {
    display: block !important;
  }
}
