/* =========================================================
   LEGAL PAGE
========================================================= */

.legal-page {
  background: #f8fbf7;
  min-height: 100vh;
}

.legal-hero {
  padding: 72px 0 24px;
}

.legal-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.05;
  color: #3f5640;
}

.legal-date {
  margin: 0;
  font-size: 1.05rem;
  color: #6f7b6f;
}

.legal-content {
  padding: 18px 0 80px;
}

.legal-container {
  max-width: 1100px;
}

.legal-container p,
.legal-container li {
  font-size: 1.06rem;
  line-height: 1.9;
  color: #5f6b5f;
}

.legal-container h2 {
  margin: 42px 0 14px;
  font-size: 1.9rem;
  line-height: 1.25;
  color: #3f5640;
}

.legal-container ul {
  margin: 12px 0 0 22px;
  padding: 0;
}

.legal-container a {
  color: #466346;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-container a:hover {
  color: #2f4632;
}

/* =========================================================
   RESPONSIVO LIMPO — LEGAL PAGES
========================================================= */

*,
*::before,
*::after{
  box-sizing: border-box;
}

html,
body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body{
  -webkit-text-size-adjust: 100%;
}

img,
video,
iframe{
  max-width: 100%;
}

h1, h2, h3, p, a, span, div, li{
  overflow-wrap: break-word;
}

.container{
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

/* =========================================================
   HEADER + HAMBURGUER
========================================================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 3000;
}

.header-inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand{
  min-width: 0;
  flex: 1;
}

.brand-text{
  min-width: 0;
}

.brand-title,
.brand-subtitle{
  display: block;
}

.brand-title{
  white-space: nowrap;
}

.brand-subtitle{
  line-height: 1.2;
}

.nav-toggle{
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(35,45,35,0.12);
  background: rgba(255,255,255,0.88);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 12px 26px rgba(20,30,20,0.08);
  z-index: 5001;
}

.nav-toggle span{
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #3f5640;
  transition: transform .25s ease, opacity .25s ease;
}

body.nav-open .nav-toggle span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2){
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-overlay{
  display: none;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px){

  .container{
    width: min(100% - 36px, 960px);
  }

  .header-inner{
    min-height: 78px;
  }

  .header-cta{
    display: none !important;
  }

  .nav-toggle{
    display: inline-flex !important;
    flex: 0 0 auto;
  }

  .nav-mobile-overlay{
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(18, 24, 19, 0.42);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 4998;
  }

  body.nav-open .nav-mobile-overlay{
    opacity: 1;
    pointer-events: auto;
  }

  .nav{
    position: fixed !important;
    top: 86px;
    left: 18px;
    right: 18px;
    width: auto !important;
    max-width: none !important;

    display: flex !important;
    flex-direction: column;
    gap: 8px;

    padding: 18px;
    border-radius: 26px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(35,45,35,0.10);
    box-shadow: 0 24px 70px rgba(20,30,20,0.18);
    backdrop-filter: blur(16px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    z-index: 4999;
  }

  body.nav-open .nav{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link{
    width: 100%;
    display: block;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 1rem;
    color: #3f5640;
    background: rgba(245,247,243,0.75);
  }

  .nav-link.is-active,
  .nav-link:hover{
    background: rgba(70,99,70,0.12);
  }

  body.nav-open{
    overflow: hidden;
  }
}

/* =========================================================
   MOBILE — LEGAL
========================================================= */

@media (max-width: 768px){

  html,
  body{
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .container{
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .site-header{
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .header-inner{
    width: 100%;
    max-width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow: visible;
  }

  .brand{
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 58px);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
  }

  .brand-mark{
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .brand-text{
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .brand-title{
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtitle{
    display: block;
    font-size: .82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle{
    display: inline-flex !important;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .legal-hero{
    padding: 52px 0 16px;
  }

  .legal-hero h1{
    font-size: clamp(2rem, 11vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
  }

  .legal-date{
    font-size: .95rem;
    line-height: 1.5;
  }

  .legal-content{
    padding: 10px 0 58px;
  }

  .legal-container{
    max-width: 100%;
  }

  .legal-container p,
  .legal-container li{
    font-size: .98rem;
    line-height: 1.78;
  }

  .legal-container h2{
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 34px 0 12px;
  }

  .legal-container ul{
    margin-left: 18px;
  }

  .legal-container a{
    word-break: break-word;
  }

  .footer-bottom{
    gap: 16px;
    text-align: center;
  }

  .footer-legal{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
  }

  .footer-legal a{
    display: inline-block;
  }

  .complaints-book-link{
    left: 14px;
    bottom: 14px;
  }

  .complaints-book-link img{
    width: 105px;
    max-width: 38vw;
    height: auto;
  }
}

/* =========================================================
   ECRÃS PEQUENOS
========================================================= */

@media (max-width: 420px){

  .container{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .header-inner{
    min-height: 76px;
  }

  .brand{
    max-width: calc(100% - 54px);
    gap: 10px;
  }

  .brand-mark{
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .brand-title{
    font-size: 1rem;
  }

  .brand-subtitle{
    font-size: .78rem;
  }

  .nav-toggle{
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .legal-hero{
    padding-top: 44px;
  }

  .legal-hero h1{
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

  .legal-container p,
  .legal-container li{
    font-size: .95rem;
    line-height: 1.72;
  }

  .legal-container h2{
    font-size: 1.28rem;
  }
}

@media (max-width: 380px){

  .brand-mark{
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .brand-title{
    font-size: .98rem;
  }

  .brand-subtitle{
    font-size: .76rem;
  }

  .nav-toggle{
    width: 42px;
    height: 42px;
  }
}

.nav-toggle{
  pointer-events: auto !important;
}

.nav-toggle span{
  pointer-events: none;
}

.nav-toggle{
  pointer-events: auto !important;
}

.nav-toggle span{
  pointer-events: none;
}