:root {
  --purple: #6A0DAD;
  --blue: #1E90FF;
  --bg: #0f1115;
  --surface: #121421;
  --text: #e8eaf0;
  --muted: #9aa3b2;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

/* Links */
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout container */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Header */
.site-header {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 50;
}
.logo { font-weight: 800; color: #fff; font-size: 1.4rem; letter-spacing: 0.3px; }
.nav a { color: #fff; margin-left: 1rem; font-weight: 600; }
.nav a.active { text-decoration: underline; }

/* Hero section */
.hero {
  background: radial-gradient(1000px 400px at 20% 0%, rgba(106,13,173,0.3), transparent),
              radial-gradient(1000px 400px at 80% 0%, rgba(30,144,255,0.3), transparent);
  padding: 4rem 1.5rem; text-align: center;
}
.hero h1 { font-size: 2.6rem; margin: 0 0 0.5rem; }
.hero p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 680px; }
.btn { display: inline-block; padding: 0.7rem 1.1rem; border-radius: 8px; font-weight: 700; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--purple); color: #fff; margin-left: 0.5rem; }

/* Modal container */
.modal-content {
  max-width: 90%;   /* wider than 900px */
  max-height: 90%;  /* taller */
  margin: 0 auto;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal .close {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;   /* 👈 move it further left */
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
  cursor: pointer;
}

.custom-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.custom-close:hover {
  background: var(--blue);
}

/* Video iframe inside modal */
.modal-content iframe {
  width: 100%;
  height: 70vh;     /* fills 70% of viewport height */
  border: 0;
  border-radius: 10px;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.video-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.video-card img {
  width: 100%;
  display: block;
}
.video-card h3 {
  font-size: 1rem;
  margin: 0.6rem 0 0.3rem;
  color: var(--text);
}
.video-card .video-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.video-card::after {
  content: "Click to watch video";
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Modal */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 100; padding: 2rem;
}
.modal-content {
  max-width: 900px; margin: 0 auto;
  background: var(--surface); border-radius: 12px;
  padding: 1rem; position: relative;
}
.modal .close {
  position: absolute; top: 10px; right: 14px;
  background: transparent; border: 2px solid #fff;
  color: #fff; border-radius: 50%;
  width: 36px; height: 36px; font-size: 1.2rem;
  cursor: pointer;
}

/* Footer */
.site-footer { padding: 1.5rem; text-align: center; color: var(--muted); }
.footer-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
  .nav { display: grid; grid-auto-flow: column; gap: 0.5rem; overflow-x: auto; }
}
.latest-video {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.latest-video h3 {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
  display: none;
  margin-bottom: 0.75rem; /* keeps spacing consistent even when hidden */
}

.latest-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}
/* Featured row layout */
.embed-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: stretch; /* equal height */
}


.embed-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-height: 360px; /* 👈 adjust as needed */
}

.embed-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--text);
}

.embed-card iframe {
  flex-grow: 1;
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 520px; /* 👈 ensures consistent embed height */
}

/* Load More button centered under the grid */
.pagination {
  text-align: center;
  margin: 20px 0;
}

#loadMoreBtn {
  padding: 12px 24px;
  font-size: 1.1rem;
  background-color: #0073e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#loadMoreBtn:hover {
  background-color: #005bb5;
}

/* Scroll to Top button fixed bottom-right */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 20px;
  font-size: 1.2rem;
  background-color: #0073e6;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
  z-index: 1000;
}

.scroll-top:hover {
  background-color: #005bb5;
  transform: scale(1.05);
}