@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Premium Light/Corporate Theme */
  --bg-primary: #ffffff; 
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-primary: #6cae2f; /* Requested Green */
  --accent-secondary: #4d8a1e; /* Darker Green */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  
  --border-color: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 10px 20px rgba(108, 174, 47, 0.2);
  
  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* ====== LAYOUT & COMPONENTS ====== */

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

/* Header & Glassmorphism Navigation */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.header.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-img {
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.5px;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(108, 174, 47, 0.3);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline:hover {
  background: rgba(108, 174, 47, 0.05); /* very light green hover */
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 6rem 0 9rem;
}

.section-light {
  background: var(--bg-primary);
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 174, 47, 0.2);
}

.card-img-wrapper {
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: relative;
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-gradient);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1rem;
  font-family: var(--font-heading);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  padding-bottom: 5rem;
  overflow: hidden;
  background-color: var(--bg-primary);
  background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95)), url('../img/hero_bg.png');
  background-size: cover;
  background-position: center;
}

/* Background effects */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,174,47,0.06) 0%, rgba(255,255,255,0) 70%);
  top: -10%;
  right: -10%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(77,138,30,0.04) 0%, rgba(255,255,255,0) 70%);
  bottom: 0;
  left: -10%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Form Styles */
.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(108, 174, 47, 0.1);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.05); /* Lighter border for light mode */
  color: var(--text-muted);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
  z-index: 1; /* keep content above glows */
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  body {
    overflow-x: hidden;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
  }

  .logo-img {
    height: 45px;
  }

  .nav-menu {
    position: fixed;
    top: 135px; /* Ajustado para el nuevo alto del header en móvil */
    left: -100%;
    width: 100%;
    height: calc(100vh - 135px);
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .nav-menu.active {
    left: 0;
  }

  .menu-toggle {
    display: block;
    font-size: 1.8rem;
    order: 2;
  }

  .logo {
    order: 1;
  }

  /* Fix para scroll horizontal y espaciados */
  .container {
    padding: 0 1.5rem;
    width: 100%;
    overflow: hidden;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding-top: 160px !important;
    min-height: auto !important;
    padding-bottom: 4rem !important;
    align-items: center !important;
    text-align: center !important;
  }

  h1 {
    font-size: 2rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Redimensionar logo en Hero para móvil */
  .hero img {
    max-width: 180px !important;
  }

  /* Forzar que nada desborde el ancho de pantalla */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Desactivar brillos de fondo en móvil para evitar scroll horizontal */
  .bg-glow, .bg-glow-2 {
    display: none !important;
  }

  /* Refuerzo absoluto para evitar scroll horizontal */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
  }

  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }
}
