/* ==========================================================================
   Ratadgaon Gram Panchayat - Mobile-First Modern Design System
   ========================================================================== */

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

:root {
  /* Brand Palette */
  --gp-navy: #0b2240;
  --gp-navy-dark: #071529;
  --gp-navy-light: #163660;
  --gp-saffron: #ff6f00;
  --gp-saffron-light: #fff3e0;
  --gp-emerald: #059669;
  --gp-emerald-light: #ecfdf5;
  --gp-gold: #d97706;
  --gp-gold-light: #fffbeb;
  --gp-red: #dc2626;
  
  /* Neutrals */
  --gp-bg: #f4f6f9;
  --gp-card-bg: #ffffff;
  --gp-text-main: #0f172a;
  --gp-text-muted: #64748b;
  --gp-border: #e2e8f0;
  --gp-glass: rgba(255, 255, 255, 0.88);
  --gp-glass-border: rgba(255, 255, 255, 0.4);

  /* Radius & Shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(11, 34, 64, 0.05);
  --shadow-md: 0 8px 24px rgba(11, 34, 64, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 34, 64, 0.12);
  --shadow-active: 0 4px 12px rgba(255, 111, 0, 0.25);
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base Setup --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', 'Inter', 'Noto Sans Devanagari', sans-serif;
  color: var(--gp-text-main);
  background-color: var(--gp-bg);
  line-height: 1.55;
  margin: 0;
  padding: 0;
  /* Extra space at bottom for mobile bottom navbar on small screens */
  padding-bottom: 76px;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--gp-navy);
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 { font-size: clamp(1.6rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); }

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--gp-navy);
  transition: var(--transition);
}

a:hover {
  color: var(--gp-saffron);
}

/* --- Layout Wrappers & Sections --- */
.section-padding {
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }
}

/* --- Top Header (Desktop & Mobile Bar) --- */
.top-header {
  background: linear-gradient(135deg, var(--gp-navy-dark), var(--gp-navy));
  color: #ffffff;
  font-size: 0.825rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--gp-saffron);
}

.top-header a {
  color: rgba(255, 255, 255, 0.9);
}

.top-header a:hover {
  color: var(--gp-saffron);
}

/* Language Selector Pills */
.lang-btn-group .btn {
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background: transparent;
  transition: var(--transition);
}

.lang-btn-group .btn.active,
.lang-btn-group .btn:hover {
  background: var(--gp-saffron);
  border-color: var(--gp-saffron);
  color: #fff;
}

/* --- Main Floating Navbar (Desktop) --- */
.navbar-main {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  padding: 0.65rem 0;
}

.navbar-main.sticky-top {
  box-shadow: var(--shadow-md);
}

.navbar-brand-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-link-item {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--gp-navy) !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

/* --- Mobile Bottom Navigation Bar (< 992px) --- */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 66px;
  background: var(--gp-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(11, 34, 64, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  align-items: center;
  justify-content: space-around;
  padding: 4px 6px;
}

@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gp-text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: var(--transition-bounce);
}

.mobile-nav-item.active,
.mobile-nav-item:active {
  color: var(--gp-saffron);
}

.mobile-nav-item.active i {
  transform: translateY(-2px) scale(1.15);
}

.mobile-nav-item-center {
  position: relative;
  top: -12px;
}

.mobile-nav-item-center .icon-bubble {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gp-saffron), #e65100);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-active);
  border: 3px solid #ffffff;
  transition: var(--transition-bounce);
}

.mobile-nav-item-center.active .icon-bubble,
.mobile-nav-item-center:active .icon-bubble {
  transform: scale(1.1);
}

.mobile-nav-item-center i {
  margin-bottom: 0;
  font-size: 1.35rem;
}

/* --- Cards & Touch Controls --- */
.gp-card {
  background: var(--gp-card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--gp-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

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

.gp-card-interactive {
  cursor: pointer;
  touch-action: manipulation;
}

.gp-card-interactive:active {
  transform: scale(0.98);
}

.gp-card-header-gradient {
  background: linear-gradient(135deg, var(--gp-navy), var(--gp-navy-light));
  color: #ffffff;
  padding: 1.25rem;
}

/* Quick Action Tiles for Mobile Grid */
.quick-action-tile {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--gp-border);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
  display: block;
  height: 100%;
}

.quick-action-tile:hover,
.quick-action-tile:active {
  transform: translateY(-4px);
  border-color: var(--gp-saffron);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  transition: var(--transition-bounce);
}

.quick-action-tile:hover .quick-action-icon {
  transform: scale(1.12) rotate(4deg);
}

/* Icon Variations */
.icon-saffron { background: var(--gp-saffron-light); color: var(--gp-saffron); }
.icon-navy { background: #e0e8f5; color: var(--gp-navy); }
.icon-emerald { background: var(--gp-emerald-light); color: var(--gp-emerald); }
.icon-gold { background: var(--gp-gold-light); color: var(--gp-gold); }

/* Buttons & Touch Targets (Min 44px height) */
.btn-gp {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.35rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border: 2px solid transparent;
  touch-action: manipulation;
}

.btn-gp:active {
  transform: scale(0.97);
}

.btn-gp-saffron {
  background: var(--gp-saffron);
  color: #ffffff;
}

.btn-gp-saffron:hover {
  background: #e65100;
  color: #ffffff;
}

.btn-gp-navy {
  background: var(--gp-navy);
  color: #ffffff;
}

.btn-gp-navy:hover {
  background: var(--gp-navy-dark);
  color: #ffffff;
}

.btn-gp-outline-navy {
  background: transparent;
  border-color: var(--gp-navy);
  color: var(--gp-navy);
}

.btn-gp-outline-navy:hover {
  background: var(--gp-navy);
  color: #ffffff;
}

/* Badges & Status Pills */
.badge-gp {
  padding: 0.35em 0.85em;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-saffron { background: var(--gp-saffron-light); color: #c2410c; border: 1px solid #ffedd5; }
.badge-navy { background: #e0e8f5; color: var(--gp-navy); border: 1px solid #cbd5e1; }
.badge-emerald { background: var(--gp-emerald-light); color: #047857; border: 1px solid #a7f3d0; }
.badge-gold { background: var(--gp-gold-light); color: #b45309; border: 1px solid #fde68a; }

/* Forms & Floating Labels */
.form-control, .form-select {
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gp-border);
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--gp-saffron);
  box-shadow: 0 0 0 3.5px rgba(255, 111, 0, 0.15);
  outline: none;
}

/* News Ticker Mobile Responsive */
.ticker-wrapper {
  background: linear-gradient(90deg, var(--gp-navy), var(--gp-navy-light));
  color: #ffffff;
  padding: 6px 0;
  font-size: 0.85rem;
}

/* Sarpanch / Secretary Profile Cards */
.official-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--gp-border);
  box-shadow: var(--shadow-sm);
}

.official-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gp-saffron-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

/* Footer Styling */
.gp-footer {
  background: var(--gp-navy-dark);
  color: #94a3b8;
  font-size: 0.9rem;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-top: 4px solid var(--gp-saffron);
}

.gp-footer h5 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.gp-footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--gp-saffron);
  border-radius: 2px;
}

.gp-footer a {
  color: #cbd5e1;
}

.gp-footer a:hover {
  color: var(--gp-saffron);
  padding-left: 4px;
}
