:root {
  --black: #000000;
  --white: #eeeeee;
  --dark-red: #ec4e3d;
  --rose-red: #8e1616;
  --blue: #0078ab;
  --sky-blue: #68c5db;
  --light-blue: #bfd7fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background-color: var(--black);
  overflow-x: hidden;
  background-image: url("../images/gradient.d0e3876ea212.png");
  background-repeat: repeat;
  background-position: top left;
  background-attachment: scroll;
}

/* ===== shared lines ===== */
.horizontal-line {
  width: 35%;
  height: 6px;
  border: 0;
  margin: 20px auto 0;
  background: var(--blue);
}

.full-line {
  width: 90%;
  height: 2px;
  border: 0;
  margin: 80px auto;
  background: var(--sky-blue);
}

/* =========================
   PAGE SECTIONS
========================= */
.learning-resources,
.workshop-resources {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 16px 40px; /* top padding avoids fixed header overlap */
  text-align: center;
  color: var(--rose-red);
}

.workshop-resources {
  padding-top: 40px;
}

.resources-heading h2 {
  font-weight: 700;
  color: var(--rose-red);
  font-size: 80px;
  margin-bottom: 10px;
  transition: 0.2s ease;
}

.resources-heading h2:hover {
  color: var(--light-blue);
}

.resources-heading p {
  max-width: 650px;
  margin: 40px auto 0;
  font-size: 22px;
  color: var(--light-blue);
  padding: 0 10px;
}

/* =========================
   CARDS GRID
========================= */
.all-resources {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 26px;
}

.card {
  box-shadow:
    inset 5px 5px 5px rgba(0, 0, 0, 0.2),
    inset -5px -5px 15px rgba(255, 255, 255, 0.1),
    5px 5px 15px rgba(0, 0, 0, 0.3),
    -5px -5px 15px rgba(255, 255, 255, 0.1);
}
.card {
  position: relative;
  width: min(320px, 92vw);
  height: 460px; /* fixed height */
  border-radius: 15px;
}

.box {
  position: absolute;
  inset: 20px;
  background: #2a2b2f;
  border: 2px solid #1e1f23;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  overflow: hidden;
}

.box::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.card:hover .box {
  transform: translateY(-18px);
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.55);
}

.content {
  position: relative;
  padding: 22px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* watermark number */
.content .watermark {
  position: absolute;
  top: -12px;
  right: 18px;
  font-size: 6.5em;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
  pointer-events: none;
}

/* title */
.content h3 {
  font-size: 1.7em;
  color: var(--sky-blue);
  margin-top: 26px;
  padding: 0 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* description */
.content p {
  font-size: 16px;
  font-weight: 300;
  color: var(--light-blue);
  line-height: 1.65;
  margin-top: 10px;

  word-break: break-word;
  overflow-wrap: anywhere;

  /* IMPORTANT */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;   /* number of lines */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
.content {
  position: relative;
  padding: 22px;
  text-align: center;

  height: 100%;
  display: flex;
  flex-direction: column;
}
/* button */
.content a {
  margin-top: auto; /* pushes button bottom */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: 0.2s ease;
}

.content a:hover {
  background: var(--rose-red);
}

/* =========================
   LOADER / EMPTY STATE
========================= */
.loader-section {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: changeColor 5s linear infinite;
  padding: 120px 0 80px;
}

@keyframes changeColor {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.loader {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.loader-section h2 {
  color: #00ff0a;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 5px;
  padding: 0 12px;
}

.dot {
  width: 16px;
  height: 16px;
  background: #00ff0a;
  box-shadow:
    0 0 10px #00ff0a,
    0 0 20px #00ff0a,
    0 0 40px #00ff0a;
  margin: 12px 8px;
  transform: scale(0.1);
  border-radius: 50%;
  animation: animateDot 2s linear infinite;
  animation-delay: calc(var(--i) * 0.1s);
}

.loader:last-child .dot {
  animation-delay: calc(var(--i) * -0.1s);
}

@keyframes animateDot {
  0% { transform: scale(0.1); }
  10% { transform: scale(1); }
  50%, 100% { transform: scale(0.1); }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .resources-heading h2 {
    font-size: 7vw;
    padding-top: 10px;
  }

  .resources-heading p {
    font-size: 3.2vw;
    margin-top: 24px;
  }
}

@media (max-width: 568px) {
  .loader-section h2 {
    font-size: 16px;
    letter-spacing: 2px;
  }

  .dot {
    width: 12px;
    height: 12px;
    margin: 10px 6px;
  }
}
