/* RESET */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family:'Inter', sans-serif;
  background:#faf9f6;
  color:#232323;
  font-size:18px;
  line-height:1.6;
  overflow-x:hidden;
}

/* Add smooth scroll class */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* VARS */
:root {
  --header-height:72px;
  --accent:#7c5e3e;
  --bg:#faf9f6;
  --text:#232323;
}

/* HEADER */
.header {
  position:fixed; top:0; left:0; right:0;
  height:var(--header-height);
  display:flex; align-items:center;
  background:rgba(250,249,246,0.9);
  backdrop-filter:blur(10px);
  z-index:1200;
  border-bottom:1px solid rgba(0,0,0,0.05);
}
.header-inner {
  width:100%; padding:0 6vw;
  display:flex; justify-content:space-between; align-items:center;
}
.logo { display:flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--text); font-weight:600; font-size:1.4rem; }
.logo img { height:var(--header-height); object-fit:contain; }

/* NAV */
.nav { display:flex; align-items:center; gap:1rem; }
.nav a, .lang-switch {
  text-decoration:none; color:var(--text);
  font-weight:500;
  padding:.5em 1.2em;
  border-radius:999px;
  transition:.25s ease;
}
.nav a:hover, .lang-switch:hover { background:rgba(0,0,0,0.05); color:var(--accent); }
.lang-switch { border:none; background:none; cursor:pointer; font-weight:600; }

/* HAMBURGER */
.hamburger { 
  display:none; 
  background:none; 
  border:none; 
  width:36px; 
  height:36px; 
  cursor:pointer;
  position: relative;
  z-index: 1300;
}
.hamburger span { 
  display:block; 
  width:24px; 
  height:2px; 
  margin:5px auto; 
  background:var(--text); 
  transition:.3s cubic-bezier(.77,0,.175,1);
  transform-origin: center;
}
.hamburger.active span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; transform: scale(0); }
.hamburger.active span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* MOBILE NAV */
@media(max-width:900px){
  .hamburger{display:block;}
  .nav {
    position:fixed; top:0; right:0;
    height:100vh; width:260px;
    background:var(--bg);
    flex-direction:column; padding-top:var(--header-height);
    transform:translateX(100%);
    transition:transform .3s ease;
    z-index:1100;
  }
  .nav.active { transform:translateX(0); }
  .nav a, .lang-switch { width:100%; text-align:center; }
}
@media(min-width:901px){
  .nav{ position:static; flex-direction:row; }
}

/* HERO */
.hero {
  position:relative;
  width:100%;
  min-height:100vh;
  height: -webkit-fill-available; /* Fix for mobile Safari */
  padding:0;
  display:flex;
  justify-content:center;
  align-items:flex-end;
  overflow:hidden;
}
.hero-bg-image {
  position:absolute; inset:0;
  background:url('https://www.sunset.com/wp-content/uploads/octothorpe-house-exterior-pr-0323-1200x600.jpg') center/cover no-repeat;
  z-index:1;
}
.hero-center {
  position:absolute;
  bottom:6vh;
  left:50%;
  transform:translateX(-50%);
  z-index:2;
  width:90%;
  text-align:center;
  color:#fff;
}
.hero h1 {
  font-family:'Work Sans', sans-serif;
  font-size:clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight:500;
  margin-bottom:.8rem;
  text-shadow:0 3px 14px rgba(0,0,0,0.45);
  animation: fadeUp 1.5s ease forwards;
}
.hero p {
  font-size:clamp(1.2rem, 3vw, 1.6rem); /* maior */
  font-weight:400; /* mais forte */
  text-align:center;
  line-height:1.4;
  opacity:0.95;
  text-shadow:0 2px 12px rgba(0,0,0,0.5);
}

/* CREDITOS DA IMAGEM */
.image-credit {
  position:absolute; bottom:.8rem; right:.8rem;
  font-size:.7rem; color:rgba(255,255,255,0.9);
  background:rgba(0,0,0,0.35);
  padding:.3em .6em;
  border-radius:3px;
  z-index:3;
  pointer-events:none;
}
@media(max-width:600px){
  .image-credit {
    font-size:.65rem;
    bottom:.5rem; right:.5rem;
    padding:.2em .5em;
  }
}

@keyframes fadeUp { from{opacity:0; transform:translateY(40px);} to{opacity:1; transform:translateY(0);} }

/* SECTIONS */
section {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: max(calc(var(--header-height) + 2rem), 5vh) 2rem max(2rem, 5vh);
  text-align: center;
  box-sizing: border-box;
}
section h2 {
  font-family:'Work Sans', sans-serif;
  font-size:clamp(2rem,4vw,3rem);
  margin-bottom:2rem;
  font-weight:600;
}
section p { max-width:760px; margin:0 auto 1.5rem; font-size:1.05rem; text-align:justify; }

