/* ==========================================================================
   REKHTA TYPOGRAPHY, GLASSMORPHISM & 3D DESIGN UPGRADE FOR RAMESH KANWAL
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400;1,600&family=Noto+Nastaliq+Urdu:wght@400;600;700&family=Noto+Serif+Devanagari:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Rozha+One&display=swap');

/* --- Rekhta Multi-Script Typography --- */
.font-urdu, [lang="ur"] {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaliq', serif !important;
    line-height: 2.5 !important;
    direction: rtl;
}

.font-hindi, [lang="hi"] {
    font-family: 'Noto Serif Devanagari', 'Rozha One', 'Hind', serif !important;
    line-height: 2.0 !important;
    direction: ltr;
}

.font-roman, [lang="ro"] {
    font-family: 'Lora', 'Playfair Display', serif !important;
    line-height: 1.9 !important;
    font-style: italic;
    direction: ltr;
}

/* Rekhta Dotted Word Meaning Underline */
.word-meaning {
    position: relative;
    cursor: pointer;
    border-bottom: 2px dotted #C5A059;
    transition: all 0.25s ease;
    display: inline-block;
    padding: 0 4px;
    border-radius: 4px;
}

.word-meaning:hover {
    color: #C5A059;
    background: rgba(197, 160, 89, 0.18);
    border-bottom-style: solid;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.35);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(197, 160, 89, 0.25) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

.glass-panel-dark {
    background: rgba(18, 21, 28, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(197, 160, 89, 0.3) !important;
    border-radius: 20px !important;
    color: #ffffff !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35) !important;
}

/* 3D Visual Effects */
.stat-card, .book-card .card, .card.h-100 {
    perspective: 1000px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-card:hover, .book-card .card:hover, .card.h-100:hover {
    transform: perspective(1000px) rotateX(4deg) rotateY(-4deg) translateY(-8px) translateZ(12px) !important;
    border-color: #C5A059 !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 25px rgba(197, 160, 89, 0.25) !important;
}

.btn-3d-gold {
    background: linear-gradient(135deg, #C5A059 0%, #9E7515 100%) !important;
    color: #12151c !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.75rem 2rem !important;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transition: all 0.3s ease !important;
}

.btn-3d-gold:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(197, 160, 89, 0.6) !important;
    color: #000 !important;
}

/* Rekhta Dictionary Floating Modal */
.rekhta-dict-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.rekhta-dict-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rekhta-dict-card {
    background: #191c24;
    border: 1px solid #C5A059;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    padding: 2rem;
    color: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(197, 160, 89, 0.3);
    transform: scale(0.85) translateY(30px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rekhta-dict-overlay.active .rekhta-dict-card {
    transform: scale(1) translateY(0);
}

/* ==========================================================================
   Full Homepage Glassmorphism & 3D Elevation System
   ========================================================================== */

/* Glass Card 3D Light (Parchment Theme) */
.glass-card-3d {
    background: rgba(253, 251, 247, 0.82) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(197, 160, 89, 0.35) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(122, 12, 30, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative;
    overflow: hidden;
}

.glass-card-3d:hover {
    transform: translateY(-8px) scale(1.015) rotateX(1.5deg) !important;
    box-shadow: 
        0 24px 50px rgba(122, 12, 30, 0.15),
        0 8px 24px rgba(197, 160, 89, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    border-color: rgba(197, 160, 89, 0.6) !important;
}

/* Glass Card 3D Dark (Royal Crimson Theme) */
.glass-card-dark-3d {
    background: linear-gradient(135deg, rgba(122, 12, 30, 0.92) 0%, rgba(74, 5, 16, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
    border: 1px solid rgba(197, 160, 89, 0.4) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 24px !important;
    box-shadow: 
        0 20px 45px rgba(26, 2, 5, 0.35),
        0 6px 18px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.glass-card-dark-3d:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 
        0 28px 60px rgba(26, 2, 5, 0.45),
        0 10px 30px rgba(197, 160, 89, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(197, 160, 89, 0.75) !important;
}

/* 3D Ambient Background Layer */
.glass-section-wrapper {
    position: relative;
    background: #FDFBF7;
    overflow: hidden;
}

.glass-section-wrapper::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.18) 0%, rgba(253, 251, 247, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.glass-section-wrapper::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(122, 12, 30, 0.12) 0%, rgba(253, 251, 247, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* 3D Photo Border Rim */
.glass-photo-rim-3d {
    position: relative;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.6) 0%, rgba(122, 12, 30, 0.4) 100%);
    box-shadow: 
        0 16px 40px rgba(122, 12, 30, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-photo-rim-3d:hover {
    transform: scale(1.03) rotate(1.5deg);
    box-shadow: 
        0 24px 50px rgba(122, 12, 30, 0.35),
        0 0 30px rgba(197, 160, 89, 0.4);
}

/* 3D Badge Chip */
.badge-3d-gold {
    background: linear-gradient(135deg, #C5A059 0%, #D4AF37 100%) !important;
    color: #4A0510 !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
}
