/*
 * Rozana Himachal - Advertisements pages (2026-10)
 * Loaded only on /advertisements and its pages.
 */
.rh-ads-page {
    --rh-a-border: #eceef2;
    --rh-a-card: #fff;
    --rh-a-muted: #6b7280;
    --rh-a-text: #111827;
}

/* ---------- list ---------- */
.rh-ads-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 24px;
}

.rh-ads-head .page-title {
    margin-bottom: 0;
}

.rh-ads-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rh-ads-year {
    padding: 6px 16px;
    border-radius: 999px;
    background-color: #f2f3f5;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.rh-ads-year:hover {
    background-color: color-mix(in srgb, var(--vr-theme-color) 14%, #fff);
    color: var(--vr-theme-color);
}

.rh-ads-year.active {
    background-color: var(--vr-theme-color);
    color: #fff;
}

.rh-ads-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.rh-ad-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--rh-a-border);
    border-radius: 14px;
    background-color: var(--rh-a-card);
    color: var(--rh-a-text);
    box-shadow: 0 4px 18px rgba(17, 24, 39, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.rh-ad-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(17, 24, 39, .12);
    color: var(--rh-a-text);
}

.rh-ad-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: #f3f4f6;
}

.rh-ad-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.rh-ad-card:hover .rh-ad-cover img {
    transform: scale(1.04);
}

.rh-ad-cover-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    background: linear-gradient(140deg, #fee2e2, #fff);
    color: #dc2626;
    font-size: 18px;
    font-weight: 800;
}

.rh-ad-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: rgba(17, 24, 39, .82);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.rh-ad-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
}

.rh-ad-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.rh-ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--rh-a-muted);
    font-size: 13px;
}

.rh-ad-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rh-ads-empty {
    padding: 60px 0;
    text-align: center;
    color: #9ca3af;
}

.rh-ads-empty p {
    margin-top: 12px;
    font-size: 16px;
}

/* ---------- one advertisement ---------- */
.rh-ad-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.rh-ad-header .page-title {
    margin-bottom: 8px;
}

.rh-ad-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--rh-a-muted);
    font-size: 14px;
    font-weight: 600;
}

.rh-ad-header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rh-ad-share {
    display: flex;
    gap: 8px;
}

.rh-ad-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
}

.rh-ad-share-btn:hover {
    color: #fff;
    opacity: .9;
}

.rh-ad-share-whatsapp {
    background-color: #25d366;
}

.rh-ad-share-facebook {
    background-color: #1877f2;
}

.rh-ad-description {
    max-width: 860px;
    margin-bottom: 22px;
    color: #374151;
    font-size: 16px;
    line-height: 1.8;
}

.rh-ad-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.rh-ad-page {
    width: 100%;
    max-width: 960px;
    margin: 0;
}

.rh-ad-page a {
    display: block;
    overflow: hidden;
    border: 1px solid var(--rh-a-border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, .08);
    cursor: zoom-in;
}

.rh-ad-page img {
    display: block;
    width: 100%;
    height: auto;
}

.rh-ad-page figcaption {
    margin-top: 8px;
    color: var(--rh-a-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.rh-ad-pdf {
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid var(--rh-a-border);
    border-radius: 14px;
    background-color: var(--rh-a-card);
}

.rh-ad-pdf-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 18px;
}

.rh-ad-pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #fee2e2;
    color: #dc2626;
}

.rh-ad-pdf-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 160px;
    color: var(--rh-a-text);
}

.rh-ad-pdf-info span {
    color: var(--rh-a-muted);
    font-size: 13px;
}

.rh-ad-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rh-ad-pdf-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    font-weight: 600;
}

.rh-ads-page .rh-ad-pdf-actions .rh-ad-btn-light {
    background-color: #f2f3f5;
    color: #374151 !important;
}

.rh-ads-page .rh-ad-pdf-actions .rh-ad-btn-light:hover {
    background-color: #e5e7eb;
}

.rh-ad-pdf-frame {
    display: block;
    width: 100%;
    height: 80vh;
    border: 0;
    border-top: 1px solid var(--rh-a-border);
}

.rh-ad-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
}

.rh-ad-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 48%;
    padding: 12px 16px;
    border: 1px solid var(--rh-a-border);
    border-radius: 12px;
    color: var(--rh-a-text);
    font-weight: 600;
}

.rh-ad-nav-link span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rh-ad-nav-link small {
    color: var(--rh-a-muted);
    font-weight: 500;
}

.rh-ad-nav-older {
    margin-left: auto;
    text-align: right;
}

.rh-ad-nav-link:hover {
    border-color: var(--vr-theme-color);
    color: var(--vr-theme-color);
}

@media (max-width: 1199.98px) {
    .rh-ads-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .rh-ads-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .rh-ad-body {
        padding: 10px 12px 12px;
    }

    .rh-ad-title {
        font-size: 14px;
    }

    /* phones open PDF files in their own viewer */
    .rh-ad-pdf-frame {
        display: none;
    }
}

/* ---------- dark mode ---------- */
.dark-mode .rh-ads-page {
    --rh-a-border: #2a2a2a;
    --rh-a-card: #1b1b1b;
    --rh-a-muted: #9ca3af;
    --rh-a-text: #e5e7eb;
}

.dark-mode .rh-ads-year,
.dark-mode .rh-ads-page .rh-ad-pdf-actions .rh-ad-btn-light {
    background-color: rgba(255, 255, 255, .08);
    color: #e5e5e5 !important;
}

.dark-mode .rh-ads-year.active {
    background-color: var(--vr-theme-color);
    color: #fff;
}

.dark-mode .rh-ad-description {
    color: #d1d5db;
}
