/* =========================================
   8JJ — Global Presence / Flag Section
   Full Responsive & Brand-Aligned Layout
   ========================================= */

/* ---------- POPUP SECTION ---------- */

.presence-popup {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 9999;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
.presence-popup.active { display: grid; }

/* Overlay */
.presence-popup .popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* Popup card */
.presence-popup .popup-content {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  padding: clamp(14px, 3vw, 24px);
  width: 92%;
  max-width: clamp(340px, 90vw, 620px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: popupShow 0.25s ease-out;
  text-align: center;
  z-index: 2;
}

/* Close button */
.presence-popup .popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: clamp(20px, 5vw, 30px);
  cursor: pointer;
  color: #1B9EDF;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}
.presence-popup .popup-close:hover {
  color: #ff5252;
  transform: scale(1.06);
}

/* Popup body */
.presence-popup .popup-body {
  margin-top: 12px;
  text-align: center;
}

/* Flag inside popup */
.presence-popup .popup-body .flagwrap {
  width: clamp(90px, 24vw, 140px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #f5f9ff;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.presence-popup .popup-body .flag {
  width: 96%;
  height: auto;
  border-radius: 12%;
  display: block;
}

/* Info text */
.presence-popup .popup-body .info {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.presence-popup .popup-body .info li {
  color: #2d4963;
  font-size: clamp(15px, 2.8vw, 17px);
  line-height: 1.45;
}
.presence-popup .popup-body .info a {
  color: #0f76de;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #cce3ff;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  background: #eaf5ff;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.presence-popup .popup-body .info a:hover {
  background: #d9ebff;
  color: #094c9e;
  box-shadow: 0 4px 12px rgba(27, 158, 223, 0.25);
}

/* Animation */
@keyframes popupShow {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ---------- FLAG GRID SECTION ---------- */

/* Section theme tokens */
#ContactUs .presence { --brand-blue: #1B9EDF; }

/* Wrapper */
#ContactUs .presence-wrap {
  max-width: 9.8rem;
  margin-inline: auto;
  padding-inline: 10px;
}

/* One-row flag list (scrollable on narrow screens) */
#ContactUs .presence-accordion {
  display: grid;
  justify-content: space-between;
  align-items:flex-start;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 15px;
}


#ContactUs .presence-accordion::-webkit-scrollbar { display: none; }

/* Each flag item */
#ContactUs .acc-item {
  flex: 0 0 auto;
  text-align: center;
}

/* Button-like trigger (flag + label stacked) */
#ContactUs .acc-trigger {
  background: transparent;
  border: none;
  padding: clamp(.04rem, 1vw, .08rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  cursor: pointer;
}
#ContactUs .acc-trigger:hover { transform: translateY(-.02rem); }

/* Flag circle */
#ContactUs .acc-trigger .label { display: grid; place-items: center; }
#ContactUs .acc-trigger .label img {
  width: clamp(1rem, 8vw, .9rem);
  height: clamp(1rem, 8vw, .9rem);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 .04rem .1rem rgba(0, 0, 0, .15);
  transition: transform .2s ease;
}
#ContactUs .acc-trigger:hover .label img { transform: translateY(-.03rem); }

/* Country label */
#ContactUs .acc-trigger .country-name {
  display: block;
  text-align: center;
  margin-top: .04rem;
  font-size: clamp(.2rem, 1.9vw, .14rem);
  font-weight: 600;
  color: #000;
  letter-spacing: .002rem;
  line-height: 1.1;
}
#ContactUs .acc-trigger:hover .country-name {
  color: var(--brand-blue);
  transform: translateY(-.01rem);
  transition: color .2s ease, transform .2s ease;
}

/* Hide accordion panels (icon grid mode) */
#ContactUs .acc-panel,
#ContactUs .acc-trigger .sign { display: none !important; }

/* ---------- RESPONSIVE (aligned to contact.css) ---------- */

/* Phones: (match contact.css breakpoint) — bigger flags & gap for touch comfort */
@media (max-width: 420px) {
  #ContactUs .presence-accordion {
    flex-wrap: wrap;             /* allow 2 rows on very narrow screens */
    justify-content: center;
    gap: 10px;                 /* ↑ slightly larger than desktop gap */
  }
  #ContactUs .acc-trigger .label img {
    width: 1.0rem;               /* ↑ larger flags on phones */
    height: 1.0rem;
  }
  #ContactUs .acc-trigger .country-name {
    font-size: .14rem;           /* ↑ slightly larger label text */
  }
}

/* Tablets: keep single row, increase spacing & flag size a touch */
@media (min-width: 421px) and (max-width: 960px) {
  #ContactUs .presence-accordion {
    gap: 35px;                 /* ↑ wider spacing than desktop */
    flex-wrap: nowrap;
  }
  #ContactUs .acc-trigger .label img {
    width: clamp(.9rem, 8vw, 1.2rem);
    height: clamp(.9rem, 8vw, 1.2rem);
  }
  #ContactUs .acc-trigger .country-name {
    font-size: .145rem;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  #ContactUs .acc-trigger { transition: none; }
  #ContactUs .acc-trigger:hover { transform: none; }
  .presence-popup .popup-content { animation: none; }
}



/* ===== Flag Popup — Normal View aligned with site.css (desktop) ===== */
@media (min-width: 961px) {
  /* Card */
  .presence-popup .popup-content {
    max-width: 4.8rem;                 /* align to site card width */
    border-radius: .14rem;              /* site.css radius */
    padding: .22rem .20rem;             /* site spacing rhythm */
    box-shadow: 0 .08rem .24rem rgba(0,0,0,.25);
    text-align: center;
    
  }

  /* Close button */
  .presence-popup .popup-close {
    top: .08rem;
    right: .12rem;
    font-size: .30rem;
    color: #1B9EDF;                     /* brand blue */
  }

  /* Flag wrapper & image */
  .presence-popup .popup-body .flagwrap {
    width: 1.20rem;                     /* balanced flag size on desktop */
    box-shadow: 0 .10rem .26rem rgba(0,0,0,.12);
  }
  .presence-popup .popup-body .flag {
    border-radius: 12%;
  }

  /* Info text & pills */
  .presence-popup .popup-body .info li {
    font-size: .18rem;                  /* readable, matches site scale */
    line-height: 1.5;
  }
  .presence-popup .popup-body .info a {
    padding: .08rem .14rem;
    border-radius: 999px;
    border: 1px solid #cce3ff;
    background: #eaf5ff;
    color: #0f76de;
    font-weight: 600;
  }
}