/* Mondego — site base CSS (nav, footer, cookie, responsive, form). Hand-authored;
   render.js appends generated .mhN:hover rules for style-hover attributes. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f7f4ef; }
::selection { background: #a86b4c; color: #f7f4ef; }
img { max-width: 100%; }

/* ---------- header / primary nav ---------- */
.mnav { display: flex; align-items: center; gap: 30px; }
.mnav-link {
  text-decoration: none; font-size: 14px; color: #4a443d; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer;
}
.mnav-link:hover { color: #a86b4c; }
.mnav-caret { font-size: 8px; color: #a86b4c; }
body[data-section="home"] .mnav-link[data-key="home"],
body[data-section="servicos"] .mnav-link[data-key="servicos"],
body[data-section="localidades"] .mnav-link[data-key="localidades"],
body[data-section="projetos"] .mnav-link[data-key="projetos"],
body[data-section="blog"] .mnav-link[data-key="blog"],
body[data-section="sobre"] .mnav-link[data-key="sobre"],
body[data-section="contacto"] .mnav-link[data-key="contacto"] { color: #a86b4c; font-weight: 600; }

.mnav-group { position: relative; }
.mnav-panel { position: absolute; top: 100%; left: -16px; padding-top: 14px; z-index: 60; display: none; }
.mnav-group:hover .mnav-panel, .mnav-panel:hover { display: block; }
.mnav-card {
  background: #f7f4ef; border: 1px solid #e4dccf; border-radius: 3px;
  box-shadow: 0 16px 40px rgba(42,38,34,0.13); padding: 8px; min-width: 240px;
  display: flex; flex-direction: column;
}
.mnav-ditem {
  text-decoration: none; color: #2a2622; font-size: 14px; font-weight: 500;
  padding: 11px 14px; border-radius: 2px; white-space: nowrap;
}
.mnav-ditem:hover { background: #f1ebe1; color: #a86b4c; }
.mnav-phone {
  text-decoration: none; color: #2a2622; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.mnav-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5a7d52; }
.mnav-cta {
  text-decoration: none; background: #2a2622; color: #f7f4ef; font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 2px; white-space: nowrap;
}
.mnav-cta:hover { background: #a86b4c; }

/* burger (hidden on desktop) */
.mnav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.mnav-burger span { display: block; width: 24px; height: 2px; background: #2a2622; transition: .2s; }

/* ---------- footer ---------- */
.mfoot-link { text-decoration: none; color: #b3a99c; font-size: 14px; }
.mfoot-link:hover { color: #cd9772; }
.mfoot-legal-link { text-decoration: none; color: #b3a99c; font-size: 13px; }
.mfoot-legal-link:hover { color: #cd9772; }

/* ---------- cookie banner ---------- */
.mcookie[hidden] { display: none !important; }
.mcookie-reject:hover { border-color: #e7e0d4; }
.mcookie-accept:hover { background: #c5825f; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .mnav-burger { display: flex; }
  .mnav {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #f7f4ef; padding: 80px 24px 24px; height: 100vh; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease; z-index: 80;
  }
  body.mnav-open .mnav { transform: translateX(0); }
  body.mnav-open .mnav-burger { position: fixed; right: 20px; top: 22px; z-index: 90; }
  .mnav-link { padding: 14px 0; border-bottom: 1px solid #e4dccf; font-size: 16px; }
  .mnav-panel { position: static; display: block; padding-top: 0; }
  .mnav-card { box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
  .mnav-phone, .mnav-cta { margin-top: 14px; }
  .mnav-cta { text-align: center; }
  .mfoot-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px) {
  .mfoot-grid { grid-template-columns: 1fr !important; }
  /* stack two-column inner grids on phones */
  .mondego-page [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ---------- contact form success (revealed by site.js) ---------- */
.mform-success { display: none; }

/* generated style-hover classes */
.mh0:hover{background: #2a2622;}
.mh1:hover{border-color: #2a2622;}
.mh2:hover{background: #faf8f4;}
.mh3:hover{background: #f7f4ef; color: #2a2622;}
.mh4:hover{border-color: #a86b4c;}
.mh5:hover{color: #a86b4c;}
