:root{
  --forest:#16332A;
  --forest-deep:#0E211B;
  --leaf:#4F8A4F;
  --light:#8FC75D;
  --cream:#FFFFFF;
  --paper:#FFFFFF;
  --bg-tint:#F1F7EC;
  --ink:#1C261F;
  --muted:#5C6B5E;
  --line: rgba(22,51,42,0.14);
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Manrope', sans-serif;
  /* Page background set to white for poster-like look */
  background: #ffffff;
  color: var(--ink);
  position:relative; /* so decorative pseudo-elements can be positioned behind content */
}
.topbar{
  /* keep topbar visually part of the poster but transparent so the white page and logo show cleanly */
  background: transparent;
  color: var(--forest);
  padding: 18px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:relative; z-index:1;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand .mark{
  width:36px;height:36px;border-radius:50%;
  background: var(--light);
  display:flex;align-items:center;justify-content:center;
  color: var(--forest-deep); font-weight:700; font-family:'Fraunces',serif;
}
.brand .logo{ width:48px; height:auto; display:block; object-fit:contain; border-radius:6px; }
.brand-text{font-family:'Fraunces',serif; font-weight:700; font-size:22px; letter-spacing:0.3px;}
.brand-sub{font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color: var(--muted); margin-top:2px;}
.nav-toggle{
  display:flex; gap:0;
  /* subtle green-tinted pill to read on white background */
  background: rgba(79,138,79,0.06);
  border:1px solid rgba(79,138,79,0.12); border-radius:999px; padding:4px;
}
.nav-toggle button{
  border:none; background:transparent; color: var(--forest);
  padding:9px 20px; border-radius:999px; font-family:'Manrope',sans-serif;
  font-size:13px; font-weight:700; letter-spacing:0.4px; cursor:pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.nav-toggle button.active{ background: var(--leaf); color: #ffffff; }
.hero{
  /* neutral, white hero so the poster aesthetic is consistent */
  background: transparent;
  color: var(--forest);
  text-align:center;
  padding: 56px 24px 64px;
  position:relative; z-index:1;
}
.hero-eyebrow{
  font-size:12px; letter-spacing:3px; text-transform:uppercase;
  color: var(--light); font-weight:700; margin-bottom:14px;
}
.hero h1{
  font-family:'Fraunces',serif; font-weight:700;
  font-size: clamp(40px, 6vw, 64px);
  margin:0 0 12px;
  letter-spacing:0.5px;
}
.hero p{ color: var(--muted); font-size:16px; max-width:560px; margin:0 auto; }
main{ max-width: 980px; margin: -34px auto 0; padding: 0 24px 80px; position:relative; z-index:1; }
.panel{
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(14,33,27,0.12);
  overflow:hidden;
  position:relative; z-index:1;
}
.section-wrap{
  display:grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.4,0,0.2,1);
}
.section-wrap.open{ grid-template-rows: 1fr; }
.section-inner{ overflow:hidden; min-height:0; }
/* allow expanded section content to show (avoid clipping grid rows) when section is open */
.section-wrap.open .section-inner{ overflow: visible; }
.section-content{
  padding: 44px 48px 52px;
  opacity:0;
  transform: translateY(10px);
  transition: opacity 0.45s ease 0.12s, transform 0.45s ease 0.12s;
}
.section-wrap.open .section-content{ opacity:1; transform: translateY(0); }
.section-title{
  font-family:'Fraunces',serif; font-weight:700; font-size:30px;
  color: var(--forest); margin: 0 0 6px;
}
.section-rule{ width:46px; height:3px; background: var(--light); border-radius:2px; margin-bottom:24px; }
.about-grid{ display:grid; grid-template-columns: 1.3fr 1fr; gap:36px; }
.about-text p{ color: var(--muted); line-height:1.75; font-size:15px; margin:0 0 16px; }
.about-stats{ display:flex; flex-direction:column; gap:16px; }
.stat-card{ background: var(--forest); color: var(--cream); border-radius:14px; padding:18px 20px; }
.stat-card .num{ font-family:'Fraunces',serif; font-size:26px; color: var(--light); font-weight:700;}
.stat-card .lab{ font-size:12px; color:#C8D6CB; letter-spacing:0.4px; margin-top:2px;}
.courses-list{
  /* Grid layout for trainings: up to 3 items per row */
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:20px;
  margin-bottom:34px;
}
.course-card{
  border:1px solid var(--line); border-radius:14px;
  padding:18px 22px;
  display:flex; justify-content:space-between; align-items:flex-start; gap:20px;
  background: #fff;
}
/* (inactive course styles removed — template renders only active trainings) */
.course-left{flex:1;}
.course-title{ font-weight:700; font-size:16px; color:var(--forest); margin:0 0 4px;}
.course-date{
  display:inline-block; font-size:12px; font-weight:700; letter-spacing:0.4px;
  color: var(--forest); background: rgba(79,138,79,0.14);
  padding:3px 10px; border-radius:999px; margin-bottom:8px;
}
.course-desc{ font-size:14px; color: var(--muted); margin:0 0 8px; line-height:1.6;}
.course-price{
  font-size:18px; font-weight:700; color: var(--leaf);
  margin:0; display:inline-block;
  font-family:'Fraunces',serif; letter-spacing:0.3px;
}
.course-cta{
  border:none; color:#ffffff; background: var(--leaf);
  font-weight:700; font-size:13px; padding:9px 16px; border-radius:999px;
  cursor:pointer; white-space:nowrap; transition: background 0.2s ease, color 0.2s ease;
}
.course-cta:hover{ background: var(--forest-deep); color: #ffffff; }
.empty-note{ color: var(--muted); font-size:14px; }
.modal-backdrop{
  position:fixed; inset:0; background: rgba(14,33,27,0.55);
  display:flex; align-items:center; justify-content:center; z-index:50;
  opacity:0; pointer-events:none; transition: opacity 0.25s ease;
}

/* Decorative leaf background placed behind all content. Put your leaf image at ip_agro/static/img/leaves.png */
body::before{
  content: '';
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 1400px;
  height: 700px;
  background-image: url('../img/leaves.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  /* make image more visible and allow white areas to blend away */
  opacity: 0.35;
  mix-blend-mode: multiply;
  filter: contrast(1.05) saturate(1.05);
  pointer-events: none;
  z-index: 0;
}

/* ensure main structural elements sit above the decorative background */
header, .topbar, .hero, main, .panel, footer, .modal{ position:relative; z-index:1; }
.modal-backdrop.open{ opacity:1; pointer-events:auto; }
.modal{
  background: var(--paper); border-radius:16px; padding:30px 32px; width:380px; max-width:90vw;
  transform: translateY(14px); transition: transform 0.25s ease;
}
.modal-backdrop.open .modal{ transform: translateY(0); }
.modal h3{ font-family:'Fraunces',serif; color:var(--forest); margin:0 0 4px; font-size:20px;}
.modal .for-course{ font-size:13px; color:var(--muted); margin:0 0 18px;}
label{ font-size:12px; font-weight:700; color: var(--forest); display:block; margin-bottom:5px; letter-spacing:0.3px;}
input, textarea{
  width:100%; border:1px solid var(--line); border-radius:9px; padding:10px 12px;
  font-family:'Manrope',sans-serif; font-size:14px; background:#fff; color:var(--ink);
}
.modal label{ margin-top:12px; }
.modal-actions{ display:flex; gap:10px; margin-top:20px; }
.btn-ghost{
  flex:1; background:transparent; border:1px solid var(--line); color:var(--muted);
  padding:10px; border-radius:999px; font-weight:700; font-size:13px; cursor:pointer;
}
.btn-confirm{
  flex:1; background: var(--leaf); border:none; color:#ffffff;
  padding:10px; border-radius:999px; font-weight:700; font-size:13px; cursor:pointer;
}
.error-note{ font-size:12px; color:#A32D2D; margin-top:10px; display:none; }
.rodo-wrap {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.rodo-wrap input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}
.rodo-wrap label {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  cursor: pointer;
}
.rodo-wrap label a {
  color: var(--leaf);
  text-decoration: underline;
}
.success-note{
  font-size:13px;
  color: var(--leaf);
  font-weight:700;
  margin-top:10px;
  display:none;
  background: rgba(79, 138, 79, 0.1);
  border-left: 3px solid var(--leaf);
  padding: 12px;
  border-radius: 6px;
  line-height: 1.5;
}
.success-note p { margin: 0 0 8px 0; }

/* Green footer styling */
.footer-green{
  background: var(--forest);
  color: #ffffff;
  padding: 56px 32px 32px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}
.footer-container{
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 32px;
}
.footer-section h3{
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--light);
  margin: 0 0 16px;
  letter-spacing: 0.3px;
}
.footer-section p{
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 10px;
  color: #C8D6CB;
}
.footer-section a{
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.footer-section a:hover{
  color: var(--light);
  text-decoration: underline;
}
.footer-bottom{
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(239, 244, 239, 0.2);
  font-size: 12px;
  color: #C8D6CB;
  margin: 0 auto;
  max-width: 980px;
}
.footer-bottom p{
  margin: 0;
  letter-spacing: 0.3px;
}
@media (max-width: 720px){
  .about-grid{ grid-template-columns:1fr; }
  .section-content{ padding:32px 22px 40px; }
  .topbar{ flex-direction:column; gap:14px; }
  .footer-container{ grid-template-columns: 1fr; gap:32px; }
  .footer-green{ padding: 40px 20px 24px; }
}

/* Responsive adjustments for the trainings grid */
@media (max-width: 1100px) {
  .courses-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 660px) {
  .courses-list {
    grid-template-columns: 1fr;
  }
  .course-card { flex-direction: column; gap:12px; }
}

/* hide decorative background on small screens to avoid layout/overlap issues */
@media (max-width: 720px){
  body::before{ display:none; }
}

