/* =============================================
   AapkaLove — Premium Poll Cards v2
   Editorial / Product-grade design
   ============================================= */

/* ════════════════════════════════════════
   Section wrapper
════════════════════════════════════════ */
.al-section {
    padding: 48px 0 48px;
    background: #FAFAFA;
}
.al-section + .al-section {
    padding-top: 0;
}

.al-section-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Section header ── */
.al-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.al-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--al-font-sans);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--al-accent);
    background: rgba(224, 33, 122, 0.07);
    border: 1px solid rgba(224, 33, 122, 0.15);
    border-radius: 999px;
    padding: 5px 13px;
    margin-bottom: 16px;
}

.al-section-title {
    font-family: var(--al-font-display);
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0a0a0a;
    margin: 0 0 8px;
    line-height: 1.15;
}

.al-section-sub {
    font-family: var(--al-font-sans);
    font-size: 1rem;
    color: #777;
    font-weight: 400;
    margin: 0;
}

/* ════════════════════════════════════════
   Card grid — Desktop / Tablet / Mobile
════════════════════════════════════════ */
.al-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.al-most-voted-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 992px) {
    .al-card-grid       { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .al-most-voted-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .al-card-grid,
    .al-most-voted-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ════════════════════════════════════════
   Individual poll card
════════════════════════════════════════ */
.al-poll-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform var(--al-dur-base) var(--al-ease-out),
        box-shadow var(--al-dur-base) var(--al-ease-out),
        border-color var(--al-dur-fast) var(--al-ease-out);
    /* Stagger-reveal animation hook */
    opacity: 0;
    transform: translateY(8px);
}

.al-poll-card.al-revealed {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity var(--al-dur-slow) var(--al-ease-out),
        transform var(--al-dur-slow) var(--al-ease-out),
        box-shadow var(--al-dur-base) var(--al-ease-out),
        border-color var(--al-dur-fast) var(--al-ease-out);
}

.al-poll-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 12px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(224, 33, 122, 0.12) inset;
    border-color: rgba(224, 33, 122, 0.18);
}

/* Top-ranked card — subtle pink ring */
.al-poll-card.al-rank-1 {
    border-color: rgba(224, 33, 122, 0.22);
    box-shadow:
        0 1px 3px rgba(224, 33, 122, 0.07),
        0 6px 24px rgba(224, 33, 122, 0.10);
}

.al-poll-card.al-rank-1:hover {
    box-shadow:
        0 4px 12px rgba(224, 33, 122, 0.10),
        0 20px 52px rgba(224, 33, 122, 0.18);
}

/* ── Thumbnail area — 4:3 aspect ratio ── */
.al-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.al-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--al-dur-base) var(--al-ease-out);
}

.al-poll-card:hover .al-card-thumb img {
    transform: scale(1.02);
}

/* Subtle gradient at bottom for badge legibility */
.al-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 45%,
        rgba(0, 0, 0, 0.20) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Rank / status badge (top-left) ── */
.al-rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--al-font-sans);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.al-rank-badge.al-r1 {
    background: rgba(224, 33, 122, 0.92);
    color: #fff;
    box-shadow: 0 2px 12px rgba(224, 33, 122, 0.45);
}

.al-rank-badge.al-r2 {
    background: rgba(18, 18, 18, 0.82);
    color: #fff;
}

.al-rank-badge.al-r3 {
    background: rgba(50, 38, 10, 0.80);
    color: #f5c842;
}

.al-rank-badge.al-rn {
    background: rgba(255, 255, 255, 0.90);
    color: #333;
    border: 1px solid rgba(0,0,0,0.10);
}

/* Trending badge */
.al-card-trending-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: var(--al-font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(224, 33, 122, 0.88);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(224, 33, 122, 0.35);
}

/* ── Card body ── */
.al-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Poll title ── */
.al-card-title {
    font-family: var(--al-font-display);
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

/* ── Dual-option result bars ── */
.al-card-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.al-card-result-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.al-card-result-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.al-card-option-name {
    font-family: var(--al-font-sans);
    font-size: 12px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    line-height: 1;
}

.al-card-pct {
    font-family: var(--al-font-mono);font-weight: 800;
    font-size: 12.5px;
    color: #222;
    flex-shrink: 0;
}

/* 🎨 Progress bars 🎨 */
.al-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 999px;
    overflow: hidden;
}

.al-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #E0217A 0%, #ff4fa0 100%);
    width: 0%;
    transition: width var(--al-dur-slow) var(--al-ease-out);
    position: relative;
    overflow: hidden;
}

/* Second option bar — complementary color */
.al-card-result-row:nth-child(2) .al-progress-fill {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

/* Removed aggressive shimmer animation from bars for cleaner UI */


/* ── Vote count meta row ── */
.al-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.al-card-vote-count {
    font-family: var(--al-font-mono);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #303030;
}

.al-card-status {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #6b6b80;
}



/* ── Vote Now CTA — pill button, not full-width ── */
.al-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--al-font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: #E0217A !important;
    text-decoration: none !important;
    background: rgba(224, 33, 122, 0.08);
    border: 1.5px solid rgba(224, 33, 122, 0.25);
    border-radius: 999px;
    padding: 6px 14px;
    min-height: 32px;
    width: auto;
    align-self: flex-start;
    cursor: pointer;
    transition:
        background var(--al-dur-fast) var(--al-ease-out),
        border-color var(--al-dur-fast) var(--al-ease-out),
        color var(--al-dur-fast) var(--al-ease-out),
        transform var(--al-dur-fast) var(--al-ease-out),
        box-shadow var(--al-dur-fast) var(--al-ease-out);
    margin-top: auto;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.al-card-btn:hover {
    background: var(--al-accent);
    border-color: var(--al-accent);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(224, 33, 122, 0.38);
    text-decoration: none !important;
}

.al-card-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ── "View All" link ── */
.al-view-all-wrap {
    text-align: center;
    margin-top: 44px;
}

.al-view-all {
    font-family: var(--al-font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--al-accent) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid rgba(224, 33, 122, 0.25);
    border-radius: 999px;
    padding: 10px 24px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.al-view-all:hover {
    background: rgba(224, 33, 122, 0.05);
    border-color: rgba(224, 33, 122, 0.45);
    transform: translateY(-1px);
    text-decoration: none !important;
    color: var(--al-accent) !important;
}

/* ── Section divider ── */
.al-section-divider {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--al-accent), var(--al-accent-hover));
    border-radius: 999px;
    margin: 0 auto 48px;
}

/* ── Empty state ── */
.al-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
    font-family: var(--al-font-sans);
    font-size: 1rem;
}

.al-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    opacity: 0.4;
}

/* ══════════════════════════════════
   Responsive section padding
══════════════════════════════════ */
@media (max-width: 768px) {
    .al-section          { padding: 40px 0; }
    .al-section-inner    { padding: 0 16px; }
    .al-section-header   { margin-bottom: 24px; }
    .al-card-title       { font-size: 16px; }
    .al-card-body        { padding: 12px 14px 14px; }
}

/* ── Swipe hint — mobile only ── */
.al-swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: var(--al-font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: #bbb;
    letter-spacing: 0.04em;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .al-section-inner { overflow: visible; }
    #al-trending      { overflow: visible; }
}

/* ── Legacy compatibility ── */
.al-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--al-font-mono);
    font-size: 13px;
    color: #777;
    font-weight: 400;
}


@media (max-width: 767px) {
    .al-card-btn {
        height: 36px;
        min-height: 36px;
        padding: 0 14px;
        font-size: 0.8rem;
    }
}
