/* ERI.mn Home2 — LEVEL-3 (Green brand) — CLEAN
   File: c/p/home2.css
*/

:root{
  /* ERI green brand */
  --h2-primary:#1FA64A;
  --h2-primary-dark:#147A34;
  --h2-primary-deep:#0F5C28;

  --h2-ink:#0B1220;
  --h2-text:#1F2937;
  --h2-muted:#6B7280;

  --h2-bg:#ffffff;
  --h2-bg-soft:#F4F8F5;

  --h2-border:rgba(15,23,42,.10);
  --h2-shadow:0 14px 38px rgba(2,6,23,.10);
  --h2-radius:18px;
}

/* Base */
.home2, .home2 *{ box-sizing:border-box; }
.home2{
  width:100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--h2-text);
  background:var(--h2-bg);
  letter-spacing:-0.01em;
}

/* Template wrapper fix */
.body > .center{
  width:100% !important;
  max-width:none !important;
  padding:0 !important;
}
html, body{ overflow-x:hidden; }

/* Containers */
.h2-container{
  max-width:1240px;
  margin:0 auto;
  padding:0 20px;
}

/* Section header */
.h2-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
.h2-section-head h2{
  margin:0;
  font-size:28px;
  line-height:1.2;
  color:var(--h2-primary-deep);
  letter-spacing:-0.02em;
  
}
.h2-more{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  color:var(--h2-primary-deep);
  font-weight:800;
  font-size:14px;
  text-decoration:none;
  box-shadow:0 6px 18px rgba(2,6,23,.06);
  transition:.2s ease;
}

.h2-more:hover{
  transform:translateY(-2px);
  border-color:rgba(31,166,74,.25);
  box-shadow:0 10px 22px rgba(2,6,23,.10);
}

/* Buttons */
.h2-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:14px;
  text-decoration:none;
  font-weight:800;
  transition:transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  gap:10px;
  white-space:nowrap;
}
.h2-btn:active{ transform:translateY(1px); }
.h2-primary{ background:var(--h2-primary); color:#fff; }
.h2-primary:hover{ background:var(--h2-primary-dark); }

/* Cards */
.h2-card{
  background:#fff;
  border:1px solid var(--h2-border);
  border-radius:var(--h2-radius);
  box-shadow:0 12px 34px rgba(2,6,23,.08);
  transition:transform .2s ease, border-color .2s ease;
}
.h2-card:hover{
  transform:translateY(-4px);
  border-color:rgba(31,166,74,.30);
}

/* Shared image/text */
.h2-img{
  width:100%;
  background:#e5e7eb;
  background-size:cover;
  background-position:center;
  aspect-ratio:16/10;
}
.h2-txt{ padding:14px 14px 14px; }
.h2-txt b{
  display:block;
  font-size:15px;
  line-height:1.35;
  color:var(--h2-ink);
  font-weight:900;
  margin-bottom:8px;
}
.h2-txt em{
  font-style:normal;
  color:var(--h2-muted);
  font-size:12.5px;
  font-weight:800;
}

/* HERO */
.h2-hero{
  padding:30px 0 35px;
  background:
    linear-gradient(90deg, rgba(7,46,21,.92) 0%, rgba(15,92,40,.88) 38%, rgba(31,166,74,.82) 100%), 
radial-gradient(900px 520px at 15% 10%, rgba(255,255,255,.08) 0%, transparent 55%), 
linear-gradient(135deg, var(--h2-primary-deep) 0%, var(--h2-primary) 100%);
  color:#fff;
  position:relative;
  overflow:hidden;
}
.h2-hero:after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(255,255,255,.06), transparent 45%);
  pointer-events:none;
}
.h2-hero-grid{
  display:grid;
  grid-template-columns: 1.35fr .75fr;
  gap:28px;
  align-items:stretch;
}
.h2-hero-left h1{
  margin:0 0 14px;
  font-size:45px;
  line-height:1.03;
  letter-spacing:-0.03em;
}
.h2-hero-left p{
  margin:0;
  font-size:18px;
  line-height:1.55;
  opacity:.94;
  max-width:620px;
}
.h2-cta{ margin-top:24px; display:flex; flex-wrap:wrap; gap:12px; }
.h2-pills{ margin-top:20px; display:flex; flex-wrap:wrap; gap:10px; }
.h2-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.20);
  font-size:13px;
  backdrop-filter: blur(6px);
}

