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

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --primary:       #2D5016;
  --primary-light: #3d6b1f;
  --primary-dark:  #1e3710;
  --accent:        #C9901A;
  --accent-light:  #e5a825;
  --bg:            #FAF7F0;
  --bg-card:       #ffffff;
  --text:          #2C2C2C;
  --text-muted:    #6b7280;
  --border:        #e5ddd0;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
  --shadow-md:     0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:     0 12px 40px rgba(0,0,0,.15);
  --radius:        14px;
  --radius-sm:     8px;
}

/* ─── Base ───────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--primary); }
a:hover { color: var(--accent); }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar.bg-primary,
.navbar.navbar-dark.bg-primary {
  background-color: var(--primary) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.3px;
}
.navbar .nav-link {
  font-weight: 600;
  padding: .5rem 1rem !important;
  border-radius: 6px;
  transition: background .15s;
}
.navbar .nav-link:hover { background: rgba(255,255,255,.12); }
.navbar .nav-link.text-warning { color: var(--accent-light) !important; }

/* ─── Bootstrap overrides ────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-light);
  border-color: var(--primary-light);
}
.btn-success { font-weight: 700; }
.badge.bg-primary { background: var(--primary) !important; }
.alert-success { border-left: 4px solid #198754; }
.alert-danger  { border-left: 4px solid #dc3545; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #4a7a25 100%);
  color: #fff;
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -40%; right: -8%;
  width: 520px; height: 520px;
  background: rgba(255,255,255,.04);
  border-radius: 50%; pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -30%; left: -5%;
  width: 380px; height: 380px;
  background: rgba(201,144,26,.08);
  border-radius: 50%; pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(201,144,26,.25);
  color: #f5c46a;
  padding: 4px 16px; border-radius: 20px;
  font-size: .8rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 16px;
}
.hero .subtitle {
  font-size: 1.1rem; opacity: .88;
  max-width: 480px; margin-bottom: 32px;
}
.hero-search {
  display: flex; align-items: center;
  background: #fff; border-radius: 50px;
  padding: 8px 8px 8px 20px; max-width: 560px;
  gap: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.25);
  margin-bottom: 28px;
}
.hero-search i { color: #9ca3af; flex-shrink: 0; }
.hero-search input {
  border: none; outline: none; flex: 1;
  font-size: 1rem; font-family: 'Nunito', sans-serif;
  color: var(--text); background: transparent; min-width: 0;
}
.hero-search input::placeholder { color: #9ca3af; }
.hero-search button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 40px; padding: 10px 22px;
  font-weight: 700; font-family: 'Nunito', sans-serif;
  font-size: .95rem; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.hero-search button:hover { background: var(--accent-light); }

/* ─── Stats bar ──────────────────────────────────────────── */
.stats-bar { background: var(--accent); color: #fff; padding: 18px 0; }
.stat-number { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label  {
  font-size: .78rem; opacity: .88;
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 700; margin-top: 2px;
}

/* ─── Section titles ─────────────────────────────────────── */
.section-title {
  font-size: 1.55rem; font-weight: 800;
  color: var(--primary); position: relative; padding-bottom: 12px; margin-bottom: 0;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 44px; height: 3px; background: var(--accent); border-radius: 2px;
}
.section-link {
  color: var(--accent); font-weight: 700; text-decoration: none;
  font-size: .95rem; transition: opacity .15s;
}
.section-link:hover { opacity: .75; color: var(--accent); }

/* ─── Business cards ─────────────────────────────────────── */
.empresa-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  height: 100%; display: flex; flex-direction: column;
}
.empresa-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent;
}
.empresa-card .logo-wrap {
  height: 150px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 16px; border-bottom: 1px solid var(--border);
}
.empresa-card .logo-wrap img {
  max-height: 118px; max-width: 100%; object-fit: contain;
}
.logo-placeholder {
  width: 72px; height: 72px; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; font-weight: 800; color: #fff;
}
.empresa-card .card-body {
  padding: 16px; flex: 1; display: flex; flex-direction: column;
}
.empresa-nombre { font-size: 1rem; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.empresa-info   { font-size: .875rem; color: var(--text-muted); line-height: 1.9; flex: 1; }
.empresa-info i { width: 16px; color: var(--primary); opacity: .7; }
.actividad-badge {
  display: inline-block; background: rgba(45,80,22,.1); color: var(--primary);
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px; margin-top: 10px;
}
.categoria-badge {
  display: inline-block; background: rgba(201,144,26,.15); color: #7a5510;
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ─── News cards ─────────────────────────────────────────── */
.noticia-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  height: 100%; display: flex; flex-direction: column;
}
.noticia-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent;
}
.noticia-img { height: 185px; object-fit: cover; width: 100%; }
.noticia-img-placeholder {
  height: 185px; background: linear-gradient(135deg, var(--primary), #4a7a25);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.noticia-card .card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.noticia-fecha {
  font-size: .78rem; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.noticia-titulo { font-size: .97rem; font-weight: 800; line-height: 1.35; margin-bottom: 8px; flex: 1; }
.noticia-titulo a { color: var(--text); text-decoration: none; transition: color .15s; }
.noticia-titulo a:hover { color: var(--primary); }
.noticia-excerpt { font-size: .85rem; color: var(--text-muted); line-height: 1.55; }

/* ─── Gallery ────────────────────────────────────────────── */
.galeria-thumb {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: var(--radius-sm); display: block;
  transition: opacity .2s, transform .2s;
}
.galeria-thumb:hover { opacity: .82; transform: scale(1.02); }

/* ─── CTA banner ─────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius); color: #fff; padding: 52px 32px; text-align: center;
}
.cta-banner h3 { font-size: 1.7rem; font-weight: 800; margin-bottom: 12px; }
.cta-banner p  { opacity: .88; margin-bottom: 28px; font-size: 1.05rem; }
.btn-accent {
  background: var(--accent); color: #fff; border: none;
  font-weight: 700; padding: .65rem 2rem; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 1rem;
  transition: background .15s, transform .15s; display: inline-block; text-decoration: none;
}
.btn-accent:hover { background: var(--accent-light); color: #fff; transform: translateY(-2px); }

/* ─── Footer ─────────────────────────────────────────────── */
footer.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,.8);
  padding: 52px 0 0; margin-top: 72px;
}
footer.site-footer h5 { color: #fff; font-weight: 800; margin-bottom: 18px; font-size: 1rem; }
footer.site-footer p  { font-size: .88rem; line-height: 1.7; opacity: .72; }
footer.site-footer a  {
  color: rgba(255,255,255,.65); text-decoration: none;
  display: block; margin-bottom: 9px; font-size: .9rem; transition: color .15s;
}
footer.site-footer a:hover { color: var(--accent-light); }
.footer-divider {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0; margin-top: 36px;
  font-size: .82rem; color: rgba(255,255,255,.38);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(45,80,22,.18);
}
.form-label { font-weight: 700; font-size: .9rem; }

/* ─── Page header strip ──────────────────────────────────── */
.page-header {
  background: var(--primary); color: #fff; padding: 32px 0; margin-bottom: 36px;
}
.page-header h1 { font-size: 1.8rem; font-weight: 800; margin: 0; }
.page-header p  { opacity: .8; margin: 4px 0 0; font-size: .95rem; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .4s ease both; }

/* ─── Utilities ──────────────────────────────────────────── */
.fw-800 { font-weight: 800 !important; }
.text-accent-custom { color: var(--accent) !important; }
