/* blog-index styles. Extracted from blog/index.blade.php. */

/* =====================================================
   BLOG INDEX — uses same h-* design system
   ===================================================== */

.h-search {
    display: flex; align-items: center;
    gap: 8px;
    max-width: 580px;
    margin: 0 auto;
    padding: 8px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    box-shadow: var(--h-card-shadow);
    transition: all .25s var(--h-ease);
}
.h-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59,130,246,.14); }
.h-search__icon { color: var(--text-light); padding: 0 12px; font-size: 14px; }
.h-search__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font: inherit;
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 4px;
    min-width: 0;
}
.h-search__btn {
    padding: 12px 18px;
    border-radius: 999px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .h-hero { padding: 56px 0; }
    .h-hero__lede { font-size: 16px; }
    .h-search { padding: 6px; }
    .h-search__btn { padding: 10px 14px; }
}

.h-header--left { text-align: left; margin-left: 0; margin-right: auto; max-width: 100%; margin-bottom: 32px; }
[dir="rtl"] .h-header--left { text-align: right; margin-right: 0; margin-left: auto; }

/* =====================================================
   FEATURED — asymmetric hero layout
   ===================================================== */
.h-feat {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}
@media (max-width: 900px) { .h-feat { grid-template-columns: 1fr; } }

.h-feat__hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--h-card-shadow);
    transition: all .35s var(--h-ease);
    min-height: 480px;
    display: flex;
}
.h-feat__hero:hover { transform: translateY(-3px); box-shadow: var(--h-card-shadow-hover); }
.h-feat__hero-media {
    display: block;
    position: relative;
    width: 100%; height: 100%;
    flex: 1;
    overflow: hidden;
    text-decoration: none;
}
.h-feat__hero-media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s var(--h-ease);
}
.h-feat__hero:hover .h-feat__hero-media img { transform: scale(1.05); }
.h-feat__hero-media .h-post__media-fallback {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 80px;
}
.h-feat__hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.25) 45%, rgba(15,23,42,0.92) 100%);
}
.h-feat__hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 36px 36px 32px;
    color: #fff;
    z-index: 1;
}
.h-feat__badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: var(--bg-white);
    color: var(--primary);
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.h-feat__badge i { font-size: 10px; }
.h-feat__hero-meta {
    display: flex; flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
}
.h-feat__cat {
    padding: 5px 12px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.h-feat__cat--small { background: rgba(59,130,246,.08); color: var(--primary); border: none; padding: 4px 10px; }
.h-feat__meta-item {
    display: inline-flex; align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255,255,255,.85);
}
.h-feat__meta-item i { font-size: 11px; }
.h-feat__hero-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #fff;
}
.h-feat__hero-excerpt {
    font-size: 15.5px;
    line-height: 1.65;
    color: rgba(255,255,255,.88);
    margin: 0 0 22px;
    max-width: 580px;
}
.h-feat__hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    background: var(--bg-white);
    color: var(--primary);
    border-radius: 12px;
    font-size: 14.5px; font-weight: 700;
    transition: all .25s var(--h-ease);
}
.h-feat__hero:hover .h-feat__hero-cta { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); color: var(--primary-dark); }
.h-feat__hero-cta i { font-size: 12px; transition: transform .25s var(--h-ease); }
.h-feat__hero:hover .h-feat__hero-cta i { transform: translateX(3px); }
[dir="rtl"] .h-feat__hero:hover .h-feat__hero-cta i { transform: translateX(-3px); }
[dir="rtl"] .h-feat__hero-cta i { transform: none; }

/* Side stack */
.h-feat__side { display: flex; flex-direction: column; gap: 24px; }
.h-feat__side-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all .3s var(--h-ease);
    box-shadow: var(--h-card-shadow);
    flex: 1;
    display: flex;
}
.h-feat__side-card:hover { transform: translateY(-3px); box-shadow: var(--h-card-shadow-hover); border-color: rgba(59,130,246,.35); }
.h-feat__side-link { display: flex; width: 100%; text-decoration: none; }
.h-feat__side-media {
    width: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-light);
}
.h-feat__side-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--h-ease);
}
.h-feat__side-card:hover .h-feat__side-media img { transform: scale(1.06); }
.h-feat__side-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--bg-lighter), var(--bg-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: var(--border-medium);
}
.h-feat__side-body {
    padding: 18px 20px;
    flex-grow: 1;
    display: flex; flex-direction: column;
    min-width: 0;
}
.h-feat__side-meta {
    display: flex; flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.h-feat__side-title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.h-feat__side-date {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--text-light);
    margin-top: auto;
}
.h-feat__side-date i { font-size: 11px; }

@media (max-width: 900px) {
    .h-feat__hero { min-height: 360px; }
}
@media (max-width: 640px) {
    .h-feat__hero { min-height: 340px; }
    .h-feat__hero-content { padding: 24px 22px 22px; }
    .h-feat__hero-title { font-size: 22px; }
    .h-feat__hero-excerpt { font-size: 14.5px; margin-bottom: 16px; }
    .h-feat__side-card { flex-direction: row; }
    .h-feat__side-media { width: 110px; }
    .h-feat__side-body { padding: 14px 16px; }
}
@media (max-width: 440px) {
    .h-feat__side-card { flex-direction: column; }
    .h-feat__side-media { width: 100%; height: 160px; }
}

/* =====================================================
   ROW LIST (horizontal editorial cards)
   ===================================================== */
.h-list { display: flex; flex-direction: column; gap: 24px; }
.h-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--h-card-shadow);
    transition: all .35s var(--h-ease);
}
.h-row:hover { transform: translateY(-3px); box-shadow: var(--h-card-shadow-hover); border-color: rgba(59,130,246,.35); }