/* Featured */
.h2-featured{
  padding:22px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  border-radius:18px;
  box-shadow:none;
}
.h2-featured h3{ margin:0 0 10px; font-size:18px; }
.h2-featured p{ margin:0 0 14px; opacity:.9; }
.h2-link{ color:#fff; font-weight:800; text-decoration:none; }
.h2-link:hover{ text-decoration:underline; }

/* STATS — 5 in one row (desktop) */
.h2-stats{
  background:var(--h2-bg);
  padding:0 0 22px;
  margin-top:20px;
}
.h2-stats-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:14px;
  align-items:stretch;
}
.h2-stat{
  background:#fff;
  border:1px solid var(--h2-border);
  border-radius:18px;
  box-shadow:0 12px 30px rgba(2,6,23,.07);
  padding:16px 16px 14px;
  min-height:86px;
}
.h2-stat-num{
  font-size:26px;
  font-weight:950;
  letter-spacing:-0.03em;
  color:var(--h2-primary-deep);
  line-height:1.05;
}
.h2-stat-label{
  margin-top:6px;
  font-size:12.5px;
  color:var(--h2-muted);
  font-weight:800;
  letter-spacing:.01em;
}

/* QUICK ACCESS */
.h2-quick{ padding:28px 0 64px; background:var(--h2-bg); }
.h2-grid-6{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
}
.h2-grid-6 .h2-card{
  padding:18px 18px 16px;
  text-decoration:none;
  color:var(--h2-text);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 8px 22px rgba(0,0,0,.06);
}
.h2-grid-6 .h2-card b{
  display:block;
  color:var(--h2-primary-deep);
  font-weight:900;
  font-size:14px;
  margin-bottom:6px;
}
.h2-grid-6 .h2-card span{
  display:block;
  color:var(--h2-muted);
  font-size:13px;
  font-weight:700;
}

/* LATEST NEWS — 4 equal cards */
.h2-news{ padding:20px 0; background:var(--h2-bg-soft); }
.h2-news-grid6{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:16px;
}

