/*
  Tally Divi production theme layer.
  Divi modules own the page structure; this file provides the small, shared
  visual system needed for a consistent maritime inspection site.
*/
:root {
  --tally-ink: #132033;
  --tally-muted: #5e6a78;
  --tally-navy: #09243f;
  --tally-blue: #1764a6;
  --tally-cyan: #52a7d8;
  --tally-brass: #b88a3c;
  --tally-brass-soft: #f4ead9;
  --tally-line: #d7e0e9;
  --tally-mist: #f4f7fa;
  --tally-white: #ffffff;
  --tally-shadow: 0 18px 45px rgba(9,36,63,.12);
}

html {
  scroll-behavior: smooth;
}

body,
.et_pb_module,
.et_pb_text,
.et_pb_menu,
.et_pb_button {
  color: var(--tally-ink);
  letter-spacing: 0;
}

body {
  background: var(--tally-white);
}

.et_pb_section .et_pb_row {
  width: min(1180px, 92vw);
}

.et-l--body .et_pb_section:not([id*="-hero"]),
#et-main-area .et_pb_section:not([id*="-hero"]) {
  padding-top: clamp(32px, 3.4vw, 52px) !important;
  padding-bottom: clamp(32px, 3.4vw, 52px) !important;
}

.et-l--body .et_pb_row,
#et-main-area .et_pb_row {
  padding-top: clamp(8px, 1.1vw, 16px) !important;
  padding-bottom: clamp(8px, 1.1vw, 16px) !important;
}

.et-l--body .et_pb_row + .et_pb_row,
#et-main-area .et_pb_row + .et_pb_row {
  margin-top: clamp(18px, 2.4vw, 30px);
}

.et_pb_text_inner > :last-child,
.tally-card > :last-child,
.tally-cta > :last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--tally-navy);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.08;
}

p,
li {
  line-height: 1.68;
}

a {
  color: var(--tally-blue);
}

#site-topbar,
#site-header,
#main-header,
.et-l--header .et_pb_section,
header.et-l--header .et_pb_section {
  box-shadow: none;
}

#site-topbar {
  background: var(--tally-navy) !important;
}

#site-topbar p,
#site-topbar a {
  margin: 0;
  color: var(--tally-white) !important;
  font-size: 13px;
  font-weight: 700;
}

#site-topbar .et_pb_column:last-child .et_pb_text_inner {
  text-align: right;
}

#site-header,
#main-header,
.et-l--header .et_pb_section_1_tb_header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.98) !important;
  border-bottom: 1px solid rgba(9,36,63,.12);
}

#site-header .et_pb_row,
#site-topbar .et_pb_row {
  width: min(1180px, 92vw);
  max-width: 1180px !important;
}

#site-header .et_pb_row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

#site-header .et_pb_row:before,
#site-header .et_pb_row:after {
  display: none !important;
}

#site-header .et_pb_column {
  float: none !important;
  width: auto !important;
  margin-bottom: 0;
  margin-right: 0 !important;
}

#site-header .et_pb_column:first-child {
  min-width: min(278px, 42vw);
}

#site-header .et_pb_column:last-child {
  min-width: 0;
}

#site-header .et_pb_image,
#site-header .et_pb_menu {
  margin-bottom: 0;
}

#site-header .et_pb_image img {
  width: auto;
  max-height: 54px;
}

#site-header .et_pb_menu,
header.et-l--header .et_pb_menu {
  background: transparent !important;
}

#site-header .et_pb_menu__menu,
#site-header .et_pb_menu__wrap {
  justify-content: flex-end;
}

#site-header .et_pb_menu_inner_container,
#site-header .et_pb_menu__wrap {
  width: 100%;
}

#site-header .et_pb_menu__menu a,
#main-header #top-menu a,
header.et-l--header .et_pb_menu__menu a {
  color: var(--tally-navy) !important;
  font-size: 15px;
  font-weight: 800;
}

#site-header .et_pb_menu__menu > nav > ul > li > a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding-top: 0;
  padding-bottom: 0;
}

