/* ===================================================================
   Indian Loop Premium — homepage.css
   Homepage-specific spacing, section dividers, premium polish.
   =================================================================== */

.ilp-home { background: var(--ilp-bg); }

.ilp-home .ilp-section { padding: 24px 0; }
.ilp-home .ilp-section + .ilp-section { border-top: 1px solid var(--ilp-line); }

/* Category-flavored backgrounds (subtle) */
.ilp-cat-section { position: relative; }
.ilp-cat-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--cat-color), transparent);
}

/* Featured slider header tweaks */
.ilp-featured-slider .ilp-section-header { align-items: flex-end; }

/* Editorial */
.ilp-editorial .ilp-card { background: linear-gradient(180deg, #fffbeb 0%, var(--ilp-bg) 100%); border: 1px solid #fef3c7; }
html[data-theme="dark"] .ilp-editorial .ilp-card { background: #1c1a13; border-color: #2a2517; }

/* AI section gradient frame */
.ilp-ai-recs { position: relative; }
.ilp-ai-recs .ilp-card {
    position: relative;
    background: var(--ilp-bg);
    border: 1px solid var(--ilp-line);
}
.ilp-ai-recs .ilp-card::before {
    content: '';
    position: absolute; inset: -1px;
    background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(6,182,212,.12));
    border-radius: calc(var(--ilp-radius) + 1px);
    z-index: -1;
}

/* Latest grid row striping */
.ilp-latest .ilp-loadmore-wrap { margin-top: 24px; }

/* AdSense slot spacing */
.ilp-home .ilp-ad { margin: 24px 0; }

/* ----------------------------------------------------------------------
   Internet Trending — live external headlines (Google News Hindi)
   ---------------------------------------------------------------------- */
.ilp-internet-trending {
    position: relative;
}
.ilp-internet-trending .ilp-section-header { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.ilp-internet-trending__tools { display: flex; align-items: center; gap: 12px; }
.ilp-internet-trending__source-label {
    font-size: 12px; color: var(--ilp-subtle); white-space: nowrap;
}
.ilp-internet-trending__refresh {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; font-size: 13px; font-weight: 600;
    border-radius: var(--ilp-radius-pill);
    background: var(--ilp-muted); color: var(--ilp-fg);
    transition: background var(--ilp-trans), color var(--ilp-trans);
    cursor: pointer; border: 0;
}
.ilp-internet-trending__refresh:hover { background: var(--ilp-primary); color: #fff; }
.ilp-internet-trending__refresh.is-spinning > span:first-child {
    display: inline-block; animation: ilpSpin 1s linear infinite;
}
.ilp-internet-trending__refresh:disabled { opacity: .55; cursor: wait; }

.ilp-internet-trending__list {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
    background: var(--ilp-bg);
    border: 1px solid var(--ilp-line);
    border-radius: var(--ilp-radius);
    overflow: hidden;
}
@media (max-width: 720px) { .ilp-internet-trending__list { grid-template-columns: 1fr; } }

.ilp-internet-trending__item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ilp-line);
    transition: background var(--ilp-trans);
}
.ilp-internet-trending__item:hover { background: var(--ilp-muted); }
/* Last row in each column shouldn't show bottom border */
.ilp-internet-trending__item:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 720px) {
    .ilp-internet-trending__item:nth-last-child(-n+2) { border-bottom: 1px solid var(--ilp-line); }
    .ilp-internet-trending__item:last-child { border-bottom: 0; }
}
/* Vertical divider between the two columns on desktop */
@media (min-width: 721px) {
    .ilp-internet-trending__item:nth-child(odd) { border-right: 1px solid var(--ilp-line); }
}

.ilp-internet-trending__rank {
    font-size: 22px; font-weight: 800; line-height: 1;
    min-width: 32px;
    background: linear-gradient(135deg, var(--ilp-primary), var(--ilp-primary-dark));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
}
.ilp-internet-trending__body { flex: 1; min-width: 0; }
.ilp-internet-trending__title {
    display: block; color: var(--ilp-fg); font-weight: 600;
    line-height: 1.45; font-size: 15px;
}
.ilp-internet-trending__title:hover { color: var(--ilp-primary); }
.ilp-internet-trending__ext {
    display: inline-block; margin-left: 4px;
    font-size: 11px; color: var(--ilp-subtle); transform: translateY(-2px);
}
.ilp-internet-trending__meta {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
    color: var(--ilp-subtle); font-size: 12px; margin-top: 4px;
}
.ilp-internet-trending__source {
    color: var(--ilp-primary); font-weight: 700; font-size: 11px;
    text-transform: uppercase; letter-spacing: .03em;
}
.ilp-internet-trending__sep { opacity: .5; }

.ilp-internet-trending__updated {
    margin-top: 10px; font-size: 12px; color: var(--ilp-subtle); text-align: right;
}

/* Loading state during AJAX refresh */
.ilp-internet-trending.is-loading .ilp-internet-trending__list { opacity: .45; pointer-events: none; }
.ilp-internet-trending.is-loading .ilp-internet-trending__list::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--ilp-line); border-top-color: var(--ilp-primary);
    border-radius: 50%; animation: ilpSpin 1s linear infinite; pointer-events: none;
}
.ilp-internet-trending__list { position: relative; }
