/**
 * Hi Trat Frontend Styles (Post Grid & Alpine Components)
 */

/* ==========================================================================
   Base & Utility
   ========================================================================== */
[x-cloak] {
    display: none !important;
}

.hi-post-grid-wrapper {
    max-width: 1200px;
    /*margin: 20px auto;
    padding: 0 16px;*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.hi-post-grid-wrapper *,
.hi-post-grid-wrapper *::before,
.hi-post-grid-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
.hi-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}

.hi-grid-kicker {
    display: inline-block;
    color: #0284c7;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.hi-grid-title {
    margin: 0 0 8px 0;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.hi-grid-subtitle {
    margin: 0;
    font-size: 15px;
    color: #64748b;
    max-width: 600px;
    line-height: 1.6;
}

.hi-grid-layout-controls {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.hi-control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hi-control-btn:hover {
    color: #0f172a;
}

.hi-control-btn.is-active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Toolbar: Filters & Search
   ========================================================================== */
.hi-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hi-category-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.hi-category-filters::-webkit-scrollbar {
    display: none;
}

.hi-filter-pill {
    padding: 7px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.hi-filter-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.hi-filter-pill.is-active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.hi-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hi-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.hi-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.hi-search-input {
    padding: 8px 32px 8px 36px;
    font-size: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    color: #0f172a;
    width: 200px;
    transition: all 0.2s ease;
    outline: none;
}

.hi-search-input:focus {
    width: 240px;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.hi-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.hi-search-clear:hover {
    color: #0f172a;
}

.hi-sort-select {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    outline: none;
    cursor: pointer;
}

.hi-sort-select:focus {
    border-color: #0284c7;
}

/* Results summary */
.hi-results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 20px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    font-size: 13px;
    color: #0369a1;
}

.hi-reset-filter-btn {
    background: none;
    border: none;
    color: #0284c7;
    font-weight: 700;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* ==========================================================================
   Post Cards Container (Configurable Grid Columns)
   ========================================================================== */
.hi-posts-container.is-grid-layout {
    display: grid;
    grid-template-columns: repeat(var(--hi-grid-cols, 3), minmax(0, 1fr));
    gap: 28px;
}

/* Explicit fallback column classes */
.hi-posts-container.hi-cols-1 { grid-template-columns: 1fr; }
.hi-posts-container.hi-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hi-posts-container.hi-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hi-posts-container.hi-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hi-posts-container.hi-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hi-posts-container.hi-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1024px) {
    .hi-posts-container.is-grid-layout,
    .hi-posts-container.hi-cols-3,
    .hi-posts-container.hi-cols-4,
    .hi-posts-container.hi-cols-5,
    .hi-posts-container.hi-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .hi-posts-container.is-grid-layout,
    .hi-posts-container.hi-cols-1,
    .hi-posts-container.hi-cols-2,
    .hi-posts-container.hi-cols-3,
    .hi-posts-container.hi-cols-4,
    .hi-posts-container.hi-cols-5,
    .hi-posts-container.hi-cols-6 {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

.hi-posts-container.is-list-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Editorial presentation selected with style="2". */
.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-card {
    position: relative;
    min-height: 420px;
    border: 0;
    border-radius: 18px;
    background: #0f172a;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-media-container {
    position: absolute;
    inset: 0;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap {
    height: 100%;
    aspect-ratio: auto;
    border-radius: inherit;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 25%, rgba(15, 23, 42, 0.92) 100%);
    content: "";
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-date-badge {
    top: 14px;
    right: 14px;
    bottom: auto;
    left: auto;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-quickview-btn {
    top: 68px;
    right: 14px;
    bottom: auto;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-body {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 26px 22px 20px;
    color: #ffffff;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-meta,
.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-excerpt {
    color: rgba(255, 255, 255, 0.82);
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-title a,
.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-title a:hover,
.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-read-more,
.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-read-more:hover {
    color: #ffffff;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-post-footer {
    border-color: rgba(255, 255, 255, 0.24);
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-share-btn {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-share-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

/* Horizontal split-card presentation selected with style="3". */
.hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-card {
    flex-direction: row;
    min-height: 290px;
}

.hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-media-container {
    width: 42%;
    flex-shrink: 0;
}

.hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap {
    height: 100%;
    min-height: 290px;
    aspect-ratio: auto;
    border-radius: 16px 0 0 16px;
}

.hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-body {
    justify-content: center;
    padding: 22px 18px;
}

.hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-date-badge {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
}

@media (max-width: 640px) {
    .hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-card {
        flex-direction: column;
    }

    .hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-media-container {
        width: 100%;
    }

    .hi-grid-style-3 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap {
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-radius: 16px 16px 0 0;
    }
}

/* Magazine presentation selected with style="4". */
.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-card {
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    background: #f8fafc;
}

.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}

.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-date-badge {
    right: 14px;
    bottom: 14px;
    left: auto;
}

.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-body {
    border-top: 3px solid #0284c7;
    padding: 20px 20px 18px;
}

.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-title {
    font-size: 20px;
}

.hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-footer {
    border-top-style: dashed;
}

/* Inset image presentation selected with style="5". */
.hi-grid-style-5 .hi-posts-container.is-grid-layout .hi-post-card {
    padding: 10px;
    border: 1px solid #e8edf4;
    border-radius: 24px;
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hi-grid-style-5 .hi-posts-container.is-grid-layout .hi-post-thumb-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 17px;
}

.hi-grid-style-5 .hi-posts-container.is-grid-layout .hi-post-date-badge {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
}

.hi-grid-style-5 .hi-posts-container.is-grid-layout .hi-post-body {
    padding: 18px 10px 8px;
}

.hi-grid-style-5 .hi-posts-container.is-grid-layout .hi-post-footer {
    border-top: 0;
    padding-top: 4px;
}

/* Card Styling */
.hi-post-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
}

.hi-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

/* List Layout Card Adaptations */
.is-list-layout .hi-post-card {
    flex-direction: row;
    align-items: stretch;
}

.is-list-layout .hi-post-media-container {
    width: 300px;
    flex-shrink: 0;
    position: relative;
}

.is-list-layout .hi-post-thumb-wrap {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 200px;
    border-radius: 16px 0 0 16px;
}

.is-list-layout .hi-post-date-badge {
    bottom: 12px;
    left: 12px;
}

.is-list-layout .hi-post-body {
    padding: 22px 24px;
}

/* Media Container */
.hi-post-media-container {
    position: relative;
}

/* Thumb Wrap */
.hi-post-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.hi-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.hi-post-card:hover .hi-post-thumb {
    transform: scale(1.06);
}

/* Category Badge (Prominent Pill on Top-Left) */
.hi-post-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #0284c7;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
    z-index: 2;
}

/* Date Badge (Red block overlapping bottom-left of thumbnail) */
.hi-post-date-badge {
    position: absolute;
    bottom: -15px;
    left: 18px;
    background: #e11d48; /* Vibrant red */
    color: #ffffff;
    border-radius: 6px;
    padding: 5px 12px 6px;
    min-width: 48px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hi-date-day {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.hi-date-month {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
    text-transform: capitalize;
    color: #ffffff;
    opacity: 0.95;
}

.hi-quickview-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 2;
}

.hi-post-card:hover .hi-quickview-btn {
    opacity: 1;
    transform: translateY(0);
}

.hi-quickview-btn:hover {
    background: #0284c7;
    color: #ffffff;
}

/* Card Body */
.hi-post-body {
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hi-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.hi-meta-dot {
    color: #cbd5e1;
}

.hi-post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hi-post-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hi-post-title a:hover {
    color: #0284c7;
}

.hi-post-excerpt {
    margin: 0 0 18px 0;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.hi-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.hi-post-footer.hi-read-more-align-left,
.hi-post-footer.hi-read-more-align-center,
.hi-post-footer.hi-read-more-align-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.hi-post-footer.hi-post-footer-no-share {
    grid-template-columns: minmax(0, 1fr);
}

.hi-post-footer.hi-read-more-align-left .hi-read-more {
    justify-self: start;
}

.hi-post-footer.hi-read-more-align-center .hi-read-more {
    justify-self: center;
    justify-content: center;
    text-align: center;
}

.hi-post-footer.hi-read-more-align-right .hi-read-more {
    justify-self: end;
}

.hi-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.hi-read-more-width-50 {
    width: 50%;
}

.hi-read-more-width-75 {
    width: 75%;
}

.hi-read-more-width-100 {
    width: 100%;
}

.hi-read-more:hover {
    gap: 10px;
    color: #0369a1;
}

.hi-read-more-style-1 {
    padding: 0;
}

.hi-read-more-style-2 {
    gap: 8px;
    padding: 9px 14px;
    border-radius: 8px;
    background: #0284c7;
    color: #ffffff;
}

.hi-read-more-style-2:hover {
    background: #0369a1;
    color: #ffffff;
}

.hi-read-more-style-3 {
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid currentColor;
    border-radius: 9999px;
}

.hi-read-more-style-4 {
    gap: 8px;
    padding-bottom: 3px;
    border-bottom: 2px solid currentColor;
}

.hi-read-more-style-5 {
    gap: 9px;
    padding: 9px 15px;
    border-radius: 4px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

.hi-read-more-style-5:hover {
    background: #1e293b;
    color: #ffffff;
}

.hi-share-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hi-share-btn:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}

/* ==========================================================================
   Pagination & Empty State
   ========================================================================== */
.hi-pagination-bar {
    text-align: center;
    margin-top: 36px;
}

.hi-page-count {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.hi-page-count span {
    font-weight: 700;
    color: #0f172a;
}

.hi-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #0f172a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.hi-load-more-btn:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}

.hi-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    margin: 20px 0;
}

.hi-empty-icon {
    color: #94a3b8;
    margin-bottom: 12px;
}

.hi-empty-state h4 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #0f172a;
}

.hi-empty-state p {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 14px;
}

.hi-empty-reset-btn {
    padding: 8px 18px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
}

/* ==========================================================================
   Quick View Modal
   ========================================================================== */
.hi-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.hi-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hi-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.15s ease;
}

.hi-modal-close:hover {
    background: #0f172a;
    color: #ffffff;
}

.hi-modal-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.hi-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hi-modal-details {
    padding: 28px;
}

.hi-modal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.hi-modal-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
}

.hi-modal-date {
    font-size: 13px;
    color: #64748b;
}

.hi-modal-title {
    margin: 0 0 14px 0;
    font-size: 24px;
    color: #0f172a;
    line-height: 1.35;
    font-weight: 800;
}

.hi-modal-excerpt {
    font-size: 15px;
    color: #334155;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.hi-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0284c7;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hi-btn-primary:hover {
    background: #0369a1;
    color: #ffffff;
}

/* Modal Transition */
.hi-modal-fade-enter {
    transition: opacity 0.2s ease-out;
}
.hi-modal-fade-start {
    opacity: 0;
}
.hi-modal-fade-end {
    opacity: 1;
}
.hi-modal-scale-enter {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hi-modal-scale-start {
    opacity: 0;
    transform: scale(0.95);
}
.hi-modal-scale-end {
    opacity: 1;
    transform: scale(1);
}

/* Toast */
.hi-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 9999px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999999;
}

/* Color themes for the complete post grid. */
.hi-post-grid-wrapper.hi-grid-theme-1 {
    --hi-grid-accent: #0284c7;
    --hi-grid-accent-dark: #0369a1;
    --hi-grid-accent-light: #f0f9ff;
    --hi-grid-accent-border: #bae6fd;
    --hi-grid-accent-shadow: rgba(2, 132, 199, 0.3);
    --hi-grid-secondary: #e11d48;
    --hi-grid-secondary-dark: #be123c;
    --hi-grid-secondary-light: #fff1f2;
    --hi-grid-secondary-border: #fecdd3;
    --hi-grid-secondary-shadow: rgba(225, 29, 72, 0.3);
}

.hi-post-grid-wrapper.hi-grid-theme-2 {
    --hi-grid-accent: #059669;
    --hi-grid-accent-dark: #047857;
    --hi-grid-accent-light: #ecfdf5;
    --hi-grid-accent-border: #a7f3d0;
    --hi-grid-accent-shadow: rgba(5, 150, 105, 0.3);
    --hi-grid-secondary: #d97706;
    --hi-grid-secondary-dark: #b45309;
    --hi-grid-secondary-light: #fffbeb;
    --hi-grid-secondary-border: #fde68a;
    --hi-grid-secondary-shadow: rgba(217, 119, 6, 0.3);
}

.hi-post-grid-wrapper.hi-grid-theme-3 {
    --hi-grid-accent: #ea580c;
    --hi-grid-accent-dark: #c2410c;
    --hi-grid-accent-light: #fff7ed;
    --hi-grid-accent-border: #fed7aa;
    --hi-grid-accent-shadow: rgba(234, 88, 12, 0.3);
    --hi-grid-secondary: #4f46e5;
    --hi-grid-secondary-dark: #4338ca;
    --hi-grid-secondary-light: #eef2ff;
    --hi-grid-secondary-border: #c7d2fe;
    --hi-grid-secondary-shadow: rgba(79, 70, 229, 0.3);
}

.hi-post-grid-wrapper.hi-grid-theme-4 {
    --hi-grid-accent: #7c3aed;
    --hi-grid-accent-dark: #6d28d9;
    --hi-grid-accent-light: #f5f3ff;
    --hi-grid-accent-border: #ddd6fe;
    --hi-grid-accent-shadow: rgba(124, 58, 237, 0.3);
    --hi-grid-secondary: #0891b2;
    --hi-grid-secondary-dark: #0e7490;
    --hi-grid-secondary-light: #ecfeff;
    --hi-grid-secondary-border: #a5f3fc;
    --hi-grid-secondary-shadow: rgba(8, 145, 178, 0.3);
}

.hi-post-grid-wrapper.hi-grid-theme-5 {
    --hi-grid-accent: #475569;
    --hi-grid-accent-dark: #334155;
    --hi-grid-accent-light: #f1f5f9;
    --hi-grid-accent-border: #cbd5e1;
    --hi-grid-accent-shadow: rgba(71, 85, 105, 0.3);
    --hi-grid-secondary: #be123c;
    --hi-grid-secondary-dark: #9f1239;
    --hi-grid-secondary-light: #fff1f2;
    --hi-grid-secondary-border: #fecdd3;
    --hi-grid-secondary-shadow: rgba(190, 18, 60, 0.3);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-filter-pill.is-active {
    background: var(--hi-grid-accent);
    border-color: var(--hi-grid-accent);
    box-shadow: 0 2px 6px var(--hi-grid-accent-shadow);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-search-input:focus,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-sort-select:focus {
    border-color: var(--hi-grid-accent);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-search-input:focus {
    box-shadow: 0 0 0 3px var(--hi-grid-accent-shadow);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-results-summary {
    background: var(--hi-grid-accent-light);
    border-color: var(--hi-grid-accent-border);
    color: var(--hi-grid-accent-dark);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-reset-filter-btn,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-title a:hover,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-read-more {
    color: var(--hi-grid-accent);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-cat-badge,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-empty-reset-btn,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-btn-primary,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-load-more-btn:hover {
    background: var(--hi-grid-accent);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-date-badge,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-quickview-btn:hover {
    background: var(--hi-grid-secondary);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-cat-badge {
    box-shadow: 0 2px 8px var(--hi-grid-accent-shadow);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-date-badge {
    box-shadow: 0 4px 12px var(--hi-grid-secondary-shadow);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-post-body {
    border-top-color: var(--hi-grid-accent);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"].hi-grid-style-4 .hi-posts-container.is-grid-layout .hi-post-body {
    border-top-color: var(--hi-grid-secondary);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"].hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-read-more {
    color: var(--hi-grid-accent);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"].hi-grid-style-2 .hi-posts-container.is-grid-layout .hi-read-more:hover {
    color: var(--hi-grid-accent-light);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-share-btn:hover {
    background: var(--hi-grid-secondary-light);
    color: var(--hi-grid-secondary-dark);
    border-color: var(--hi-grid-secondary-border);
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-read-more-style-2,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-read-more-style-5 {
    background: var(--hi-grid-accent);
    color: #ffffff;
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-read-more-style-2:hover,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-read-more-style-5:hover,
.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-btn-primary:hover {
    background: var(--hi-grid-accent-dark);
    color: #ffffff;
}

.hi-post-grid-wrapper[class*="hi-grid-theme-"] .hi-modal-badge {
    background: var(--hi-grid-accent-light);
    color: var(--hi-grid-accent-dark);
}

/* ==========================================================================
   Island Explorer Shortcode [hi_trat] Styles
   ========================================================================== */
.hi-trat-container {
    max-width: 760px;
    margin: 28px auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.hi-trat-header-box {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 28px 24px 20px;
}

.hi-trat-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.hi-trat-title {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
}

.hi-trat-desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.hi-trat-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.hi-trat-tab-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hi-trat-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hi-trat-tab-btn.is-active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.hi-trat-content-box {
    padding: 24px;
    min-height: 150px;
}

.hi-trat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.hi-trat-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.hi-trat-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.hi-trat-panel p {
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.hi-trat-action-bar {
    display: flex;
    justify-content: flex-end;
}

.hi-trat-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.hi-trat-like-btn:hover {
    background: #ffe4e6;
    transform: scale(1.04);
}

.hi-trat-like-btn:active {
    transform: scale(0.96);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .hi-grid-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .is-list-layout .hi-post-card {
        flex-direction: column;
    }

    .is-list-layout .hi-post-thumb-wrap {
        width: 100%;
        min-height: 190px;
    }

    .hi-toolbar-right {
        width: 100%;
    }

    .hi-search-box {
        flex-grow: 1;
    }

    .hi-search-input {
        width: 100%;
    }

    .hi-search-input:focus {
        width: 100%;
    }
}
