/* =========================================
   Infographics Page
   Figma: DigiMantra Website New
   Hero: shared page-hero.css
   ========================================= */

/* ------ Hero background override ------ */
.page-hero--infographic {
    --page-hero-bg: url(../image/news-press/web.png);
    --page-hero-bg-tab: url(../image/news-press/tab.png);
    --page-hero-bg-mob: url(../image/news-press/mob.png);
}

/* =========================================
   Section Wrapper
   ========================================= */
.ig-section {
    padding: 80px 0 120px;
    background-color: #08121C;
}

/* =========================================
   Grid – 3 columns desktop
   Figma gap: 24px
   ========================================= */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* =========================================
   Card
   Figma: bg #000000, radius 12px,
          border 1px rgba(255,255,255,0.10)
   ========================================= */
.ig-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    padding: 20px;
}

/* Gradient border glow on hover – correct mask technique */
.ig-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1.5px;
    background: linear-gradient(135deg, #01CBCF 0%, #0082EB 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 3;
}

.ig-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(1, 203, 207, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.40);
}

/* Gradient border shows on hover */
.ig-card:hover::before {
    opacity: 1;
}

/* -- Entire card as link -- */
.ig-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Image Wrap
   Figma card image: 344 x 220px (landscape)
   ========================================= */
.ig-card__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 344 / 220;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #0a1828;
}

/* Image */
.ig-card__img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 12px;
}

/* NO scale transform on img — causes GPU layer that hides overlay */

/* Placeholder when no image */
.ig-card__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1a2e 0%, #0d2540 100%);
}

/* =========================================
   Hover Overlay — always above image (z-index:2)
   ========================================= */
.ig-card__hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: rgba(0, 8, 20, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ig-card:hover .ig-card__hover-overlay {
    opacity: 1;
    pointer-events: auto;
}

.ig-card__hover-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Download pill button */
.ig-card__dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 999px;
    background: linear-gradient(95deg, #01CBCF -3.18%, #0082EB 98.57%);
    color: #ffffff;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(0, 130, 235, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.ig-card:hover .ig-card__dl-btn {
    transform: scale(1.06);
    box-shadow: 0 8px 30px rgba(0, 130, 235, 0.60);
}

.ig-card__dl-btn svg {
    flex-shrink: 0;
}

/* =========================================
   Card Body – title below image
   Figma: padding 18px, bg black, title white
   ========================================= */
.ig-card__body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Category badge — gradient text + left border (same as news press) */
.ig-card__category {
    display: inline-block;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(95deg, #01CBCF -3.18%, #0082EB 98.57%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-left: 2px solid #01CBCF;
    padding-left: 8px;
    line-height: 1;
    margin-bottom: 2px;
}

/* Title: Figma exact — Roboto 600, 20px, 140% lh, White */
.ig-card__title {
    color: #ffffff;
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 140%;
    letter-spacing: 0;
    margin: 0;

    /* Max 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Date — muted small text below title */
.ig-card__date {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.50);
    margin-top: auto;
    padding-top: 8px;
    display: block;
}

/* =========================================
   Responsive
   ========================================= */

/* ≤ 1440px */
@media (max-width: 1440px) {
    .ig-section {
        padding: 80px 0 100px;
    }
}

/* Tablet ≤ 1024px – 2 columns */
@media (max-width: 1024px) {
    .ig-section {
        padding: 60px 0 80px;
    }

    .ig-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ig-card__title {
        font-size: 17px;
    }
}

/* Mobile ≤ 767px – 1 column */
@media (max-width: 767px) {
    .ig-section {
        padding: 40px 0 60px;
    }

    .ig-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ig-card__image-wrap {
        aspect-ratio: 4 / 3;
    }

    .ig-card__title {
        font-size: 16px;
    }

    .ig-card__body {
        padding: 14px 16px 16px;
    }
}