#site-header .et_pb_menu__menu > nav > ul > li.menu-item-has-children > a {
  padding-right: 18px !important;
  position: relative;
}

#site-header .et_pb_menu__menu > nav > ul > li.menu-item-has-children > a:after {
  top: 50% !important;
  right: 0 !important;
  margin-top: 0 !important;
  transform: translateY(-50%);
  line-height: 1;
}

#site-header .tally-menu-no-link > a {
  cursor: default;
}

#site-header .tally-menu-has-link > a {
  cursor: pointer;
}

header.et-l--header .mobile_menu_bar:before,
header.et-l--header .et_pb_menu__icon,
header.et-l--header .et_pb_menu__search-button:after,
header.et-l--header .et_pb_menu__search-button:before {
  color: var(--tally-navy) !important;
}

header.et-l--header .et_pb_menu__search-button,
header.et-l--header .et_pb_menu__close-search-button {
  margin-left: 18px;
  color: var(--tally-navy) !important;
}

header.et-l--header .et_pb_menu__search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 58px;
  margin-right: 0;
}

header.et-l--header .et_pb_menu__wrap--hidden .et_pb_menu__search-button {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

header.et-l--header .et_pb_menu__close-search-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 14px;
}

header.et-l--header .et_pb_menu__close-search-button:before {
  display: none !important;
  content: "" !important;
}

header.et-l--header .et_pb_menu__close-search-button:after {
  position: static !important;
  content: "M" !important;
  font-size: 24px;
  line-height: 1;
  color: var(--tally-navy) !important;
}

header.et-l--header .et_pb_menu__search-container {
  background: var(--tally-white);
  inset: 0;
  align-items: center;
}

header.et-l--header .et_pb_menu__search-input {
  color: var(--tally-ink);
  font-size: 16px;
}

.et_pb_section[id$="-hero"],
.et_pb_section[id*="-hero"] {
  position: relative;
  min-height: clamp(420px, 56vh, 560px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.et_pb_section[id$="-hero"]:after,
.et_pb_section[id*="-hero"]:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3,15,27,.92), rgba(9,36,63,.78) 54%, rgba(9,36,63,.34)),
    linear-gradient(0deg, rgba(3,15,27,.62), rgba(3,15,27,.10));
}

.et_pb_section[id$="-hero"] .et_pb_row,
.et_pb_section[id*="-hero"] .et_pb_row {
  position: relative;
  z-index: 2;
}

.et_pb_section[id$="-hero"] h1,
.et_pb_section[id$="-hero"] h2,
.et_pb_section[id$="-hero"] p,
.et_pb_section[id$="-hero"] a,
.et_pb_section[id*="-hero"] h1,
.et_pb_section[id*="-hero"] h2,
.et_pb_section[id*="-hero"] p,
.et_pb_section[id*="-hero"] a {
  color: var(--tally-white) !important;
}

.et_pb_section[id$="-hero"] h1,
.et_pb_section[id$="-hero"] h2,
.et_pb_section[id*="-hero"] h1,
.et_pb_section[id*="-hero"] h2 {
  max-width: 980px;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.02;
}

body .et_pb_section[id$="-hero"] .tally-hero-title,
body .et_pb_section[id*="-hero"] .tally-hero-title {
  max-width: 980px;
  margin: 0 0 22px;
  color: var(--tally-white) !important;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.02;
  text-shadow: 0 2px 18px rgba(3,15,27,.38);
}

.et_pb_section[id$="-hero"] p,
.et_pb_section[id*="-hero"] p {
  max-width: 810px;
  font-size: 18px;
  line-height: 1.62;
}

.tally-hero-kicker,
.tally-kicker {
  margin: 0 0 12px;
  color: var(--tally-brass) !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tally-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tally-eyebrow-row span,
.tally-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  color: var(--tally-white);
  font-size: 13px;
  font-weight: 800;
}

.tally-section-intro {
  max-width: 800px;
  margin-bottom: 14px;
}

