/* ================================================================
   BAJRA 3D INTERACTIVE HERO — "THE LIVING LIBRARY"
   Palette: #8E1616 (Crimson), #D4AF37 (Gold), #0d0204 (Atmospheric Dark)
   ================================================================ */

/* Full-viewport width enforcement — eliminate blank white side gaps */
.home #wrapper-content,
.home #primary-content,
.home #primary-content > .container,
.home #bb-homepage,
.bajra-hero-3d {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

.home #primary-content > .container {
    max-width: 100% !important;
    width: 100% !important;
}

.home #primary-content .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.home #primary-content .col-lg-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.bajra-hero-3d {
    position: relative;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 65% 45%, #1f0408 0%, #0d0204 60%, #050102 100%);
    overflow: hidden;
    z-index: 10;
}

/* Atmospheric Ambient Glowing Lights */
.bajra-hero-3d__ambient-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.28;
    z-index: 1;
}

.bajra-hero-3d__ambient-glow--1 {
    width: 600px;
    height: 600px;
    background: #D4AF37;
    top: 15%;
    right: 12%;
}

.bajra-hero-3d__ambient-glow--2 {
    width: 500px;
    height: 500px;
    background: #8E1616;
    bottom: 10%;
    left: 20%;
    opacity: 0.35;
}

/* 3D WebGL Canvas */
.bajra-hero-3d__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 2;
    display: block;
    outline: none;
}

/* Content Container Layer */
.bajra-hero-3d__container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    z-index: 10;
    pointer-events: none; /* Let WebGL mouse events pass through to canvas */
}

.bajra-hero-3d__content {
    max-width: 620px;
    pointer-events: auto; /* Re-enable pointer events on text and CTAs */
}

/* Small Eyebrow */
.bajra-hero-3d__eyebrow-wrap {
    margin-bottom: 20px;
}

.bajra-hero-3d__eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #D4AF37;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.bajra-hero-3d__eyebrow-badge i {
    font-size: 10px;
}

