/* ===== Wards Section ===== */
.wards-title {
  font-size: 2.5rem;
  text-align: center;
  color: #222;
  margin: 100px 0 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.wards-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: #222;
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Grid Layout */
.wards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* Ward Card */
.ward-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Makes sure cards stretch equally */
}

.ward-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Ward Image */
.ward-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.ward-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  position: relative;
  z-index: 1;
}

/* Overlay tint */
.ward-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* Tint color */
  z-index: 2;
  pointer-events: none;
}

.ward-card:hover .ward-image img {
  transform: scale(1.08);
}

/* Card Content */
.ward-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Forces content area to fill remaining space */
}

.ward-content h3 {
  font-size: 1.4rem;
  color: #111;
  margin-bottom: 8px;
  font-weight: 600;
}

.ward-content p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}

.ward-content .gurkar {
  font-size: 0.9rem;
  color: #666;
  margin-top: auto; /* Pushes Gurkar and button to bottom */
  font-style: italic;
}

/* "Know More" Button */
.more-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #004080;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.more-btn:hover {
  background: #002850;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

/* Modal Background */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

/* Modal Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Content */
.modal-content {
  background: #fff;
  width: 85%;
  max-width: 850px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s ease;
}

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

/* Close Button */
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  cursor: pointer;
  color: #444;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #e74c3c;
}

/* Modal Body */
.modal-body {
  display: flex;
  flex-direction: row;
  gap: 25px;
  padding: 25px;
}

.modal-image img {
  width: 320px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.modal-info {
  flex: 1;
}

.modal-info h2 {
  margin-top: 0;
  color: #222;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.modal-info p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* ===== Load More Button ===== */
.load-more-container {
  text-align: center;
  margin: 40px 0;
}

.load-more-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #004080;
  border-radius: 10px;
  text-decoration: none;
  letter-spacing: 0.6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover Glow Effect */
.load-more-btn:hover {
  background: #002850;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Click Animation */
.load-more-btn:active {
  transform: scale(0.95);
}

/* Shine Effect */
.load-more-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75px;
  width: 50px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  transform: skewX(-25deg);
  transition: 0.5s;
}

.load-more-btn:hover::before {
  left: 120%;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
    text-align: center;
  }

  .modal-image img {
    width: 100%;
    max-width: 400px;
    margin: auto;
  }
}

/* ===== Container ===== */
.ward-details-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 100px auto;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ===== Image Styling ===== */
.ward-details-container img {
  flex: 1 1 45%;
  max-width: 520px;
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, filter 0.3s ease;
  
  /* Apply a dark tint using brightness */
  filter: brightness(0.7); /* 0.7 = 70% brightness, darker image */
}

.ward-details-container img:hover {
  transform: scale(1.03);
  filter: brightness(0.6); /* Slightly darker on hover */
}


/* ===== Text Section ===== */
.ward-details-text {
  flex: 1 1 50%;
  padding: 10px;
}

.ward-details-text h2 {
  font-size: 2rem;
  color: #004080;
  margin-bottom: 12px;
  position: relative;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.ward-details-text h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #004080;
  margin-top: 6px;
  border-radius: 2px;
}

.ward-details-text .gurkar {
  font-size: 1rem;
  color: #666;
  margin-bottom: 20px;
  font-weight: 500;
}

/* ===== Description Text ===== */
.ward-details-text p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 15px;
  line-height: 1.8;
}

/* ===== Links inside longDescription ===== */
.ward-details-text p a {
  color: #004080;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.ward-details-text p a:hover {
  color: #ff6600;
  text-decoration: underline;
}

/* ===== Back Button ===== */
.back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #004080;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.back-btn:hover {
  background: #002850;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .ward-details-container {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }

  .ward-details-container img {
    max-width: 100%;
    margin: 0 auto;
  }

  .ward-details-text h2::after {
    margin: 8px auto 0;
  }

  .ward-details-text {
    padding: 0;
  }
}