.h-row__media {
    display: block;
    position: relative;
    width: 100%; height: 100%;
    min-height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}
.h-row__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--h-ease);
}
.h-row:hover .h-row__media img { transform: scale(1.06); }
.h-row__media-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--bg-lighter), var(--bg-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    color: var(--border-medium);
}

.h-row__body {
    padding: 28px 32px;
    display: flex; flex-direction: column;
    min-width: 0;
}
.h-row__meta {
    display: flex; flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 12px;
}
.h-row__date,
.h-row__meta-item {
    display: inline-flex; align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-light);
    font-weight: 500;
}
.h-row__date i,
.h-row__meta-item i { font-size: 11px; }

.h-row__title {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    letter-spacing: -0.015em;
}
.h-row__title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color .2s ease;
}
.h-row__title a:hover { color: var(--primary); }

.h-row__excerpt {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-light);
    margin: 0 0 18px;
    flex-grow: 1;
}

.h-row__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.h-row__cta {
    display: inline-flex; align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59,130,246,.08);
    color: var(--primary);
    border-radius: 999px;
    font-size: 13px; font-weight: 700;
    text-decoration: none;
    transition: all .25s var(--h-ease);
}
.h-row__cta i { font-size: 11px; transition: transform .25s var(--h-ease); }
.h-row__cta:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}
.h-row__cta:hover i { transform: translateX(3px); }
[dir="rtl"] .h-row__cta:hover i { transform: translateX(-3px); }
[dir="rtl"] .h-row__cta i { transform: none; }

.h-row__share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.h-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-medium);
    cursor: pointer;
    font-size: 13px;
    position: relative;
    transition: all 0.25s var(--h-ease);
    padding: 0;
    outline: none;
}
.h-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.h-share-btn--linkedin:hover {
    color: #fff;
    background: #0077b5;
    border-color: #0077b5;
}
.h-share-btn--x:hover {
    color: #fff;
    background: #000000;
    border-color: #000000;
}
.h-share-btn--facebook:hover {
    color: #fff;
    background: #1877f2;
    border-color: #1877f2;
}
.h-share-btn--copy {
    position: relative;
}
.h-share-btn--copy:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.h-share-btn--copied {
    color: #fff !important;
    background: #10b981 !important;
    border-color: #10b981 !important;
}

/* Tooltip */
.h-share-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--text-dark);
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s var(--h-ease);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 10;
}
.h-share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-dark);
}
.h-share-btn--copy:hover .h-share-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

@media (max-width: 760px) {
    .h-row { grid-template-columns: 1fr; }
    .h-row__media { min-height: 200px; }
    .h-row__body { padding: 22px 22px 24px; }
}

/* =====================================================
   FILTER CHIPS
   ===================================================== */
.h-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}
.h-filter-chip {
    display: inline-flex; align-items: center;
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-medium);
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all .25s var(--h-ease);
}
.h-filter-chip:hover { border-color: var(--primary-light); color: var(--primary); transform: translateY(-1px); }
.h-filter-chip.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(30,64,175,.22);
}

/* =====================================================
   POST CARD
   ===================================================== */
.h-post { padding: 0; }
.h-post__media {
    position: relative;
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}
.h-post__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s var(--h-ease);
}
.h-post:hover .h-post__media img { transform: scale(1.05); }
.h-post__media-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 48px;
}
.h-post__media-fallback--soft {
    background: linear-gradient(135deg, var(--bg-lighter), var(--bg-light));
    color: var(--border-medium);
}
.h-post__featured-badge {
    position: absolute;
    top: 14px; left: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px;
    background: rgba(255,255,255,.95);
    color: var(--primary);
    border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
[dir="rtl"] .h-post__featured-badge { left: auto; right: 14px; }
.h-post__featured-badge i { font-size: 9px; }

.h-post__body { padding: 22px; flex-grow: 1; display: flex; flex-direction: column; }
.h-post__meta {
    display: flex; flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 12px;
}
.h-post__cat {
    padding: 4px 10px;
    background: rgba(59,130,246,.08);
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.h-post__meta-item {
    display: inline-flex; align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
}
.h-post__meta-item i { font-size: 11px; }
.h-post__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.h-post__title a { color: var(--text-dark); text-decoration: none; transition: color .2s ease; }
.h-post__title a:hover { color: var(--primary); }
.h-post__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-light);
    margin: 0 0 16px;
    flex-grow: 1;
}
.h-post__footer {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}
.h-post__date {
    font-size: 12.5px;
    color: var(--text-light);
    display: inline-flex; align-items: center; gap: 5px;
}
.h-post__date i { font-size: 11px; }

/* =====================================================
   PAGINATION
   ===================================================== */
.h-pagination { margin-top: 48px; display: flex; justify-content: center; }
.h-pagination nav { display: flex; flex-wrap: wrap; gap: 6px; }
.h-pagination a, .h-pagination span {
    display: inline-flex; align-items: center;
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-medium);
    border-radius: 10px;
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    transition: all .2s var(--h-ease);
    min-height: 38px;
}
.h-pagination a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.h-pagination .active, .h-pagination [aria-current="page"] {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.h-pagination .disabled, .h-pagination [aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.h-empty {
    text-align: center;
    padding: 72px 24px;
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 2px dashed var(--border-light);
    border-radius: 20px;
}
.h-empty__icon {
    width: 76px; height: 76px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
}
.h-empty h3 { font-size: 22px; font-weight: 700; color: var(--text-dark); margin: 0 0 10px; }
.h-empty p { font-size: 15px; color: var(--text-light); line-height: 1.6; margin: 0; }
