/* ===== Top bar ===== */
.topnav{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef1f6;
}

.topnav-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand{
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: #0f172a;
  letter-spacing: .2px;
}

/* ===== Menu ===== */
.menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.menu-item{
  position: relative;
}

.menu-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
}

.menu-link:hover{
  background: #f4f7ff;
}

.chev{
  opacity: .7;
  font-size: .9em;
}

/* ===== Search button (optional) ===== */
.search-btn{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #1e3a8a;
  border: 1px solid #cfe0ff;
  background: #ffffff;
  font-weight: 700;
}
.search-btn:hover{
  background: #f4f7ff;
}
.search-icon{ font-size: 1rem; }

/* ===== Mega dropdown container ===== */
.mega{
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 820px;
  display: none;
}

.menu-item--mega:hover .mega,
.menu-item--mega:focus-within .mega{
  display: block;
}

/* little “pointer” under the menu item */
.mega::before{
  content: "";
  position: absolute;
  left: 120px;
  top: -10px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-left: 1px solid #eef1f6;
  border-top: 1px solid #eef1f6;
  transform: rotate(45deg);
}

.mega-panel{
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15,23,42,.10);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* ===== Left column ===== */
.mega-left{
  background: #f8fbff;
  border-right: 1px solid #eef1f6;
  padding: 16px;
}

.mega-title{
  font-size: .8rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mega-continent{
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
}

.mega-continent:hover{
  background: #eaf2ff;
}

/* ===== Right column ===== */
.mega-right{
  padding: 16px;
}

.country-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.country-card{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #eef1f6;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}

.country-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.country-thumb{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #eef1f6;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  flex: 0 0 40px;
}

.country-name{
  font-weight: 800;
  line-height: 1.1;
}

.mega-more{
  display: inline-block;
  margin-top: 14px;
  font-weight: 800;
  color: #2563eb;
  text-decoration: none;
}
.mega-more:hover{
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 920px){
  .mega{ width: 92vw; }
  .mega-panel{ grid-template-columns: 1fr; }
  .mega-left{ border-right: 0; border-bottom: 1px solid #eef1f6; }
  .country-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



/* Trigger as a button (same look as link) */
.menu-trigger{
  background: none;
  border: 0;
  cursor: pointer;
}

/* Mega open/close controlled by .is-open */
.menu-item--mega .mega{ display:none; }
.menu-item--mega.is-open .mega{ display:block; }

/* Desktop: open on hover too */
@media (hover:hover){
  .menu-item--mega:hover .mega{ display:block; }
}

.mega-continent.is-active{
  background:#eaf2ff;
  font-weight: 800;
}

/* Thumb uses background-image */
.country-thumb{
  width: 64px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #eef1f6;
  background: #f1f5f9;
  background-size: cover;
  background-position: center;
  flex: 0 0 64px;
}
.country-thumb.is-placeholder{
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

