/* ==========================================================
   Canning-II Block Digital Portal — Public Site
   Design tokens: Govt of India / WB portal aesthetic
   ========================================================== */
:root {
    --navy: #0a2f5c;
    --navy-dark: #071f3d;
    --saffron: #ff9933;
    --green: #138808;
    --gold: #c9971e;
    --bg-light: #f5f7fa;
    --text-dark: #1b1f24;
    --border-grey: #dfe4ea;
    --font-display: 'Merriweather', Georgia, serif;
    --font-body: 'Noto Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-light);
    margin: 0;
}

h1, h2, h3, h4, .site-title h1 {
    font-family: var(--font-display);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #fff;
    color: var(--navy);
    padding: 10px 16px;
    z-index: 2000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* Tricolor strip */
.tricolor-strip {
    height: 5px;
    background: linear-gradient(90deg, var(--saffron) 33.3%, #fff 33.3% 66.6%, var(--green) 66.6%);
}

/* Top utility bar */
.top-bar {
    background: var(--navy-dark);
    color: #cfd8e3;
    font-size: 0.82rem;
    padding: 6px 0;
}
.top-bar a { color: #cfd8e3; text-decoration: none; margin: 0 4px; }
.top-bar a:hover { color: #fff; text-decoration: underline; }
.top-bar .divider { color: #52607a; }

/* Header */
.site-header {
    background: var(--navy);
    color: #fff;
}
.emblem-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.site-title h1 { font-size: 1.4rem; color: #fff; }
.site-title .tagline { font-size: 0.85rem; color: #b9c6da; font-family: var(--font-body); }
.header-actions .btn-outline-light { border-color: #b9c6da; }
.header-actions .btn { white-space: nowrap; }
.user-greeting { font-size: 0.85rem; }

/* Main nav */
.main-nav {
    background: var(--gold);
}
.main-nav .navbar-nav .nav-link {
    color: var(--navy-dark);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 14px;
}
.main-nav .navbar-nav .nav-link:hover {
    background: rgba(10, 47, 92, 0.08);
}

.nav-search { max-width: 220px; }

/* Advertisement slots */
.ad-slot { margin: 0 auto; max-width: 100%; }
.ad-slot img { max-height: 120px; }

/* Hero slider */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide {
    height: 420px;
    display: flex;
    align-items: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.hero-slide-1 { background: linear-gradient(135deg, var(--navy), #1a5a99); }
.hero-slide-2 { background: linear-gradient(135deg, var(--navy-dark), var(--green)); }
.hero-slide-3 { background: linear-gradient(135deg, #7a1f1f, var(--navy-dark)); }

/* Ambient drifting glow, evokes river light on the delta at dusk */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 30%, rgba(255,153,51,0.16), transparent 45%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.10), transparent 40%);
    animation: heroDrift 14s ease-in-out infinite alternate;
    pointer-events: none;
}
.hero-slide .container { position: relative; z-index: 2; }
.hero-slide h2 {
    font-size: 2.3rem;
    max-width: 650px;
    opacity: 0;
    transform: translateY(18px);
}
.hero-slide p {
    font-size: 1.08rem;
    max-width: 550px;
    opacity: 0;
    transform: translateY(18px);
}
.hero-cta { opacity: 0; transform: translateY(18px); margin-top: 6px; }
.carousel-item.active .hero-slide h2 { animation: heroRise 0.75s cubic-bezier(.2,.8,.25,1) 0.15s forwards; }
.carousel-item.active .hero-slide p { animation: heroRise 0.75s cubic-bezier(.2,.8,.25,1) 0.32s forwards; }
.carousel-item.active .hero-cta { animation: heroRise 0.75s cubic-bezier(.2,.8,.25,1) 0.48s forwards; }

.hero-cta .btn { margin-right: 10px; margin-bottom: 8px; }
.hero-cta .btn-warning { color: var(--navy-dark); font-weight: 700; }

/* Wave divider: the signature element, echoing the Matla river / Sundarbans
   waterways that define this block geographically */
.wave-divider {
    display: block;
    width: 100%;
    line-height: 0;
    margin-top: -2px;
}
.wave-divider svg { width: 100%; height: 54px; display: block; }

@keyframes heroRise {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroDrift {
    from { transform: translate(-2%, -2%) scale(1); }
    to   { transform: translate(2%, 2%) scale(1.06); }
}

/* Emergency banner */
.emergency-banner {
    background: #b32424;
    color: #fff;
    font-size: 0.9rem;
}

/* Quick links */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 20px 10px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.88rem;
    transition: transform 0.2s cubic-bezier(.2,.8,.25,1), box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
}
.quick-link-card i { font-size: 1.6rem; color: var(--saffron); transition: transform 0.25s cubic-bezier(.34,1.56,.64,1); display: inline-block; }
.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(10,47,92,0.14);
    border-color: var(--saffron);
    color: var(--navy);
}
.quick-link-card:hover i { transform: scale(1.18) rotate(-4deg); }

/* Content cards */
.content-card {
    background: #fff;
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.section-title {
    font-size: 1.1rem;
    color: var(--navy);
    border-bottom: 2px solid var(--saffron);
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.section-title i { color: var(--saffron); margin-right: 6px; }
.news-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-grey);
    transition: padding-left 0.2s ease;
}
.news-list li:last-child { border-bottom: none; }
.news-list li:hover { padding-left: 4px; }
.news-list a { color: var(--text-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.news-list a:hover { color: var(--navy); text-decoration: underline; }

/* GP cards */
.gp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border-grey);
    border-left: 4px solid var(--green);
    border-radius: 6px;
    padding: 18px 8px;
    text-decoration: none;
    color: var(--navy-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    transition: transform 0.2s cubic-bezier(.2,.8,.25,1), box-shadow 0.2s ease, background 0.2s ease;
}
.gp-card i { font-size: 1.4rem; color: var(--green); transition: transform 0.25s ease; }
.gp-card:hover {
    background: #f0f7ee;
    color: var(--navy-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(19,136,8,0.16);
}
.gp-card:hover i { transform: scale(1.15); }

/* Stats counter strip */
.stats-strip {
    background: linear-gradient(120deg, var(--navy-dark), var(--navy) 60%, #124a2e);
    color: #fff;
    padding: 38px 0;
}
.stat-block { text-align: center; padding: 6px 10px; }
.stat-block i { font-size: 1.5rem; color: var(--saffron); margin-bottom: 8px; display: block; }
.stat-number {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    display: block;
}
.stat-label { font-size: 0.82rem; color: #c9d4e3; letter-spacing: 0.03em; text-transform: uppercase; margin-top: 4px; display: block; }

/* Scroll-reveal system: elements fade/rise into place as they enter the viewport */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(.2,.8,.25,1), transform 0.6s cubic-bezier(.2,.8,.25,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-slide h2, .hero-slide p, .hero-cta { opacity: 1 !important; transform: none !important; animation: none !important; }
    .hero-slide::before { animation: none !important; }
    .quick-link-card, .gp-card, .content-card { transition: none !important; }
}

/* Auth card */
.auth-card {
    background: #fff;
    border: 1px solid var(--border-grey);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(10,47,92,0.08);
}
.auth-card h2 { color: var(--navy); font-size: 1.5rem; }
.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
}
.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
}

/* Floating SOS button */
.sos-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #c62828;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(198,40,40,0.5);
    z-index: 1500;
    animation: sos-pulse 1.8s infinite;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.sos-float i { font-size: 1.2rem; margin-bottom: 2px; }
.sos-float:hover { color: #fff; background: #a51f1f; }
@keyframes sos-pulse {
    0% { box-shadow: 0 0 0 0 rgba(198,40,40,0.55); }
    70% { box-shadow: 0 0 0 14px rgba(198,40,40,0); }
    100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); }
}

/* Footer */
.site-footer {
    background: var(--navy-dark);
    color: #c9d4e3;
    padding: 40px 0 20px;
    margin-top: 40px;
    font-size: 0.88rem;
}
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #c9d4e3; text-decoration: none; }
.footer-links a:hover { color: var(--saffron); }

/* Status badges (complaint / SOS tracking) */
.badge.status-pending { background: #ff9933 !important; }
.badge.status-accepted { background: #0a2f5c !important; }
.badge.status-in_progress { background: #6c757d !important; }
.badge.status-resolved { background: #138808 !important; }
.badge.status-rejected { background: #c62828 !important; }
.badge.status-approved { background: #138808 !important; }
.badge.status-sold { background: #6c757d !important; }
.badge.status-expired { background: #b32424 !important; }
.verified-badge { font-size: 0.65rem; vertical-align: middle; }

@media (max-width: 767px) {
    .hero-slide { height: 340px; }
    .hero-slide h2 { font-size: 1.5rem; }
    .hero-slide p { font-size: 0.95rem; }
    .hero-cta .btn { font-size: 0.82rem; padding: 7px 14px; }
    .site-title h1 { font-size: 1.1rem; }
    .site-title .tagline { display: none; }
    .header-inner { row-gap: 10px; }
    .header-actions { margin-left: 0 !important; width: 100%; justify-content: flex-end; }
    .header-actions .btn { font-size: 0.78rem; padding: 5px 10px; }
    .user-greeting { display: none; }
    .stats-strip { padding: 26px 0; }
    .stat-number { font-size: 1.7rem; }
    .stat-label { font-size: 0.7rem; }
    .stat-block i { font-size: 1.2rem; }
}
