/* ============================================================
   HHH - Consultora Agropecuaria | Estilos principales
   Paleta: Verde oscuro #2C5F2E | Verde medio #4A9E2A | Naranja #E07B2A
   ============================================================ */

:root {
  --c-dark:    #1E4020;
  --c-primary: #2C5F2E;
  --c-mid:     #4A9E2A;
  --c-accent:  #E07B2A;
  --c-light:   #F8F4EE;
  --c-white:   #FFFFFF;
  --c-text:    #2A2A2A;
  --c-muted:   #6c757d;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,0.12);
  --transition: all .3s ease;
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--c-text); background: var(--c-white); overflow-x: hidden; }
a { color: var(--c-accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--c-primary); }
img { max-width: 100%; height: auto; }

/* ── Tipografía ───────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: 'Montserrat', sans-serif; font-weight: 700; line-height: 1.2; }
.section-title { font-size: 2rem; color: var(--c-primary); margin-bottom: .5rem; }
.section-subtitle { color: var(--c-muted); font-size: 1.05rem; margin-bottom: 2rem; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar-hhh {
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-primary) 100%);
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.navbar-hhh .logo-wrapper { display: flex; align-items: center; gap: 12px; }
.navbar-hhh .logo-img { height: 52px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.navbar-hhh .brand-text { color: var(--c-white); font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.1rem; line-height: 1.1; }
.navbar-hhh .brand-sub  { color: rgba(255,255,255,.75); font-size: .72rem; font-weight: 400; letter-spacing: .05em; }
.navbar-hhh .nav-link   { color: rgba(255,255,255,.85) !important; font-weight: 500; transition: var(--transition); padding: .4rem 1rem !important; }
.navbar-hhh .nav-link:hover { color: var(--c-accent) !important; }
.navbar-toggler { border-color: rgba(255,255,255,.3) !important; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--c-dark) 0%, var(--c-primary) 50%, #1a6b1c 100%);
  min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block;
  background: rgba(224,123,42,.2);
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--c-white);
  margin-bottom: 1rem;
}
.hero-title span { color: var(--c-accent); }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 540px; line-height: 1.7; margin-bottom: 2rem; }
.hero-cta {
  background: var(--c-accent);
  color: var(--c-white) !important;
  padding: .85rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(224,123,42,.4);
  transition: var(--transition);
}
.hero-cta:hover { background: #c96b1e; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(224,123,42,.5); color: var(--c-white) !important; }
.hero-drone-svg { position: absolute; right: 5%; bottom: 10%; opacity: .18; width: min(480px, 45vw); }

/* ── Stats bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--c-accent);
  padding: 1.2rem 0;
  color: var(--c-white);
}
.stats-bar .stat-item { text-align: center; }
.stats-bar .stat-num { font-size: 1.8rem; font-weight: 800; font-family: 'Montserrat', sans-serif; }
.stats-bar .stat-lbl { font-size: .78rem; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }

/* ── Evento card ──────────────────────────────────────────── */
.section-evento { background: var(--c-light); padding: 80px 0; }
.evento-card {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 5px solid var(--c-accent);
}
.evento-header {
  background: linear-gradient(135deg, var(--c-primary), var(--c-dark));
  color: var(--c-white);
  padding: 2rem;
}
.evento-header h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.evento-header .badge-cupo {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  color: var(--c-white);
  font-size: .75rem;
  padding: .25rem .8rem;
  border-radius: 50px;
}
.evento-header .badge-cupo.urgente { background: rgba(255,80,80,.3); border-color: rgba(255,80,80,.6); }
.evento-body { padding: 2rem; }
.evento-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.meta-item { display: flex; align-items: flex-start; gap: .6rem; }
.meta-item .meta-icon { width: 36px; height: 36px; background: var(--c-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meta-item .meta-icon i { color: var(--c-primary); font-size: .95rem; }
.meta-item .meta-text small { display: block; color: var(--c-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.meta-item .meta-text strong { font-size: .95rem; color: var(--c-text); }

/* ── Cupo bar ─────────────────────────────────────────────── */
.cupo-bar-wrapper { margin: 1.5rem 0; }
.cupo-bar-wrapper label { font-size: .82rem; color: var(--c-muted); display: flex; justify-content: space-between; margin-bottom: .3rem; }
.progress { height: 10px; border-radius: 50px; background: #e9ecef; }
.progress-bar { background: linear-gradient(90deg, var(--c-mid), var(--c-accent)); border-radius: 50px; }

/* ── Sección "¿Qué vas a aprender?" ──────────────────────── */
.section-aprender { padding: 80px 0; background: var(--c-white); }
.learn-card {
  background: var(--c-light);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  border-bottom: 4px solid transparent;
  transition: var(--transition);
}
.learn-card:hover { border-bottom-color: var(--c-accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.learn-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--c-primary), var(--c-mid)); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.learn-icon i { color: var(--c-white); font-size: 1.4rem; }
.learn-card h4 { color: var(--c-primary); font-size: 1rem; margin-bottom: .5rem; }
.learn-card p  { color: var(--c-muted); font-size: .9rem; margin: 0; }

/* ── Cronograma ───────────────────────────────────────────── */
.section-cronograma { background: var(--c-light); padding: 80px 0; }
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before { content: ''; position: absolute; left: .6rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--c-accent), var(--c-mid)); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.1rem; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--c-accent); border: 3px solid var(--c-white); box-shadow: 0 0 0 2px var(--c-accent); }
.timeline-time { font-size: .78rem; font-weight: 700; color: var(--c-accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2rem; }
.timeline-title { font-size: 1rem; color: var(--c-primary); font-weight: 700; margin-bottom: .25rem; }
.timeline-desc { font-size: .88rem; color: var(--c-muted); line-height: 1.5; }

/* ── Formulario inscripción ───────────────────────────────── */
.section-inscripcion { background: linear-gradient(160deg, var(--c-dark) 0%, var(--c-primary) 100%); padding: 80px 0; }
.form-card { background: var(--c-white); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.form-card h2 { color: var(--c-primary); margin-bottom: .3rem; }
.form-label { font-weight: 600; font-size: .88rem; color: var(--c-text); margin-bottom: .3rem; }
.form-control, .form-select {
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  padding: .65rem 1rem;
  font-size: .93rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-mid);
  box-shadow: 0 0 0 3px rgba(74,158,42,.15);
}
.btn-inscribir {
  background: linear-gradient(135deg, var(--c-accent), #c96b1e);
  border: none;
  color: var(--c-white);
  font-weight: 700;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(224,123,42,.35);
}
.btn-inscribir:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(224,123,42,.5); }

/* ── Footer ───────────────────────────────────────────────── */
.footer-hhh {
  background: var(--c-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}
.footer-hhh .footer-logo { height: 60px; margin-bottom: 1rem; }
.footer-hhh .footer-brand { color: var(--c-white); font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.1rem; }
.footer-hhh .footer-tagline { font-size: .82rem; opacity: .7; }
.footer-hhh h6 { color: var(--c-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: 1rem; }
.footer-hhh a { color: rgba(255,255,255,.7); font-size: .9rem; display: block; margin-bottom: .4rem; }
.footer-hhh a:hover { color: var(--c-accent); }
.footer-hhh .footer-divider { border-color: rgba(255,255,255,.1); margin: 1.5rem 0; }
.footer-hhh .footer-copy { font-size: .8rem; opacity: .55; text-align: center; }

/* ── Flash messages ───────────────────────────────────────── */
.alert-hhh-exito { background: #d4edda; border-left: 4px solid #28a745; color: #155724; border-radius: 8px; padding: 1rem 1.2rem; }
.alert-hhh-error { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; border-radius: 8px; padding: 1rem 1.2rem; }

/* ── Sin eventos ──────────────────────────────────────────── */
.no-evento {
  text-align: center; padding: 4rem 2rem;
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.no-evento .no-evento-icon { font-size: 4rem; color: #dee2e6; margin-bottom: 1rem; }
.no-evento h3 { color: var(--c-muted); font-size: 1.3rem; }
.no-evento p  { color: #adb5bd; font-size: .95rem; }

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { min-height: 70vh; }
  .hero-drone-svg { display: none; }
  .stats-bar .stat-item { margin-bottom: .5rem; }
}

/* ── Admin styles ─────────────────────────────────────────── */
.admin-body { background: #f1f5f1; }
.admin-sidebar {
  width: 260px; min-height: 100vh;
  background: linear-gradient(180deg, var(--c-dark) 0%, var(--c-primary) 100%);
  position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 100;
  box-shadow: 3px 0 20px rgba(0,0,0,.2);
}
.admin-sidebar .sidebar-logo { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.admin-sidebar .sidebar-logo img  { height: 42px; }
.admin-sidebar .sidebar-logo span { color: var(--c-white); font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: .95rem; }
.admin-sidebar nav { padding: 1.5rem 0; flex: 1; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.75);
  padding: .75rem 1.5rem;
  font-size: .9rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.admin-sidebar nav a i { width: 20px; text-align: center; }
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  color: var(--c-white);
  background: rgba(255,255,255,.08);
  border-left-color: var(--c-accent);
}
.admin-sidebar .sidebar-footer { padding: 1.2rem 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; color: rgba(255,255,255,.5); }
.admin-main { margin-left: 260px; min-height: 100vh; }
.admin-topbar {
  background: var(--c-white);
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar h5 { margin: 0; color: var(--c-primary); font-size: 1rem; }
.admin-topbar .topbar-user { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--c-muted); }
.admin-topbar .topbar-user i { color: var(--c-primary); }
.admin-content { padding: 2rem; }

/* Stat cards */
.stat-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-left: 4px solid var(--c-accent);
}
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.stat-card .stat-icon.green  { background: rgba(44,95,46,.1);  color: var(--c-primary); }
.stat-card .stat-icon.orange { background: rgba(224,123,42,.1); color: var(--c-accent);  }
.stat-card .stat-icon.mid    { background: rgba(74,158,42,.1);  color: var(--c-mid);     }
.stat-card .stat-num  { font-size: 2rem; font-weight: 800; color: var(--c-text); line-height: 1; }
.stat-card .stat-lbl  { font-size: .78rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }

/* Admin table */
.admin-table-card { background: var(--c-white); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.06); overflow: hidden; }
.admin-table-card .card-head { padding: 1.2rem 1.5rem; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.admin-table-card .card-head h6 { margin: 0; color: var(--c-primary); font-weight: 700; }
.table-admin { margin: 0; }
.table-admin th { background: var(--c-light); color: var(--c-primary); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: .85rem 1rem; border: none; }
.table-admin td { padding: .85rem 1rem; vertical-align: middle; font-size: .9rem; border-color: #f5f5f5; }
.badge-activo   { background: rgba(74,158,42,.15);  color: #2E7D1A; font-size: .75rem; padding: .25rem .7rem; border-radius: 50px; font-weight: 600; }
.badge-inactivo { background: rgba(220,53,69,.1);   color: #dc3545; font-size: .75rem; padding: .25rem .7rem; border-radius: 50px; font-weight: 600; }

/* Admin buttons */
.btn-hhh-primary { background: linear-gradient(135deg, var(--c-primary), var(--c-mid)); color: var(--c-white) !important; border: none; border-radius: 8px; padding: .55rem 1.2rem; font-weight: 600; font-size: .88rem; transition: var(--transition); }
.btn-hhh-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-hhh-danger  { background: rgba(220,53,69,.1); color: #dc3545 !important; border: 1px solid rgba(220,53,69,.2); border-radius: 8px; padding: .55rem 1rem; font-size: .82rem; transition: var(--transition); }
.btn-hhh-danger:hover  { background: #dc3545; color: var(--c-white) !important; }
.btn-hhh-edit    { background: rgba(224,123,42,.1); color: var(--c-accent) !important; border: 1px solid rgba(224,123,42,.25); border-radius: 8px; padding: .55rem 1rem; font-size: .82rem; transition: var(--transition); }
.btn-hhh-edit:hover    { background: var(--c-accent); color: var(--c-white) !important; }

/* Admin form */
.admin-form-card { background: var(--c-white); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.06); padding: 2rem; }
.admin-form-card .section-divider { border-color: #f0f0f0; margin: 1.5rem 0; }

/* Login */
.login-page { min-height: 100vh; background: linear-gradient(160deg, var(--c-dark), var(--c-primary)); display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--c-white); border-radius: 20px; padding: 3rem 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.login-logo  { height: 70px; display: block; margin: 0 auto 1.5rem; }
.login-card h4 { color: var(--c-primary); text-align: center; margin-bottom: 2rem; }
.btn-login { background: linear-gradient(135deg, var(--c-accent), #c96b1e); border: none; color: var(--c-white); font-weight: 700; padding: .85rem; border-radius: 50px; width: 100%; font-size: 1rem; cursor: pointer; transition: var(--transition); }
.btn-login:hover { opacity: .9; transform: translateY(-1px); }

@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main    { margin-left: 0; }
}
