/* ============================================================
   AGROTECH 2026 — Agenda CSS
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --blue-dark:   #050542;
  --blue-main:   #0d0d6b;
  --blue-light:  #1a1a9c;
  --blue-accent: #2d2dcc;
  --green:       #6abf2e;
  --green-dark:  #4e8f1f;

  --campo:      #2e7d32;
  --campo-bg:   #e8f5e9;
  --campo-bd:   #4caf50;
  --fabrica:    #1565c0;
  --fabrica-bg: #e3f2fd;
  --fabrica-bd: #42a5f5;
  --tecno:      #6a1b9a;
  --tecno-bg:   #f3e5f5;
  --tecno-bd:   #ab47bc;
  --evento:     #e65100;
  --evento-bg:  #fff3e0;
  --evento-bd:  #ff9800;
  --neutral-bg: #f5f5f5;
  --neutral-bd: #bdbdbd;

  --bg:     #eef0f7;
  --white:  #ffffff;
  --text:   #1a1a3e;
  --muted:  #607080;
  --border: #dde2ee;
  --sh:     0 2px 12px rgba(0,0,0,.08);
  --sh-lg:  0 6px 24px rgba(0,0,0,.13);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { display: block; }

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  background: var(--blue-main);
  border-bottom: 2px solid rgba(106,191,46,.28);
  position: relative;
  z-index: 400;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 46px; padding: 7px 0; }
.nav-links { display: flex; list-style: none; }
.nav-links a {
  display: block; padding: 14px 12px;
  font-size: .77rem; font-weight: 600; color: rgba(255,255,255,.8);
  border-bottom: 2px solid transparent;
  transition: color .17s, border-color .17s; white-space: nowrap;
}
.nav-links a:hover { color: var(--green); border-bottom-color: var(--green); }
.nav-links .cta a {
  background: var(--green); color: var(--blue-dark);
  border-radius: 20px; margin: 7px 0 7px 6px;
  padding: 6px 15px; font-weight: 700; border-bottom: none;
}
.nav-links .cta a:hover { background: var(--green-dark); color: #fff; border-bottom-color: transparent; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px 0; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px; transition: all .24s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 55%, #14148a 100%);
  position: relative; overflow: hidden;
}
.site-header::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: 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='%236abf2e' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.header-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 28px 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.header-inner img { height: 70px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.header-right { text-align: right; }
.header-right .subtitle {
  font-size: .78rem; font-weight: 700; color: var(--green);
  letter-spacing: 1px; text-transform: uppercase;
}
.header-right .meta {
  font-family: 'Space Mono', monospace; font-size: .76rem;
  color: rgba(255,255,255,.6); margin-top: 5px; line-height: 1.7;
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker { background: var(--green); height: 34px; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; animation: ticker 48s linear infinite; white-space: nowrap; }
.ticker-track span {
  font-family: 'Space Mono', monospace; font-size: .67rem; font-weight: 700;
  color: var(--blue-dark); padding: 0 28px;
}
.ticker-track span::before { content: '◆  '; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar { background: var(--blue-dark); }
.stats-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; text-align: center;
}
.stat-num { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; color: var(--green); line-height: 1; }
.stat-lbl { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* ============================================================
   FILTERS BAR
   ============================================================ */
.filters-bar {
  background: var(--white);
  position: sticky; top: 0; z-index: 300;
  box-shadow: 0 2px 14px rgba(0,0,0,.1);
  border-bottom: 1px solid var(--border);
}
.filters-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 20px 8px;
  display: flex; flex-direction: column; gap: 8px;
}

/* Filter rows */
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-label {
  font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .9px;
  color: var(--muted); white-space: nowrap; min-width: 70px; flex-shrink: 0;
}
.chips { display: flex; gap: 5px; flex-wrap: wrap; }

/* Each chip is a regular <a> link → pure PHP server-side filtering, zero JS needed */
.chip {
  display: inline-block;
  border: 2px solid var(--border); background: transparent; color: var(--muted);
  font-family: 'DM Sans', sans-serif; font-size: .74rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--blue-accent); color: var(--blue-light); background: #f0f2ff; }
