@import url("./petroantillana_header.css");
@import url("./petroantillana_menu.css");
@import url("./petroantillana_footer.css");

:root {
  --petro-public-green: #006400;
  --petro-public-search-green: #4f9748;
  --petro-public-nav-green: #327a09;
  --petro-public-active: #434244;
  --petro-public-underline: #3a3f45;
}

body {
  margin: 0;
}

/* Match the shared header/menu rhythm from the public Petroantillana site. */
.petro-site-header {
  position: relative;
  top: auto;
  z-index: 900;
  width: 100%;
  background: #ffffff;
  box-shadow: none;
  transition: background 0.3s, border 0.3s, box-shadow 0.3s;
}

.petro-site-header.is-scrolled {
  background: #ffffff;
  box-shadow: none;
}

.petro-site-header::before {
  content: "";
  display: block;
  width: 100%;
  height: 42px;
  background: var(--petro-public-green);
}

.petro-header-main {
  box-sizing: border-box;
  width: 100%;
  min-height: 80px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 30% 70%;
  align-items: center;
  justify-content: stretch;
  gap: 0;
  background: #ffffff;
}

.petro-brand {
  width: 100%;
  justify-content: center;
}

.petro-brand img {
  width: min(218px, 70%);
  max-width: 70%;
  height: auto;
}

.petro-main-nav {
  width: 100%;
  min-width: 0;
  justify-content: center;
  flex: 0 1 auto;
}

.petro-nav-list {
  justify-content: center;
  gap: 0;
}

.petro-nav-link {
  box-sizing: border-box;
  min-height: 64px;
  padding: 13px 20px;
  color: var(--petro-public-nav-green);
  font-family: Lato, Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 20px;
  transition: color 0.3s ease;
}

.petro-nav-link::after {
  bottom: 9px;
  height: 3px;
  background: var(--petro-public-underline);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.petro-nav-link:hover,
.petro-nav-link:focus,
.petro-nav-link.is-active {
  color: var(--petro-public-active);
}

@media (max-width: 1024px) {
  .petro-site-header::before {
    height: 48px;
  }

  .petro-site-header::after {
    top: 8px;
    left: 20px;
    right: auto;
    width: min(58vw, 360px);
    min-width: 0;
    height: 30px;
  }

  .petro-header-main {
    min-height: 78px;
    padding: 0 20px;
    grid-template-columns: 70% 30%;
  }

  .petro-brand {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }

  .petro-brand img {
    width: min(218px, 70%);
    max-width: 70%;
  }

  .petro-menu-toggle {
    display: inline-block;
    grid-column: 2;
    justify-self: end;
  }


  .petro-main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: #ffffff;
    border-top: 1px solid rgba(50, 122, 9, 0.18);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.12);
  }

  .petro-main-nav.is-open {
    display: block;
  }

  .petro-nav-list {
    width: min(calc(100% - 40px), 760px);
    margin: 0 auto;
    display: block;
    padding: 8px 0 14px;
  }

  .petro-nav-link {
    width: 100%;
    min-height: 44px;
    padding: 0;
    font-size: 18px;
    line-height: 44px;
  }

  .petro-nav-link::after {
    bottom: 0;
  }
}

@media (max-width: 480px) {
  .petro-site-header::after {
    left: 14px;
    width: 57vw;
    padding-right: 10px;
  }

  .petro-header-main {
    min-height: 74px;
    padding: 0 14px;
  }
}