body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg,
      #000000 20%,
      #2f868f 40%,
      #0000ff 70%,
      #800080 60%,
      #807700 20%,
      #22473f 60%
    );

  color: #222;
}

.animated-gradient {
  background: linear-gradient(270deg, black, green, blue, purple, maroon, yellow);
  background-size: 1400% 1200%;
  animation: gradientShift 15s ease infinite;
  color: white;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

h1 {
  text-align: center;
  font-size: 22px;
  margin-top: 55px;
  margin-bottom: 50px;
  background: linear-gradient(to right, #5f2c82, #49a09d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}



/* Beautiful loader wave */
.custom-loader {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.custom-loader div,
.custom-loader::before,
.custom-loader::after {
  content: '';
  padding-bottom: 2px;
  width: 9px;
  height: 9px;
  background: #1e88e5;
  animation: wave 0.6s infinite ease-in-out;
  border-radius: 3px;
}

.custom-loader::after {
  animation-delay: 0.2s;
}

.custom-loader div {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(2); }
}

/* Video wrapper styles */
.myt-embed {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.myt-embed video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
}

/* Meta styling */
.video-meta {
  text-align: center;
  padding: 10px 20px;
}

.video-meta h4 {
  margin: 8px 0 4px;
  font-size: 18px;
}

.video-meta p {
  font-size: 14px;
  color: #555;
}



.grid-row {
  display: grid;
  gap: 30px;
  margin-bottom: 60px;
}

.row-1 {
  grid-template-columns: repeat(2, 1fr);
}

.row-2 {
  grid-template-columns: repeat(3, 1fr);
}

.row-3 {
  grid-template-columns: 2fr 1fr;
}

.row-dynamic {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 40px;
}

.hero-card,
.mid-card,
.strip-card {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 25px rgba(93, 12, 255, 0.1), 0 12px 50px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.hero-card:hover,
.mid-card:hover,
.strip-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-card img,
.mid-card img,
.strip-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 5px solid #92c1db;
}

.hero-content,
.text {
  padding: 7px 14px;
  background: linear-gradient(to top right, rgba(93, 12, 255, 0.9), rgba(0, 255, 255, 0.7));
  color: white;
}

.hero-content h2,
.mid-card h3,
.strip-card h4 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
}

.meta {
  font-size: 14px;
  color: #eee;
  margin-bottom: 10px;
}

.excerpt {
  font-size: 15px;
  color: #fff;
}

.mid-card.large {
  grid-row: span 2;
  height: 100%;
}

.bottom-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.strip-card {
  min-width: 280px;
  scroll-snap-align: start;
}


/* Ensure the parent is flex */
.grid-row.row-3 {
  display: flex;
  gap: 20px; /* spacing between cards, optional */
}

/* Both cards grow to match height */
.grid-row.row-3 .mid-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ensure the image doesn't stretch the height */
.grid-row.row-3 .mid-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Make the text area stretch to fill */
.grid-row.row-3 .mid-card .text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Keep title/meta/excerpt spaced */
}


.grid-row.row-5.five-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 equal cards */
  gap: 20px;
  margin-top: 40px;
}

.grid-row.row-5 .mini-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.3s ease;
}

.grid-row.row-5 .mini-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.grid-row.row-5 .mini-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.grid-row.row-5 .mini-card .text {
  padding: 12px;
}

.grid-row.row-5 .mini-card h4 {
  font-size: 16px;
  margin: 0 0 5px;
  line-height: 1.3;
}

.grid-row.row-5 .mini-card .meta {
  font-size: 12px;
  color: #666;
}


/* Universal card styles */
.grid-row a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f9f9f9; /* subtle fill for empty space */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.grid-row a:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.grid-row a img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Text block: fills remaining height */
.grid-row a .text {
  flex-grow: 1;
  padding: 16px;
  background-color: #fefefe; /* fill area for short content */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-row a h3,
.grid-row a h4 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
  min-height: 48px; /* force title block height */
}

.grid-row a .meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}

.grid-row a .excerpt {
  font-size: 14px;
  color: #fbfbfb;
  line-height: 1.5;
  margin-top: auto;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fefefe;
  border-radius: 10px;
  overflow: hidden;
}

.hero-content {
  padding: 20px;
}

.hero-content h2 {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 10px;
  min-height: 48px;
}

.hero-excerpt {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  max-height: 90px;
  overflow: hidden;
}



/* Mobile Responsive */
@media (max-width: 1024px) {
  .grid-row.row-5.five-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-row.row-5.five-cards {
    grid-template-columns: 1fr;
  }
}



/* Responsive behavior (optional for smaller screens) */
@media (max-width: 768px) {
  .grid-row.row-3 {
    flex-direction: column;
  }
}

@media (max-width: 992px) {
  .row-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .row-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }
  .grid-row {
    grid-template-columns: 1fr;
  }
  .hero-card img,
  .mid-card img,
  .strip-card img {
    height: 160px;
  }
  .hero-content h2,
  .mid-card h3,
  .strip-card h4 {
    font-size: 20px;
  }
  .meta {
    font-size: 16px;
  }
  .excerpt {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 30px 15px;
  }
  h1 {
    font-size: 18px;
  }
  .hero-content h2,
  .mid-card h3,
  .strip-card h4 {
    font-size: 18px;
  }
  .meta {
    font-size: 14px;
  }
  .excerpt {
    font-size: 14px;
  }
  
    .hero-card img,
    .mid-card img,
    .strip-card img {
      
      object-fit: cover;
      border: 1px solid lightgrey;
      border-radius: 4px;
}
  
}


/* ========= Mobile Responsive: Global Settings ========= */
@media (max-width: 768px) {
  .myt-embed {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }
  
  /* Add this to your existing loader CSS */
    .myt-embed {
      position: relative; /* Ensure the parent is the positioning context */
    }
    
    /* Perfect center alignment */
    .custom-loader {
      position: absolute;
      top: 45.7%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      z-index: 10;
      pointer-events: none; /* Don't block clicks on video */
    }
    
      

  .myt-embed video {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: contain; /* ensure no cropping on narrow screens */
  }

  .custom-loader {
    width: 48px;
    gap: 4px;
  }

  .custom-loader div,
  .custom-loader::before,
  .custom-loader::after {
    padding-left: 3px;
    width: 8px;
    height: 16px;
    
  }

  .video-meta {
    padding: 12px 16px;
    text-align: left;
  }

  .video-meta h4 {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  .video-meta p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
  }

  #load-more {
    width: 90%;
    font-size: 15px;
    padding: 10px 0;
  }
}

/* ========= Extra Small Devices (Below 480px) ========= */
@media (max-width: 480px) {
  .video-meta h4 {
    font-size: 15px;
  }

  .video-meta p {
    font-size: 12.5px;
  }

  .custom-loader {
    width: 40px;
  }

  .custom-loader div,
  .custom-loader::before,
  .custom-loader::after {
    width: 6px;
    height: 14px;
  }

  .myt-embed {
    margin: 16px auto;
  }
}




