/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #1a4d2e;
  --green-mid:    #2d6a4f;
  --green-light:  #52b788;
  --green-pale:   #d8f3dc;
  --brown:        #7b4f2e;
  --brown-light:  #c49a6c;
  --brown-pale:   #f5ebe0;
  --white:        #ffffff;
  --off-white:    #f8faf9;
  --text-dark:    #1a2318;
  --text-mid:     #3d5a45;
  --text-light:   #6b8f71;
  --shadow-sm:    0 2px 8px rgba(26,77,46,.10);
  --shadow-md:    0 8px 32px rgba(26,77,46,.15);
  --shadow-lg:    0 20px 60px rgba(26,77,46,.20);
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.35s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

img { display: block; max-width: 100%; }

a { text-decoration: none; color: inherit; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-mid);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45,106,79,.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}
.btn-full { width: 100%; justify-content: center; }

/* ===== SECTION TAGS & HEADERS ===== */
.section-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-light);
  background: var(--green-pale);
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.section-tag.light {
  color: var(--green-pale);
  background: rgba(255,255,255,.15);
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}
.section-header h2 { margin-bottom: 1rem; }
.section-desc { color: var(--text-light); font-size: 1.05rem; }

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.25;
  color: var(--text-dark);
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: .8rem 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.logo-icon {
  width: 42px; height: 42px;
  background: var(--green-mid);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main {
  font-weight: 700;
  font-size: .95rem;
  color: var(--white);
  transition: color var(--transition);
}
.logo-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
}
#navbar.scrolled .logo-main { color: var(--green-dark); }
#navbar.scrolled .logo-sub  { color: var(--text-light); }

.nav-links {
  display: flex;
  list-style: none;
  gap: .25rem;
}
.nav-links a {
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  transition: var(--transition);
}
.nav-links a:hover { background: rgba(255,255,255,.15); color: var(--white); }
#navbar.scrolled .nav-links a { color: var(--text-mid); }
#navbar.scrolled .nav-links a:hover { background: var(--green-pale); color: var(--green-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}
#navbar.scrolled .hamburger span { background: var(--green-dark); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,77,46,.85) 0%,
    rgba(45,106,79,.70) 50%,
    rgba(123,79,46,.50) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: 5rem;
}
.hero-tag {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 1.25rem;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero-content h1 span { color: var(--brown-light); }
.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2.5rem; right: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; transform: scaleY(.8); }
  50%       { opacity: 1;  transform: scaleY(1); }
}

/* ===== STATS ===== */
.stats {
  background: var(--green-dark);
  padding: 3.5rem 0;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat-item {
  text-align: center;
  color: var(--white);
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 40px;
  background: rgba(255,255,255,.2);
}
.stat-num {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--green-light);
  line-height: 1;
}
.stat-plus {
  font-size: 2rem;
  color: var(--green-light);
  font-weight: 700;
  vertical-align: middle;
}
.stat-label {
  display: block;
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  letter-spacing: .05em;
  margin-top: .4rem;
}

/* ===== SOBRE ===== */
.sobre {
  padding: 8rem 0;
  background: var(--off-white);
}
.sobre-imgs {
  position: relative;
}
.img-main {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.img-badge {
  position: absolute;
  bottom: -2rem; right: -2rem;
  width: 200px; height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 5px solid var(--white);
  box-shadow: var(--shadow-md);
}
.experience-badge {
  position: absolute;
  top: 2rem; left: -2rem;
  background: var(--brown);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 130px;
}
.exp-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.exp-text {
  font-size: .72rem;
  opacity: .85;
  margin-top: .2rem;
  line-height: 1.3;
}

.sobre-text h2 { margin-bottom: 1.5rem; }
.sobre-text > p { color: var(--text-mid); margin-bottom: 1rem; font-size: 1rem; }
.sobre-values { display: flex; flex-direction: column; gap: 1.25rem; margin: 2rem 0; }
.value-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.value-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: .1rem; }
.value-item strong { display: block; color: var(--green-dark); font-size: .95rem; }
.value-item p { font-size: .88rem; color: var(--text-light); margin: 0; }
.sobre-nif {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--green-pale);
  padding: .6rem 1.2rem;
  border-radius: 50px;
  font-size: .85rem;
  color: var(--green-dark);
}

