/* Special Sections (Quote of the Day, Picture of the Day, Trends) */

.day-heading {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
  text-align: center;
}
time.date {
  display: block;
  font-size: 0.8rem;
  color: #555;
  text-align: center;
}

/* Quote of the Day wrapper */
.quote_of_day {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto;
  padding: 20px;
  background-color: var(--secondary-color);
  background-image: linear-gradient(to right, var(--secondary-color), #00d451);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
  isolation: isolate;
}

/* Title */
.quote_of_day .qod-title {
  font-family: "Luxurious Script", cursive;
  font-size: 3rem;
  margin: 10px 0 20px;
  color: #f9f9f9;
  text-align: center;
}

.quote_of_day p {
  font-size: 2rem;
  text-align: center;
  margin: 0 10px 20px;
}

/* --- Carousel shell --- */
.quotes-carousel {
  width: 100%;
  max-width: 700px;
  position: relative;
  overflow: hidden;
}

/* --- Horizontal track --- */
.quotes-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  padding: 0 8px 0px;
  margin: 0 -8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: transparent;
  scrollbar-width: none; /* Firefox */
}
.quotes-track::-webkit-scrollbar { display: none; }

/* Each slide */
.quote_card {
  scroll-snap-align: center;
  margin: 0 8px;
  margin-bottom: 20px;
  background: #ffffffd9;
  backdrop-filter: blur(4px);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* Elevate on desktop pointers only */
@media (hover: hover) and (pointer: fine) {
  .quote_card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
  }
}

.quote_card blockquote {
  margin: 0 0 10px;
  font-family: 'Roboto', sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
  color: #222;
}

.quote_card .author {
  margin: 0;
  font-size: 1.1rem;
  color: #2c7a36;
  font-weight: 600;
  letter-spacing: 0.06rem;
}

/* Arrows above everything */
.q-nav {
  position: absolute;
  top: calc(50% + env(safe-area-inset-top, 0));
  transform: translateY(-50%);
  height: 40px;
  width: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  z-index: 2001; /* over any header */
  -webkit-tap-highlight-color: transparent;
}
.q-nav:focus { outline: none; }
.q-nav:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }

.q-prev { left: 20px; }
.q-next { right: 20px; }

/* Section wrapper */
.pod {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 36px auto 24px;
  padding: 0 12px;
}

/* Title block */
.pod-title {
  text-align: left;
  margin-bottom: 12px;
}

.pod-kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: #0f5132;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Gradient headline */
.pod-heading {
  margin: 8px 0 0 0;
  font-weight: 400;
  line-height: 1.2;
  font-size: clamp(1.25rem, 1.1vw + 1rem, 1.75rem);
  background: linear-gradient(90deg, #0ee9a7, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Keep your existing layout, just refine spacing */
.picture_of_day {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 16px auto 32px;
}

/* Make the image look crisp and “card-like” */
.story_img {
  width: 100%;
  max-width: 980px;
  height: 500px; /* explicit height; avoids cumulative shift */
  object-fit: cover;
  border-radius: var(--border-radius, 16px);
  box-shadow: var(--box-shadow, 0 10px 24px rgba(0,0,0,.12));
  border: 1px solid rgba(0,0,0,.06);
}

/* Trends and Box Styles */
.trends {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
}

.trends .box {
  flex: 1 1 calc(50% - 20px);
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.trends .trends_title {
  margin-bottom: 10px;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: var(--secondary-color);
  background-image: linear-gradient(to right, var(--secondary-color), #00d451);
  font-size: 0.6rem;
  color: white;
}
.trends .box h6 {
  margin-top: 0;
  font-weight: 400;
  line-height: 1.2;
  font-size: clamp(1.25rem, 1.1vw + 1rem, 1.75rem);
  background: linear-gradient(90deg, #0ee9a7, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.trends .box img {
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.trends .box p {
  margin-top: 10px;
  color: #555;
  text-align: left;
}

.trends .box:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* --- NEWS SECTION SWIPABLE ON ALL SCREENS --- */

.news-grid-snippet {
  display: flex !important;
  overflow-x: auto;
  gap: 16px;
  padding: 10px 15px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.news-article-snippet {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: 320px;
  scroll-snap-align: start;
  scroll-margin-inline: 15px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  animation-fill-mode: forwards;
}

.news-article-snippet:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* Hide scrollbars */
.news-grid-snippet::-webkit-scrollbar { display: none; }
.news-grid-snippet { scrollbar-width: none; }

.news-image-snippet {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.news-article-snippet h4 {
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.news-article-snippet h4 a {
  text-decoration: none;
  color: #222;
  transition: color 0.2s ease;
}

.news-article-snippet h4 a:hover {
  color: var(--primary-color, #007bff);
}

.news-meta-snippet {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 12px;
}

.news-description-snippet {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
  line-height: 1.6;
}

/* General utility styles and section titles */
.news-section {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: #0f5132;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

.news-section::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color, #6c757d);
  border-radius: 2px;
}

.text-center {
  text-align: center;
  margin-bottom: 40px;
}

.btn-primary {
  background-color: var(--primary-color, #007bff);
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--dark-primary-color, #004d13);
  transform: translateY(-2px);
}

.alert {
  margin: 20px auto;
  max-width: 800px;
  padding: 15px;
  border-radius: 5px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  text-align: center;
}

/* === Young Achievers Styles === */
.young-achievers-section {
  padding: 2rem 1rem;
  text-align: center;
  overflow: hidden;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
  background-color: rgb(244, 252, 236);
  background-image: linear-gradient(to bottom, rgba(246, 252, 247, 0.5), rgba(238, 252, 238, 0.5));
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transform: translate3d(0,0,0);
  transition: transform 0.3s ease;
  will-change: transform;
  justify-content: center;
  flex-wrap: wrap; /* allow wrapping */
}

.carousel-slide-pair {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  flex: 0 0 auto;
}

.achiever-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 200px;
  max-width: calc(20% - 2rem);
  box-sizing: border-box;
}

.achiever-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  -webkit-user-drag: none;
  user-select: none;
}

.achiever-name {
  margin-top: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}

.achievers-link { margin-top: 1rem; }

.see-all-link {
  font-size: 0.95rem;
  color: var(--primary-color);
  text-decoration: none;
}
.see-all-link:hover { text-decoration: underline; }
