/* GP public website. Theme colours come from --site-primary / --site-accent (Website settings). */
:root { --site-primary: #0b3d91; --site-accent: #ff9933; --site-green: #138808; }

.site-body { background: #f6f8fb; }
.min-w-0 { min-width: 0; }

/* Top bar */
.site-topbar { background: var(--site-primary); color: #fff; }
.site-topbar a, .site-topbar .btn-link { color: #fff; text-decoration: none; }
.site-topbar a:hover { text-decoration: underline; }
.site-topbar .lang-switch a.active { font-weight: 700; text-decoration: underline; }
.site-topbar .lang-switch span { margin: 0 .35rem; opacity: .6; }

/* Header */
.site-header { background: #fff; border-bottom: 3px solid var(--site-accent); }
.site-emblem { height: 64px; width: auto; }
.site-emblem-placeholder { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 64px; font-size: 2rem; color: var(--site-primary); }
.site-logo { height: 64px; width: 64px; object-fit: contain; }
.site-name { font-size: 1.45rem; font-weight: 800; color: var(--site-primary); line-height: 1.2; }
.site-sub { color: #374151; font-size: .95rem; }
.site-tagline { color: #6b7280; font-size: .85rem; font-style: italic; }
.site-helpline { align-items: center; gap: .6rem; color: var(--site-primary); text-decoration: none; border: 1px solid #e5e7eb; border-radius: .75rem; padding: .4rem .9rem; }
.site-helpline i { font-size: 1.5rem; color: var(--site-accent); }
.site-helpline small { display: block; color: #6b7280; line-height: 1; }
.site-helpline strong { font-size: 1.1rem; }

/* Navigation */
.site-nav { background: var(--site-primary); padding: 0; }
.site-nav .navbar-toggler { color: #fff; border-color: rgba(255,255,255,.5); margin: .4rem 0; }
.site-nav .nav-link { color: #fff; padding: .75rem .9rem !important; font-weight: 500; }
.site-nav .nav-link:hover, .site-nav .nav-link.active, .site-nav .nav-link.show { background: rgba(0,0,0,.18); color: #fff; }
.site-nav .nav-link.active { box-shadow: inset 0 -3px 0 var(--site-accent); }
.site-nav .dropdown-menu { border-radius: 0 0 .5rem .5rem; border-top: 3px solid var(--site-accent); margin-top: 0; }
.site-nav .dropdown-item.active, .site-nav .dropdown-item:active { background: var(--site-primary); }

/* Ticker */
.site-ticker { background: #fff7ed; border-bottom: 1px solid #fde3c4; }
.ticker-label { background: var(--site-accent); color: #1f1300; font-weight: 700; padding: .45rem .8rem; white-space: nowrap; font-size: .9rem; }
.ticker-track { overflow: hidden; flex: 1; position: relative; }
.ticker-items { display: inline-flex; gap: 3rem; white-space: nowrap; padding: .45rem 0; animation: ticker 40s linear infinite; }
.ticker-items a { color: #7c2d12; text-decoration: none; font-weight: 500; }
.ticker-items a:hover, .ticker-items a:focus { text-decoration: underline; }
.ticker-track:hover .ticker-items, .ticker-track:focus-within .ticker-items, .ticker-track.paused .ticker-items { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; flex-wrap: wrap; white-space: normal; gap: 1rem; } }

.site-breadcrumb { background: #fff; border-bottom: 1px solid #e5e7eb; font-size: .9rem; }

/* Page structure */
.page-head { background: linear-gradient(90deg, var(--site-primary), color-mix(in srgb, var(--site-primary) 70%, #000)); color: #fff; padding: 2rem 0 1.6rem; }
.page-head h1 { font-size: 1.75rem; font-weight: 700; margin: 0; }
.page-head p { margin: .35rem 0 0; opacity: .9; }
.section { padding: 2.5rem 0; }
.section-title { font-size: 1.35rem; font-weight: 700; color: var(--site-primary); display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem; }
.section-title::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--site-accent), transparent); }
.card-site { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; transition: box-shadow .15s; overflow: hidden; }
/* Equal-height cards only when the card is alone in a grid column. A stretched flex column has a
   definite height, so height:100% on cards that share a column with other blocks overflows into
   the sections below. */
.row > [class*="col"] > .card-site:only-child { height: 100%; }
.card-site:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
/* height:auto lets aspect-ratio win over the width/height attributes (kept on <img> to avoid layout shift). */
.card-site .card-img-top { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #e5e7eb; }
.card-site h3, .card-site .h6 { color: var(--site-primary); }
.content-body { background: #fff; border-radius: .75rem; padding: 1.5rem; border: 1px solid #e5e7eb; }
.content-body img { max-width: 100%; height: auto; }
.content-body table { width: 100%; margin-bottom: 1rem; }
.content-body td, .content-body th { border: 1px solid #d1d5db; padding: .4rem .6rem; }
.content-body iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; width: 100%; }
.meta-line { color: #6b7280; font-size: .875rem; }
.btn-site { background: var(--site-primary); color: #fff; border-color: var(--site-primary); }
.btn-site:hover, .btn-site:focus { background: color-mix(in srgb, var(--site-primary) 80%, #000); color: #fff; }

/* Home */
.hero .carousel-item img { height: clamp(220px, 38vw, 460px); object-fit: cover; width: 100%; background: #1f2937; }
.hero .carousel-caption { background: rgba(0,0,0,.45); border-radius: .5rem; padding: .75rem 1rem; bottom: 2rem; }
.hero-fallback { background: linear-gradient(120deg, var(--site-primary), color-mix(in srgb, var(--site-primary) 55%, var(--site-green))); color: #fff; padding: 4rem 0; }
.quick-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem .5rem; text-decoration: none; color: var(--site-primary); font-weight: 600; height: 100%; }
.quick-links a i { font-size: 1.9rem; color: var(--site-accent); }
.quick-links a:hover, .quick-links a:focus { border-color: var(--site-primary); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.stats-band { background: var(--site-primary); color: #fff; }
.stat-box { text-align: center; padding: 1rem .5rem; }
.stat-box i { font-size: 1.8rem; color: var(--site-accent); }
.stat-box .num { font-size: 1.7rem; font-weight: 800; display: block; }
.stat-box .lbl { font-size: .9rem; opacity: .9; }
.sarpanch-card img { width: 140px; height: 160px; object-fit: cover; border-radius: .5rem; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.list-dated li { display: flex; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed #e5e7eb; }
.list-dated .date-chip { flex: 0 0 auto; width: 3.4rem; text-align: center; border-radius: .4rem; background: #eef2ff; color: var(--site-primary); line-height: 1.1; padding: .3rem 0; font-size: .75rem; }
.list-dated .date-chip strong { display: block; font-size: 1.2rem; }
.gov-links a { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .6rem; padding: .7rem .9rem; text-decoration: none; color: #1f2937; height: 100%; }
.gov-links a i { color: var(--site-primary); font-size: 1.4rem; }

/* People */
.person-card { text-align: center; padding: 1.25rem; }
.person-card img, .person-card .avatar { width: 112px; height: 128px; object-fit: cover; border-radius: .5rem; margin: 0 auto .6rem; display: block; background: #e5e7eb; }
.person-card .avatar { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #9ca3af; }

/* Gallery */
.gallery-grid a { display: block; border-radius: .5rem; overflow: hidden; }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s; }
.gallery-grid a:hover img { transform: scale(1.04); }
.video-thumb { position: relative; display: block; }
.video-thumb::after { content: "\F4F4"; font-family: bootstrap-icons; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }

/* Services / forms */
.service-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; text-decoration: none; color: inherit; }
.service-tile i { font-size: 2rem; color: var(--site-accent); }
.timeline { list-style: none; padding-left: 0; border-left: 3px solid #e5e7eb; margin-left: .5rem; }
.timeline li { position: relative; padding: 0 0 1rem 1.25rem; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .3rem; width: 15px; height: 15px; border-radius: 50%; background: var(--site-primary); border: 3px solid #fff; box-shadow: 0 0 0 1px #d1d5db; }
.form-section { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1.5rem; }

/* Footer */
.site-footer { background: #0f1e3d; color: #cbd5e1; margin-top: 3rem; }
.site-footer h2 { color: #fff; }
.site-footer a { color: #e2e8f0; }
.site-footer a:hover { color: #fff; }
.site-footer-bottom { background: #0a1530; color: #94a3b8; }
.site-footer-bottom a { color: #e2e8f0; }

/* Print */
@media print {
    .site-topbar, .site-nav, .site-ticker, .site-footer, .site-breadcrumb, .btn, .skip-link { display: none !important; }
    .page-head { background: none; color: #000; padding: 0; }
    .content-body, .card-site { border: 0; }
}

/* High contrast refinements */
body.high-contrast .page-head, body.high-contrast .stats-band { border-bottom: 2px solid #fff; }