/* SOBRE */
.sobre-content { max-width:760px; margin:0 auto; }
.beneficios-list { list-style:none; margin-top:2rem; text-align:left; }
.beneficios-list li { margin-bottom:1rem; font-size:1rem; position:relative; padding-left:1.4rem; }
.beneficios-list li::before { content:"▸"; color:var(--accent); position:absolute; left:0; }
.beneficios-list strong { color:var(--accent); }

/* CONTACTO */
.contacto p { margin-bottom:1.5rem; text-align:center; }

/* COFINANCING */
.cofinancing-logos {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  width: clamp(150px, 80vw, 500px);
  max-width: 100%;
}
.cofinancing-logos a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}
.cofinancing-logos img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s ease;
}
.cofinancing-logos a:hover img {
  opacity: 0.8;
}

/* BUTTON */
.btn {
  display:inline-block;
  padding:1rem 2.4rem;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  border-radius:40px;
  text-decoration:none;
  font-size:1.05rem;
  transition:.3s;
}
.btn:hover { background:#a9855c; transform:translateY(-2px); }

/* FOOTER */
.footer { text-align:center; padding:1.5rem 1rem; font-size:.9rem; color:#777; border-top:1px solid rgba(0,0,0,0.05); }

/* COOKIES */
.cookie-banner {
  position:fixed; bottom:0; left:0; right:0;
  background:rgba(0,0,0,0.85); color:#fff;
  padding:.8rem 1rem;
  text-align:center;
  font-size:.9rem;
  display:flex; justify-content:center; align-items:center; gap:1rem;
  z-index:2000;
}
.cookie-banner button {
  background:var(--accent); border:none; color:#fff;
  padding:.4rem 1rem; border-radius:20px; cursor:pointer;
  font-size:.85rem; transition:.3s;
}
.cookie-banner button:hover { background:#a9855c; }

/* FADE SECTIONS */
.fade-section { opacity:0; transform:translateY(40px); transition:all .8s ease; }
.fade-section.visible { opacity:1; transform:translateY(0); }

/* Mobile Adjustments */
@media (max-width: 480px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 16px;
  }

  section {
    padding: max(calc(var(--header-height) + 1rem), 4vh) 1rem max(1rem, 4vh);
    justify-content: flex-start;
  }

  .hero-center {
    bottom: max(12vh, 80px);
  }

  .hero h1 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    margin-bottom: 0.6rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
    line-height: 1.4;
  }

  .sobre-content {
    padding: max(2vh, 20px) 0;
  }

  section h2 {
    font-size: clamp(1.6rem, 7vw, 2rem);
    margin: max(2vh, 20px) 0;
  }

  section p {
    font-size: 0.95rem;
    text-align: left;
    margin-bottom: max(2vh, 15px);
  }

  .beneficios-list {
    margin-top: max(2vh, 20px);
  }

  .beneficios-list li {
    font-size: 0.9rem;
    margin-bottom: max(1.5vh, 12px);
    line-height: 1.4;
  }

  .contacto {
    padding-top: max(calc(var(--header-height) + 2rem), 10vh);
  }
}

/* Tablet Adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  section {
    padding: max(calc(var(--header-height) + 2rem), 6vh) 2rem max(2rem, 6vh);
  }

  .sobre-content {
    padding: max(3vh, 30px) 0;
  }

  section p {
    font-size: 1rem;
    margin-bottom: max(3vh, 20px);
  }
}

/* Handle tall mobile screens */
@media (max-height: 667px) and (max-width: 480px) {
  section {
    padding: calc(var(--header-height) + 1rem) 1rem 1rem;
  }

  .hero-center {
    bottom: 8vh;
  }

  .beneficios-list li {
    margin-bottom: 8px;
  }
}

/* COFINANCING PAGE */
.cofinanciamento-page {
  min-height: 100vh;
  padding: max(calc(var(--header-height) + 2rem), 5vh) 2rem max(2rem, 5vh);
}

.cofinanciamento-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.cofinanciamento-content h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.project-info {
  margin-bottom: 2.5rem;
}

.project-info h3 {
  font-family: 'Work Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.project-info p {
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  margin: 0;
  max-width: none;
}

.project-objectives {
  list-style: none;
  padding-left: 0;
}

.project-objectives li {
  margin-bottom: 1rem;
  font-size: 1rem;
  position: relative;
  padding-left: 1.4rem;
}

.project-objectives li::before {
  content: "▸";
  color: var(--accent);
  position: absolute;
  left: 0;
}

.cofinanciamento-content .cofinancing-logos {
  margin-top: 3rem;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  width: clamp(200px, 70vw, 500px);
}
