/* =====================================================================
   enios-additions.css
   Drop this file into your CSS folder and link it AFTER your existing
   stylesheet in <head>:
     <link rel="stylesheet" href="assets/css/enios-additions.css" />
   ===================================================================== */


/* ─────────────────────────────────────────────────────────────────────
   1.  LANGUAGE SWITCHER
   Place the following HTML snippet inside your <nav> element, next to
   the existing menu links:

     <li class="lang-switcher">
       <a href="#" data-lang="no">NO</a>
       <span>|</span>
       <a href="#" data-lang="en">EN</a>
     </li>
   ───────────────────────────────────────────────────────────────────── */

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65em;
  letter-spacing: 0.05em;
}

.lang-switcher a[data-lang] {
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s;
  font-weight: 600;
  padding: 2px 4px;
}

.lang-switcher a[data-lang]:hover {
  opacity: 0.85;
}

.lang-switcher a[data-lang].active {
  opacity: 1;
  /* border-bottom: 2px solid currentColor; */
}

.lang-switcher span {
  opacity: 0.35;
}


/* ─────────────────────────────────────────────────────────────────────
   2.  POPUP / OVERLAY
   ───────────────────────────────────────────────────────────────────── */

/* Prevent body scroll when overlay is open */
body.popup-open {
  overflow: hidden;
}

/* Dark backdrop */
#popup-overlay {
  display: flex;
  align-items: center;
  justify-content: center;

  position: fixed;
  inset: 0;                       /* top/right/bottom/left: 0 */
  z-index: 9999;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* White popup box */
#popup-box {
  position: relative;
  width: 80%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;

  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  padding: 48px 48px 40px;

  /* Slide-up entrance */
  transform: translateY(20px);
  transition: transform 0.25s ease;

  /* Nice scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

#popup-overlay.active #popup-box {
  transform: translateY(0);
}

/* Close button */
#popup-close {
  position: sticky;
  float: right;
  top: 0;
  right: 0;

  /* Positioning inside box */
  margin: -32px -32px 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  border-radius: 15%;

  background: #f7f7f7;
  color: #000000;
  font-size: 22px;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;

  /* Ensure it floats above content */
  z-index: 1;
}

#popup-close:hover {
  background: #999999;
  color: #123456;
  /* transform: rotate(90deg); */
}

/* Loading / error states inside popup */
.popup-loading,
.popup-error {
  text-align: center;
  padding: 40px 0;
  color: #888;
  font-style: italic;
}

.popup-error {
  color: #c0392b;
}

/* ─── Popup content typography ──────────────────────────────────────── */

#popup-body {
  line-height: 1.7;
  color: #333;
}

#popup-body h2 {
  margin-top: 0;
  font-size: 1.6em;
}

#popup-body h3 {
  font-size: 1.15em;
  margin-top: 1.6em;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

#popup-body ul {
  padding-left: 1.4em;
}

#popup-body .popup-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

#popup-body .popup-profile-header img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#popup-body .popup-profile-header .popup-profile-meta h2 {
  margin-bottom: 4px;
}

#popup-body .popup-profile-header .popup-profile-meta p {
  margin: 2px 0;
  color: #555;
}

/* ─── Responsive adjustments ────────────────────────────────────────── */

@media (max-width: 700px) {
  #popup-box {
    width: 94%;
    padding: 32px 24px 28px;
  }

  #popup-close {
    margin: -20px -16px 10px auto;
  }

  #popup-body .popup-profile-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ----Illustrationns -------------------------*/
.svc-img {
  background: #1a3a5c;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 8px 8px; /* top-left top-right bottom-right bottom-left */
}

.svc-img i {
  font-size: 55px;
  color: rgba(255, 255, 255, 0.45);
  stroke-width: 0.75; 
}

/* Hide inactive language blocks inside popups */
[lang-block] { display: none; }
html[lang="no"] [lang-block="no"],
html[lang="en"] [lang-block="en"] { display: block; }

/* ── Service popup image ─────────────────────────────────────────── */
.service-img {
  float: left;
  width: 50%;
  max-width: 250px;
  max-height: 250px;
  object-fit: cover;        /* crops the 445×445 px photo to fill the box */
  border-radius: 10px;      /* rounded corners matching the popup box */
  border: 1px solid #cecece; /* thin navy border — ties it to site colour */
  margin: 0 20px 12px 0;    /* gap between image and text */
  display: block;
}

/* Clears the float after the intro paragraph */
.service-intro::after {
  content: "";
  display: table;
  clear: both;
}