/* ============================================================
   🏡 आपले गाव (Aaple Gaav) - Ultra-Professional Modern Design System
   Font: Poppins & Noto Sans Devanagari
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Noto+Sans+Devanagari:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #059669;
    --primary-dark: #047857;
    --primary-light: #e6f4ea;
    --primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --secondary-color: #d97706;
    --accent-orange: #f97316;
    --dark-navy: #0f172a;
    --medium-slate: #334155;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --font-main: 'Poppins', 'Noto Sans Devanagari', sans-serif;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: #1e293b;
    padding-bottom: 85px; /* Space for PWA mobile bottom nav */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}

/* Glassmorphism Header Top Bar */
.top-header-bar {
    background: linear-gradient(135deg, #091e36 0%, #0f172a 100%);
    color: #ffffff;
    padding: 10px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-header-bar a {
    transition: transform 0.2s, opacity 0.2s;
}

/* Main Navigation Bar */
.main-navbar {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 12px 0 !important;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 3px solid var(--primary-color);
}

.navbar-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark) !important;
    text-decoration: none;
}

.navbar-brand-logo .logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(5, 150, 105, 0.2);
}

.nav-link {
    font-weight: 600;
    color: var(--medium-slate) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

/* Floating Help Button */
.floating-help-btn {
    position: fixed;
    bottom: 95px;
    right: 25px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.45);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1050;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #ffffff;
    font-size: 0.9rem;
}

.floating-help-btn:hover {
    transform: scale(1.06);
    color: white;
}

/* Gram Panchayat Member Photo - Small Square with Rounded Corners */
.gp-member-photo {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-member-avatar-fallback {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #059669 0%, #091e36 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 3px solid #059669;
}

/* Notice Ticker */
.notice-ticker-wrapper {
    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 5px solid var(--accent-orange);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.notice-ticker-label {
    background: var(--accent-orange);
    color: white;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Hero Carousel Slider */
.ad-carousel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.ad-carousel .carousel-item {
    height: 380px;
    background-color: #091e36;
}

.ad-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption-custom {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0) 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    color: white;
    text-align: left;
}

.carousel-caption-custom h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

/* Section Titles */
.section-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark-navy);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.btn-view-all {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 30px;
    background: var(--primary-light);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Category Quick Cards */
.category-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--dark-navy);
    display: block;
    height: 100%;
}

.category-card.featured-card {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white !important;
    border: 2px solid #059669;
}

.category-card.featured-card .category-icon {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.category-card.featured-card h5, 
.category-card.featured-card p {
    color: white !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.cat-gp { background: #ecfdf5; color: #047857; }
.cat-feed { background: #dcfce7; color: #15803d; }
.cat-galli { background: #dbeafe; color: #1d4ed8; }
.cat-farmer { background: #fef3c7; color: #b45309; }
.cat-health { background: #fee2e2; color: #b91c1c; }
.cat-edu { background: #e0f2fe; color: #0369a1; }
.cat-schemes { background: #f3e8ff; color: #7e22ce; }
.cat-contacts { background: #ffedd5; color: #c2410c; }
.cat-gallery { background: #fce7f3; color: #be185d; }
.cat-docs { background: #e0e7ff; color: #4338ca; }

/* Emergency Contact Cards - Fixed Layout */
.emergency-btn-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary-color);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    height: 100%;
}

.emergency-btn-card:hover {
    box-shadow: var(--shadow-md);
}

.emergency-icon {
    font-size: 2rem;
    margin-right: 10px;
}

.emergency-info h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-navy);
}

.emergency-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.btn-call-direct {
    background: #16a34a;
    color: white;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-call-direct:hover {
    color: white;
    background: #15803d;
}

/* News & Content Cards - Fixed Clean Grid & Overlap */
.content-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-card-img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.content-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-card-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: inline-block;
    margin-bottom: 8px;
    width: fit-content;
}

.content-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 8px;
    line-height: 1.4;
}

.content-card-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

/* Mobile Sticky Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1040;
    border-top: 1px solid var(--border-color);
}

.bottom-nav-item {
    text-align: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    flex: 1;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Footer Styling */
.site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #091e36 100%);
    color: #94a3b8;
    padding: 40px 0 20px;
    font-size: 0.9rem;
    border-top: 3px solid var(--primary-color);
}

.site-footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 14px;
}

.site-footer a {
    color: #cbd5e1;
    text-decoration: none;
}

@media (max-width: 768px) {
    .ad-carousel .carousel-item { height: 220px; }
    .floating-help-btn { bottom: 75px; right: 15px; padding: 10px 16px; font-size: 0.85rem; }
}
