/* Homepage: latest blog posts (sections/blogShowcase.blade.php). Text >= 13px. */
.hw-section { position: relative; padding: 90px 0; background: linear-gradient(180deg, #fff, #f6f8ff); color: #10155c; direction: rtl; text-align: right; overflow: hidden; }
.hw-section *, .hw-section *::before, .hw-section *::after { box-sizing: border-box; }
.hw-section:not(.is-live) *, .hw-section:not(.is-live) *::before, .hw-section:not(.is-live) *::after { animation-play-state: paused !important; }
.hw-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hw-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; margin-bottom: 14px; border-radius: 30px; background: #fff4d6; color: #a37800; font-size: 13px; font-weight: 600; }
.hw-section h2 { margin: 0; color: #10155c; font-size: clamp(26px, 2.5vw, 38px); font-weight: 800; line-height: 1.6; letter-spacing: -.5px; }
.hw-section h2 span { display: block; color: #6f7693; font-size: clamp(16px, 1.3vw, 19px); font-weight: 600; letter-spacing: 0; }
.hw-all { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 18px; border-radius: 30px; border: 1px solid #f1dc9c; color: #8a6700; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .2s; }
.hw-all:hover { background: #fff7dc; color: #10155c; text-decoration: none; }

/* Topic strip */
.hw-topics { position: relative; margin: 0 0 28px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hw-topics-track { display: flex; width: max-content; animation: hw-marquee 38s linear infinite; }
.hw-topics:hover .hw-topics-track, .hw-topics:focus-within .hw-topics-track { animation-play-state: paused; }
.hw-topics ul { display: flex; gap: 10px; margin: 0; padding: 4px 0 4px 10px; list-style: none; }
.hw-topics li { margin: 0; }
.hw-topics a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-radius: 30px; background: #fff; border: 1px solid #e6e9f5; color: #4b5476; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: border-color .2s, color .2s; }
.hw-topics a:hover { border-color: #7057e8; color: #10155c; text-decoration: none; }
.hw-topics a span { min-width: 24px; padding: 0 7px; border-radius: 20px; background: #f1eeff; color: #5a43d6; font-size: 13px; text-align: center; }
@keyframes hw-marquee { to { transform: translateX(50%); } }

/* Cards */
.hw-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); gap: 16px; }
.hw-card { display: flex; min-width: 0; border-radius: 22px; background: #fff; border: 1px solid #eceff8; box-shadow: 0 22px 44px -34px #5b6fb099; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.hw-card:hover { transform: translateY(-4px); border-color: #ddd6fb; box-shadow: 0 26px 50px -28px #5b6fb0aa; }
.hw-card--lead { grid-row: 1 / 4; flex-direction: column; }
.hw-card--mini { align-items: stretch; }
.hw-media { position: relative; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, #f1eeff, #eaf6ff); }
.hw-card--lead .hw-media { aspect-ratio: 2.2 / 1; margin: 12px 12px 0; border-radius: 16px; }
.hw-card--mini .hw-media { width: 38%; margin: 10px; border-radius: 14px; }
.hw-media img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .5s; }
.hw-card:hover .hw-media img { transform: scale(1.04); }
.hw-ph { color: #b6abee; font-size: 34px; }
.hw-new { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 30px; background: #10155c; color: #fff; font-size: 13px; font-weight: 700; }
.hw-new i { width: 7px; height: 7px; border-radius: 50%; background: #42d3a1; animation: hw-ping 1.8s infinite; }
@keyframes hw-ping { 50% { opacity: .3; } }
.hw-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 18px 20px 16px; }
.hw-card--mini .hw-body { padding: 14px 16px 12px 6px; }
.hw-cat { margin-bottom: 8px; padding: 3px 12px; border-radius: 30px; background: #e3f8ef; color: #12806a; font-size: 13px; font-weight: 700; text-decoration: none; }
.hw-cat:hover { background: #cdf2e2; color: #0b6655; text-decoration: none; }
.hw-section .hw-body h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hw-section .hw-card--lead h3 { font-size: clamp(19px, 1.6vw, 23px); }
.hw-body h3 a { color: #10155c; text-decoration: none; }
.hw-body h3 a:hover { color: #7057e8; }
.hw-body p { margin: 0 0 12px; color: #6f7693; font-size: 14px; line-height: 2; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hw-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; color: #858aa6; font-size: 13px; }
.hw-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hw-meta i { color: #a39ad6; }
.hw-section a:focus-visible { outline: 3px solid #8b78ee; outline-offset: 3px; border-radius: 10px; }

@media (max-width: 991px) {
    .hw-section { padding: 64px 0; }
    .hw-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
    .hw-card--lead { grid-row: auto; }
}
@media (max-width: 575px) {
    .hw-section { padding: 48px 0; }
    .hw-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hw-section h2 { font-size: 25px; }
    .hw-card--mini .hw-media { width: 34%; margin: 8px; border-radius: 12px; }
    .hw-card--mini .hw-body { padding: 10px 8px 10px 4px; }
    .hw-section .hw-card--mini h3 { font-size: 14px; }
    .hw-card--mini .hw-cat { display: none; }
    .hw-card--mini .hw-meta span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hw-section *, .hw-section *::before, .hw-section *::after { animation: none !important; transition: none !important; }
    .hw-topics { -webkit-mask-image: none; mask-image: none; }
    .hw-topics-track { width: auto; }
    .hw-topics-track > ul[aria-hidden] { display: none; }
    .hw-topics ul { flex-wrap: wrap; }
}
