/*
Theme Name: ERRECI Child
Description: Child theme ERRECI basato su Twenty Twenty-Five con header, footer e menu custom stabili.
Author: ERRECI
Template: twentytwentyfive
Version: 1.0.0
Text Domain: erreci-child
*/

header.wp-block-template-part {
  background: linear-gradient(180deg, rgba(248,247,244,0.98) 0%, rgba(239,238,234,0.96) 100%);
  border-bottom: 1px solid #d9ddd8;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
}

footer.wp-block-template-part {
  margin-top: 2rem;
}

.erreci-shell-header {
  width: 100%;
}

.erreci-shell-header__inner {
  max-width: min(1520px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 1.05rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.erreci-shell-brand {
  flex: 0 0 auto;
}

.erreci-shell-brand__link {
  display: block;
  width: clamp(230px, 28vw, 430px);
  height: clamp(58px, 6vw, 92px);
  background: url("assets/images/logo-erreci.png") no-repeat left center / contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

.erreci-shell-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.erreci-shell-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.erreci-shell-menu__item {
  margin: 0;
}

.erreci-shell-menu__item--kopa {
  margin-left: auto;
}

.erreci-shell-menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-family: "Barlow", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--erreci-text, #353332);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.erreci-shell-menu__link:hover,
.erreci-shell-menu__link:focus-visible,
.current-menu-item > .erreci-shell-menu__link,
.current_page_item > .erreci-shell-menu__link,
.current-menu-ancestor > .erreci-shell-menu__link,
.erreci-shell-menu__link[aria-current="page"] {
  background-color: rgba(0, 140, 47, 0.1);
  color: var(--erreci-primary, #008c2f);
  transform: translateY(-1px);
}

.erreci-shell-menu__link--kopa {
  width: 118px;
  min-height: 38px;
  padding: 0;
  border-radius: 0;
  background: url("assets/images/logo-kopa.png") no-repeat center / contain;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

.erreci-shell-menu__link--kopa:hover,
.erreci-shell-menu__link--kopa:focus-visible,
.current-menu-item > .erreci-shell-menu__link--kopa,
.current_page_item > .erreci-shell-menu__link--kopa,
.current-menu-ancestor > .erreci-shell-menu__link--kopa,
.erreci-shell-menu__link--kopa[aria-current="page"] {
  background: url("assets/images/logo-kopa.png") no-repeat center / contain;
  background-color: transparent;
  color: transparent;
  transform: none;
}

.erreci-shell-footer {
  background: linear-gradient(135deg, #2e2c2b 0%, #393735 55%, #177038 100%);
  color: #f5f7f6;
}

.erreci-shell-footer__inner {
  max-width: min(1520px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 1.4rem 0 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.9fr) minmax(220px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.erreci-shell-footer h2,
.erreci-shell-footer p,
.erreci-shell-footer a,
.erreci-shell-footer strong {
  color: inherit;
}

.erreci-shell-footer__brand h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
}

.erreci-shell-footer__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #91d0a3;
}

.erreci-shell-footer__nav {
  display: block;
}

.erreci-shell-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.erreci-shell-footer__menu-item {
  margin: 0;
}

.erreci-shell-footer__menu-link {
  display: inline-flex;
  font-weight: 600;
  text-decoration: none;
}

.erreci-shell-footer__menu-link:hover,
.erreci-shell-footer__menu-link:focus-visible {
  color: #97d2aa;
}

.erreci-shell-footer__contacts p {
  margin-top: 0;
}

.erreci-shell-footer__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  background: #ffffff;
  color: var(--erreci-ink, #3a3836) !important;
  font-weight: 700;
  text-decoration: none;
}

.erreci-shell-footer__button:hover,
.erreci-shell-footer__button:focus-visible {
  background: #edf3ee;
}

.erreci-shell-footer__legal {
  max-width: min(1520px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #d7ddd9;
}

@media (max-width: 1100px) {
  .erreci-shell-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .erreci-shell-menu {
    justify-content: flex-start;
  }

  .erreci-shell-menu__item--kopa {
    margin-left: 0;
  }
}

@media (max-width: 782px) {
  .erreci-shell-brand__link {
    width: min(78vw, 320px);
    height: 64px;
  }

  .erreci-shell-menu__link {
    min-height: 36px;
    padding: 0.45rem 0.72rem;
    font-size: 0.94rem;
  }

  .erreci-shell-menu__link--kopa {
    width: 102px;
    min-height: 32px;
    padding: 0;
  }

  .erreci-shell-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .erreci-shell-header__inner,
  .erreci-shell-footer__inner,
  .erreci-shell-footer__legal {
    max-width: calc(100vw - 24px);
  }
}