.tally-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.tally-link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--tally-line);
  border-radius: 4px;
  background: var(--tally-white);
  color: var(--tally-navy) !important;
  font-weight: 900;
  text-decoration: none !important;
}

.tally-link-row a:first-child {
  border-color: var(--tally-brass);
  background: var(--tally-brass);
  color: #071829 !important;
}

.et_pb_section[id$="-hero"] .tally-link-row a,
.et_pb_section[id*="-hero"] .tally-link-row a,
.tally-cta .tally-link-row a {
  border-color: rgba(255,255,255,.28);
  background: var(--tally-white);
  color: var(--tally-navy) !important;
}

.et_pb_section[id$="-hero"] .tally-link-row a:first-child,
.et_pb_section[id*="-hero"] .tally-link-row a:first-child,
.tally-cta .tally-link-row a:first-child {
  border-color: var(--tally-brass);
  background: var(--tally-brass);
  color: #071829 !important;
}

.tally-card,
#home-services .et_pb_blurb,
#home-process .et_pb_blurb,
#home-values .et_pb_blurb,
#page-about-values .et_pb_blurb,
#page-about-approvals .et_pb_blurb,
#page-about-team .et_pb_blurb,
.et_pb_section[id$="-process"] .et_pb_blurb,
.et_pb_section[id$="-related"] .et_pb_blurb,
.et_pb_section[id^="page-services"] .et_pb_blurb,
.et_pb_section[id$="-details"] .et_pb_column_1_3 {
  height: 100%;
  padding: clamp(18px, 2vw, 22px);
  border: 1px solid var(--tally-line);
  border-radius: 6px;
  background: var(--tally-white);
  box-shadow: 0 10px 26px rgba(9,36,63,.06);
}

.tally-card:hover,
#home-services .et_pb_blurb:hover,
.et_pb_section[id^="page-services"] .et_pb_blurb:hover,
.et_pb_section[id$="-related"] .et_pb_blurb:hover {
  border-color: rgba(23,100,166,.42);
  box-shadow: var(--tally-shadow);
}

.tally-card h3,
.et_pb_blurb h4,
.et_pb_blurb h3 {
  color: var(--tally-navy);
}

.tally-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.tally-card li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.tally-stat {
  border-top: 4px solid var(--tally-brass);
}

.tally-stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--tally-navy);
  font-size: 34px;
  line-height: 1;
}

.tally-media-card {
  overflow: hidden;
  padding: 0;
}

.tally-media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.tally-media-card .tally-media-body {
  padding: clamp(18px, 2vw, 22px);
}

.tally-dark-band {
  padding: clamp(24px, 3vw, 32px);
  border-radius: 6px;
  background: var(--tally-navy);
}

.tally-dark-band h2,
.tally-dark-band h3,
.tally-dark-band p,
.tally-dark-band li,
.tally-dark-band a {
  color: var(--tally-white) !important;
}

.tally-cta {
  padding: clamp(24px, 3.4vw, 38px);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(82,167,216,.16), transparent 36%),
    var(--tally-navy);
}

.tally-cta h3,
.tally-cta p,
.tally-cta a {
  color: var(--tally-white) !important;
}

.tally-proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--tally-line);
  border-radius: 6px;
  background: var(--tally-line);
}

.tally-proof-strip > div {
  padding: clamp(18px, 2vw, 22px);
  background: var(--tally-white);
}

.tally-proof-strip strong {
  display: block;
  margin-bottom: 7px;
  color: var(--tally-navy);
  font-size: 18px;
  line-height: 1.2;
}

.tally-proof-strip p {
  color: var(--tally-muted);
  font-size: 14px;
  line-height: 1.5;
}

.tally-proof-strip-modern > div {
  border-top: 3px solid rgba(184,138,60,.75);
}

.et_pb_contact_submit {
  min-width: 140px;
  font-size: 0 !important;
}

.et_pb_contact_submit:after {
  content: "Send besked";
  font-size: 15px;
  font-weight: 800;
}

