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

:root {
  --primary: #2E7D32;
  --primary-light: #4CAF50;
  --primary-dark: #1B5E20;
  --primary-bg: rgba(46,125,50,0.08);
  --primary-border: rgba(46,125,50,0.25);
  --dark: #212121;
  --dark-mid: #2c2c2c;
  --dark-lighter: #3a3a3a;
  --text: #333;
  --text-light: #666;
  --bg: #ffffff;
  --bg-light: #f5f5f5;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* ======================== NAV ======================== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #ffffff;
  padding: 8px 0;
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
nav .container { display: flex; justify-content: space-between; align-items: center; }
nav .logo { display: flex; align-items: center; gap: 10px; }
nav .logo img { height: 80px; width: auto; border-radius: 6px; }
nav .nav-links { display: flex; gap: 28px; align-items: center; }
nav .nav-links a {
  color: var(--text); font-size: 0.9rem;
  font-weight: 500; transition: color 0.2s;
}
nav .nav-links a:hover { color: var(--primary); }
nav .nav-links a.nav-cta {
  background: var(--primary); color: #fff; padding: 8px 20px; border-radius: 6px;
  font-weight: 600; font-size: 0.85rem; transition: background 0.2s;
}
nav .nav-links a.nav-cta:hover { background: var(--primary-dark); color: #fff; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); margin: 5px 0; transition: 0.3s; }

/* ======================== HERO ======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(33,33,33,0.94), rgba(33,33,33,0.8)),
              url('../img/proyecto-bosque-norte.jpeg') center/cover no-repeat;
  padding-top: 96px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block; background: rgba(76,175,80,0.15); color: var(--primary-light);
  padding: 6px 16px; border-radius: 30px; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 20px; border: 1px solid rgba(76,175,80,0.3);
}
.hero h1 {
  color: #fff; font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 10px;
}
.hero .rotating-text {
  color: var(--primary-light);
  display: inline-block;
  min-width: 280px;
  border-bottom: 3px solid var(--primary-light);
  padding-bottom: 2px;
  transition: opacity 0.4s ease;
}
.hero .rotating-text.fade { opacity: 0; }
.hero .hero-sub {
  color: rgba(255,255,255,0.65); font-size: 1.05rem; margin-top: 18px; max-width: 460px;
}
.hero-trust {
  display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap;
}
.hero-trust-item {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.6); font-size: 0.82rem;
}
.hero-trust-item i { color: var(--primary-light); font-size: 1rem; }
.btn-projects {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  color: var(--primary-light); font-weight: 600; font-size: 0.9rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px; transition: border-color 0.2s;
}
.btn-projects:hover { border-color: var(--primary-light); }

/* HERO FORM */
.hero-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 32px 28px;
  backdrop-filter: blur(6px);
}
.hero-form h3 {
  color: #fff; font-size: 1.15rem; font-weight: 700; margin-bottom: 6px;
}
.hero-form .form-hint {
  color: rgba(255,255,255,0.5); font-size: 0.8rem; margin-bottom: 20px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 0.8rem; font-weight: 500;
  margin-bottom: 5px; color: rgba(255,255,255,0.65);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07); color: #fff;
  font-family: inherit; font-size: 0.88rem;
  transition: border-color 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--primary-light); }
.form-group select option { background: var(--dark); color: #fff; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-submit {
  width: 100%; padding: 13px; margin-top: 4px;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { background: var(--primary-dark); }

/* ======================== SECTIONS ======================== */
section { padding: 90px 0; }
.section-label {
  display: inline-block; background: var(--primary-bg); color: var(--primary);
  padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.section-title { font-size: 2.1rem; font-weight: 800; margin-bottom: 14px; color: var(--dark); }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; max-width: 560px; }
.text-center .section-subtitle { margin: 0 auto; }

/* ======================== SERVICES ======================== */
.services { background: var(--bg-light); }
.services-list { margin-top: 50px; display: flex; flex-direction: column; gap: 0; }
.service-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e0e0e0;
}
.service-row:last-child { border-bottom: none; }
.service-item {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 32px 30px;
  transition: background 0.2s;
}
.service-item:first-child { border-right: 1px solid #e0e0e0; }
.service-item:hover { background: rgba(46,125,50,0.04); }
.service-item.full-width {
  grid-column: 1 / -1;
  max-width: 50%;
}
.service-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.service-text h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.service-text p { font-size: 0.88rem; color: var(--text-light); line-height: 1.55; }

/* ======================== PROJECTS ======================== */
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 50px;
}
.project-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.project-card:hover img { transform: scale(1.08); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(33,33,33,0.9) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h3 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.project-overlay p { color: rgba(255,255,255,0.7); font-size: 0.8rem; }

/* ======================== ABOUT ======================== */
.about { background: var(--bg-light); }
.about-content { margin-top: 50px; max-width: 800px; }
.about-content h3 {
  font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 18px;
}
.about-content p {
  color: var(--text-light); font-size: 0.95rem; margin-bottom: 14px;
}
.about-stats {
  display: flex; gap: 40px; margin-top: 32px;
  padding-top: 28px; border-top: 1px solid #ddd;
}
.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat .label { font-size: 0.78rem; color: var(--text-light); font-weight: 500; margin-top: 2px; }

/* ======================== CONTACT (bottom) ======================== */
.contact-bottom { background: var(--dark); color: #fff; padding: 70px 0; }
.contact-bottom-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.contact-card {
  display: flex; align-items: flex-start; gap: 16px;
}
.contact-card-icon {
  width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0;
  background: rgba(76,175,80,0.15); color: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.contact-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.contact-card p { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.contact-card a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.contact-card a:hover { color: var(--primary-light); }

/* ======================== FOOTER ======================== */
footer {
  background: #1a1a1a; padding: 28px 0; color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}
.footer-content {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-light); }

/* ======================== WHATSAPP ======================== */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 56px; height: 56px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ======================== LIGHTBOX ======================== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-caption {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8); font-size: 0.9rem; text-align: center;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.2rem; }
  .hero { min-height: auto; padding: 100px 0 60px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-bottom-grid { grid-template-columns: 1fr; gap: 28px; }
  .service-row { grid-template-columns: 1fr; }
  .service-item:first-child { border-right: none; border-bottom: 1px solid #e0e0e0; }
  .service-item.full-width { max-width: 100%; }
}

@media (max-width: 768px) {
  nav .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column;
    padding: 16px 20px 20px; gap: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
  nav .nav-links a:last-child { border-bottom: none; margin-top: 6px; text-align: center; }
  .hamburger { display: block; }
  .hero h1 { font-size: 1.9rem; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .about-stats { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 500px) {
  .projects-grid { grid-template-columns: 1fr; }
  .hero-trust { flex-direction: column; gap: 12px; }
}
