/* ===========================
   CSS Reset & Base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===========================
   Design Tokens
   =========================== */
:root {
  /* Primary */
  --color-blue-500: hsl(215, 51%, 70%);
  --color-cyan-400: hsl(178, 100%, 50%);

  /* Neutral */
  --color-blue-950: hsl(217, 54%, 11%);
  --color-blue-900: hsl(216, 50%, 16%);
  --color-blue-800: hsl(215, 32%, 27%);
  --color-white: hsl(0, 0%, 100%);

  /* Typography */
  --font-family: 'Outfit', sans-serif;
  --font-size-body: 18px;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
}

/* ===========================
   Base Styles
   =========================== */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-light);
  background-color: var(--color-blue-950);
  color: var(--color-blue-500);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  line-height: 1.6;
}

/* ===========================
   Card Component
   =========================== */
.card {
  background-color: var(--color-blue-900);
  border-radius: 15px;
  padding: 24px;
  max-width: 350px;
  width: 100%;
}

/* ===========================
   Card Image
   =========================== */
.card__image-wrapper {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.card__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

/* Cyan overlay on hover */
.card__image-overlay {
  position: absolute;
  inset: 0;
  background-color: hsla(178, 100%, 50%, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card__view-icon {
  width: 48px;
  height: 48px;
}

.card__image-wrapper:hover .card__image-overlay {
  opacity: 1;
}

.card__image-wrapper:hover .card__image {
  opacity: 0.4;
}

/* ===========================
   Card Body
   =========================== */
.card__body {
  margin-top: 24px;
}

.card__title {
  font-size: 1.375rem; /* 22px */
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  margin-bottom: 16px;
}

.card__title-link {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card__title-link:hover {
  color: var(--color-cyan-400);
}

.card__description {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-light);
  color: var(--color-blue-500);
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ===========================
   Card Meta (Price & Time)
   =========================== */
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 16px;
}

.card__price {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-cyan-400);
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
}

.card__time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-blue-500);
  font-weight: var(--font-weight-light);
  font-size: 1rem;
}

.card__meta-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===========================
   Card Divider
   =========================== */
.card__divider {
  border: none;
  border-top: 1px solid var(--color-blue-800);
  margin: 0 0 16px 0;
}

/* ===========================
   Card Creator
   =========================== */
.card__creator {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 0;
}

.card__avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 1.5px solid var(--color-white);
  flex-shrink: 0;
  display: block;
}

.card__creator-text {
  font-size: 0.9444rem; /* ~17px */
  font-weight: var(--font-weight-light);
  color: var(--color-blue-500);
  line-height: 1;
}

.card__creator-link {
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--font-weight-light);
  transition: color 0.2s ease;
}

.card__creator-link:hover {
  color: var(--color-cyan-400);
}

/* ===========================
   Attribution Footer
   =========================== */
.attribution {
  font-size: 0.6875rem;
  text-align: center;
  color: var(--color-blue-500);
  margin-top: 1.5rem;
}

.attribution a {
  color: hsl(228, 45%, 44%);
  text-decoration: none;
}

.attribution a:hover {
  text-decoration: underline;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 375px) {
  body {
    padding: 1rem;
    justify-content: flex-start;
    padding-top: 2rem;
  }

  .card {
    padding: 20px;
  }
}
