/* ==========================================
   Indexpo News – Creative UI
   ========================================== */

/* Filter Bar */
.ixp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 28px;
}

.ixp-filter {
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #2a2a3a;
    border-radius: 20px;
    background: transparent;
    color: #999;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}

.ixp-filter:hover {
    border-color: var(--cat-border);
    color: var(--cat-text);
    background: var(--cat-bg);
}

.ixp-filter.active {
    background: var(--cat-bg);
    color: var(--cat-text);
    border-color: var(--cat-text);
    box-shadow: 0 0 12px var(--cat-bg);
}

.ixp-filter-skeleton {
    height: 34px;
    width: 320px;
    border-radius: 20px;
    background: linear-gradient(90deg, #1e1e2a 25%, #2a2a3a 50%, #1e1e2a 75%);
    background-size: 800px 100%;
    animation: ixp-shimmer 1.6s infinite ease-in-out;
}

/* Tag */
.ixp-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    border-radius: 20px;
    border: 1px solid;
    backdrop-filter: blur(4px);
}

/* Hero Card */
.ixp-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 32px;
    transition: transform .3s;
}

.ixp-hero:hover {
    transform: scale(1.005);
}

.ixp-hero__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

.ixp-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
    image-rendering: auto;
    filter: contrast(1.03) saturate(1.1);
}

.ixp-hero:hover .ixp-hero__img {
    transform: scale(1.03);
}

.ixp-hero__gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(10,10,18,.95) 0%, rgba(10,10,18,.75) 55%, rgba(10,10,18,.15) 100%);
}

.ixp-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.ixp-hero__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.ixp-hero__excerpt {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,.75);
    max-width: 700px;
}

.ixp-hero__date {
    font-size: 12px;
    color: rgba(255,255,255,.5);
}

/* Grid */
.ixp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card */
.ixp-card {
    background: #13131b;
    border: 1px solid #1e1e2e;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}

.ixp-card:hover {
    transform: translateY(-6px);
    border-color: #2d2d44;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.ixp-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1a1a2e;
}

.ixp-card__img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(19,19,27,.6) 100%);
    pointer-events: none;
}

.ixp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
    image-rendering: auto;
    filter: contrast(1.03) saturate(1.1);
}

.ixp-card:hover .ixp-card__img {
    transform: scale(1.06);
}

.ixp-card__img-wrap .ixp-tag {
    position: absolute;
    top: 12px;
    left: 12px;
}

.ixp-card__info {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ixp-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    color: #eee;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ixp-card__body {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #777;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ixp-card__date {
    font-size: 12px;
    color: #555;
    margin-top: auto;
}

/* Empty */
.ixp-empty {
    color: #666;
    text-align: center;
    padding: 60px 0;
    font-size: 15px;
}

/* Skeleton */
@keyframes ixp-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.ixp-hero-skeleton {
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: 18px;
    margin-bottom: 32px;
    background: linear-gradient(90deg, #1e1e2a 25%, #2a2a3a 50%, #1e1e2a 75%);
    background-size: 800px 100%;
    animation: ixp-shimmer 1.6s infinite ease-in-out;
}

.ixp-skel__img,
.ixp-skel__line {
    background: linear-gradient(90deg, #1e1e2a 25%, #2a2a3a 50%, #1e1e2a 75%);
    background-size: 800px 100%;
    animation: ixp-shimmer 1.6s infinite ease-in-out;
    border-radius: 8px;
}

.ixp-skel {
    pointer-events: none;
}

.ixp-skel__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px 14px 0 0;
}

.ixp-skel__line {
    height: 13px;
    margin: 6px 20px;
}

.ixp-skel__line:last-child {
    margin-bottom: 20px;
}

/* Pagination */
.ixp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 40px 0 16px;
}

.ixp-pg {
    background: #13131b;
    color: #888;
    border: 1px solid #1e1e2e;
    border-radius: 10px;
    min-width: 40px;
    height: 40px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.ixp-pg:hover:not(:disabled):not(.active) {
    border-color: #2968FA;
    color: #fff;
    background: #2968FA15;
}

.ixp-pg.active {
    background: linear-gradient(135deg, #2968FA, #1B52D4);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(124, 108, 255, .3);
}

.ixp-pg:disabled {
    opacity: .25;
    cursor: default;
}

.ixp-pg svg {
    display: block;
}

.ixp-pg-dots {
    color: #444;
    font-size: 14px;
    padding: 0 4px;
}

/* ==========================================
   Modal
   ========================================== */
.ixp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.ixp-modal.open {
    opacity: 1;
    visibility: visible;
}

.ixp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(10px);
}

.ixp-modal__panel {
    position: relative;
    background: #111118;
    border: 1px solid #1e1e2e;
    border-radius: 20px;
    max-width: 720px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    transform: translateY(24px) scale(.97);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.ixp-modal.open .ixp-modal__panel {
    transform: translateY(0) scale(1);
}

.ixp-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.ixp-modal__close:hover {
    background: #2968FA;
    border-color: #2968FA;
}

.ixp-modal__hero {
    position: relative;
}

.ixp-modal__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    display: block;
}

.ixp-modal__hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, #111118);
}

.ixp-modal__hero .ixp-tag {
    position: absolute;
    bottom: 20px;
    left: 28px;
}

.ixp-modal__body {
    padding: 8px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ixp-modal__date {
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ixp-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

.ixp-modal__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: #999;
}

.ixp-modal__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2968FA, #1B52D4);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    padding: 11px 24px;
    border: none;
    border-radius: 10px;
    transition: all .25s;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 16px rgba(124, 108, 255, .25);
}

.ixp-modal__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 108, 255, .4);
    color: #fff;
}

.ixp-modal__cta svg {
    transition: transform .2s;
}

.ixp-modal__cta:hover svg {
    transform: translate(2px, -2px);
}

/* Modal scrollbar */
.ixp-modal__panel::-webkit-scrollbar {
    width: 5px;
}

.ixp-modal__panel::-webkit-scrollbar-track {
    background: transparent;
}

.ixp-modal__panel::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 3px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
    .ixp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .ixp-hero__title {
        font-size: 20px;
    }
    .ixp-hero__excerpt {
        display: none;
    }
    .ixp-hero__content {
        padding: 20px 24px;
    }
}

@media (max-width: 560px) {
    .ixp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ixp-hero__img-wrap {
        aspect-ratio: 16 / 10;
    }
    .ixp-hero__title {
        font-size: 18px;
    }
    .ixp-modal__panel {
        width: 96%;
        border-radius: 14px;
    }
    .ixp-modal__body {
        padding: 8px 20px 24px;
    }
}
