/* 
   ENECYG CONSTRUCTORA - SISTEMA DE DISEÑO INSTITUCIONAL
   Versión: 1.0 (Sin dependencias externas)
   Paleta: Verdes sobrios, Charcoal, Blanco Arquitectónico.
*/

:root {
  /* Colores de Marca */
  --color-primary: #0F2E28;
  /* Verde Bosque Profundo */
  --color-primary-light: #1A3C34;
  --color-accent: #C5D86D;
  /* Verde Técnico de Contraste */
  --color-secondary: #2D3436;
  /* Gris Carbono */

  /* Paleta Neutral */
  --color-bg: #FDFDFD;
  --color-bg-alt: #F8F9FA;
  --color-text-main: #1D1D1F;
  --color-text-muted: #4A5568;
  --color-border: #E2E8F0;

  /* Tipografía (Pila de fuentes del sistema) */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-heading: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Espaciado y Layout */
  --space-unit: 1rem;
  --container-max-width: 1200px;

  /* Transiciones */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- ESTILOS BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

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

/* --- UTILIDADES DE DISEÑO --- */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 6rem 0;
}

.bg-alt {
  background-color: var(--color-bg-alt);
}

.bg-dark {
  background-color: var(--color-primary);
}

.text-white {
  color: #FFFFFF;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1.25rem;
  }

  .site-header {
    position: sticky;
    padding: 1rem 0;
  }

  .nav-wrapper {
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem 1rem;
  }

  .nav-links a {
    font-size: 0.72rem;
  }

  .section-padding {
    padding: 4rem 0;
  }

  .hero-section {
    min-height: 100svh;
    height: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .footer-top {
    flex-direction: column;
  }

  .footer-bottom-info {
    text-align: left;
  }
}

/* --- BOTONES Y COMPONENTES --- */
.btn-institutional {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  background: transparent;
}

.btn-institutional:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-primary);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
}

/* --- HEADER Y NAVEGACIÓN --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.footer-logo {
  height: 35px;
  margin-bottom: 1rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--color-primary);
}

.header-scrolled {
  padding: 1rem 0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* --- SECCIÓN HERO --- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-primary);
  color: white;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/hero.png') center/cover no-repeat;
  opacity: 0.35;
  filter: grayscale(100%);
}

.hero-bg-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(15, 46, 40, 0.95), rgba(15, 46, 40, 0.5));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  opacity: 0.85;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
}

.hero-actions .btn-institutional {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.hero-actions .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
}

.hero-actions .btn-institutional:hover {
  background: white;
  color: var(--color-primary);
}

/* --- SECCIONES DE CONTENIDO --- */
.section-header {
  margin-bottom: 4rem;
  max-width: 700px;
}

.section-header h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  position: relative;
  padding-bottom: 1rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--color-accent);
}

.section-header.text-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Tarjetas de Servicio */
.service-card {
  background: white;
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
}

.service-media {
  height: 240px;
  width: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transition: var(--transition-smooth);
}

.service-card:hover .service-media {
  filter: grayscale(0%);
}

.service-card h3 {
  padding: 2rem 2rem 1rem;
  color: var(--color-primary);
}

.service-card ul {
  padding: 0 2rem 2.5rem;
}

.service-card li {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text-muted);
}

.service-card li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--color-accent);
}

/* Flujo de Metodología */
.methodology-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.flow-step {
  background: white;
  padding: 3rem 2rem;
}

.step-num {
  display: block;
  font-size: 3.8rem;
  font-weight: 800;
  color: #1A3C34;
  line-height: 1;
  margin-bottom: 1.5rem;
  -webkit-text-stroke: 1px var(--color-border);
}

.flow-step h4 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.flow-step p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

@media (max-width: 1024px) {
  .methodology-flow {
    grid-template-columns: 1fr;
  }
}

/* Estadísticas y Contexto */
.stats-grid {
  display: flex;
  gap: 3.5rem;
  margin-top: 3.5rem;
}

.location-visual {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.location-visual .location-kicker {
  display: block;
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.location-visual strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.location-visual p {
  max-width: 420px;
  opacity: 0.78;
  font-size: 0.9rem;
}

.stat-val {
  font-size: 3.2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.pilar-card {
  padding: 2.5rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
}

.pilar-card h4 {
  margin-bottom: 0.8rem;
  color: var(--color-primary);
}

.pilar-card p {
  font-size: 0.9rem;
}

/* --- FOOTER --- */
.site-footer {
  padding: 5rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer.bg-dark {
  color: var(--color-bg);
}

.site-footer.bg-dark p {
  opacity: 0.8;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-bottom-info {
  text-align: right;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* --- ANIMACIONES --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-3>*:nth-child(2) {
  transition-delay: 0.15s;
}

.grid-3>*:nth-child(3) {
  transition-delay: 0.3s;
}