.search-results .et_pb_post {
  padding: 22px;
  border: 1px solid var(--tally-line);
  border-radius: 6px;
  background: var(--tally-white);
}

.search-results .et_pb_module_header {
  font-size: 0 !important;
}

.search-results .et_pb_module_header:before {
  content: "S\00f8 geresultater";
  color: var(--tally-navy);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
}

.search-results .post-meta {
  display: none;
}

.search-results .more-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--tally-brass);
  color: #071829 !important;
  font-size: 0 !important;
  font-weight: 900;
  text-decoration: none !important;
}

.search-results .more-link:after {
  content: "L\00e6 s mere";
  font-size: 14px;
}

#home-proof,
#home-process,
#page-about-values,
#page-contact-info,
#service-index,
.et_pb_section[id$="-process"],
.tally-soft-section {
  background: var(--tally-mist) !important;
}

#home-heritage img,
#page-about-origin img,
#page-contact-info img,
#home-reporting img {
  width: 100%;
  border: 1px solid var(--tally-line);
  border-radius: 6px;
  box-shadow: var(--tally-shadow);
}

#site-footer {
  background: var(--tally-navy) !important;
  border-top: 0;
}

#site-footer h3,
#site-footer p,
#site-footer li {
  color: var(--tally-white);
}

#site-footer h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

#site-footer a {
  color: #d9e9f7;
  font-weight: 800;
  text-decoration: none;
}

#site-footer .et_pb_row {
  max-width: 1180px !important;
}

#site-footer .tally-footer-service-links br {
  display: none;
}

#site-footer .tally-footer-service-links a {
  display: block;
  padding: 3px 0;
  line-height: 1.35;
}

