/* ====================== Carousel Wrapper ====================== */
.my-carousel-wrapper {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 0; /* removed top/bottom padding to reduce gap with title */
  background: transparent;
}

/* Section title */
.carousel-title {
  margin: 30px 0 20px 30px; /* very small bottom margin */
  font-size: 1.4rem;
  font-weight: 700;
  color: #007ACC;
}

body.dark-mode .carousel-title {
  color: #00e5ff;
}

/* ====================== Carousel container ====================== */
.mc-carousel {
  display: flex;
  gap: 10px;            /* small gap between cards */
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 0 60px 20px; /* removed top padding to stick cards close to title */
}

/* ====================== Link wrapper ====================== */
.mc-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ====================== Cards ====================== */
.mc-card {
  min-width: 270px;
  margin: 0;        /* remove default margin */
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,122,204,0.2);
}

body.dark-mode .mc-card {
  background: #1e1e1e;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.mc-card img {
  width: 100%;
  height: 250px;       /* all images same height */
  object-fit: cover;
  display: block;
}

.mc-card h3 {
  margin: 15px 10px 10px;
  font-weight: normal;
  color: #003d66;
}

body.dark-mode .mc-card h3 {
  color: #ffffff;
}

.mc-card p {
  padding: 0 20px 20px;
  color: #666;
}

body.dark-mode .mc-card p {
  color: #ccc;
}

/* ====================== Carousel Arrows ====================== */
.mc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  background: rgba(0, 122, 204, 0.8);
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5; /* below sticky header */
  border-radius: 50%;
  user-select: none;
  transition: background-color 0.3s ease;
}

.mc-left {
  left: 10px;
}

.mc-right {
  right: 10px;
}

.mc-arrow:hover {
  background: rgba(0, 122, 204, 1);
}

body.dark-mode .mc-arrow {
  background: rgba(0, 229, 255, 0.8);
}

body.dark-mode .mc-arrow:hover {
  background: rgba(0, 229, 255, 1);
}

/* ====================== Responsive adjustments ====================== */
@media (max-width: 900px) {
  .mc-carousel {
    padding: 0 30px 20px; /* keep small gap at top and bottom */
  }
  .mc-card {
    min-width: 220px;
  }
  .mc-arrow {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

/* ====================== Cursor for clickable cards ====================== */
.mc-card-link:hover {
  cursor: pointer;
}

/* ====================== Always show arrows on mobile ====================== */
@media (max-width: 900px) {
  .mc-arrow {
    display: flex;        /* ensure they are visible */
    width: 40px;          /* slightly bigger for touch */
    height: 40px;
    font-size: 20px;
    top: 45%;             /* adjust vertical position */
    z-index: 10;          /* make sure it’s above cards */
    opacity: 0.9;         /* slightly transparent for visibility */
  }

  .mc-left {
    left: 5px;            /* slightly inside the screen */
  }

  .mc-right {
    right: 5px;
  }

  /* optional: make arrows easier to tap on touch devices */
  .mc-arrow:hover {
    transform: scale(1.1);
  }
}