@media (max-width: 1200px){
  .h2-news-grid6{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .h2-news-grid6{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px){
  .h2-news-grid6{ grid-template-columns:1fr; }
}
.h2-news-card4{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  text-decoration:none;
  color:var(--h2-text);
  border:1px solid var(--h2-border);
  border-radius:var(--h2-radius);
  background:#fff;
  box-shadow:0 12px 34px rgba(2,6,23,.08);
  transition:transform .2s ease, border-color .2s ease;
  height:100%;
}
.h2-news-card4:hover{
  transform:translateY(-4px);
  border-color:rgba(31,166,74,.30);
}
.h2-news-card4 .h2-txt{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}
.h2-news-card4 .h2-txt b{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:42px;
}
.h2-news-card4 .h2-txt em{ margin-top:auto; }

/* FINISHED STUDIES */
.h2-research{ padding:20px 0; background:radial-gradient(700px 260px at 10% 0%, rgba(31,166,74,.08), transparent 60%), linear-gradient(180deg, #f7fbf8 0%, #ffffff 100%); }
.h2-grid-3{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
}
.h2-study{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  text-decoration:none;
  color:var(--h2-text);
  border-radius:var(--h2-radius);
  border:1px solid var(--h2-border);
  background:#fff;
  box-shadow:0 12px 34px rgba(2,6,23,.08);
  transition:transform .2s ease, border-color .2s ease;
}
.h2-study:hover{
  transform:translateY(-4px);
  border-color:rgba(31,166,74,.30);
}
.h2-study b{
  padding:14px 16px 0;
  font-size:15px;
  line-height:1.35;
  color:var(--h2-ink);
  font-weight:900;
}
.h2-study span{
  padding:8px 16px 16px;
  font-size:12.5px;
  color:var(--h2-muted);
  font-weight:800;
}

/* TOP PUBLICATIONS */
.h2-top{ padding:70px 0; background:var(--h2-bg-soft); }
.h2-top-list{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
}
.h2-top-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid var(--h2-border);
  background:#fff;
  text-decoration:none;
  color:var(--h2-text);
  transition:transform .2s ease, border-color .2s ease;
}
.h2-top-item:hover{
  transform:translateY(-2px);
  border-color:rgba(31,166,74,.28);
}
.h2-rank{
  width:36px;height:36px;
  border-radius:12px;
  background:rgba(31,166,74,.12);
  color:var(--h2-primary-deep);
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}
.h2-title{
  font-weight:900;
  color:var(--h2-ink);
  line-height:1.25;
}

/* RESPONSIVE */
@media (max-width:1100px){
  .h2-grid-6{ grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:1024px){
  .h2-stats{ margin-top:-22px; }
  .h2-stats-grid{ grid-template-columns:repeat(3, 1fr); }
  .h2-news-grid4{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:900px){
  .h2-hero-grid{ grid-template-columns:1fr; }
  .h2-grid-3{ grid-template-columns:repeat(2, 1fr); }
  .h2-top-list{ grid-template-columns:repeat(2, 1fr); }
  .h2-hero-left h1{ font-size:40px; }
}
@media (max-width:640px){
  .h2-stats-grid{ grid-template-columns:repeat(2, 1fr); }
  .h2-news-grid4{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  .h2-grid-6{ grid-template-columns:repeat(2, 1fr); }
  .h2-grid-3{ grid-template-columns:1fr; }
  .h2-top-list{ grid-template-columns:1fr; }
  .h2-hero{ padding:70px 0 46px; }
  .h2-hero-left h1{ font-size:34px; }
  .h2-stat-num{ font-size:22px; }
}
/* =========================================================
   HOME2 — MOBILE FIX PACK (Paste at END of c/p/home2.css)
   Fix: mobile spacing, hero typography, cards, grid, overflow
========================================================= */

@media (max-width: 900px){
  .home2{ overflow:hidden; }

  /* Make hero breathe */
  .h2-hero{ padding:72px 0 42px; }
  .h2-hero-grid{ grid-template-columns:1fr; gap:16px; }
  .h2-hero-left h1{
    font-size:36px;
    line-height:1.08;
    letter-spacing:-0.02em;
  }
  .h2-hero-left p{
    font-size:16px;
    line-height:1.6;
    max-width:none;
  }

  /* CTA */
  .h2-cta{ margin-top:16px; }
  .h2-btn{ width:auto; }

  /* Pills wrap nicely */
  .h2-pills{ margin-top:14px; gap:8px; }
  .h2-pill{
    font-size:12.5px;
    padding:7px 10px;
  }

  /* Featured card becomes full width */
  .h2-hero-right .h2-featured{
    padding:16px;
    border-radius:16px;
  }
}

/* Phones */
@media (max-width: 560px){
  .h2-container{ padding:0 14px; }

  /* Hero tighter + no huge empty area */
  .h2-hero{ padding:58px 0 34px; }
  .h2-hero-left h1{ font-size:30px; }
  .h2-hero-left p{ font-size:15px; }

  /* Buttons full width for thumb */
  .h2-cta{ gap:10px; }
  .h2-btn{
    width:100%;
    padding:12px 14px;
    border-radius:14px;
  }

  /* Pills: 2 per row feel */
  .h2-pills{ gap:8px; }
  .h2-pill{
    border-radius:999px;
    white-space:nowrap;
  }

  /* STATS: do NOT eat space (if you still use it) */
  .h2-stats{ margin-top:-14px; padding:0 0 16px; }
  .h2-stats-grid{ gap:10px; }
  .h2-stat{ padding:14px 14px 12px; border-radius:16px; }
  .h2-stat-num{ font-size:20px; }
  .h2-stat-label{ font-size:12px; }

  /* Quick access: 2 columns */
  .h2-quick{ padding:22px 0 46px; }
  .h2-grid-6{
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
  }
  .h2-grid-6 .h2-card{
    padding:14px 14px 12px;
    border-radius:16px;
  }
  .h2-grid-6 .h2-card b{ font-size:13px; }
  .h2-grid-6 .h2-card span{ font-size:12.5px; }

  /* News cards: 1 column on phones */
  .h2-news{ padding:44px 0; }
  .h2-news-grid4{ grid-template-columns:1fr; gap:14px; }
  .h2-news-card4 .h2-txt{ padding:12px; }
  .h2-news-card4 .h2-txt b{ font-size:14px; min-height:0; }

  /* Research grid: 1 column */
  .h2-research{ padding:44px 0; }
  .h2-grid-3{ grid-template-columns:1fr; gap:14px; }

  /* Top list: 1 column */
  .h2-top{ padding:44px 0; }
  .h2-top-list{ grid-template-columns:1fr; gap:10px; }
}
/* Top publications title font size */
.h2-top-item .h2-title{
  font-size:14px;
  line-height:1.4;
}
/* Research Publications 4 fixed */
.h2-news-grid4{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}

.h2-news-grid4 .h2-news-card4{
  display:block;
  width:100%;
  min-width:0;
}

/* Discussion + Annual 6 fixed */
.h2-news-grid6{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:16px;
}

.h2-news-grid6 .h2-news-card4{
  display:block;
  width:100%;
  min-width:0;
}

/* responsive */
@media (max-width:1200px){
  .h2-news-grid6{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:900px){
  .h2-news-grid4{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .h2-news-grid6{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:520px){
  .h2-news-grid4,
  .h2-news-grid6{
    grid-template-columns:1fr;
  }
}
/* =========================================================
   PARTNERS — SAFE VISUAL UPGRADE
   old PHP + old JS structure-г эвдэхгүй
========================================================= */

.partners{
  padding:64px 0;
  background:
    radial-gradient(700px 260px at 10% 0%, rgba(31,166,74,.08), transparent 60%),
    linear-gradient(180deg, #f7fbf8 0%, #ffffff 100%);
  border-top:1px solid rgba(15,23,42,.06);
}

.partners > h4{
  max-width:1240px;
  margin:0 auto 20px;
  padding:0 20px;
  font-size:28px;
  line-height:1.2;
  font-weight:900;
  color:var(--h2-primary-deep);
  letter-spacing:-0.02em;
}

.partners > div{
  max-width:1240px;
  margin:0 auto;
  padding:0 20px;
  position:relative;
}

.partners > div > div{
  overflow:hidden;
}

.partners > div > div > div{
  display:flex;
  gap:14px;
  align-items:stretch;
}

.partners .org{
  min-width:250px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  box-shadow:0 8px 24px rgba(2,6,23,.06);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow:hidden;
}

.partners .org:hover{
  transform:translateY(-4px);
  border-color:rgba(31,166,74,.24);
  box-shadow:0 16px 32px rgba(2,6,23,.10);
}

.partners .org a{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:inherit;
  padding:0px 16px;
  min-height:82px;
}

.partners .org img{
  display:block;
  width:72px;
  height:72px;
  object-fit:contain;
  flex:0 0 72px;
}

.partners .org b{
  display:block;
  font-size:13px;
  line-height:1.45;
  font-weight:900;
  color:var(--h2-ink);
}

.partners .org p{
  display:none;
}

/* slider arrows */
.partners .prev,
.partners .next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 8px 20px rgba(2,6,23,.12);
  cursor:pointer;
  z-index:5;
}

.partners .prev{
  left:0;
}

.partners .next{
  right:0;
}

.partners .prev:before,
.partners .next:before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:10px;
  height:10px;
  border-top:2px solid var(--h2-primary-deep);
  border-right:2px solid var(--h2-primary-deep);
}

.partners .prev:before{
  transform:translate(-35%,-50%) rotate(-135deg);
}

.partners .next:before{
  transform:translate(-65%,-50%) rotate(45deg);
}

@media (max-width:768px){
  .partners{
    padding:46px 0;
  }

  .partners > h4{
    padding:0 14px;
    font-size:24px;
  }

  .partners > div{
    padding:0 14px;
  }

  .partners .org{
    min-width:220px;
  }

  .partners .org a{
    gap:12px;
    padding:12px 14px;
    min-height:76px;
  }

  .partners .org img{
    width:60px;
    height:60px;
    flex-basis:60px;
  }

  .partners .org b{
    font-size:12.5px;
  }
}
/* =========================
   DESKTOP TOP BAR FIX
========================= */
@media (min-width: 885px){

  .topnav .center{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:16px !important;
    min-height:30px !important;
  }

  .topnav .lang{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    white-space:nowrap !important;
    line-height:1 !important;
    position:static !important;
    float:none !important;
  }

  .topnav .lang > span{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    padding:4px 8px !important;
    margin:0 !important;
    white-space:nowrap !important;
    line-height:1 !important;
    font-size:14px !important;
    position:static !important;
    float:none !important;
    vertical-align:middle !important;
  }

  .topnav .lang > span img{
    display:block !important;
    width:16px !important;
    height:11px !important;
    margin:0 !important;
    padding:0 !important;
    float:none !important;
    position:static !important;
    vertical-align:middle !important;
    object-fit:cover !important;
  }

  .topnav .top-links,
  .topnav .top-links li{
    list-style:none !important;
    margin:0 !important;
    padding:0 !important;
    float:none !important;
  }

  .topnav .top-links{
    display:flex !important;
    align-items:center !important;
    white-space:nowrap !important;
  }

  .topnav .top-links a{
    display:inline-block !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
  }

  /* хуучин theme-с ирсэн эвдэрхий style-уудыг дарна */
  .topnav .lang:before,
  .topnav .lang:after,
  .topnav .lang > span:before,
  .topnav .lang > span:after,
  .topnav .top-links:before,
  .topnav .top-links:after{
    content:none !important;
    display:none !important;
  }
}
@media (min-width: 885px){
  .topnav .lang{ margin-left:0 !important; left:auto !important; top:auto !important; }
  .topnav .top-links{ margin-left:auto !important; }
}
/* Mobile only: show 3 items */
@media (max-width: 560px){

  /* Research Publications */
  .h2-news-grid4 > a:nth-child(n+4){
    display:none;
  }

  /* ERI Finished Studies */
  .h2-grid-3 > a:nth-child(n+4){
    display:none;
  }

  /* Working Papers */
  .h2-news-grid6 > a:nth-child(n+4){
    display:none;
  }

}
.h2-news-grid4 .h2-img{
  border-bottom:1px solid rgba(15,23,42,.06);
}
.h2-news-grid4 .h2-img{
  border-bottom:1px solid rgba(15,23,42,.20);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.9);
}