/* Indian Tricolor Theme - Responsive */
:root {
  --primary: #FF9933;
  --secondary: #138808;
  --accent: #0066CC;
  --primary-light: rgba(255, 153, 51, 0.1);
  --secondary-light: rgba(19, 136, 8, 0.1);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Fade-up animation for sections */
.fade-up-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-up-section.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  .hero-slide-img { animation: none; }
  .carousel-item.active .hero-animate .hero-badge,
  .carousel-item.active .hero-animate .hero-title,
  .carousel-item.active .hero-animate .hero-subtitle,
  .carousel-item.active .hero-animate .hero-desc,
  .carousel-item.active .hero-animate .hero-btns { animation: none; opacity: 1; }
}

@media (min-width: 576px) {
  html { font-size: 15px; }
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin: 0;
  color: #374151;
  overflow-x: hidden;
}

/* Container - side padding for content sections */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 576px) {
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (min-width: 768px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Header - Fixed on scroll (sticky fallback for overflow issues) */
.navbar-politics {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff !important;
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 0.5rem 0;
}

.navbar-politics .navbar-toggler {
  color: #000;
  border-color: rgba(0, 0, 0, 0.25);
}

.navbar-politics .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width: 768px) {
  .navbar-politics { padding: 0.75rem 0; }
}

.navbar-politics .navbar-brand {
  font-weight: 700;
  color: #111 !important;
  font-size: 1rem;
}

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

.navbar-brand-text {
  font-size: 1rem;
}

@media (min-width: 768px) {
  .navbar-brand-text { font-size: 1.1rem; }
}

.footer-logo {
  height: 65px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.footer-brand {
  font-weight: 700;
  color: white;
  font-size: 1rem;
}

.navbar-politics .nav-link {
  color: #374151 !important;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.5rem 0.6rem !important;
  margin: 0 0.125rem;
  position: relative;
  background: transparent !important;
  border-radius: 0;
  transition: color 0.25s ease;
}

@media (min-width: 768px) {
  .navbar-politics .nav-link { font-size: 0.8125rem; padding: 0.5rem 0.75rem !important; margin: 0 0.2rem; }
}

.navbar-politics .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  transform: translateX(-50%);
}

.navbar-politics .nav-link:hover {
  color: var(--primary) !important;
  background: transparent !important;
}

.navbar-politics .nav-link:hover::after {
  width: 100%;
}

.navbar-politics .nav-link.active {
  color: var(--primary) !important;
  background: transparent !important;
}

.navbar-politics .nav-link.active::after {
  width: 100%;
}

.navbar-politics .navbar-collapse {
  padding-top: 0.75rem;
}

@media (min-width: 992px) {
  .navbar-politics .navbar-collapse { padding-top: 0; }
}

/* Nav items - single line, aligned, centered */
.navbar-politics .navbar-collapse {
  flex-grow: 1;
  justify-content: center;
}

.navbar-politics .navbar-nav {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .navbar-politics .navbar-nav { gap: 1rem; }
}

.navbar-politics .nav-item-cta {
  margin-left: 1rem;
  margin-right: -0.5rem;
}

@media (min-width: 992px) {
  .navbar-politics .nav-item-cta { margin-left: 2rem; margin-right: -0.75rem; }
}

.navbar-politics .nav-item {
  display: flex;
  align-items: center;
}

.navbar-politics .nav-link {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.navbar-politics .btn-primary-orange {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 576px) {
  .navbar-politics .btn-primary-orange { padding: 0.5rem 1.25rem; }
}

@media (min-width: 768px) {
  .navbar-politics .btn-primary-orange { padding: 0.625rem 1.5rem; }
}

.btn-primary-orange {
  background: var(--primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(255, 153, 51, 0.25);
}

@media (min-width: 576px) {
  .btn-primary-orange { padding: 0.625rem 1.5rem; }
}

.btn-primary-orange:hover {
  background: #e68a2e;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.35);
}

/* Cards - Minimal */
.card-tricolor {
  border-top: 2px solid var(--primary);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.card-tricolor:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .card-tricolor:hover { transform: none; }
}

/* Images - Responsive */
img {
  max-width: 100%;
  height: auto;
}

.object-fit-cover {
  object-fit: cover;
}

/* Footer - Minimal */
.footer-politics {
  background: #1f2937;
  color: white;
  padding: 2rem 0 1rem;
}

@media (min-width: 768px) {
  .footer-politics { padding: 3rem 0 1.5rem; }
}

.footer-politics .row > div {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-politics .row > div { margin-bottom: 0; }
}

.footer-politics a {
  color: #9ca3af;
  transition: color 0.3s;
}

.footer-politics a:hover {
  color: var(--primary);
}

.footer-politics .footer-brand {
  font-weight: 700;
  color: white;
}

.footer-politics .footer-brand small {
  font-size: 0.75rem;
  color: var(--primary);
}

.footer-atmedia-link {
  color: #9ca3af !important;
  text-decoration: none;
  transition: color 0.25s ease, text-decoration 0.25s ease;
}

.footer-atmedia-link:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

/* Page headers - Minimal */
.page-header {
  padding: 2.5rem 0;
  background: #fafbfc;
}

@media (min-width: 576px) {
  .page-header { padding: 3.5rem 0; }
}

@media (min-width: 768px) {
  .page-header { padding: 5rem 0; }
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  word-wrap: break-word;
}

@media (min-width: 576px) {
  .page-header h1 { font-size: 2.5rem; }
}

@media (min-width: 768px) {
  .page-header h1 { font-size: 3rem; }
}

@media (min-width: 992px) {
  .page-header h1 { font-size: 3.75rem; }
}

.text-primary-orange { color: var(--primary) !important; }
.text-secondary-green { color: var(--secondary) !important; }
.bg-primary-light { background: var(--primary-light); }
.bg-secondary-light { background: var(--secondary-light); }

/* CTA Section - Minimal */
.cta-tricolor {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 2.5rem 0;
  color: white;
}

@media (min-width: 576px) {
  .cta-tricolor { padding: 3.5rem 0; }
}

@media (min-width: 768px) {
  .cta-tricolor { padding: 5rem 0; }
}

.cta-tricolor h2, .cta-tricolor .display-5 {
  font-size: 1.5rem;
}

@media (min-width: 576px) {
  .cta-tricolor h2, .cta-tricolor .display-5 { font-size: 1.75rem; }
}

@media (min-width: 768px) {
  .cta-tricolor h2, .cta-tricolor .display-5 { font-size: 2rem; }
}

/* Form focus */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 153, 51, 0.25);
}

.btn:focus, .btn:active:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 153, 51, 0.25);
}