/* ===== PROJECTO ===== */
.projeto {
  position: relative;
  padding: 9rem 0;
  overflow: hidden;
}
.projeto-bg-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.projeto-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,77,46,.92), rgba(26,77,46,.80));
  z-index: 1;
}
.projeto-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.projeto-content h2 { color: var(--white); margin-bottom: 1rem; }
.projeto-intro {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}
.projeto-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.proj-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: var(--transition);
  text-align: left;
}
.proj-card:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.3);
}
.proj-card-icon { font-size: 2rem; margin-bottom: 1rem; }
.proj-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: .6rem;
}
.proj-card p { font-size: .88rem; color: rgba(255,255,255,.75); line-height: 1.6; }

/* ===== PROVINCIAS ===== */
.provincias {
  padding: 8rem 0;
  background: var(--white);
}
.prov-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.prov-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  animation: fadeUp .6s ease both;
  animation-delay: var(--delay);
}
.prov-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.prov-img-wrap { position: relative; overflow: hidden; height: 220px; }
.prov-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.prov-card:hover .prov-img-wrap img { transform: scale(1.08); }
.prov-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(26,77,46,.8), transparent);
  padding: 1rem;
}
.prov-overlay span { font-size: .75rem; color: rgba(255,255,255,.85); letter-spacing: .05em; }
.prov-info {
  padding: 1.5rem;
  background: var(--white);
}
.prov-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--green-dark);
  margin-bottom: .5rem;
}
.prov-info p { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; line-height: 1.6; }
.prov-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--green-pale);
  color: var(--green-mid);
  padding: .25rem .75rem;
  border-radius: 50px;
}

/* ===== PARCERIA ===== */
.parceria {
  padding: 8rem 0;
  background: var(--brown-pale);
}
.parceria-grid { gap: 5rem; }
.parceria-text h2 { margin-bottom: 1.5rem; }
.parceria-text > p { color: var(--text-mid); margin-bottom: 1rem; }
.parceria-pillars { display: flex; flex-direction: column; gap: .85rem; margin-top: 2rem; }
.pillar { display: flex; align-items: center; gap: .85rem; }
.pillar-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brown);
  flex-shrink: 0;
}
.pillar span { font-size: .93rem; color: var(--text-mid); font-weight: 500; }
.parceria-img-wrap {
  position: relative;
}
.parceria-img-wrap img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.parceria-badge {
  position: absolute;
  bottom: -1.5rem; left: -1.5rem;
  background: var(--white);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.badge-flag { font-size: 1.4rem; }
.parceria-badge span { font-size: .75rem; color: var(--text-light); }
.parceria-badge strong { font-size: .95rem; color: var(--green-dark); }

/* ===== CONTACTO ===== */
.contacto {
  padding: 8rem 0;
  background: var(--off-white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { display: flex; gap: 1.25rem; align-items: flex-start; }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-item strong { display: block; color: var(--green-dark); font-weight: 600; margin-bottom: .3rem; }
.contact-item p { font-size: .9rem; color: var(--text-mid); margin: 0; line-height: 1.7; }

/* FORM */
.contact-form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-dark); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid #e0ebe3;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .93rem;
  color: var(--text-dark);
  background: var(--off-white);
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
}
.form-success {
  display: none;
  text-align: center;
  color: var(--green-mid);
  font-size: .9rem;
  font-weight: 500;
  padding: .75rem;
  background: var(--green-pale);
  border-radius: var(--radius);
  margin-top: 1rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1.25rem; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 300px; }
.footer-links h4,
.footer-contact h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--green-light); }
.footer-contact p { font-size: .88rem; margin-bottom: .5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.5rem 0;
  text-align: center;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.4); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .projeto-cards { grid-template-columns: repeat(2, 1fr); }
  .prov-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat-item:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
  .parceria-grid { gap: 3rem; }

  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text-mid) !important; padding: .75rem 1rem; }

  .hero-content h1 { font-size: 2rem; }
  .hero-scroll { display: none; }

  .sobre-imgs { margin-bottom: 2rem; }
  .img-badge { display: none; }
  .experience-badge { left: 1rem; top: 1rem; }
  .img-main { height: 340px; }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }

  .parceria-img-wrap img { height: 300px; }
  .parceria-badge { left: .5rem; bottom: .5rem; }

  .projeto-cards { grid-template-columns: 1fr; }
  .prov-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 480px) {
  .prov-grid { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; }
  .btn { text-align: center; justify-content: center; }
}
