/* ==========================================================================
   SISTEMA DE DISEÑO - CORPORACIÓN COLVERDE
   ========================================================================== */

:root {
  /* Paleta de Colores */
  --color-brand-primary: #1E4620;   /* Verde Bosque Profundo */
  --color-brand-secondary: #C05B3F; /* Tierra/Terracota */
  --color-surface-light: #F8F9FA;   /* Blanco Humo */
  --color-surface-white: #FFFFFF;
  --color-overlay: rgba(0, 0, 0, 0.4);
  --color-overlay-dark: rgba(0, 0, 0, 0.7);
  
  /* Tipografía */
  --color-text-main: #2D3748;
  --color-text-muted: #718096;
  --font-family-primary: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Espaciado */
  --spacing-sm: 0.5rem;   /* 8px */
  --spacing-md: 1rem;     /* 16px */
  --spacing-lg: 2rem;     /* 32px */
  --spacing-xl: 4rem;     /* 64px */
  
  /* Radios de Borde y Sombras */
  --border-radius-card: 8px;
  --border-radius-btn: 4px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  
  /* Transiciones */
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-family-primary);
  color: var(--color-text-main);
  background-color: var(--color-surface-white);
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

/* JUSTIFICACIÓN DE TEXTO GLOBAL APROBADA */
p {
  text-align: justify;
}

.bg-light { background-color: var(--color-surface-light); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.rounded-img { border-radius: var(--border-radius-card); }
.w-100 { width: 100%; }
.align-center { align-items: center; }

/* ==========================================================================
   UTILIDADES MODULARES
   ========================================================================== */

.btn-primary {
  background-color: var(--color-brand-secondary);
  color: var(--color-surface-white);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-btn);
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  background-color: #A04A30;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-brand-primary);
  border: 2px solid var(--color-brand-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-btn);
  font-weight: 600;
  display: inline-block;
  transition: all var(--transition-speed) ease;
}

.btn-secondary:hover {
  background-color: var(--color-brand-primary);
  color: var(--color-surface-white);
}

.container-section {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-brand-primary);
  margin-bottom: var(--spacing-xl);
}

.section-title-left {
  font-size: 2.5rem;
  color: var(--color-brand-primary);
  margin-bottom: var(--spacing-md);
  text-align: left;
}

.lead-text {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header-global {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-xl);
  background-color: var(--color-surface-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
}

nav ul {
  display: flex;
  gap: var(--spacing-lg);
}

nav a {
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--transition-speed) ease;
  font-size: 0.9rem;
}

nav a:hover, nav a.active {
  color: var(--color-brand-primary);
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--color-brand-primary); 
  background-image: linear-gradient(var(--color-overlay), var(--color-overlay)), url('https://static.wixstatic.com/media/4b8e61_ffabd42d23de4149a11b569fd6e1e010.jpg');
  background-size: cover;
  background-position: center;
  color: var(--color-surface-white);
}

.hero-secundario {
  position: relative;
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--color-brand-primary);
  color: var(--color-surface-white);
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: var(--spacing-lg);
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  text-align: center;
}

.hero-secundario .hero-content h1 {
  font-size: 2.5rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
  text-align: center;
}

/* ==========================================================================
   TARJETAS Y GRILLAS GLOBALES
   ========================================================================== */
.ejes-accion {
  padding: var(--spacing-xl);
  background-color: var(--color-surface-light);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.card-modulo {
  background: var(--color-surface-white);
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

.card-modulo:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-modulo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  font-size: 1.5rem;
  color: var(--color-brand-primary);
  margin-bottom: var(--spacing-sm);
  text-align: left;
}

.card-body p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  flex-grow: 1;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
  align-self: flex-start;
}
.badge-ambiental { background-color: #E6F4EA; color: #137333; }
.badge-etnico { background-color: #FCE8E6; color: #C5221F; }
.badge-social { background-color: #FEF7E0; color: #B06000; }

.link-leer-mas {
  color: var(--color-brand-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   SPLIT SCREEN
   ========================================================================== */
.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.split-screen .image-content img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ==========================================================================
   GALERÍA (HONEYCOMB / PANAL)
   ========================================================================== */
.filtros-galeria {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.btn-filter {
  background: transparent;
  border: 1px solid var(--color-text-muted);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-filter.active, .btn-filter:hover {
  background: var(--color-brand-primary);
  color: var(--color-surface-white);
  border-color: var(--color-brand-primary);
}

.honeycomb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  max-width: 1000px;
}

.honeycomb-cell {
  flex: 0 1 250px;
  max-width: 250px;
  height: 288.5px;
  margin: 15px 15px; /* Spacing between hexagons */
  position: relative;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #ccc;
  overflow: hidden;
}

/* To create the interlocking honeycomb effect, we offset even rows. 
   Using negative margins or specific flex-basis helps. */
@media (min-width: 850px) {
  .honeycomb-cell:nth-child(7n+5),
  .honeycomb-cell:nth-child(7n+6),
  .honeycomb-cell:nth-child(7n+7) {
    margin-top: -65px;
    margin-bottom: -65px;
  }
  .honeycomb-cell:nth-child(7n+5) {
    margin-left: 140px;
  }
}

.honeycomb-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.honeycomb-cell:hover img {
  transform: scale(1.1);
}

.honeycomb-cell-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: rgba(30, 70, 32, 0.8);
  color: white;
  text-align: center;
  opacity: 0;
  transition: 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.honeycomb-cell:hover .honeycomb-cell-title {
  opacity: 1;
}

/* ==========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================== */
.contact-form-container {
  padding: var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text-main);
  text-align: left;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #CBD5E0;
  border-radius: var(--border-radius-btn);
  font-family: inherit;
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-global {
  background-color: var(--color-brand-primary);
  color: var(--color-surface-white);
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-md);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 900px) {
  .split-screen {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-global {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}
