/* =================== Compact & smooth (loaded last) =================== */
:root{--ease:cubic-bezier(.22,1,.36,1)}

/* ---- tighter vertical rhythm: no big empty gaps ---- */
.section{padding:3rem 0}
.sec-head{margin-bottom:1.6rem}
.sec-head h2{font-size:clamp(1.4rem,2.6vw,1.9rem);margin-bottom:0}
.sec-head p{margin:.25rem 0 0;font-size:.92rem}
.sec-head .bar{margin-top:.6rem;height:3px}
.wave-t.bg-soft,.wave-t.bg-dark-x,.wave-t.section-join{padding-top:4.2rem}
.wave-b.bg-dark-x{padding-bottom:4.2rem}
.wave-t::before,.wave-b::after{height:30px}
.hero-zone{max-height:660px;min-height:460px}
.hero-zone::after{height:42px}
.scroll-down{bottom:48px!important;width:36px;height:36px}
.band-wrap{padding:.9rem 0}
.band{padding:.6rem 0}
.band a{font-size:1rem}
.page-hero{padding:2.6rem 0 4rem}
.page-hero h1{font-size:clamp(1.5rem,3.4vw,2.3rem)}
.hero-chips{margin:.6rem 0 .7rem}
.detail-wrap{padding-bottom:2.4rem}
.article-card{padding:1.6rem;border-radius:20px}
.site-footer{padding:2.4rem 0 0}
.copy{margin-top:1.4rem;padding:.8rem 0}
.mt-5{margin-top:1.6rem!important}

