/* ========================================
   కపిలవాయి లింగమూర్తి - Traditional Telugu Fonts
   మండలి(Headings) | మల్లన్న(Nav) | గురజాడ(Body) | NTR(Display)
======================================== */

/* Base Reset & Variables */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #fbbf24;
    --success-color: #059669;
    --warning-color: #d97706;
    --info-color: #0ea5e9;
    --dark-color: #1f2937;
    --light-bg: #f8fafc;
}

/* Telugu Font System */
html {
    font-feature-settings: 'liga' 1, 'clig' 1, 'kern' 1;
    scroll-behavior: smooth;
}

/* Body - గురజాడ Font */
.mandali-body {
    font-family: 'Mandali', 'Noto Sans Telugu', serif;
    font-weight: 400;
    line-height: 1.8;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Navigation - మల్లన్న Font */
.mallanna-nav { font-family: 'Mallanna', sans-serif !important; }
.mallanna-navlink, .mallanna-navlink * { 
    font-family: 'Mallanna', sans-serif !important; 
    font-weight: 500;
}
.mallanna-brand { 
    font-family: 'Mallanna', sans-serif !important; 
    font-weight: 700;
    font-size: 1.6rem;
}

/* Headings - మండలి Font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Mandali', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

/* Display Titles - NTR Font */
.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-family: 'NTR', sans-serif !important;
    font-weight: 700;
}

/* Navigation */
.navbar { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

.navbar-brand {
    font-family: 'Mallanna', sans-serif !important;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.nav-link {
    font-family: 'Mallanna', sans-serif !important;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 700;
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Hero Section - NTR Display */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 50%, #1d4ed8 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section h1 {
    font-family: 'NTR', 'Mandali', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .lead {
    font-family: 'Mandali', serif;
    font-weight: 500;
    font-size: 1.3rem;
}

/* Hero Center Text - Complete */
.hero-section {
    text-align: center;
}

.hero-section .lead.gurajada-body {
    font-family: 'Gurajada', serif;
    text-align: center !important;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.hero-section .fs-4.ntr-display {
    font-family: 'NTR', sans-serif;
    text-align: center !important;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: rgba(255, 255, 255, 0.95);
}

/* Visual Enhancement */
.hero-section p {
    padding: 0 2rem;
}



.gallery-img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    opacity: 0;
    transition: all 0.4s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.bg-gradient-primary { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }



@media (max-width: 768px) {
    .hero-section p {
        padding: 0 1rem;
    }
}


/* Sections */
section { padding: 80px 0; }
section.py-5 { padding: 5rem 0; }
.bg-light { background-color: var(--light-bg) !important; }

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-header {
    font-family: 'Mandali', sans-serif;
    font-weight: 700;
    border: none;
    padding: 1.25rem 1.5rem;
}

/* Buttons */
.btn {
    font-family: 'Mallanna', sans-serif;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Content */
.card-text, p, li {
    font-family: 'Mandali', serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    hyphens: auto;
}

.list-unstyled li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.list-unstyled li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'Mallanna', sans-serif;
}




/* Rachanalu Covers - 100% Working */
.cover-image {
    height: 320px;
    width: 100%;
    position: relative;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background-color: #e5e7eb; /* Fallback color */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Fallback Method */
.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Show image */
}

/* Default placeholder if no image */
.cover-image:not([style*="url"]):before {
    content: "పుస్తకం బొమ్మ";
    color: #6b7280;
    font-family: 'Gurajada', sans-serif;
    font-size: 1.2rem;
    z-index: 1;
}







/* Jeevita Sangraham Specific */
.mandali-heading { font-family: 'Mandali', sans-serif !important; }
.ntr-display { font-family: 'NTR', sans-serif !important; }
.gurajada-body { font-family: 'Gurajada', serif; }

/* Timeline Items */
.timeline-item .d-flex { gap: 1rem; }
.hover-card:hover { transform: translateY(-3px) !important; }

/* Gradient Headers */
.bg-gradient-primary { 
    background: linear-gradient(135deg, var(--primary-color), #3b82f6) !important; 
}
.bg-gradient-success { 
    background: linear-gradient(135deg, var(--success-color), #10b981) !important; 
}
.bg-gradient-warning { 
    background: linear-gradient(135deg, var(--warning-color), #f59e0b) !important; 
}


/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #111827);
    color: #d1d5db;
}

footer h5, footer h6 { font-family: 'Mandali', sans-serif; font-weight: 700; }
footer p, footer li { 
    font-family: 'Mandali', serif; 
    font-weight: 400;
    font-size: 0.95rem;
}

/* Forms */
.form-label { font-family: 'Mandali', sans-serif; font-weight: 600; }
.form-control::placeholder { 
    font-family: 'Mandali', serif; 
    font-weight: 400; 
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.2rem; }
    section { padding: 60px 0; }
    .navbar-brand { font-size: 1.4rem; }
    .nav-link { font-size: 0.95rem; }
}

@media (max-width: 576px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .hero-section { min-height: 50vh; padding: 2rem 0; }
}

/* Print */
@media print {
    .navbar, footer { display: none; }
    .hero-section { background: white !important; color: black !important; }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .card { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
    .nav-link { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
}
