/* ═══════════════════════════════════════════════════════════
   BIBLE PPTs — Custom Overrides (extends app.css)
   Adds version gallery cards and category cards specific
   to the Bible PPTs app. All design tokens inherited from
   the shared app.css (same as parishuddagrandhamu.com).
   ═══════════════════════════════════════════════════════════ */

/* ── Content Protection ──────────────────────────────────── */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* iOS long-press menu */
}

/* Allow selection in input fields only */
input, textarea, [contenteditable] {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Prevents right-click save on images */
}

/* Re-enable pointer events on interactive elements */
a, button, label, input, select, textarea, [role="button"] {
    pointer-events: auto;
}

/* ── Chapter download buttons — must always be clickable ─ */
button.chapter-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    border: none;
    background: var(--surface, #f5f5f5);
    border: 1px solid var(--border, #ddd);
}

button.chapter-btn:hover {
    background: var(--butcher, #8b3a30) !important;
    border-color: var(--butcher, #8b3a30) !important;
    color: #fff !important;
}

/* ── Version Gallery Grid ─────────────────────────────────── */
.bp-version-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 500px) {
    .bp-version-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .bp-version-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .bp-version-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ── Version Card ─────────────────────────────────────────── */
.bp-version-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
    box-shadow: var(--shadow-sm);
}

.bp-version-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.bp-version-card__img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg);
}

.bp-version-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.bp-version-card:hover .bp-version-card__img img {
    transform: scale(1.05);
}

.bp-version-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2c2926 0%, #1a1816 100%);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bp-version-card__placeholder::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(214, 185, 120, 0.15);
    /* Subtle gold border */
    border-radius: 4px;
    pointer-events: none;
}

.bp-version-card__placeholder span {
    font-size: 2.2rem;
    font-weight: 800;
    color: #d6b978;
    /* Soft gold */
    font-family: var(--font-serif);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.bp-version-card__placeholder::after {
    content: 'HOLY BIBLE';
    position: absolute;
    bottom: 24px;
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2em;
    color: rgba(214, 185, 120, 0.4);
    z-index: 1;
}

.bp-version-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--butcher);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 4px 8px;
    border-radius: 6px;
}

.bp-version-card__body {
    padding: 14px 12px;
    border-top: 3px solid var(--butcher);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bp-version-card__name {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
}

.dark .bp-version-card__name {
    color: #fff;
}

.bp-version-card__lang {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bp-version-card__cta {
    margin-top: auto;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    color: var(--butcher);
    letter-spacing: .05em;
}

/* ── Category Cards (Homepage) ───────────────────────────── */
.bp-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px;
    text-decoration: none;
    cursor: pointer;
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    transition: all var(--trans-base);
    position: relative;
    overflow: hidden;
}

.bp-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--butcher);
    opacity: 0.8;
}

.bp-category-card__icon {
    font-size: 64px;
    margin-bottom: 24px;
    transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.bp-category-card:hover .bp-category-card__icon {
    transform: scale(1.1) translateY(-8px);
}

.bp-category-card__title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.dark .bp-category-card__title {
    color: var(--butcher-light);
}

.bp-category-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.bp-category-card__cta {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--butcher);
    letter-spacing: .1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bp-category-card__cta::after {
    content: '→';
    transition: transform .2s ease;
}

.bp-category-card:hover .bp-category-card__cta::after {
    transform: translateX(4px);
}

/* ── Admin Sidebar Nav Highlight ─────────────────────────── */
.admin-nav-link.active {
    color: var(--butcher);
    background: rgba(139, 58, 48, .07);
}

/* ── Responsive table adjustments ───────────────────────── */
@media (max-width: 640px) {
    .bp-version-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .page-header__title {
        font-size: clamp(1.4rem, 5vw, 2.5rem);
    }
}

/* ── Hero Background ─────────────────────────────────────── */
.hero,
.page-header {
    background-color: #2b2523 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%238b3a30' fill-opacity='0.25' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3Cpath fill='%23d1b06b' fill-opacity='0.05' d='M0,256L48,229.3C96,203,192,149,288,154.7C384,160,480,224,576,218.7C672,213,768,139,864,128C960,117,1056,171,1152,197.3C1248,224,1344,224,1392,224L1440,224L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-size: cover !important;
    background-position: bottom !important;
}

.dark .hero,
.dark .page-header {
    background-color: #12100e !important;
}

/* ── Header Branding ─────────────────────────────────────── */
.header__logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header__heading {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0;
    white-space: nowrap;
}

.dark .header__heading {
    color: #fff;
}

@media (max-width: 768px) {
    .header__heading {
        display: none; /* Hide heading on mobile to save space */
    }
}

/* ── Footer Social Links ─────────────────────────────────── */
.footer__social-links {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__social-links a {
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #ffffff;
}

.footer__social-links a svg {
    fill: #ffffff;
    stroke: none;
}

.footer__social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.footer__nav-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__link--icon {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 13px !important;
}

.footer__link--icon svg {
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    fill: currentColor;
}

.footer__social-links a svg[stroke="currentColor"] {
    fill: none;
    stroke: #ffffff;
}

.footer__link--icon:hover svg {
    opacity: 1;
}