/* Main content - centered, padding for fixed navbar */
.main-content {
  padding-top: 80px; /* Navbar height: logo ~65px + padding */
  padding-bottom: 2rem;
  margin: 0 auto;
}

/* Hero carousel - Full viewport, no scroll (minus fixed navbar) */
.hero-carousel-section {
  width: 100%;
  height: calc(100vh - 80px);
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: hidden;
}

.hero-carousel-section .carousel,
.hero-carousel-section .carousel-inner,
.hero-carousel-section .carousel-item {
  height: 100%;
}

.hero-slide-bg {
  overflow: hidden;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoomIn 8s ease-out forwards;
}

.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,153,51,0.92), rgba(255,255,255,0.88), rgba(19,136,8,0.92));
}

.carousel-item.active .hero-slide-img {
  animation: heroZoomIn 8s ease-out forwards;
}

@keyframes heroZoomIn {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

/* Hero content animations */
.hero-animate .hero-badge {
  opacity: 0;
  animation: heroFadeUp 0.6s ease-out 0.2s forwards;
}

.hero-animate .hero-title {
  opacity: 0;
  animation: heroFadeUp 0.6s ease-out 0.4s forwards;
}

.hero-animate .hero-subtitle {
  opacity: 0;
  animation: heroFadeUp 0.6s ease-out 0.55s forwards;
}

.hero-animate .hero-desc {
  opacity: 0;
  animation: heroFadeUp 0.6s ease-out 0.7s forwards;
}

.hero-animate .hero-btns {
  opacity: 0;
  animation: heroFadeUp 0.6s ease-out 0.85s forwards;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Re-trigger animation when slide becomes active */
.carousel-item:not(.active) .hero-animate .hero-badge,
.carousel-item:not(.active) .hero-animate .hero-title,
.carousel-item:not(.active) .hero-animate .hero-subtitle,
.carousel-item:not(.active) .hero-animate .hero-desc,
.carousel-item:not(.active) .hero-animate .hero-btns {
  opacity: 0;
  animation: none;
}

.carousel-item.active .hero-animate .hero-badge { animation: heroFadeUp 0.6s ease-out 0.2s forwards; }
.carousel-item.active .hero-animate .hero-title { animation: heroFadeUp 0.6s ease-out 0.4s forwards; }
.carousel-item.active .hero-animate .hero-subtitle { animation: heroFadeUp 0.6s ease-out 0.55s forwards; }
.carousel-item.active .hero-animate .hero-desc { animation: heroFadeUp 0.6s ease-out 0.7s forwards; }
.carousel-item.active .hero-animate .hero-btns { animation: heroFadeUp 0.6s ease-out 0.85s forwards; }

/* Hero indicators - visible on gradient */
.hero-indicators {
  bottom: 1.5rem;
}

.hero-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  opacity: 0.7;
}

.hero-indicators button.active {
  background: #fff;
  opacity: 1;
}

/* Carousel controls - visible */
.hero-carousel-section .carousel-control-prev-icon,
.hero-carousel-section .carousel-control-next-icon {
  filter: none;
  background-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  padding: 12px;
  background-size: 60%;
}

.hero-carousel-section .carousel-control-prev-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); }
.hero-carousel-section .carousel-control-next-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); }

