:root {
  --page-bg: #f2f4f8;
  --card-bg: #ffffff;
  --ink: #1a2433;
  --muted: #647087;
  --accent: #0c5fd9;
  --accent-2: #083c8a;
  --border: #d6deea;
}

.mag-page *,
.mag-page *::before,
.mag-page *::after {
  box-sizing: border-box;
}

.mag-page {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

.mag-page {
  font-family: "Poppins", Arial, sans-serif;
  color: var(--ink);
}

.mag-gallery-wrap {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 36px 24px 56px;
  margin-top: 7%;
  margin-bottom: 5%;
}

.mag-header {
  margin-bottom: 24px;
}

.mag-eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.mag-header h1 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 44px);

  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: #040f4d;
}

.mag-subtitle {
  margin: 0;
  color: var(--muted);
 
  font-size: 16px;
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.mag-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(7, 25, 59, 0.08);
  display: grid;
  grid-template-rows: auto 1fr;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.mag-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(7, 25, 59, 0.14);
}

.mag-thumb-link {
  display: block;
  background: #eef2f9;
}

.mag-thumb {
  width: 100%;
  /*aspect-ratio: 16 / 10;*/
  object-fit: cover;
  display: block;
}

.mag-card-body {
  padding: 14px 14px 16px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
}

.mag-tag {
  margin: 0;
  font-size: 12px;
  color: #8a5a15;
  font-weight: 500;
}

.mag-title {
  margin: 0;
  font-size: 22px;
  color: #fd7d00;
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 600;
}

.mag-link {
  margin-top: 2px;
  display: inline-block;
  width: fit-content;
  color: #273272;
  text-decoration: none;
  font-weight: 600;
}

.mag-link:hover {
  color: var(--accent-2);
  text-decoration: none;
}

@media (max-width: 1100px) {
  .mag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mag-gallery-wrap {
    padding: 24px 14px 40px;
  }

  .mag-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mag-card-body {
    padding: 12px 12px 14px;
  }
}
