/* ==========================================================================
   SunTeam v2 — SunMag landing. Images keep their natural aspect ratio.
   ========================================================================== */
.mg { overflow-x: clip; }
.mg-hero { position: relative; padding: 18px 0 18px; overflow: hidden; }
.mg-hero .hero-bg { z-index: -1; }
.mg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.mg-head > div:first-child { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.mg-head .lead { margin: 0; }
.mg-kpis { display: flex; gap: 10px; }
.mg-kpis div { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 12px 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.mg-kpis .ic { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: var(--amber-soft); color: var(--accent-ink); }
.mg-kpis b { font-size: var(--fs-xl); font-weight: 900; line-height: 1.2; }
.mg-kpis span { font-size: var(--fs-xs); color: var(--text-3); }

/* natural-ratio media: never cropped, never stretched */
.mg-media { position: relative; display: block; overflow: hidden; background: var(--surface-sunk); }
.mg-media img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease); }

/* popular */
.mg-pop { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mg-top { display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-2); transition: transform .35s var(--ease), box-shadow .35s; }
.mg-top:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px var(--sun-400), 0 30px 60px -36px rgba(17,19,24,.5); }
.mg-top:hover .mg-media img { transform: scale(1.03); }
.mg-rank { position: absolute; top: 14px; inset-inline-start: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--sun-400); color: #111318; font-weight: 900; box-shadow: 0 10px 24px -10px rgba(185,137,0,.8); }
.mg-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.mg-meta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); }
.mg-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); margin-inline: 4px; }
.mg-title { font-size: var(--fs-xl); font-weight: 900; line-height: 1.7; }
.mg-sum { color: var(--text-2); line-height: 2; font-size: var(--fs-sm); }
.mg-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent-ink); font-size: var(--fs-sm); }

.mg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mg-list a { display: grid; grid-template-columns: 34px 132px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.mg-list a:hover { transform: translateX(-4px); box-shadow: inset 0 0 0 1.5px var(--sun-400), var(--sh-1); }
.mg-n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #111318; color: var(--sun-400); font-weight: 900; }
.mg-list li:nth-child(1) .mg-n { background: #D0D5DD; color: #111318; }
.mg-list li:nth-child(2) .mg-n { background: #E3A877; color: #111318; }
.mg-thumb { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-sunk); }
.mg-thumb img { display: block; width: 100%; height: auto; }
.mg-li-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mg-li-body b { font-size: var(--fs-sm); font-weight: 800; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-li-body small { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-3); }

/* latest */
.mg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.mg-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.mg-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px var(--sun-400), var(--sh-2); }
.mg-card:hover .mg-media img { transform: scale(1.03); }
.mg-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.mg-card-body small { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.mg-card-body b { font-weight: 800; line-height: 1.8; }

@media (max-width: 960px) { .mg-pop { grid-template-columns: 1fr; } .mg-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mg-grid { grid-template-columns: 1fr; } .mg-list a { grid-template-columns: 30px 96px minmax(0, 1fr); } }
