/**
 * Category Showcase Widget Stylesheet
 *
 * @package NationalRajasthan
 */

:root {
    --nr-card-radius: 8px;
    --nr-gap: 24px;
    --nr-border: #ECECEC;
    --nr-red: #C8102E;
    --nr-title-size: 18px;
    --nr-meta-size: 12px;
}

.nr-showcase {
    margin: 35px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    position: relative;
}

/* ==========================================
 * SECTION HEADER
 * ========================================== */
.nr-showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #F0F0F0;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.nr-showcase-header__title-wrapper {
    position: relative;
    margin-bottom: -2px;
}

.nr-showcase-header__title {
    font-size: 22px;
    font-weight: 700;
    color: #222222;
    margin: 0;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

.nr-showcase-header__title a {
    color: inherit;
    text-decoration: none;
}

.nr-showcase-header__line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--nr-red);
}

.nr-showcase-header__view-all {
    font-size: 13px;
    font-weight: 700;
    color: var(--nr-red);
    text-decoration: none;
    padding-bottom: 10px;
    transition: opacity 0.2s;
}

.nr-showcase-header__view-all:hover {
    opacity: 0.8;
}

/* ==========================================
 * TAXONOMY NAVIGATION TABS
 * ========================================== */
.nr-showcase-tabs-container {
    margin-bottom: 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for clean horizontal tabs */
.nr-showcase-tabs-container::-webkit-scrollbar {
    display: none;
}

.nr-showcase-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 12px;
    white-space: nowrap;
    align-items: center;
}

.nr-showcase-tab {
    background-color: #F8F8F8;
    border: 1px solid #EAEAEA;
    border-radius: 4px;
    padding: 6px 14px;
    transition: all 0.25s ease;
}

.nr-showcase-tab a {
    color: #444444;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.nr-showcase-tab:hover {
    border-color: var(--nr-red);
    background-color: #FFF8F8;
}

.nr-showcase-tab:hover a {
    color: var(--nr-red);
}

/* Active Highlight */
.nr-showcase-tab--active {
    background-color: var(--nr-red) !important;
    border-color: var(--nr-red) !important;
}

.nr-showcase-tab--active a {
    color: #ffffff !important;
}

/* ==========================================
 * COLUMNS & GUTTER
 * ========================================== */
.nr-showcase__body {
    display: flex;
    gap: var(--nr-gap);
}

.nr-showcase__main {
    flex-grow: 1;
}

.nr-showcase__sidebar {
    flex-shrink: 0;
}

/* ==========================================
 * LAYOUT: CLASSIC SPLIT (50 / 50)
 * ========================================== */
.nr-showcase-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--nr-gap);
}

/* Featured card image setups */
.nr-showcase-featured {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-card-radius);
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.3s;
}

.nr-showcase-featured:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.nr-showcase-featured__image-link {
    display: block;
    width: 100%;
    overflow: hidden;
}

.nr-showcase-featured__image-wrapper {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background-color: #f4f4f4;
}

.nr-showcase-featured__image-wrapper--landscape {
    aspect-ratio: 16/9;
}

.nr-showcase-featured__image-wrapper--portrait {
    aspect-ratio: 4/3;
}

.nr-showcase-featured__image-wrapper--square {
    aspect-ratio: 1/1;
}

.nr-showcase-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nr-showcase-featured:hover .nr-showcase-featured__img {
    transform: scale(1.04);
}

.nr-showcase-featured__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(200, 16, 46, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nr-showcase-featured__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--nr-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
}

.nr-showcase-featured__content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nr-showcase-featured__title {
    font-size: var(--nr-title-size);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.nr-showcase-featured__title a {
    color: #111111;
    text-decoration: none;
    transition: color 0.2s;
}

.nr-showcase-featured__title a:hover {
    color: var(--nr-red);
}

.nr-showcase-featured__excerpt {
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.nr-showcase-featured__meta {
    display: flex;
    gap: 15px;
    font-size: var(--nr-meta-size);
    color: #888888;
    border-top: 1px solid #F0F0F0;
    padding-top: 12px;
    margin-top: auto;
}

.nr-showcase-featured__meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Right Column: Supporting stories */
.nr-showcase-split__stories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: flex-start;
}

.nr-showcase-story-card {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0F0F0;
}

.nr-showcase-story-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nr-showcase-story-card__image-link {
    display: block;
    flex-shrink: 0;
}

.nr-showcase-story-card__image-wrapper {
    position: relative;
    width: 110px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.nr-showcase-story-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.nr-showcase-story-card:hover .nr-showcase-story-card__img {
    transform: scale(1.03);
}

.nr-showcase-story-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(200, 16, 46, 0.9);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nr-showcase-story-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nr-showcase-story-card__category {
    font-size: 10px;
    font-weight: 700;
    color: var(--nr-red);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nr-showcase-story-card__category a {
    color: inherit;
    text-decoration: none;
}

.nr-showcase-story-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.nr-showcase-story-card__title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s;
}

.nr-showcase-story-card__title a:hover {
    color: var(--nr-red);
}

.nr-showcase-story-card__meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #999999;
}

.nr-showcase-story-card__meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
 * LAYOUT: COMPACT
 * ========================================== */
.nr-showcase-compact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nr-showcase-compact-list .nr-showcase-story-card__image-wrapper {
    width: 140px;
}

.nr-showcase-compact-list .nr-showcase-story-card__title {
    font-size: 15px;
}

/* ==========================================
 * LAYOUT: GRID
 * ========================================== */
.nr-showcase-grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--nr-gap);
}