/* Main Headline */
.bajra-hero-3d__title {
    font-family: var(--bb-serif, 'Cinzel', serif);
    font-size: clamp(38px, 5.2vw, 68px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0 0 24px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.bajra-hero-3d__title-line {
    display: block;
}

.bajra-hero-3d__title-line--gold {
    background: linear-gradient(135deg, #ffffff 0%, #ecd698 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Supporting Description */
.bajra-hero-3d__description,
.bb-redesign .bajra-hero-3d__description,
#bb-section-hero .bajra-hero-3d__description {
    font-size: clamp(15px, 1.3vw, 17.5px) !important;
    line-height: 1.65 !important;
    color: #FFF0E2 !important;
    margin: 0 0 32px 0 !important;
    max-width: 540px !important;
    font-weight: 400 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75) !important;
}

/* Action CTAs */
.bajra-hero-3d__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.bajra-hero-3d__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
}

.bajra-hero-3d__btn--primary {
    background: linear-gradient(135deg, #8E1616 0%, #630c17 100%);
    color: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 6px 20px rgba(142, 22, 22, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bajra-hero-3d__btn--primary:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #aa841f 100%);
    color: #140305 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.bajra-hero-3d__btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.bajra-hero-3d__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #D4AF37;
    color: #D4AF37 !important;
    transform: translateY(-2px);
}

/* Interaction Hint */
.bajra-hero-3d__hint,
.bb-redesign .bajra-hero-3d__hint {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    color: rgba(255, 240, 226, 0.8) !important;
    letter-spacing: 0.05em !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.bajra-hero-3d__hint-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D4AF37;
    box-shadow: 0 0 8px #D4AF37;
    animation: bbPulse 2s infinite;
}

@keyframes bbPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

/* Floating Tooltip */
.bajra-hero-3d__tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    background: rgba(13, 2, 4, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(12px);
    max-width: 260px;
    transform: translate(0, 0);
    transition: opacity 0.15s ease;
}

.bajra-hero-3d__tooltip-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #D4AF37;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.bajra-hero-3d__tooltip-title,
.bb-redesign .bajra-hero-3d__tooltip-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 2px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.bajra-hero-3d__tooltip-author,
.bb-redesign .bajra-hero-3d__tooltip-author,
p.bajra-hero-3d__tooltip-author {
    font-size: 11.5px !important;
    color: #E8B96A !important;
    margin: 0 !important;
    font-style: italic !important;
}

/* Glassmorphism Book Details Panel (Modal) */
.bajra-hero-3d__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    background: rgba(18, 3, 6, 0.92);
    border: 1.5px solid rgba(212, 175, 55, 0.45);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 1000000;
    animation: bbPanelIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bbPanelIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.bajra-hero-3d__panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bajra-hero-3d__panel-close:hover {
    background: #8E1616;
    border-color: #D4AF37;
    color: #D4AF37;
    transform: rotate(90deg);
}

.bajra-hero-3d__panel-inner {
    display: flex;
    gap: 24px;
    align-items: center;
}

.bajra-hero-3d__panel-cover {
    width: 140px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: #200408;
}

.bajra-hero-3d__panel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bajra-hero-3d__panel-info {
    flex: 1;
    min-width: 0;
}

.bajra-hero-3d__panel-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.12);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.bajra-hero-3d__panel-title,
.bb-redesign .bajra-hero-3d__panel-title,
#bajra-panel-title {
    font-family: var(--bb-font-serif, 'Playfair Display', Georgia, serif) !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.25 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.bajra-hero-3d__panel-author,
.bb-redesign .bajra-hero-3d__panel-author,
#bajra-panel-author,
p#bajra-panel-author {
    font-family: var(--bb-font-sans, "Inter", sans-serif) !important;
    font-size: 13.5px !important;
    color: #E8B96A !important; /* luminous warm gold author text */
    margin: 0 0 10px 0 !important;
    font-style: italic !important;
    font-weight: 500 !important;
}

.bajra-hero-3d__panel-desc,
.bb-redesign .bajra-hero-3d__panel-desc,
#bajra-panel-desc,
p#bajra-panel-desc {
    font-family: var(--bb-font-sans, "Inter", sans-serif) !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    color: #F8F1E9 !important; /* crisp off-white/ivory text, 100% readable on dark card */
    margin: 0 0 14px 0 !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.bajra-hero-3d__panel-price,
.bb-redesign .bajra-hero-3d__panel-price,
#bajra-panel-price {
    display: block !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #E8B96A !important;
    margin-bottom: 14px !important;
}

.bajra-hero-3d__panel-btn {
    padding: 10px 20px;
    font-size: 11.5px;
    width: 100%;
}

/* WebGL Fallback */
.bajra-hero-3d__fallback {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 3;
}

.bajra-hero-3d__fallback-card {
    background: rgba(20, 3, 5, 0.85);
    border: 1px solid #D4AF37;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: #ffffff;
}

.bajra-hero-3d__fallback-card img {
    max-width: 150px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Mobile & Tablet Responsiveness */
@media screen and (max-width: 1024px) {
    .bajra-hero-3d {
        min-height: 90vh;
    }
    
    .bajra-hero-3d__content {
        max-width: 500px;
    }
}

@media screen and (max-width: 768px) {
    .bajra-hero-3d {
        min-height: 88vh;
        align-items: flex-start;
        padding-top: 40px;
    }

    .bajra-hero-3d__content {
        max-width: 100%;
        text-align: center;
    }

    .bajra-hero-3d__title {
        font-size: 34px;
        margin-bottom: 16px;
    }

    .bajra-hero-3d__description {
        font-size: 14px;
        margin: 0 auto 24px auto;
    }

    .bajra-hero-3d__actions {
        justify-content: center;
        gap: 10px;
    }

    .bajra-hero-3d__btn {
        padding: 12px 20px;
        font-size: 12px;
        width: 100%;
        max-width: 280px;
    }

    .bajra-hero-3d__hint {
        display: none;
    }

    .bajra-hero-3d__panel-inner {
        flex-direction: column;
        text-align: center;
    }

    .bajra-hero-3d__panel-cover {
        width: 110px;
        height: 155px;
    }
}
