:root {
  --primary-navy: #002B49;
  --primary-blue: #00A3E0;
  --text-dark: #002B49;
  --text-muted: #86A1B5;
  --text-secondary: #6c757d;
  --bg-light: #f8fbfd;
  --border-light: #e9ecef;
  --white: #ffffff;
}

html, body {
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  background: #E6EFF5 !important; 
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2C3539;
  line-height: 1.6;
  margin: 0;
  padding-top: 70px;
}

/* Search Section */
main .mnt-primary-nav {
  background: linear-gradient(135deg, rgba(43, 76, 126, 0.9), rgba(43, 76, 126, 0.7)), url('https://www.mnthen.com/images/bg/blog_bg.jpg') center/cover no-repeat;
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.025);
}

.mnt-search-form {
  max-width: 600px;
  margin: 0 auto;
}

.mnt-search-wrapper {
  background: var(--white);
  border-radius: 30px;
  padding: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 43, 73, 0.025);
  display: flex;
  align-items: center;
}

.mnt-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  background: transparent;
}

.mnt-search-input::placeholder {
  color: var(--text-muted);
}

.mnt-clear-button,
.mnt-search-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-muted);
  transition: opacity 0.2s ease; /* Only transition on buttons */
}

.mnt-clear-button:hover,
.mnt-search-button:hover {
  opacity: 0.8; /* Only hover effect on buttons */
}

/* Carousel */
.carousel-container {
  height: 100%; /* Match the height of the Recent Articles container */
  border-radius: 12px;
  overflow: hidden;
}

.carousel-inner {
  height: 100%;
}

.carousel-item {
  position: relative;
  height: 100%;
}

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

/* Black bar overlay */
.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7); /* Black background with some transparency */
  padding: 10px 20px; /* Adjust padding to control height */
  width: 100%; /* Ensure the overlay spans the full width */
  text-align: center; /* Center the title horizontally */
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Article title */
.carousel-title {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0; /* Remove default margin */
}

/* Recent Articles */
.recent-articles-card-body {
  border-radius: 12px; /* Rounded corners */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%; /* Match the height of the carousel */
}

.recent-articles {
  overflow-y: auto;
}

.article-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.article-item:last-child {
  border-bottom: none;
}

.article-image {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 6px;
}

.article-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.article-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Spotlight Section */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* Ensure all items in the same row have the same height */
}

.spotlight-item {
  background: var(--white);
  border-radius: 8px; /* Rounded corners */
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Ensure content stretches to fill the height */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.025); /* Shadow depth no greater than 0.025 */
}

.spotlight-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.spotlight-content {
  padding: 1rem;
  flex: 1; /* Ensure content stretches to fill the height */
  text-align: center; /* Center the title under the image */
}

.spotlight-content h3 {
  margin-top: 0.75rem; /* Slight margin between image and title */
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* History Hub Section */
.history-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* Ensure all items in the same row have the same height */
}

.history-hub-item {
  background: var(--white);
  border-radius: 8px; /* Rounded corners */
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Ensure content stretches to fill the height */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.025); /* Shadow depth no greater than 0.025 */
}

.history-hub-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.history-hub-content {
  padding: 1rem;
  flex: 1; /* Ensure content stretches to fill the height */
}

.history-hub-content h3 {
  margin-top: 1.25rem; /* Increased margin between image and headline */
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Today in History */
.today-in-history {
  background-color: #d3d3d3;
  padding: 60px 0;
  position: relative;
}

.today-in-history::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-color: #0077b6;
}

.today-in-history .container-fluid {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.today-in-history .section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
}

.today-in-history #today-in-history-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.025); /* Shadow depth no greater than 0.025 */
  height: 250px;
}

.today-in-history #today-in-history-content p {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.today-in-history #today-in-history-content p strong {
  font-weight: 700;
  color: #d9534f;
}

/* Date Display */
#today-date {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .mnt-primary-nav {
    padding: 1rem 0;
  }

  .recent-articles-card-body {
    height: auto;
  }

  .spotlight-grid,
  .history-hub-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