.nr-showcase-grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-card-radius);
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.3s;
}

.nr-showcase-grid-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.nr-showcase-grid-card__image-link {
    display: block;
    width: 100%;
}

.nr-showcase-grid-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.nr-showcase-grid-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.nr-showcase-grid-card:hover .nr-showcase-grid-card__img {
    transform: scale(1.03);
}

.nr-showcase-grid-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(200, 16, 46, 0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nr-showcase-grid-card__content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nr-showcase-grid-card__category {
    font-size: 10px;
    font-weight: 700;
    color: var(--nr-red);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.nr-showcase-grid-card__category a {
    color: inherit;
    text-decoration: none;
}

.nr-showcase-grid-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.nr-showcase-grid-card__title a {
    color: #222222;
    text-decoration: none;
}

.nr-showcase-grid-card__title a:hover {
    color: var(--nr-red);
}

.nr-showcase-grid-card__meta {
    margin-top: auto;
    font-size: 11px;
    color: #999999;
    border-top: 1px solid #F8F8F8;
    padding-top: 8px;
}

/* ==========================================
 * AJAX LOADING WRAPPER TRANSITION
 * ========================================== */
.nr-showcase__content-inner {
    transition: opacity 0.25s ease-in-out;
}

.nr-showcase--loading .nr-showcase__content-inner {
    opacity: 0.45;
    pointer-events: none;
}

/* ==========================================
 * RESPONSIVE RULES
 * ========================================== */
@media (max-width: 1024px) {
    .nr-showcase-grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nr-showcase__body {
        flex-direction: column;
    }

    .nr-showcase__sidebar {
        width: 100% !important;
        margin-top: 30px;
    }

    .nr-showcase__main {
        width: 100% !important;
    }

    .nr-showcase-split {
        grid-template-columns: 1fr;
    }
    
    .nr-showcase-split__stories {
        margin-top: 15px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .nr-showcase-split__stories .nr-showcase-story-card {
        border-bottom: none;
        padding-bottom: 0;
        flex-direction: column;
    }
    
    .nr-showcase-split__stories .nr-showcase-story-card__image-wrapper {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .nr-showcase-grid-cards {
        grid-template-columns: 1fr;
    }

    .nr-showcase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .nr-showcase-split__stories {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
 * QUICK POLL STYLES
 * ========================================== */
.nr-sidebar-poll {
    background: #ffffff;
    border: 1px solid #ECECEC;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nr-sidebar-poll__question p {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    margin: 0 0 16px 0;
}

.nr-sidebar-poll__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nr-sidebar-poll__opt-btn {
    width: 100%;
    background-color: #f7f7f7;
    border: 1px solid #ECECEC;
    border-radius: 6px;
    color: #444444;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nr-sidebar-poll__opt-btn:hover {
    background-color: var(--nr-red);
    border-color: var(--nr-red);
    color: #ffffff;
}

.nr-sidebar-poll__opt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results panel progress bars */
.nr-sidebar-poll__results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nr-poll-result-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nr-poll-result-row__meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    color: #444444;
}

.nr-poll-result-row__label {
    font-weight: 600;
}

.nr-poll-result-row__pct {
    color: var(--nr-red);
    font-weight: 700;
}

.nr-poll-result-row__bar {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.nr-poll-result-row__fill {
    height: 100%;
    background-color: var(--nr-red);
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.nr-poll-result-total {
    margin-top: 6px;
    border-top: 1px solid #F0F0F0;
    padding-top: 10px;
    font-size: 12px;
    color: #888888;
    text-align: right;
}