.chip.on { background: var(--blue-main); border-color: var(--blue-main); color: #fff; }
.chip.on.campo   { background: var(--campo);   border-color: var(--campo); }
.chip.on.fabrica { background: var(--fabrica); border-color: var(--fabrica); }
.chip.on.tecno   { background: var(--tecno);   border-color: var(--tecno); }
.chip.on.evento  { background: var(--evento);  border-color: var(--evento); }

/* Search row */
.filter-search-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.search-form { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 380px; }
.search-form input {
  flex: 1; padding: 6px 14px 6px 34px; border: 2px solid var(--border);
  border-radius: 20px; font-family: 'DM Sans', sans-serif; font-size: .8rem;
  color: var(--text); background: var(--bg); outline: none; transition: border .18s;
}
.search-form input:focus { border-color: var(--blue-accent); background: #fff; }
.search-wrap { position: relative; flex: 1; }
.search-wrap .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .85rem; pointer-events: none; }
.btn-search {
  background: var(--blue-main); color: #fff; border: none;
  border-radius: 20px; padding: 6px 16px; font-size: .78rem; font-weight: 700;
  transition: background .17s; white-space: nowrap;
}
.btn-search:hover { background: var(--blue-dark); }
.btn-reset {
  background: none; border: 2px solid var(--border); border-radius: 20px;
  font-size: .72rem; font-weight: 700; color: var(--muted); padding: 5px 12px;
  transition: all .17s; white-space: nowrap;
}
.btn-reset:hover { border-color: #e53935; color: #e53935; }

/* Filter status badges */
.filter-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-active {
  background: #e8eaf8; color: var(--blue-main);
  font-size: .67rem; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}

/* Legend */
.legend {
  max-width: 1200px; margin: 0 auto; padding: 6px 20px 9px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid #f0f2f8;
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 600; color: var(--muted); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-sep { flex: 1; }
.result-count { font-family: 'Space Mono', monospace; font-size: .67rem; font-weight: 700; color: var(--blue-main); }

/* ============================================================
   MAIN / AGENDA
   ============================================================ */
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 64px; }

/* Day block */
.day-block { margin-bottom: 38px; }
.day-title { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.day-name { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--blue-main); letter-spacing: 2px; line-height: 1; }
.day-pill {
  font-family: 'Space Mono', monospace; font-size: .7rem; font-weight: 700;
  color: var(--muted); background: #fff; border: 1.5px solid var(--border);
  padding: 3px 10px; border-radius: 20px;
}
.day-line { flex: 1; height: 2px; background: linear-gradient(to right, var(--blue-accent), transparent); }
.day-badge {
  font-size: .68rem; font-weight: 700; color: #fff;
  background: var(--blue-main); padding: 3px 9px; border-radius: 12px; white-space: nowrap;
}

/* Session list */
.session-list { display: flex; flex-direction: column; gap: 8px; }

/* Card */
.card {
  background: #fff; border-radius: 12px; border-left: 5px solid var(--neutral-bd);
  box-shadow: var(--sh); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.card.campo   { background: var(--campo-bg);   border-left-color: var(--campo-bd); }
.card.fabrica { background: var(--fabrica-bg); border-left-color: var(--fabrica-bd); }
.card.tecno   { background: var(--tecno-bg);   border-left-color: var(--tecno-bd); }
.card.evento  { background: var(--evento-bg);  border-left-color: var(--evento-bd); }

.card-row {
  display: grid; grid-template-columns: 76px 1fr auto;
  align-items: stretch; min-height: 66px;
}

/* Time column */
.card-time {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 6px; border-right: 1px solid rgba(0,0,0,.06);
}
.card-time .t  { font-family: 'Space Mono', monospace; font-size: .84rem; font-weight: 700; }
.card-time .hs { font-size: .58rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; margin-top: 2px; }

/* Body column */
.card-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; }
.card-title { font-size: .9rem; font-weight: 700; line-height: 1.35; }
.card-speaker { font-size: .75rem; font-weight: 600; color: var(--muted); }
.card-speaker .role { color: #90a4ae; font-weight: 400; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag {
  font-size: .62rem; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; text-transform: uppercase; letter-spacing: .4px;
}
.tag-campo   { background: var(--campo);   color: #fff; }
.tag-fabrica { background: var(--fabrica); color: #fff; }
.tag-tecno   { background: var(--tecno);   color: #fff; }
.tag-empresa { background: rgba(0,0,0,.07); color: var(--muted); }

/* Actions column */
.card-actions {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 10px; gap: 5px; flex-shrink: 0; min-width: 50px;
}
.flag-circle {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1;
}
.act-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; color: #fff; transition: opacity .17s, transform .17s;
  flex-shrink: 0; text-decoration: none;
}
.act-btn:hover { opacity: .82; transform: scale(1.09); }
.btn-info  { background: var(--blue-main); }
.btn-info.campo   { background: var(--campo); }
.btn-info.fabrica { background: var(--fabrica); }
.btn-info.tecno   { background: var(--tecno); }
.btn-cal   { background: var(--blue-dark); }

/* Tooltip */
.tip-wrap { position: relative; }
.tip {
  position: absolute; bottom: calc(100% + 6px); right: 0;
  background: var(--text); color: #fff; font-size: .65rem; white-space: nowrap;
  padding: 4px 8px; border-radius: 6px;
  opacity: 0; transform: translateY(4px); transition: all .13s;
  pointer-events: none; z-index: 60;
}
.tip::after {
  content: ''; position: absolute; top: 100%; right: 8px;
  border: 4px solid transparent; border-top-color: var(--text);
}
.tip-wrap:hover .tip { opacity: 1; transform: translateY(0); }

/* Calendar dropdown */
.cal-wrap { position: relative; }
.cal-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border-radius: 10px; min-width: 200px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); border: 1px solid var(--border);
  z-index: 700; display: none; overflow: hidden;
}
.cal-menu.open { display: block; animation: popIn .14s ease; }
@keyframes popIn { from { opacity:0; transform: scale(.95) translateY(-4px); } to { opacity:1; transform: scale(1) translateY(0); } }
.cal-hd { font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 9px 14px 5px; border-bottom: 1px solid #f0f2f8; }
.cal-opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  font-size: .8rem; font-weight: 600; color: var(--text); transition: background .13s;
  text-decoration: none;
}
.cal-opt:hover { background: #f0f2ff; color: var(--blue-main); }

/* Expandable detail */
.card-detail { display: none; padding: 0 14px 14px 76px; border-top: 1px solid rgba(0,0,0,.05); }
.card-detail.open { display: block; }
.detail-body { padding-top: 10px; font-size: .78rem; color: var(--muted); line-height: 1.9; }
.detail-row { display: flex; gap: 8px; align-items: flex-start; }
.detail-row strong { color: var(--text); min-width: 68px; flex-shrink: 0; }
.detail-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  background: var(--blue-main); color: #fff;
  padding: 6px 14px; border-radius: 20px;
  font-size: .74rem; font-weight: 600; transition: background .17s;
}
.detail-link:hover { background: var(--blue-dark); }

/* No results */
.no-results { text-align: center; padding: 56px 20px; color: var(--muted); }
.no-results h3 { font-size: 1.2rem; margin-bottom: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--blue-dark); color: rgba(255,255,255,.4);
  text-align: center; padding: 18px 20px; font-size: .72rem;
}
footer a { color: var(--green); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--blue-main); border-top: 1px solid rgba(106,191,46,.2);
    box-shadow: 0 8px 20px rgba(0,0,0,.3); padding-bottom: 6px; z-index: 500;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 20px; border-bottom: none; border-left: 3px solid transparent; }
  .nav-links a:hover { border-left-color: var(--green); }
  .nav-links .cta a { margin: 6px 20px; border-radius: 8px; text-align: center; border-left: none; }
  .stats-inner { grid-template-columns: repeat(3,1fr); }
  .header-right { display: none; }
  .card-detail { padding-left: 16px; }
  .f-label { min-width: 54px; }
}
@media (max-width: 480px) {
  .card-row { grid-template-columns: 58px 1fr auto; }
  .card-title { font-size: .83rem; }
  .chip { font-size: .7rem; padding: 3px 9px; }
  .stats-inner { grid-template-columns: repeat(3,1fr); }
}

/* ============================================================
   TINY JS — cal dropdown toggle (no dependency)
   ============================================================ */
/* handled inline via onclick + CSS class .open */
