/* =============================================================
   SAFETY FOOD CONSULTING - layout: header, navigation, footer
   ============================================================= */

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

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100%;
}

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: calc(var(--container) + 40px);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 20px;
}

.header-brand {
  justify-self: start;
  display: inline-flex;
}

.header-brand img {
  width: 101px;
  height: 101px;
}

.header-nav {
  justify-self: center;
}

.header-actions {
  justify-self: end;
  padding-left: 10px;
}

/* primary menu */

.menu {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu > li {
  position: relative;
}

.menu > li > a {
  display: block;
  padding: 0 24px;
  color: var(--color-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: 88px;
  text-transform: uppercase;
}

.menu > li > a:hover,
.menu > li > a:focus,
.menu > li.is-current > a {
  color: #000;
}

.menu-toggle-arrow {
  display: inline-block;
  width: 10px;
  margin-left: 6px;
  vertical-align: middle;
  fill: currentColor;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--color-white);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              visibility var(--duration) var(--ease);
}

.menu > li:hover > .sub-menu,
.menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu a {
  display: block;
  padding: 11.7px 24px;
  color: var(--color-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: uppercase;
}

.sub-menu a:hover,
.sub-menu a:focus {
  color: #000;
}

/* mobile header + drawer */

.header-toggle {
  display: none;
  justify-self: end;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-blue);
  cursor: pointer;
  line-height: 0;
}

.header-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  background: var(--color-light);
  overflow-y: auto;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer__close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 14.4px;
  border: 0;
  background: none;
  color: var(--color-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mobile-drawer__close svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.mobile-menu {
  margin: 53px 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.mobile-menu a {
  display: block;
  padding: 0 20px;
  color: #000;
  font-size: 18px;
  font-weight: 400;
  line-height: 54px;
}

body.is-locked {
  overflow: hidden;
}

@media (max-width: 921px) {
  :root {
    --header-height: 77px;
  }
  .header-bar {
    grid-template-columns: 1fr auto;
  }
  .header-brand img {
    width: 40px;
    height: 40px;
  }
  .header-nav,
  .header-actions {
    display: none;
  }
  .header-toggle {
    display: block;
  }
}

@media (max-width: 544px) {
  .header-brand img {
    width: 47px;
    height: 47px;
  }
}

/* ---------------- Page title (inner pages) ---------------- */

.page-title {
  padding: 160px var(--container-pad) 80px;
  background-image: url('../img/shape-page-title.svg');
  background-repeat: no-repeat;
  background-position: right top;
}

.page-title h1,
.page-title h2 {
  margin: 0;
}

.page-title--center h1,
.page-title--center h2 {
  text-align: center;
}

/* titluri lungi (paginile legale) nu trebuie sa intre sub forma albastra */
.page-title--legal h1 {
  max-width: 70%;
  font-size: 48px;
  line-height: 1.25;
}

@media (max-width: 921px) {
  .page-title--legal h1 { max-width: 100%; font-size: 38px; }
}

@media (max-width: 544px) {
  .page-title--legal h1 { font-size: 28px; }
}

@media (max-width: 1024px) {
  .page-title {
    padding: 120px var(--container-pad) 64px;
    background-size: 55vw auto;
  }
}

@media (max-width: 767px) {
  .page-title {
    padding: 100px var(--container-pad) 40px;
    background-size: 70vw auto;
  }
}

/* ---------------- Shape divider (Elementor "tilt") ---------------- */

.shape-divider {
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  direction: ltr;
  pointer-events: none;
}

.shape-divider--top {
  top: -1px;
}

.shape-divider--bottom {
  bottom: -1px;
  transform: rotate(180deg);
}

.shape-divider svg {
  position: relative;
  left: 50%;
  display: block;
  width: calc(100% + 1.3px);
  height: 120px;
  transform: translateX(-50%) rotateY(180deg);
}

.shape-divider .shape-fill {
  fill: var(--color-light);
}

@media (max-width: 1024px) {
  .shape-divider svg { height: 80px; }
}

@media (max-width: 767px) {
  .shape-divider svg { height: 48px; }
}

/* ---------------- Contact form block (above footer) ---------------- */

.contact-block {
  padding: 20px 0;
  background: var(--color-light);
}

.contact-block__title {
  margin: 0 0 20px;
  text-align: center;
}

.contact-block__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 0 20px;
  gap: 32px;
}

.contact-block__col {
  flex: 1 1 calc(50% - 16px);
  min-width: 0;
}

.contact-block__col figure {
  margin: 2rem 0;
}

@media (max-width: 921px) {
  .contact-block__col {
    flex: 1 1 100%;
  }
}

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

.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 30px;
  max-width: calc(var(--container) + 80px);
  margin: 0 auto;
  padding: 96px 40px 64px;
}

.footer-main h2 {
  margin: 0 0 22px;
  color: var(--color-light);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
}

.footer-main ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-main a,
.footer-main p {
  color: var(--color-white);
  font-size: 15px;
  line-height: 1.857;
  overflow-wrap: anywhere;
}

.footer-main p {
  margin: 0 0 1em;
}

.footer-main a:hover,
.footer-main a:focus {
  color: var(--color-teal);
}

.footer-logo img {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: calc(var(--container) + 80px);
  margin: 0 auto;
  padding: 40px;
}

.footer-bottom p {
  margin: 0;
  color: var(--color-white);
  font-size: 14px;
  line-height: 26px;
}

/* butonul „Setări cookie-uri" arata identic cu link-urile din meniul subsolului */
.footer-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.857;
  text-align: left;
  cursor: pointer;
}

.footer-link-button:hover,
.footer-link-button:focus {
  color: var(--color-teal);
}

.footer-bottom a {
  color: var(--color-white);
}

@media (max-width: 921px) {
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
    padding: 64px 24px 32px;
  }
  .footer-logo {
    grid-column: 1 / -1;
  }
  .footer-logo img {
    width: 120px;
    margin: 0 auto;
  }
  .footer-main a {
    display: inline-block;
    padding: 3px 0;
  }
}

@media (max-width: 544px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    padding: 28px 24px;
    text-align: center;
  }
}
