/* ============================================================
   Homepage partners strip + latest news
   ------------------------------------------------------------
   Markup: resources/views/frontend/home.blade.php
   ============================================================ */

.hpt, .hnw {
    --hn-navy: #061634;
    --hn-blue: #2563eb;
    --hn-ink: #0f172a;
    --hn-text: #475569;
    --hn-muted: #64748b;
    --hn-line: #e6ebf3;
    --hn-soft: #f5f8fe;
}

/* ── Partners & memberships ───────────────────────────────── */
.hpt { padding: 56px 0; background: #fff; border-top: 1px solid var(--hn-line); border-bottom: 1px solid var(--hn-line); }
.hpt__inner { display: grid; grid-template-columns: 300px 1fr; align-items: center; gap: 40px; }
.hpt__eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hn-blue); }
.hpt__title { margin: 8px 0 6px; font-size: 1.35rem; font-weight: 900; line-height: 1.25; color: var(--hn-ink); }
.hpt__sub { margin: 0; font-size: 14px; line-height: 1.6; color: var(--hn-muted); }

.hpt__logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hpt__logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 104px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--hn-line);
    background: #fff;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.hpt__logo:hover, .hpt__logo:hover { border-color: #c7d7fb; box-shadow: 0 14px 30px rgba(15, 23, 42, .08); transform: translateY(-3px); }
.hpt__logo img {
    max-width: 120px;
    max-height: 46px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .7;
    transition: filter .25s, opacity .25s;
}
.hpt__logo:hover img { filter: none; opacity: 1; }
.hpt__name { font-size: 12px; font-weight: 700; color: var(--hn-muted); text-align: center; line-height: 1.2; }
.hpt__logo-text { font-size: 15px; font-weight: 900; color: var(--hn-text); text-align: center; }
.hpt__ext { position: absolute; top: 10px; right: 10px; font-size: 10px; color: #cbd5e1; opacity: 0; transition: opacity .2s; }
a.hpt__logo:hover .hpt__ext { opacity: 1; color: var(--hn-blue); }

/* ── Latest news ──────────────────────────────────────────── */
.hnw { padding: 84px 0; background: linear-gradient(180deg, #f6f8fc 0%, #eef3fb 100%); }
.hnw__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.hnw__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hn-blue); }
.hnw__title { margin: 10px 0 8px; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; color: var(--hn-ink); }
.hnw__sub { margin: 0; max-width: 560px; font-size: 1.02rem; line-height: 1.7; color: var(--hn-muted); }
.hnw__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1.5px solid #c7d7fb;
    background: #fff;
    color: #1d4ed8 !important;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.hnw__all:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff !important; }
.hnw__all i { font-size: 12px; }

.hnw__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hnw__grid--lead { grid-template-columns: 1.35fr 1fr; }

/* Post card */
.hnw__post {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hn-line);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.hnw__post:hover { transform: translateY(-4px); border-color: #c7d7fb; box-shadow: 0 22px 44px rgba(15, 23, 42, .10); }
.hnw__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0a2a6b 0%, #2563eb 60%, #22d3ee 100%);
}
.hnw__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.hnw__post:hover .hnw__media img { transform: scale(1.05); }
.hnw__media-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, .9);
    text-align: center;
    padding: 20px;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
}
.hnw__media-fallback i { font-size: 36px; }
.hnw__media-fallback span { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.hnw__media-fallback[hidden] { display: none; }
.hnw__cat {
    position: absolute;
    top: 14px; left: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.hnw__feat {
    position: absolute;
    top: 14px; right: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hnw__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.hnw__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--hn-muted); }
.hnw__meta i { color: #94a3b8; margin-right: 4px; }
.hnw__post-title { margin: 10px 0 8px; font-size: 1.12rem; font-weight: 800; line-height: 1.4; color: var(--hn-ink); }
.hnw__post-title a { color: inherit; text-decoration: none; }
.hnw__post-title a:hover { color: var(--hn-blue); }
.hnw__excerpt {
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--hn-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hnw__read { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: #1d4ed8; text-decoration: none; }
.hnw__read i { font-size: 11px; transition: transform .2s; }
.hnw__read:hover i { transform: translateX(3px); }

.hnw__grid--lead .hnw__post:first-child .hnw__post-title { font-size: 1.45rem; }
.hnw__grid--lead .hnw__post:first-child .hnw__media { aspect-ratio: 2 / 1; }

/* Recent work list (shown while posts are few) */
.hnw__side {
    background: #fff;
    border: 1px solid var(--hn-line);
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
}
.hnw__side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hnw__side-title { margin: 0; font-size: 1.05rem; font-weight: 900; color: var(--hn-ink); }
.hnw__side-link { font-size: 13.5px; font-weight: 800; color: #1d4ed8; text-decoration: none; }
.hnw__side-link:hover { text-decoration: underline; }
.hnw__project {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--hn-line);
    text-decoration: none;
}
.hnw__project:first-of-type { border-top: 0; }
.hnw__thumb {
    flex-shrink: 0;
    width: 84px; height: 62px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--hn-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.hnw__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hnw__project:hover .hnw__thumb img { transform: scale(1.06); }
.hnw__project-cat { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hn-blue); }
.hnw__project-title { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--hn-ink); }
.hnw__project:hover .hnw__project-title { color: var(--hn-blue); }

/* Responsive */
@media (max-width: 1199.98px) {
    .hpt__inner { grid-template-columns: 1fr; gap: 22px; text-align: center; }
    .hpt__sub { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 991.98px) {
    .hnw { padding: 64px 0; }
    .hnw__grid, .hnw__grid--lead { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
    .hnw__head { flex-direction: column; align-items: flex-start; }
    .hnw__grid, .hnw__grid--lead { grid-template-columns: 1fr; }
    .hpt__logos { grid-template-columns: repeat(2, 1fr); }
    .hpt__logo { height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
    .hpt *, .hnw * { transition: none !important; }
}
