@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

:root {
  --primary-color: #2C2C54;
  --secondary-color: #c62828;
  --accent-color: #ffc107;
  --light-color: #f5f5f5;
  --dark-color: #212121;
  --text-color: #333333;
  --hover-transition: all 0.3s ease;
}

body {
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

/* Header */
header {
  background-color: white;
  color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-right: 15px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.logo-text p {
  font-size: 14px;
  color: var(--primary-color);
  margin: 0;
}

.top-right {
  display: flex;
  align-items: center;
}

.language-switcher {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.language-switcher button {
  background-color: transparent;
  color: var(--primary-color);
  padding: 0;
  border: none;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--hover-transition);
  cursor: pointer;
}

.language-switcher button:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Main Navigation */
.main-nav {
  background-color: var(--primary-color);
  padding: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.nav-links li {
  margin: 0;
  position: relative;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 15px 20px;
  display: block;
  transition: var(--hover-transition);
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
}

.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Search Section */
.search-section {
  padding: 40px 20px;
  text-align: center;
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
}

.search-container h2 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* Advanced Search Form */
.advanced-search-form {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 25px;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Updated to make filters in one line */
.search-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.filter-group {
  flex: 1;
  text-align: left;
  min-width: 0; /* Allow flexbox to shrink items below their content size */
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 16px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background-color: white;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.1);
}

.search-btn {
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 500;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-btn:hover {
  background-color: #b71c1c;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Results Grid - Matched with index.css */
.martyrs-grid {
  display: grid;
  grid-template-columns: repeat(1fr); /* 3 cards per row */
  gap: 30px;
  max-width: 100%; /* Ensure full width */
  margin: 30px auto 0;
  padding: 0 20px;
  
}

.martyr-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: var(--hover-transition);
  cursor: pointer;
  position: relative;
  width: 100%;
}

.martyr-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.martyr-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background-color: rgba(235, 241, 245, 0.842);
}

.martyr-info {
  padding: 20px;
}

.martyr-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.martyr-info .rank {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 5px;
}

.martyr-info p {
  margin-bottom: 10px;
}

.martyr-info .date {
  color: #666;
  font-size: 14px;
}

.read-more-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  font-size: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: var(--hover-transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #b71c1c;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
@media (max-width: 768px) {
  .martyrs-grid {
    grid-template-columns: 1fr; /* 1 card per row */
    gap: 15px; /* Reduce gap on smaller screens */
    padding: 0 10px; /* Adjust padding for mobile */
  }
}

/* Media Queries for Responsive Design */
@media (max-width: 900px) {
  .search-filters {
    flex-wrap: wrap;
  }
  
  .filter-group {
    flex-basis: 48%;
  }
}

@media (max-width: 768px) {
  .search-filters {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .search-section {
    padding: 30px 15px;
  }
  
  .advanced-search-form {
    padding: 20px 15px;
  }
  
  .search-container h2 {
    font-size: 28px;
  }
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 60px 0 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-column h3 {
  font-size: 20px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 2px;
  background-color: var(--accent-color);
  bottom: 0;
  left: 0;
}

.footer-column p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #bdbdbd;
  text-decoration: none;
  transition: var(--hover-transition);
  display: inline-block;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  transition: var(--hover-transition);
}

.social-links a:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.social-links i {
  color: white;
  font-size: 18px;
}

.footer-bottom {
  margin-top: 40px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #bdbdbd;
  font-size: 14px;
}

.footer-bottom a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--hover-transition);
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Pagination Controls */
.pagination-controls {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
  position: relative;
  z-index: 1000;
}

.pagination-controls button {
  padding: 8px 15px;
  margin: 0 5px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--hover-transition);
}

.pagination-controls button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.page-numbers {
  display: inline-block;
  margin: 0 10px;
}

.page-numbers button {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  min-width: 35px;
}

.page-numbers button.active {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.page-numbers button:hover:not(.active) {
  background-color: var(--light-color);
}