/* ---- smaller cards ---- */
.card-x{border-radius:14px;box-shadow:0 6px 18px rgba(27,31,59,.08)}
.card-img{aspect-ratio:16/9}
.card-body-x{padding:.8rem .95rem .9rem}
.card-body-x .meta{font-size:.72rem;margin-bottom:.3rem;gap:.2rem .5rem}
.card-body-x h3{font-size:.98rem;margin-bottom:.25rem;line-height:1.3}
.card-body-x p{font-size:.84rem;margin-bottom:.5rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.read-more{font-size:.82rem}
.badge-x{left:10px;top:10px;font-size:.66rem;padding:.2rem .65rem}

/* ---- smaller focus-area cards ---- */
.feature-card{padding:1rem .95rem;border-radius:14px;box-shadow:0 6px 18px rgba(27,31,59,.07)}
.feature-card .ic{width:44px;height:44px;font-size:1.25rem;margin-bottom:.6rem;border-radius:12px}
.feature-card h3{font-size:.98rem;margin-bottom:.2rem}
.feature-card p{font-size:.82rem;line-height:1.45}
#missions .feature-card::after{font-size:2.3rem;right:10px;top:4px}
#missions .feature-card .arrow{right:12px;bottom:10px}

/* ---- about, forms, join, gallery ---- */
.about-img img{aspect-ratio:16/10;border-radius:20px}
.float-badge{padding:.55rem .9rem;bottom:18px;font-size:.85rem}
#about .display-6{font-size:1.7rem}
#about .lead{font-size:1rem}
.section-join .display-6{font-size:1.7rem}
.section-join .lead{font-size:1rem}
.join-points li{margin:.35rem 0;font-size:.95rem}
.form-card,.info-card{padding:1.3rem;border-radius:18px}
.form-control,.form-select{padding:.5rem .8rem;font-size:.92rem}
.form-label{font-size:.85rem;margin-bottom:.2rem}
.g-item{border-radius:12px}
.pager .page-link{width:36px;height:36px}
.chip{padding:.3rem .9rem;font-size:.82rem}

/* ---- hero tiles a little smaller ---- */
.stat-glass{padding:.7rem .9rem;border-radius:16px}
.stat-glass b{font-size:1.25rem}
.hero-stats{gap:10px}

/* ---- smoother motion: one easing curve, gentler hovers ---- */
.card-x,.feature-card,.g-item,.side-item,.pn a,.btn,.chip,.badge-x,.read-more{transition-timing-function:var(--ease)}
.card-x,.feature-card{transition-duration:.5s}
.card-x:hover{transform:translateY(-5px);box-shadow:0 14px 30px rgba(27,31,59,.14)}
.feature-card:hover{transform:translateY(-5px)}
.card-img img{transition:transform .9s var(--ease)}
.card-x:hover .card-img img{transform:scale(1.07)}
.btn-brand:hover,.btn-outline-brand:hover{transform:translateY(-2px)}
[data-aos]{will-change:transform,opacity}

@media(max-width:991px){
  .section{padding:2.2rem 0}
  .wave-t.bg-soft,.wave-t.bg-dark-x,.wave-t.section-join{padding-top:3.4rem}
  .wave-b.bg-dark-x{padding-bottom:3.4rem}
  .hero-carousel .carousel{height:380px}
  .page-hero{padding:2.2rem 0 3.4rem}
}
@media(max-width:575px){
  .card-body-x{padding:.7rem .8rem .8rem}
  .sec-head{margin-bottom:1.2rem}
}

/* =================== Text overlap fixes =================== */
/* 1. slide text: the leaving slide's text disappears at once, so two headlines never show together */
.carousel-item.active.carousel-item-start .hero-content,
.carousel-item.active.carousel-item-end .hero-content{opacity:0;transition:opacity .12s linear}
.carousel-item .hero-content{transition:opacity .2s linear}
/* 2. headline never runs under the stat tiles */
@media(min-width:992px){
  .home .hero-content>div{max-width:min(560px,calc(100% - 380px))}
}
@media(min-width:1200px){.home .hero-content>div{max-width:620px}}
.home .hero-content .hero-title{overflow-wrap:anywhere;line-height:1.38}
.hero-title .w{padding:.04em 0}
/* 3. Devanagari needs more line height, otherwise matras collide with the line above */
h1,h2,h3,h4,h5,.card-body-x h3,.mc-body strong,.feature-card h3,.side-item strong,.pn span{line-height:1.45}
.card-body-x p,.feature-card p,.content,.hero-content p{line-height:1.6}
.sec-head h2{padding:.12em 0;line-height:1.5}
/* 4. navbar: no wrapping/overlap between 992px and 1200px */
@media(min-width:992px) and (max-width:1199px){
  .main-nav .nav-link{padding:.5rem .55rem!important;font-size:.88rem;white-space:nowrap}
  .brand-text{font-size:1.2rem}
  .main-nav .btn-brand{padding:.45rem 1rem;font-size:.88rem}
}
@media(min-width:1200px){.main-nav .nav-link{white-space:nowrap}}
/* 5. Back button sits in the flow, above the title */
.back-btn{position:static;display:flex;width:max-content;margin:0 auto .9rem 0}
@media(max-width:575px){.back-btn{top:auto}}
/* 6. floating helper buttons never cover the bottom bar / each other */
@media(max-width:991px){.motion-toggle{bottom:86px}#toTop{bottom:86px}}
/* 7. long words/URLs never push text outside cards */
.card-body-x,.feature-card,.side-item span,.article-card .content{overflow-wrap:anywhere}

/* detail hero: stronger overlay so any text inside the cover image never shows through the title */
.page-hero.has-img{background-image:linear-gradient(135deg,rgba(27,31,59,.95),rgba(58,42,107,.92) 55%,rgba(150,52,10,.9)),var(--hero-img)}

/* =================== Citizen Services / government portals =================== */
.portals-sec{background:linear-gradient(180deg,#fff,#f4f6ff 60%,#fff)}
.portal-card{position:relative;display:flex;gap:.8rem;align-items:flex-start;height:100%;padding:.95rem;border-radius:16px;background:#fff;color:var(--text);
  border:1px solid #e9ebf5;box-shadow:0 6px 18px rgba(27,31,59,.06);overflow:hidden;transition:transform .45s var(--ease),box-shadow .45s var(--ease),border-color .3s}
.portal-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,var(--primary),#7b5cff);transform:scaleY(0);transform-origin:top;transition:transform .45s var(--ease)}
.portal-card::after{content:"";position:absolute;right:-30px;top:-30px;width:90px;height:90px;border-radius:50%;background:radial-gradient(circle,rgba(194,65,12,.14),transparent 70%);transition:transform .5s var(--ease)}
.portal-card:hover{transform:translateY(-5px);border-color:rgba(194,65,12,.35);box-shadow:0 16px 34px rgba(27,31,59,.14);color:var(--text)}
.portal-card:hover::before{transform:scaleY(1)}
.portal-card:hover::after{transform:scale(2.2)}
.pc-ic{flex:none;width:46px;height:46px;border-radius:13px;display:grid;place-items:center;font-size:1.3rem;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary-2));box-shadow:0 8px 16px rgba(194,65,12,.3);transition:transform .45s var(--ease)}
.portal-card:hover .pc-ic{transform:rotate(-8deg) scale(1.08)}
.pc-body{display:flex;flex-direction:column;gap:.15rem;min-width:0;flex:1;position:relative;z-index:1}
.pc-body em{font-style:normal;font-size:.66rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--primary)}
.pc-body strong{font-size:.95rem;line-height:1.4;color:var(--dark)}
.pc-body small{font-size:.8rem;line-height:1.5;color:#5f6278;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pc-go{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-top:.45rem;padding-top:.45rem;border-top:1px dashed #e3e5f0;font-size:.74rem}
.pc-dom{color:#2b7a4b;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.pc-visit{color:var(--primary);font-weight:700;white-space:nowrap}
.pc-visit i{display:inline-block;transition:transform .35s var(--ease)}
.portal-card:hover .pc-visit i{transform:translate(3px,-3px)}
.portal-note{margin:1.4rem auto 0;max-width:820px;text-align:center;font-size:.82rem;color:#5f6278;background:#fff8f2;border:1px solid #f4dccb;border-radius:12px;padding:.7rem 1rem}
.portal-note i{color:var(--primary);margin-right:.3rem}
.portals-page .chip{border:0;cursor:pointer}
.portals-page .chip b{font-weight:600;opacity:.8;margin-left:.2rem}
@media(max-width:575px){.portal-card{padding:.8rem}.pc-ic{width:40px;height:40px;font-size:1.1rem}}

/* navbar with 8 items: keep the Join button on one line, trim paddings */
.main-nav .btn-brand,.main-nav .navbar-nav .btn{white-space:nowrap}
@media(min-width:1200px){.main-nav .nav-link{padding:.6rem .62rem!important;font-size:.95rem}}
/* portal cards: show the full website address */
.pc-go{flex-wrap:wrap;row-gap:.2rem}
.pc-dom{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}

/* =================== No watermarks behind text =================== */
#missions .feature-card::after{content:none!important;display:none}
#missions .row{counter-reset:none}
.portal-card::after{display:none}
.about-img::before{opacity:.35}

/* final overlap/clipping touches */
.pc-dom{flex:1 1 100%;font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-visit{margin-left:auto}
.float-badge{right:10px}

/* =================== About section (redesigned) =================== */
.about-sec{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#fff8f2 100%);padding:3.6rem 0 3.2rem}
.ab-shape{position:absolute;border-radius:50%;pointer-events:none;filter:blur(2px)}
.ab-shape.s1{width:280px;height:280px;right:-90px;top:-70px;background:radial-gradient(circle,rgba(194,65,12,.14),transparent 70%)}
.ab-shape.s2{width:240px;height:240px;left:-80px;bottom:-60px;background:radial-gradient(circle,rgba(123,92,255,.14),transparent 70%)}

.ab-visual{position:relative;padding:0 18px 22px 0;max-width:560px;margin:0 auto}
.ab-frame{position:absolute;left:22px;top:22px;right:0;bottom:0;border-radius:28px;background:linear-gradient(135deg,var(--primary),#7b5cff);opacity:.9;transform:rotate(2.2deg)}
.ab-img{position:relative;z-index:1;display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:26px;box-shadow:0 22px 50px rgba(27,31,59,.25);border:5px solid #fff;animation:none}
.about-img::before,.about-img::after{display:none}
.ab-card{position:absolute;z-index:2;display:flex;align-items:center;gap:.65rem;background:#fff;border-radius:16px;padding:.7rem 1rem;box-shadow:0 14px 32px rgba(27,31,59,.2);animation:floatImg 6s ease-in-out infinite}
.ab-card i{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:1.15rem;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary-2))}
.ab-card b{display:block;font-size:1.2rem;line-height:1.1;color:var(--dark)}
.ab-card small{color:#5f6278;font-size:.75rem}
.ab-card.c1{left:-14px;bottom:44px}
.ab-card.c2{right:34px;top:-14px;padding:.55rem .9rem;font-weight:700;color:var(--primary);font-size:.85rem;animation-delay:-3s}
.ab-card.c2 i{width:28px;height:28px;font-size:.8rem;border-radius:9px}

.eyebrow{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .85rem;border-radius:50px;background:rgba(194,65,12,.1);color:var(--primary);font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;margin-bottom:.7rem}
.ab-title{font-size:clamp(1.6rem,3vw,2.3rem);font-weight:800;line-height:1.4;margin-bottom:.7rem;color:var(--dark)}
.ab-text{font-size:1rem;line-height:1.75;color:#4a4d66;margin-bottom:1.1rem}
.ab-points{list-style:none;padding:0;margin:0 0 1.3rem;display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.ab-points li{display:flex;gap:.7rem;align-items:flex-start;background:#fff;border:1px solid #f0e2d8;border-radius:14px;padding:.7rem .8rem;transition:transform .4s var(--ease,ease),box-shadow .4s,border-color .3s}
.ab-points li:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(27,31,59,.1);border-color:rgba(194,65,12,.35)}
.ab-points .ic{flex:none;width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:1.05rem;color:var(--primary);background:rgba(194,65,12,.1)}
.ab-points strong{display:block;font-size:.92rem;line-height:1.4;color:var(--dark)}
.ab-points small{display:block;font-size:.78rem;line-height:1.45;color:#5f6278}
.ab-actions{display:flex;flex-wrap:wrap;gap:.7rem}
@media(max-width:575px){.ab-points{grid-template-columns:1fr}.ab-card.c1{left:0}.ab-card.c2{right:8px}.ab-visual{padding-right:12px}}

/* hero headline: plain white text. The animated gradient-clip on the h2 produced a ghost copy of the last word
   (background-clip:text + transformed child words), which overlapped "Mission". */
.home .hero-content .hero-title,
.home .carousel-item.active .hero-content .hero-title.a2{background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;-webkit-text-fill-color:#fff!important;color:#fff;animation:up .8s .4s forwards!important}
.home .hero-content .hero-title .w{-webkit-text-fill-color:#fff;color:#fff}
.carousel-item.active .hero-title .w{animation:wordIn .7s calc(var(--i) * 80ms + .35s) cubic-bezier(.2,.9,.3,1.2) both!important}
@media(max-width:991px){.home .carousel-indicators{justify-content:center!important;margin-left:0!important}}
