/* =========================================================
   HOME PAGE — Hero, Streams, Institutes, News, Board Hub
   Requires: global.css loaded first
========================================================= */

/* --- Hero --- */
.hero {
  --hero: url('https://www.univariety.com/blog/wp-content/uploads/2020/11/Blog-banner-image_001.jpg');
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  color: #fff;
  background: linear-gradient(0deg, rgba(4,8,16,.55), rgba(4,8,16,.55)), var(--hero) center/cover no-repeat;
  padding-top: 74px;
}
.hero-wrap { width: min(1100px, 92%); margin: 0 auto; text-align: center; }
.hero-title { line-height: 1.15; text-shadow: 0 1px 10px rgba(0,0,0,.18); margin: 0 0 16px; }
.hero-search {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #dfe6ef; border-radius: 36px;
  padding: 8px 12px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  width: min(900px, 96%); margin: 0 auto 10px;
}
.hero-search input {
  flex: 1; border: 0; outline: 0;
  font-size: 1rem; padding: .56rem .4rem;
  color: #243142; background: transparent;
}
.hero-search .s-icon { display: grid; place-items: center; }
.hero-search .s-icon svg { width: 18px; height: 18px; stroke: #666; }
.hero-stats {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,.22); padding: 8px 18px; border-radius: 12px;
  width: min(760px, 94%); margin: 8px auto 0;
}
.stat { flex: 1; text-align: center; position: relative; }
.stat:not(:first-child)::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 1px; background: rgba(255,255,255,.35);
}
.num { font-size: 1.08rem; font-weight: 700; }
.lab { opacity: .95; font-size: .88rem; }
@media (max-width: 960px) { .hero-title { font-size: 1.6rem; } }
@media (max-width: 768px) {
  .hero { min-height: 500px; }
  .hero-search, .hero-stats { width: 94%; }
  .stat { flex: 0 0 25%; }
  .num { font-size: 1.02rem; }
  .lab { font-size: .82rem; }
}

/* --- Streams / Entrance --- */
.sec.streams { padding: 34px 0 42px; background: var(--bg); margin: 28px 0 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.h2 span { color: var(--brand); }
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 1024px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-tile { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e9eef6; border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-s); }
.cat-tile img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.ct-name { font-weight: 500; }
.ct-sub { font-size: .82rem; color: #7b8593; }
.more-wrap { display: flex; justify-content: center; margin-top: 12px; }
.more-btn { border: 1px solid #dfe4ee; background: #fff; border-radius: 999px; padding: .56rem 1rem; font-weight: 700; cursor: pointer; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.pill { border: 1px solid #dfe4ee; background: #fff; border-radius: 999px; padding: .42rem .8rem; font-weight: 700; font-size: .9rem; color: #2a3342; cursor: pointer; }
.pill.active { background: #eef3ff; border-color: #cfe0ff; color: #1c3b8e; }
.course-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .course-cards { grid-template-columns: 1fr; } }
.ccard { border: 1px solid #e9eef6; border-radius: 12px; background: #fff; box-shadow: var(--shadow-s); }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid #eef2f8; }
.cc-title { margin: 0; font-size: 1rem; }
.cc-title .tag { font-weight: 600; color: #6b7380; background: #f4f6fa; border: 1px solid #e7edf4; border-radius: 999px; padding: .06rem .42rem; margin-left: .4rem; }
.cc-meta { font-size: .9rem; color: #61708a; }
.cc-body { padding: 12px; }
.cc-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 12px; margin: 0; padding-left: 16px; }
@media (max-width: 900px) { .cc-cols { grid-template-columns: repeat(2, 1fr); } }
.cc-cols li { font-size: .9rem; }
.cc-link { display: inline-block; margin-top: 10px; }

@media (min-width: 721px) { #moreCats { display: none !important; } #catGrid [data-more] { display: flex !important; } }
@media (min-width: 901px) { #moreCourses { display: none !important; } #entranceCards .ccard[data-more] { display: block !important; } }

/* --- Featured Institutes --- */
.inst-sec { margin: 36px 0 0; padding: 0; background: transparent; }
.inst-head { width: min(1180px, 92%); margin: 0 auto 12px; display: flex; align-items: center; justify-content: space-between; }
.sec-title { font-size: 1.28rem; }
.sec-title .brand { color: var(--brand); }
.inst-surface { width: min(1180px, 92%); margin: 0 auto; position: relative; }
.inst-row {
  display: flex; gap: 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 6px 2px;
  scrollbar-width: none;
}
.inst-row::-webkit-scrollbar { display: none; }
.inst-card {
  flex: 0 0 360px; scroll-snap-align: start;
  background: #fff; border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(16,24,40,.10);
  overflow: hidden;
}
.inst-img { width: 100%; height: 160px; object-fit: cover; }
.inst-body { padding: 12px 14px 14px; }
.inst-name { margin: 0 0 4px; }
.inst-meta { margin: 0; color: #6a7483; font-size: .9rem; }
@media (max-width: 768px) { .inst-card { flex: 0 0 82vw; } .inst-img { height: 150px; } }
.ibtn { display: flex; gap: 8px; }
.ibtn button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #cfd8e3; background: #fff;
  display: grid; place-items: center;
  cursor: pointer; font-weight: 800;
  box-shadow: var(--shadow-s);
}
.ibtn button[disabled] { opacity: .45; pointer-events: none; }

/* --- News --- */
.news-sec { width: min(1180px, 92%); margin: 34px auto 54px; }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 920px) { .news-grid { grid-template-columns: 1fr; gap: 22px; } }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-m); padding: 14px; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 4px 0 8px; }
.news-title { font-size: 1.28rem; line-height: 1.1; }
.news-title .brand { color: var(--brand); }
.news-accent { display: flex; align-items: center; gap: 8px; }
.news-accent .bar { width: 38px; height: 4px; border-radius: 6px; background: var(--brand); }
.news-accent .dot { width: 8px; height: 8px; border-radius: 50%; background: #fbb49e; }
.news-list { display: grid; gap: 12px; margin-top: 6px; }
.news-item {
  display: grid; grid-template-columns: 116px 1fr; gap: 12px;
  border: 1px solid #eef2f8; border-radius: 12px; padding: 8px;
  background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.news-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-s); border-color: #e4ebf7; }
.news-thumb { width: 116px; height: 72px; border-radius: 10px; object-fit: cover; background: #eef2f8; }
.news-body { display: flex; flex-direction: column; justify-content: center; }
.news-link { font-weight: 700; color: #1e2a3b; line-height: 1.25; display: inline-block; }
.news-link:hover { color: var(--brand); }
.news-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.news-date-inline {
  font-size: .86rem; color: #556171; font-weight: 600;
  background: #f6f8fb; border: 1px solid #e9eef6; border-radius: 999px;
  padding: .18rem .54rem; display: inline-flex; gap: 6px; align-items: center;
}
.news-date-inline svg { width: 14px; height: 14px; opacity: .9; }
.news-tag { font-size: .84rem; color: #7b8593; }

/* --- Board Hub --- */
.board-sec { width: min(1180px, 92%); margin: 38px auto; }
.board-wrap { display: grid; gap: 42px; }
.board-block h3 { font-size: 1.5rem; margin: 0 0 14px; }
.board-block h3 .brand { color: var(--brand); }
@media (max-width: 720px) { .board-block h3 { font-size: 1.28rem; } }