/* Responsive display classes */
.display-hero {
  font-size: 1.75rem;
}

@media (min-width: 576px) {
  .display-hero { font-size: 2.25rem; }
}

@media (min-width: 768px) {
  .display-hero { font-size: 2.75rem; }
}

@media (min-width: 992px) {
  .display-hero { font-size: 3rem; }
}

/* Step badge - responsive */
.step-badge {
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
  margin-left: 18px;
}

@media (min-width: 576px) {
  .step-badge {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    margin-left: 21px;
  }
}

@media (min-width: 768px) {
  .step-badge {
    width: 48px;
    height: 48px;
    margin-left: 24px;
  }
}

/* Stat value - responsive */
.stat-value {
  font-size: 1.75rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .stat-value { font-size: 2.5rem; }
}

@media (min-width: 992px) {
  .stat-value { font-size: 3rem; }
}

/* Election tabs - responsive rounded */
.election-tabs .btn:first-child {
  border-radius: 0.375rem 0.375rem 0 0;
}

.election-tabs .btn:last-child {
  border-radius: 0 0 0.375rem 0.375rem;
}

@media (min-width: 576px) {
  .election-tabs .btn:first-child {
    border-radius: 0.375rem 0 0 0.375rem;
  }
  .election-tabs .btn:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
  }
}

.chart-container {
  position: relative;
  width: 100%;
}

/* Long text - prevent overflow */
.card-body, .p-3, .p-4 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Contact map placeholder - mobile */
.contact-map-placeholder {
  min-height: 180px;
}

@media (min-width: 768px) {
  .contact-map-placeholder { min-height: 280px; }
}

/* Blog image - responsive */
.blog-img-wrap {
  height: 200px;
  min-height: 200px;
}

@media (min-width: 576px) {
  .blog-img-wrap { height: 220px; min-height: 220px; }
}

/* Service list image - responsive */
.service-img-wrap {
  min-height: 12rem;
  height: 18rem;
}

@media (max-width: 767px) {
  .service-img-wrap { height: 14rem; min-height: 14rem; }
}

/* Responsive table/overflow */
.table-responsive, .overflow-auto {
  -webkit-overflow-scrolling: touch;
}

/* Pre/code - mobile */
pre, code {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-width: 100%;
}

/* Input group responsive */
@media (max-width: 575px) {
  .input-group {
    flex-direction: column;
  }
  .input-group .form-control {
    border-radius: 0.375rem !important;
  }
  .input-group .btn {
    border-radius: 0.375rem !important;
    width: 100%;
  }
}
