/* ============================================================
   AFFINZA HOME — home.css
   Magazine-style homepage. Classes match front-page.php exactly.
   ============================================================ */

/* ══ HERO ══════════════════════════════════════════════════════ */
.mag-hero {
  padding: 40px 0 48px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.mag-hero__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Featured card */
.mag-featured-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.mag-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.mag-featured-card__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.mag-featured-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 350ms ease;
}
.mag-featured-card:hover .mag-featured-card__img img {
  transform: scale(1.04);
}
.mag-featured-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
}
.mag-featured-card__body {
  padding: 22px 24px 24px;
}
.mag-featured-card__title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--text-1);
  margin: 8px 0 10px;
}
.mag-featured-card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary cards stack */
.mag-hero__secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mag-sec-card {
  display: flex;
  gap: 12px;
  text-decoration: none;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.mag-sec-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.mag-sec-card__img {
  flex-shrink: 0;
  width: 110px;
  overflow: hidden;
  background: var(--surface-2);
}
.mag-sec-card__img img {
  width: 110px;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.mag-sec-card:hover .mag-sec-card__img img {
  transform: scale(1.06);
}
.mag-sec-card__img-placeholder {
  width: 110px;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
  min-height: 90px;
}
.mag-sec-card__body {
  flex: 1;
  min-width: 0;
  padding: 14px 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mag-sec-card__title {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  color: var(--text-1);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══ CATEGORY LABEL ════════════════════════════════════════════ */
.mag-cat-label {
  display: inline-block;
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pink);
  background: var(--pink-light);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  text-decoration: none;
}
.mag-cat-label--sm {
  font-size: 10px;
  padding: 2px 8px;
}

/* ══ SHARED META ROW ═══════════════════════════════════════════ */
.mag-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.mag-meta time {
  color: var(--text-3);
}

/* ══ MAIN LAYOUT ═══════════════════════════════════════════════ */
.mag-layout {
  padding: 40px 0 0;
}
.mag-layout__inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.mag-layout__main {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ══ CATEGORY SECTION ══════════════════════════════════════════ */
.mag-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.mag-section__title {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: var(--weight-ultra);
  color: var(--text-1);
  margin: 0;
}
.mag-section__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.mag-section__more:hover {
  text-decoration: underline;
}

/* ══ 3-COLUMN CARD GRID ════════════════════════════════════════ */
.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mag-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.mag-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.mag-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.mag-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.mag-card:hover .mag-card__img img {
  transform: scale(1.05);
}
.mag-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
}
.mag-card__body {
  flex: 1;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mag-card__title {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  color: var(--text-1);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══ NEWSLETTER BANNER ═════════════════════════════════════════ */
.mag-newsletter {
  margin-top: 48px;
  background: linear-gradient(135deg, var(--pink) 0%, #c44569 100%);
  padding: 48px 0;
}
.mag-newsletter__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px 48px;
  align-items: center;
}
.mag-newsletter__text {
  grid-column: 1 / -1;
  text-align: center;
}
.mag-newsletter__text h2 {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: var(--weight-ultra);
  color: #fff;
  margin-bottom: 8px;
}
.mag-newsletter__text p {
  font-size: 15px;
  color: rgba(255 255 255 / .85);
  margin: 0;
}
.mag-newsletter__form {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.mag-newsletter__form input[type="email"] {
  flex: 1;
  padding: 13px 20px;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  outline: none;
  font-family: var(--ff-body);
  background: rgba(255 255 255 / .95);
  color: var(--text-1);
}
.mag-newsletter__form .btn-white {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  white-space: nowrap;
  background: #fff;
  color: var(--pink);
  font-family: var(--ff-display);
  font-weight: 700;
  padding: 13px 24px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 150ms ease;
}
.mag-newsletter__form .btn-white:hover {
  background: var(--pink-light);
}
.mag-newsletter__fine-print {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: rgba(255 255 255 / .7);
  margin: 0;
}

/* ══ LATEST POSTS ═══════════════════════════════════════════════ */
.mag-latest {
  padding: 48px 0 56px;
}
.mag-latest__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 0;
}

/* Horizontal card */
.mag-hcard {
  display: flex;
  gap: 14px;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 200ms ease, box-shadow 200ms ease;
  align-items: flex-start;
}
.mag-hcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.mag-hcard__img {
  flex-shrink: 0;
  width: 96px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.mag-hcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.mag-hcard:hover .mag-hcard__img img {
  transform: scale(1.06);
}
.mag-hcard__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
}
.mag-hcard__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mag-hcard__title {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  color: var(--text-1);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══ SIDEBAR WIDGET HELPERS ════════════════════════════════════ */
.widget-post-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.widget-post-row:last-child {
  border-bottom: none;
}
.widget-post-row__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.widget-post-row__thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
}
.widget-post-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.widget-post-row__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget-post-row:hover .widget-post-row__title {
  color: var(--pink);
}
.widget-post-row__date {
  font-size: 11px;
  color: var(--text-3);
}
.widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ══ RESPONSIVE ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .mag-hero__grid {
    grid-template-columns: 1fr 280px;
  }
  .mag-layout__inner {
    grid-template-columns: 1fr 260px;
    gap: 24px;
  }
  .mag-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mag-hero__grid {
    grid-template-columns: 1fr;
  }
  .mag-hero__secondary {
    flex-direction: row;
  }
  .mag-sec-card {
    flex: 1;
    flex-direction: column;
  }
  .mag-sec-card__img,
  .mag-sec-card__img img,
  .mag-sec-card__img-placeholder {
    width: 100%;
    height: 120px;
  }
  .mag-sec-card__body {
    padding: 12px;
  }
  .mag-layout__inner {
    grid-template-columns: 1fr;
  }
  .mag-latest__grid {
    grid-template-columns: 1fr;
  }
  .mag-newsletter__inner {
    gap: 20px;
  }
  .mag-featured-card__title {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .mag-hero__secondary {
    flex-direction: column;
  }
  .mag-sec-card {
    flex-direction: row;
  }
  .mag-sec-card__img,
  .mag-sec-card__img img,
  .mag-sec-card__img-placeholder {
    width: 100px;
    height: auto;
    min-height: 80px;
  }
  .mag-grid {
    grid-template-columns: 1fr;
  }
  .mag-newsletter__form {
    flex-direction: column;
    border-radius: var(--radius-md);
  }
  .mag-newsletter__form input[type="email"] {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .mag-newsletter__form .btn-white {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    width: 100%;
    text-align: center;
  }
}