@media (min-width: 981px) {
  li.tally-mega-menu.mega-menu > ul.sub-menu {
    position: fixed !important;
    top: var(--tally-mega-top, 118px) !important;
    left: 50% !important;
    width: min(1120px, calc(100vw - 56px)) !important;
    max-height: calc(100vh - 148px);
    overflow-y: auto;
    padding: 28px 32px 32px !important;
    border: 0;
    border-top: 1px solid var(--tally-line);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 28px 70px rgba(9,36,63,.18);
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 46px;
    transform: translateX(-50%);
    background:
      linear-gradient(180deg, #ffffff, #f8fbfd) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none;
  }

  li.tally-mega-menu.mega-menu:hover > ul.sub-menu,
  li.tally-mega-menu.mega-menu:focus-within > ul.sub-menu,
  li.tally-mega-menu.mega-menu.et-show-dropdown > ul.sub-menu,
  li.tally-mega-menu.mega-menu.tally-mega-open > ul.sub-menu {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(-50%) !important;
    pointer-events: auto;
  }

  li.tally-mega-menu.mega-menu:not(:hover):not(:focus-within):not(.et-show-dropdown):not(.tally-mega-open) > ul.sub-menu,
  li.tally-mega-menu.mega-menu:not(:hover):not(:focus-within):not(.et-show-dropdown):not(.tally-mega-open) > ul.sub-menu * {
    visibility: hidden !important;
  }

  li.tally-mega-menu.mega-menu > ul.sub-menu > li {
    width: auto !important;
    margin: 0 !important;
  }

  li.tally-mega-column {
    min-height: 0;
    padding: 0 !important;
    background: transparent;
  }

  li.tally-mega-column > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    margin-bottom: 10px;
    padding: 0 0 10px !important;
    border-bottom: 1px solid rgba(23,100,166,.22);
    color: #596371 !important;
    font-size: 14px !important;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
  }

  li.tally-mega-column.tally-menu-has-link > a:hover,
  li.tally-mega-column.tally-menu-anchor-link > a:hover {
    color: var(--tally-blue) !important;
  }

  li.tally-mega-column.tally-menu-no-link > a {
    pointer-events: none;
  }

  li.tally-mega-column > a:after {
    display: none !important;
    content: "" !important;
  }

  li.tally-mega-column > ul.sub-menu {
    position: static !important;
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  li.tally-mega-column > ul.sub-menu > li {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  li.tally-mega-column li a {
    display: block;
    padding: 6px 9px !important;
    border-radius: 4px;
    color: #3f4854 !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1.45;
    white-space: normal;
  }

  li.tally-mega-column li a:hover {
    background: rgba(23,100,166,.08) !important;
    color: var(--tally-blue) !important;
  }
}

@media (max-width: 980px) {
  #site-topbar .et_pb_column:last-child .et_pb_text_inner {
    text-align: left;
  }

  #site-header .et_pb_row {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 16px;
  }

  #site-header .et_pb_column:first-child {
    min-width: 0;
  }

  #site-header .et_pb_image img {
    max-width: min(242px, 58vw);
    max-height: 46px;
  }

  #site-header .et_pb_menu__wrap {
    justify-content: flex-end;
  }

  #site-header .et_mobile_nav_menu {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
  }

  #site-header .mobile_menu_bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(9,36,63,.14);
    border-radius: 4px;
    background: #fff;
  }

  #site-header .mobile_menu_bar:before {
    position: static;
    font-size: 32px;
    line-height: 1;
  }

  #site-header .et_mobile_menu {
    position: fixed !important;
    top: var(--tally-mobile-menu-top, 112px) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-height: calc(100vh - var(--tally-mobile-menu-top, 112px));
    overflow-y: auto;
    padding: 10px 20px 24px !important;
    border: 0;
    border-top: 1px solid var(--tally-line);
    border-radius: 0;
    box-shadow: 0 22px 50px rgba(9,36,63,.18);
    background: #fff !important;
  }

  #site-header .et_mobile_menu li {
    position: relative;
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(215,224,233,.86);
  }

  #site-header .et_mobile_menu li a {
    display: block;
    padding: 13px 48px 13px 0 !important;
    border: 0;
    color: var(--tally-navy) !important;
    background: transparent !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
  }

  #site-header .et_mobile_menu li li {
    border-bottom: 0;
  }

  #site-header .et_mobile_menu li li a {
    padding: 9px 12px !important;
    color: #485463 !important;
    font-size: 14px;
    font-weight: 700;
  }

  #site-header .et_mobile_menu ul.sub-menu {
    position: static !important;
    display: none !important;
    width: auto !important;
    padding: 2px 0 10px 12px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #site-header .et_mobile_menu li.tally-submenu-open > ul.sub-menu {
    display: block !important;
  }

  #site-header .tally-submenu-toggle {
    position: absolute;
    top: 7px;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(9,36,63,.12);
    border-radius: 4px;
    background: #f7fafc;
    cursor: pointer;
  }

  #site-header .tally-submenu-toggle span:before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--tally-navy);
    border-bottom: 2px solid var(--tally-navy);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
  }

  #site-header .tally-submenu-open > .tally-submenu-toggle span:before {
    transform: translateY(2px) rotate(-135deg);
  }

  .et_pb_section[id$="-hero"],
  .et_pb_section[id*="-hero"] {
    min-height: 440px;
  }

  .tally-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tally-card,
  #home-services .et_pb_blurb,
  #home-process .et_pb_blurb,
  #home-values .et_pb_blurb,
  #page-about-values .et_pb_blurb,
  #page-about-approvals .et_pb_blurb,
  #page-about-team .et_pb_blurb,
  .et_pb_section[id$="-process"] .et_pb_blurb,
  .et_pb_section[id$="-related"] .et_pb_blurb,
  .et_pb_section[id^="page-services"] .et_pb_blurb {
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  #site-topbar p,
  #site-topbar a {
    font-size: 12px;
  }

  .et_pb_section[id$="-hero"] h1,
  .et_pb_section[id$="-hero"] h2,
  .et_pb_section[id*="-hero"] h1,
  .et_pb_section[id*="-hero"] h2 {
    font-size: 38px;
  }

  .tally-link-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tally-link-row a {
    justify-content: center;
    width: 100%;
  }

  .tally-proof-strip {
    grid-template-columns: 1fr;
  }
}
