/*
 * Odia Sanskruti — "Kalinga" Design System
 * v4.0 — A living temple experience, not a website
 * 
 * Design Philosophy:
 * Every section is a "hall" in a temple complex.
 * You walk through Vimana → Jagamohana → Natya Mandapa → Bhoga Mandapa.
 * Borders are Pattachitra frames. Transitions flow like temple spires.
 * Colors are Rajarani sandstone, temple stone, and sacred saffron.
 *
 * Anti-patterns:
 * ❌ No bento grids (this isn't a dashboard)
 * ❌ No glassmorphism (temples don't have glass)
 * ❌ No neon/glow effects (temples glow from within, not with LEDs)
 * ❌ No floating particles (too sci-fi — use floating lotus petals instead)
 * ❌ No card tilts (content should feel grounded, like stone carvings)
 * ✅ Textured backgrounds (sandstone grain)
 * ✅ Ornamental borders (Pattachitra-inspired SVG)
 * ✅ Flowing transitions (Rekha Deula curves)
 * ✅ Depth through shadows (temple stone layers)
 * ✅ Warm, organic palette (Rajarani gold + temple stone)
 */

/* ============================================
   KALINGA DESIGN TOKENS
   ============================================ */
:root {
    /* Sandstone — the foundation */
    --kl-sandstone: #F5E6C8;
    --kl-sandstone-warm: #E8D5B0;
    --kl-sandstone-deep: #D4C4A0;
    --kl-cream: #FFF9F0;
    --kl-parchment: #FAF0E4;
    
    /* Temple Stone */
    --kl-stone: #C4A882;
    --kl-stone-dark: #8B7355;
    --kl-stone-shadow: #6B5740;
    --kl-granite: #4A3F35;
    --kl-charcoal: #2C2520;
    
    /* Sacred Colors */
    --kl-saffron: #D4722A;
    --kl-saffron-deep: #B85A18;
    --kl-vermillion: #C1440E;
    --kl-maroon: #7B1818;
    --kl-maroon-deep: #4A0E0E;
    --kl-gold: #C9A84C;
    --kl-gold-bright: #E8C84A;
    --kl-lotus: #E8A0B4;
    --kl-lotus-deep: #C46A82;
    --kl-turmeric: #D4A843;
    
    /* Nature */
    --kl-palm: #5B8C3E;
    --kl-palm-deep: #3D6B2A;
    --kl-chilika: #4A8B8B;
    --kl-chilika-deep: #2D5F5F;
    --kl-sky: #B8D4E3;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-odia: 'Noto Sans Oriya', sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-devanagari: 'Tiro Devanagari Odia', serif;
    
    /* Spacing (temple proportions) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-xxl: 64px;
    --space-section: 96px;
    --space-hall: 128px;
    
    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    
    /* Shadows (temple stone depth) */
    --shadow-sm: 0 1px 3px rgba(44, 37, 32, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 37, 32, 0.1), 0 1px 3px rgba(44, 37, 32, 0.06);
    --shadow-lg: 0 8px 30px rgba(44, 37, 32, 0.12), 0 2px 8px rgba(44, 37, 32, 0.08);
    --shadow-xl: 0 16px 50px rgba(44, 37, 32, 0.15), 0 4px 16px rgba(44, 37, 32, 0.1);
    --shadow-stone: 0 2px 4px rgba(139, 115, 85, 0.15), 0 8px 20px rgba(139, 115, 85, 0.1);
    
    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --transition: 0.3s var(--ease);
    --transition-slow: 0.6s var(--ease);
    
    /* Textures */
    --texture-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ============================================
   BASE RESET
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

::selection {
    background: rgba(212, 114, 42, 0.2);
    color: var(--kl-maroon);
}

*:focus-visible {
    outline: 2px solid var(--kl-saffron);
    outline-offset: 2px;
}

a, button, [role="button"] { cursor: pointer; }

body {
    background: var(--kl-cream);
    color: var(--kl-charcoal);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.odia-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--kl-saffron);
    color: white;
    padding: 8px 16px;
    z-index: 99999;
    font-size: 14px;
    transition: top 0.2s;
}

.odia-skip-link:focus { top: 80px; }

/* ============================================
   KALINGA PATACHITRA BORDER SYSTEM
   ============================================ */

/* Top ornamental border — lotus chain */
.kl-pattachitra-top {
    height: 6px;
    background: linear-gradient(90deg, 
        var(--kl-saffron) 0%, var(--kl-gold) 20%, var(--kl-lotus) 40%, 
        var(--kl-gold) 60%, var(--kl-saffron) 80%, var(--kl-maroon) 100%);
    position: relative;
}

.kl-pattachitra-top::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: repeating-linear-gradient(90deg,
        transparent 0px, transparent 8px,
        var(--kl-saffron) 8px, var(--kl-saffron) 9px,
        transparent 9px, transparent 20px
    );
    opacity: 0.3;
}

/* Bottom border — inverted lotus chain */
.kl-pattachitra-bottom {
    height: 6px;
    background: linear-gradient(90deg,
        var(--kl-maroon) 0%, var(--kl-saffron) 20%, var(--kl-gold) 40%,
        var(--kl-lotus) 60%, var(--kl-gold) 80%, var(--kl-saffron) 100%);
    position: relative;
}

/* Torana — arched section entrance */
.kl-torana {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
    position: relative;
}

.kl-torana::before,
.kl-torana::after {
    content: '🪷';
    font-size: 20px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
}

.kl-torana::before { left: 10%; }
.kl-torana::after { right: 10%; }

.kl-torana-title {
    font-family: var(--font-odia);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--kl-maroon);
    margin: 0;
    display: inline-block;
    position: relative;
}

.kl-torana-title::before,
.kl-torana-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kl-gold), transparent);
}

.kl-torana-title::before { right: calc(100% + 16px); }
.kl-torana-title::after { left: calc(100% + 16px); }

.kl-torana-sub {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--kl-stone-dark);
    margin-top: var(--space-xs);
}

/* Lotus divider */
.kl-lotus-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-xl) auto;
    max-width: 300px;
}

.kl-lotus-divider::before,
.kl-lotus-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kl-stone), transparent);
}

.kl-lotus-divider-icon {
    font-size: 18px;
    animation: kl-float 4s ease-in-out infinite;
}

@keyframes kl-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   NAVIGATION — Temple Gateway
   ============================================ */
.kl-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: var(--transition);
}

.kl-nav-scrolled {
    background: rgba(255, 249, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(196, 168, 130, 0.2);
    box-shadow: 0 2px 20px rgba(44, 37, 32, 0.06);
    padding: var(--space-sm) 0;
}

.kl-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand */
.kl-nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.kl-nav-brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--kl-saffron), var(--kl-maroon));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.kl-nav:hover .kl-nav-brand-icon {
    transform: scale(1.05);
}

.kl-nav-brand-odia {
    display: block;
    font-family: var(--font-odia);
    font-size: 18px;
    font-weight: 700;
    color: var(--kl-charcoal);
    line-height: 1.2;
}

.kl-nav-brand-en {
    display: block;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kl-stone-dark);
}

/* Desktop menu */
.kl-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kl-nav-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--kl-charcoal);
    font-size: 13px;
    font-family: var(--font-odia);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.kl-nav-menu a .nav-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.kl-nav-menu a .nav-en {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--kl-stone-dark);
    letter-spacing: 0.5px;
}

.kl-nav-menu a:hover {
    background: var(--kl-sandstone);
    color: var(--kl-saffron-deep);
}

.kl-nav-menu a.active {
    background: linear-gradient(135deg, var(--kl-sandstone), var(--kl-sandstone-warm));
    color: var(--kl-maroon);
}

/* Search */
.kl-nav-search {
    position: relative;
}

.kl-nav-search input {
    background: var(--kl-sandstone);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-family: var(--font-odia);
    font-size: 13px;
    color: var(--kl-charcoal);
    width: 180px;
    transition: var(--transition);
}

.kl-nav-search input:focus {
    outline: none;
    border-color: var(--kl-saffron);
    background: white;
    width: 220px;
    box-shadow: 0 0 0 3px rgba(212, 114, 42, 0.1);
}

/* Mobile toggle */
.kl-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--kl-stone);
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--kl-charcoal);
    cursor: pointer;
}

/* Mobile overlay */
.kl-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--kl-cream);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xxl);
}

.kl-mobile-overlay.kl-mobile-active { display: flex; }

.kl-mobile-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--kl-charcoal);
    cursor: pointer;
}

.kl-mobile-overlay a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    text-decoration: none;
    color: var(--kl-charcoal);
    font-family: var(--font-odia);
    font-size: 20px;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    width: 100%;
    max-width: 320px;
}

.kl-mobile-overlay a:hover {
    background: var(--kl-sandstone);
    color: var(--kl-saffron-deep);
}

.kl-mobile-overlay .mobile-en {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--kl-stone-dark);
    margin-left: auto;
}

/* ============================================
   HERO — The Vimana (Sanctum Entrance)
   ============================================ */
.kl-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide backgrounds */
.kl-hero-slides {
    position: absolute;
    inset: 0;
}

.kl-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s var(--ease);
    animation: kl-kenburns 20s ease-in-out infinite;
}

.kl-hero-slide.active { opacity: 1; }

@keyframes kl-kenburns {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Stone texture overlay */
.kl-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, 
            rgba(44, 37, 32, 0.3) 0%, 
            rgba(44, 37, 32, 0.1) 40%, 
            rgba(44, 37, 32, 0.4) 100%),
        var(--texture-grain);
    z-index: 1;
    pointer-events: none;
}

/* Hero content */
.kl-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 var(--space-lg);
    max-width: 800px;
}

.kl-hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    color: var(--kl-sandstone);
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(8px);
}

.kl-hero-title-or {
    display: block;
    font-family: var(--font-odia);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 700;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    margin-bottom: var(--space-sm);
}

.kl-hero-title-en {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    margin-bottom: var(--space-xl);
}

.kl-hero-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-xxl);
}

.kl-hero-pill {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-odia);
    font-size: 13px;
    backdrop-filter: blur(4px);
}

.kl-hero-pills .kl-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
}

.kl-hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* CTA Buttons */
.kl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--kl-saffron), var(--kl-vermillion));
    color: white;
    text-decoration: none;
    font-family: var(--font-odia);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 16px rgba(212, 114, 42, 0.3);
    transition: var(--transition);
}

.kl-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 114, 42, 0.4);
}

.kl-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    font-family: var(--font-odia);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.kl-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero indicators */
.kl-hero-indicators {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: var(--space-sm);
}

.kl-hero-dot {
    width: 32px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.kl-hero-dot.active {
    background: var(--kl-sandstone);
    width: 48px;
}

/* Scroll down indicator */
.kl-scroll-hint {
    position: absolute;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: kl-bounce 2s ease-in-out infinite;
}

@keyframes kl-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   HALL SYSTEM — Temple Room Sections
   ============================================ */

/* Each section is a "hall" in the temple */
.kl-hall {
    padding: var(--space-section) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Sandstone hall */
.kl-hall-stone {
    background: var(--kl-sandstone);
    background-image: var(--texture-grain);
}

/* Parchment hall */  
.kl-hall-parchment {
    background: var(--kl-parchment);
}

/* Dark hall — for contrast sections */
.kl-hall-dark {
    background: linear-gradient(135deg, var(--kl-charcoal), var(--kl-granite));
    color: var(--kl-sandstone);
}

/* Maroon hall — sacred */
.kl-hall-sacred {
    background: linear-gradient(135deg, var(--kl-maroon), var(--kl-maroon-deep));
    color: var(--kl-sandstone);
}

/* ============================================
   EDITORIAL INTRO — The Jagamohana
   ============================================ */
.kl-intro {
    text-align: center;
    padding: var(--space-section) var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.kl-intro-odia {
    font-family: var(--font-odia);
    font-size: clamp(20px, 3vw, 28px);
    color: var(--kl-charcoal);
    line-height: 1.9;
    margin: 0 0 var(--space-lg);
}

.kl-drop-cap {
    float: left;
    font-family: var(--font-heading);
    font-size: 3.8em;
    line-height: 1;
    padding: 0 var(--space-sm) 0 0;
    padding-top: 0.05em;
    color: var(--kl-saffron);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(212, 114, 42, 0.3);
    position: relative;
    top: 0.05em;
}

.kl-intro-en {
    font-family: var(--font-heading);
    font-size: clamp(15px, 2vw, 18px);
    color: var(--kl-stone-dark);
    letter-spacing: 0.5px;
    line-height: 1.8;
    margin: 0;
}

/* ============================================
   CATEGORY EXPLORE — The Natya Mandapa
   ============================================ */
.kl-explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.kl-explore-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) var(--space-md);
    background: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--kl-charcoal);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(196, 168, 130, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kl-explore-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--item-color, var(--kl-saffron));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kl-explore-item:hover::after {
    transform: scaleX(1);
}

.kl-explore-item[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.93), rgba(245, 240, 230, 0.9));
    z-index: 0;
    transition: var(--transition);
}

.kl-explore-item[style*="background-image"]:hover::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(245, 240, 230, 0.72));
}

.kl-explore-item > * { position: relative; z-index: 1; }

.kl-explore-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--item-color, var(--kl-saffron));
    transform: scaleX(0);
    transition: transform 0.3s var(--ease);
}

.kl-explore-item:hover::before { transform: scaleX(1); }

.kl-explore-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* Enhanced Category Cards */
.kl-explore-item[style*="background-image"].kl-cat-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.65) 100%);
    z-index: 1;
    border-radius: inherit;
    transition: all 0.4s ease;
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced:hover::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.5) 100%);
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--item-color);
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced:hover .kl-cat-arrow {
    opacity: 1;
    transform: translateX(0);
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced:hover .kl-cat-glow {
    opacity: 0.5 !important;
}
/* Pattachitra border effect on categories */
.kl-explore-item[style*="background-image"].kl-cat-enhanced::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
    transition: border-color 0.3s ease;
}
.kl-explore-item[style*="background-image"].kl-cat-enhanced:hover::after {
    border-color: rgba(201, 168, 76, 0.6);
}

/* Fact cards */
.kl-fact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* White text for enhanced category cards on dark overlay */
.kl-cat-enhanced:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--item-color) !important;
}
.kl-cat-enhanced:hover > div > div:last-child > div:last-child {
    opacity: 1;
    transform: translateX(0);
}
.kl-cat-enhanced::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
    transition: border-color 0.3s ease;
}
.kl-cat-enhanced:hover::after {
    border-color: rgba(201, 168, 76, 0.5);
}

.kl-explore-icon {
    font-size: 32px;
    margin-bottom: var(--space-md);
    transition: var(--transition);
}

.kl-explore-item:hover .kl-explore-icon {
    transform: scale(1.15);
}

.kl-explore-odia {
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 600;
    color: var(--kl-charcoal);
    text-align: center;
}

.kl-explore-en {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--kl-stone-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    text-align: center;
}

/* ============================================
   ARTICLE CARDS — Carved Stone Tablets
   ============================================ */
.kl-grid {
    display: grid;
    gap: var(--space-lg);
}

.kl-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kl-grid-2 { grid-template-columns: repeat(2, 1fr); }

.kl-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(196, 168, 130, 0.1);
    transition: var(--transition);
}

.kl-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.kl-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--kl-sandstone);
}

.kl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.kl-card:hover .kl-card-image img {
    transform: scale(1.04);
}

.kl-card-category {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    padding: 4px 12px;
    background: rgba(44, 37, 32, 0.75);
    backdrop-filter: blur(8px);
    color: var(--kl-sandstone);
    font-family: var(--font-odia);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: var(--transition);
}

.kl-card-category:hover {
    background: var(--kl-saffron);
    color: white;
}

.kl-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.kl-card-body {
    padding: var(--space-lg);
}

.kl-card-title {
    font-family: var(--font-odia);
    font-size: 17px;
    font-weight: 600;
    color: var(--kl-charcoal);
    line-height: 1.5;
    margin: 0 0 var(--space-sm);
}

.kl-card-title a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.kl-card-title a:hover { color: var(--kl-saffron-deep); }

.kl-card-excerpt {
    font-size: 14px;
    color: var(--kl-stone-dark);
    line-height: 1.7;
    margin: 0 0 var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kl-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 12px;
    color: var(--kl-stone);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(196, 168, 130, 0.15);
}

.kl-card-date { color: var(--kl-stone-dark); }

.kl-card-reading {
    margin-left: auto;
    color: var(--kl-stone);
    font-size: 12px;
}

/* Featured card — wide, editorial */
.kl-card-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(196, 168, 130, 0.1);
    transition: var(--transition);
}

.kl-card-featured:hover {
    box-shadow: var(--shadow-xl);
}

.kl-card-featured .kl-card-image {
    aspect-ratio: auto;
    height: 100%;
}

.kl-card-featured .kl-card-body {
    padding: var(--space-xxl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kl-card-featured .kl-card-title {
    font-size: 22px;
    line-height: 1.4;
}

.kl-card-featured .kl-card-excerpt {
    -webkit-line-clamp: 4;
}

/* ============================================
   STATS — Sacred Numbers
   ============================================ */
.kl-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
    padding: var(--space-section) var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.kl-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    color: var(--kl-gold-bright);
    line-height: 1;
}

.kl-stat-label {
    font-family: var(--font-odia);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-sm);
}

/* ============================================
   ABOUT TEASER
   ============================================ */
.kl-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
}

.kl-about-odia {
    font-family: var(--font-odia);
    font-size: 18px;
    color: var(--kl-charcoal);
    line-height: 2;
}

.kl-about-en {
    font-size: 16px;
    color: var(--kl-stone-dark);
    line-height: 1.9;
}

/* ============================================
   NEWSLETTER — The Bhoga Mandapa
   ============================================ */
.kl-newsletter {
    text-align: center;
    padding: var(--space-section) var(--space-lg);
    max-width: 600px;
    margin: 0 auto;
}

.kl-newsletter-icon {
    font-size: 36px;
    margin-bottom: var(--space-md);
}

.kl-newsletter-title {
    font-family: var(--font-odia);
    font-size: 28px;
    font-weight: 700;
    color: var(--kl-charcoal);
    margin: 0 0 var(--space-sm);
}

.kl-newsletter-sub {
    font-size: 14px;
    color: var(--kl-stone-dark);
    margin: 0 0 var(--space-xl);
}

.kl-newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 480px;
    margin: 0 auto;
}

.kl-newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--kl-stone);
    border-radius: var(--radius-pill);
    font-family: var(--font-odia);
    font-size: 14px;
    background: white;
    color: var(--kl-charcoal);
    transition: var(--transition);
}

.kl-newsletter-form input:focus {
    outline: none;
    border-color: var(--kl-saffron);
    box-shadow: 0 0 0 3px rgba(212, 114, 42, 0.1);
}

.kl-newsletter-form button {
    padding: 14px 28px;
    background: var(--kl-saffron);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.kl-newsletter-form button:hover {
    background: var(--kl-saffron-deep);
}

/* ============================================
   FOOTER — The Temple Boundary
   ============================================ */
.kl-footer {
    background: var(--kl-charcoal);
    color: var(--kl-sandstone);
    padding: var(--space-section) var(--space-lg) var(--space-lg);
}

.kl-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xxl);
}

.kl-footer-brand-name {
    font-family: var(--font-odia);
    font-size: 22px;
    font-weight: 700;
    color: var(--kl-sandstone);
}

.kl-footer-brand-en {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--kl-stone);
    margin-top: 2px;
}

.kl-footer-desc {
    font-size: 14px;
    color: rgba(245, 230, 200, 0.6);
    margin-top: var(--space-lg);
    line-height: 1.8;
}

.kl-footer-heading {
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 600;
    color: var(--kl-sandstone);
    margin-bottom: var(--space-lg);
}

.kl-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kl-footer-links li { margin-bottom: var(--space-sm); }

.kl-footer-links a {
    color: rgba(245, 230, 200, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.kl-footer-links a:hover { color: var(--kl-saffron); }

.kl-footer-bottom {
    max-width: 1200px;
    margin: var(--space-xxl) auto 0;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(196, 168, 130, 0.15);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(245, 230, 200, 0.4);
}

/* ============================================
   SCROLL PROGRESS — Temple Path
   ============================================ */
.kl-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kl-saffron), var(--kl-gold), var(--kl-lotus));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============================================
   BACK TO TOP
   ============================================ */

/* Reading Progress Circle */
.kl-reading-circle {
    position: fixed;
    bottom: calc(var(--space-xl) + 56px);
    left: calc(var(--space-xl) + 0px);
    width: 44px;
    height: 44px;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.kl-reading-circle.kl-visible {
    opacity: 1;
}

.kl-reading-circle svg {
    position: absolute;
    top: 0;
    left: 0;
}

.kl-reading-circle-text {
    font-size: 9px;
    font-weight: 700;
    color: var(--kl-saffron);
    z-index: 1;
}

.kl-back-top {
    position: fixed;
    bottom: var(--space-xl);
    left: var(--space-xl);
    width: 44px;
    height: 44px;
    background: var(--kl-saffron);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}
.kl-back-top.kl-visible {
    opacity: 1;
    transform: translateY(0);
}

.kl-back-top:hover {
    background: var(--kl-saffron-deep);
    transform: translateY(-2px);
}

/* ============================================
   SCROLL REVEALS
   ============================================ */
.kl-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.kl-reveal.kl-revealed {
    opacity: 1;
    transform: translateY(0);
}

.kl-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.kl-stagger > *.kl-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PAGE LOADER — Temple Bell
   ============================================ */
.kl-loader {
    position: fixed;
    inset: 0;
    background: var(--kl-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s var(--ease);
}

.kl-loader-done { opacity: 0; pointer-events: none; }

.kl-loader-bell {
    width: 48px;
    height: 48px;
    border: 3px solid var(--kl-sandstone);
    border-top-color: var(--kl-saffron);
    border-radius: 50%;
    animation: kl-spin 1s linear infinite;
}

@keyframes kl-spin { to { transform: rotate(360deg); } }

.kl-loader-text {
    margin-top: var(--space-lg);
    font-family: var(--font-odia);
    font-size: 18px;
    color: var(--kl-stone-dark);
}

/* ============================================
   PAGE HERO (About, Contact)
   ============================================ */
.kl-page-hero {
    position: relative;
    height: 40vh;
    min-height: 280px;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kl-maroon) 0%, var(--kl-maroon-deep) 50%, var(--kl-charcoal) 100%);
    background-size: cover;
    background-position: center;
}

.kl-page-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(44, 37, 32, 0.2) 0%,
            rgba(44, 37, 32, 0.5) 100%),
        var(--texture-grain);
    z-index: 1;
}

.kl-page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--space-lg);
}

.kl-page-hero .kl-hero-title-or {
    font-size: clamp(28px, 5vw, 44px);
    margin-bottom: 0;
}

.kl-page-hero .kl-hero-title-en {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.kl-lang-switch {
    position: fixed;
    bottom: calc(var(--space-xl) + 164px);
    left: var(--space-xl);
    z-index: 999;
    display: flex;
    background: var(--kl-charcoal);
    border-radius: var(--radius-pill);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(196, 168, 130, 0.2);
}

.kl-lang-btn {
    padding: 8px 16px;
    background: transparent;
    color: rgba(245, 230, 200, 0.6);
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.kl-lang-btn:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.kl-lang-btn:last-child { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }

.kl-lang-btn.kl-lang-active {
    background: var(--kl-saffron);
    color: white;
}

.kl-lang-btn:hover:not(.kl-lang-active) {
    color: var(--kl-sandstone);
    background: rgba(245, 230, 200, 0.08);
}

/* Language states */
body.kl-lang-or .kl-en-only { display: none !important; }
body.kl-lang-en .kl-or-only { display: none !important; }

/* Fallback if no JS: show both */
.kl-en-only, .kl-or-only {
    transition: opacity 0.25s var(--ease);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.kl-contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xxl);
}

.kl-form-group {
    margin-bottom: var(--space-lg);
}

.kl-form-group label {
    display: block;
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 500;
    color: var(--kl-charcoal);
    margin-bottom: var(--space-sm);
}

.kl-form-group input,
.kl-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--kl-stone);
    border-radius: var(--radius-md);
    font-family: var(--font-odia);
    font-size: 14px;
    background: white;
    color: var(--kl-charcoal);
    transition: var(--transition);
}

.kl-form-group input:focus,
.kl-form-group textarea:focus {
    outline: none;
    border-color: var(--kl-saffron);
    box-shadow: 0 0 0 3px rgba(212, 114, 42, 0.1);
}

.kl-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.kl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.kl-contact-submit {
    width: 100%;
    padding: 14px;
    background: var(--kl-saffron);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-odia);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.kl-contact-submit:hover {
    background: var(--kl-saffron-deep);
}

.kl-info-card {
    padding: var(--space-xl);
    background: var(--kl-parchment);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(196, 168, 130, 0.2);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: var(--transition);
}

.kl-info-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kl-info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.kl-info-card h3 {
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 600;
    color: var(--kl-charcoal);
    margin: 0 0 4px;
}

.kl-info-card p {
    font-size: 13px;
    color: var(--kl-stone-dark);
    margin: 0;
}

.kl-info-card a {
    color: var(--kl-saffron-deep);
    text-decoration: none;
}

.kl-info-card a:hover { text-decoration: underline; }

/* Social pills */
.kl-social-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: var(--space-xl);
    background: var(--kl-sandstone);
    border-radius: var(--radius-lg);
}

.kl-social-pill {
    padding: 8px 16px;
    background: white;
    border: 1px solid rgba(196, 168, 130, 0.2);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--kl-stone-dark);
    text-decoration: none;
    transition: var(--transition);
}

.kl-social-pill:hover {
    background: var(--kl-saffron);
    color: white;
    border-color: var(--kl-saffron);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 114, 42, 0.25);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1440px) {
    .kl-hall, .kl-intro, .kl-newsletter, .kl-stats { max-width: 1100px; }
}

@media (max-width: 1024px) {
    .kl-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .kl-grid-2 { grid-template-columns: 1fr; }
    .kl-card-featured { grid-template-columns: 1fr; }
    .kl-footer-inner { grid-template-columns: 1fr 1fr; }
    .kl-stats { grid-template-columns: repeat(2, 1fr); }
    .kl-about-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
    .kl-contact-grid { grid-template-columns: 1fr; }
    .kl-nav-menu { display: none; }
    .kl-nav-search { display: none; }
    .kl-nav-toggle { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 768px) {
    .kl-grid-3 { grid-template-columns: 1fr; }
    .kl-explore-grid { grid-template-columns: repeat(2, 1fr); }
    .kl-form-row { grid-template-columns: 1fr; }
    .kl-newsletter-form { flex-direction: column; }
    .kl-hero-title-or { font-size: clamp(26px, 7vw, 40px); }
    .kl-hero-pills { gap: 4px; }
    .kl-hero-pill { font-size: 11px; padding: 4px 10px; }
    .kl-footer-inner { grid-template-columns: 1fr; }
    .kl-footer-bottom { flex-direction: column; gap: var(--space-sm); }
    .kl-scroll-hint { display: none; }
    .kl-torana::before, .kl-torana::after { display: none; }
    .kl-torana-title::before, .kl-torana-title::after { width: 30px; }
}

@media (max-width: 480px) {
    .kl-explore-grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
    .kl-explore-item { padding: var(--space-lg) var(--space-sm); }
    .kl-explore-icon { font-size: 24px; }
    .kl-hero-cta-group { flex-direction: column; }
    .kl-btn-primary, .kl-btn-secondary { justify-content: center; }
}

/* ============================================
   SINGLE POST BODY
   ============================================ */
.kl-single-body {
    font-family: var(--font-odia, 'Noto Sans Oriya'), 'Noto Sans', Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 2 !important;
    color: #2C2520 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.kl-single-body * {
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
}

.kl-single-body p {
    color: #2C2520 !important;
    font-size: 17px !important;
    margin-bottom: 1em !important;
}

.kl-single-body h1,
.kl-single-body h2,
.kl-single-body h3,
.kl-single-body h4,
.kl-single-body h5,
.kl-single-body h6 {
    font-family: var(--font-odia, 'Noto Sans Oriya'), 'Noto Sans', Arial, sans-serif !important;
    color: #7B1818 !important;
    line-height: 1.4;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.kl-single-body h2 {
    font-size: 24px;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--kl-sandstone);
}

.kl-single-body h3 { font-size: 20px; }

.kl-single-body p {
    margin: 0 0 var(--space-lg);
}

.kl-single-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-md);
}

.kl-single-body a {
    color: var(--kl-saffron-deep);
    text-decoration: underline;
    text-decoration-color: rgba(184, 90, 24, 0.3);
    text-underline-offset: 2px;
    transition: var(--transition);
}

.kl-single-body a:hover {
    text-decoration-color: var(--kl-saffron-deep);
}

.kl-single-body blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl) var(--space-lg) var(--space-xxl);
    background: var(--kl-parchment);
    border-left: 4px solid var(--kl-saffron);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--kl-stone-dark);
}

.kl-single-body ul,
.kl-single-body ol {
    margin: 0 0 var(--space-lg);
    padding-left: var(--space-xl);
}

.kl-single-body li {
    margin-bottom: var(--space-sm);
}

.kl-single-body code {
    background: var(--kl-sandstone);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.kl-single-body pre {
    background: var(--kl-charcoal);
    color: var(--kl-sandstone);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

.kl-single-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.kl-single-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
}

.kl-single-body th,
.kl-single-body td {
    padding: var(--space-md);
    border: 1px solid var(--kl-sandstone-deep);
    text-align: left;
}

.kl-single-body th {
    background: var(--kl-sandstone);
    font-weight: 600;
}

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a {
    background: white;
    color: var(--kl-charcoal);
    border: 1px solid var(--kl-sandstone-deep);
}

.nav-links a:hover {
    background: var(--kl-saffron);
    color: white;
    border-color: var(--kl-saffron);
}

.nav-links .current {
    background: var(--kl-saffron);
    color: white;
    border: 1px solid var(--kl-saffron);
}

.nav-links .dots {
    background: none;
    border: none;
    color: var(--kl-stone);
}

/* ============================================
   READING PROGRESS (Single Posts)
   ============================================ */
.kl-reading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kl-saffron), var(--kl-gold), var(--kl-lotus));
    z-index: 5;
    width: 0;
    transition: width 0.1s linear;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.kl-breadcrumb {
    background: var(--kl-sandstone);
    border-bottom: 1px solid rgba(196, 168, 130, 0.2);
}

.kl-breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    flex-wrap: wrap;
}

.kl-breadcrumb a {
    color: var(--kl-saffron-deep);
    text-decoration: none;
    transition: var(--transition);
}

.kl-breadcrumb a:hover { color: var(--kl-maroon); }

.kl-breadcrumb-sep {
    color: var(--kl-stone);
    font-size: 14px;
}

.kl-breadcrumb-current {
    color: var(--kl-stone-dark);
    font-weight: 500;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.kl-toc {
    background: var(--kl-parchment);
    border: 1px solid rgba(196, 168, 130, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xxl);
}

.kl-toc-title {
    font-family: var(--font-odia);
    font-size: 16px;
    font-weight: 600;
    color: var(--kl-maroon);
    margin-bottom: var(--space-md);
}

.kl-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kl-toc-list li {
    margin-bottom: var(--space-xs);
}

.kl-toc-list a {
    display: block;
    padding: 6px 12px;
    color: var(--kl-charcoal);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.kl-toc-list a:hover,
.kl-toc-list a.kl-toc-active {
    background: var(--kl-sandstone);
    border-left-color: var(--kl-saffron);
    color: var(--kl-saffron-deep);
}

.kl-toc-list .kl-toc-h3 {
    padding-left: var(--space-xl);
    font-size: 13px;
}

/* ============================================
   ARTICLE CONTENT CLASSES (no inline styles)
   ============================================ */
.kl-single-body .kl-intro {
    font-size: 1.1em;
    font-style: italic;
    color: #6a6258;
    margin-bottom: 1.5em;
    line-height: 2;
}
.kl-dark-mode .kl-single-body .kl-intro { color: #a09888 !important; }

.kl-single-body .kl-divider {
    border: none;
    border-top: 1px solid rgba(201,168,76,0.3);
    margin: 2em 0;
}
.kl-dark-mode .kl-single-body .kl-divider {
    border-top-color: rgba(201,168,76,0.2) !important;
}

.kl-single-body .kl-callout-maroon {
    background: rgba(123,24,24,0.08);
    border-left: 4px solid #7B1818;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
}
.kl-dark-mode .kl-single-body .kl-callout-maroon {
    background: rgba(123,24,24,0.15) !important;
    border-left-color: #D4722A !important;
}

.kl-single-body .kl-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin: 1.5em 0;
}

.kl-single-body .kl-stat-card {
    background: rgba(123,24,24,0.06);
    padding: 1em;
    border-radius: 8px;
    border: 1px solid rgba(123,24,24,0.15);
}
.kl-dark-mode .kl-single-body .kl-stat-card {
    background: rgba(123,24,24,0.12) !important;
    border-color: rgba(201,168,76,0.15) !important;
}

.kl-single-body .kl-stat-title {
    font-weight: 700;
    color: #7B1818;
    margin-bottom: 0.3em;
}
.kl-dark-mode .kl-single-body .kl-stat-title { color: #D4722A !important; }

.kl-single-body .kl-timeline {
    position: relative;
    padding-left: 2em;
    margin: 1.5em 0;
}
.kl-single-body .kl-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #C9A84C, #7B1818);
    border-radius: 2px;
}
.kl-dark-mode .kl-single-body .kl-timeline::before {
    background: linear-gradient(to bottom, #e8c84a, #D4722A) !important;
}

.kl-single-body .kl-timeline-item {
    margin-bottom: 1.2em;
}
.kl-single-body .kl-timeline-year {
    font-weight: 700;
    color: #7B1818;
    margin-bottom: 0.2em;
}
.kl-dark-mode .kl-single-body .kl-timeline-year { color: #e8c84a !important; }

/* ============================================
   ARTICLE WRAPPER
   ============================================ */
.kl-article-wrapper {
    max-width: 920px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-xxl);
}

/* Hero meta below title */
.kl-hero-meta {
    font-family: var(--font-odia);
    letter-spacing: 0.3px;
}

/* Featured image */
.kl-featured-image {
    margin-bottom: var(--space-xxl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--kl-sandstone-deep);
}
.kl-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Author box */
.kl-author-box {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-xxl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--kl-parchment), rgba(245, 240, 230, 0.6));
    border-radius: var(--radius-lg);
    border: 1px solid var(--kl-sandstone-deep);
}
.kl-author-avatar {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kl-sandstone);
    border-radius: 50%;
    flex-shrink: 0;
}
.kl-author-name {
    font-family: var(--font-odia);
    font-size: 15px;
    font-weight: 600;
    color: var(--kl-charcoal);
    margin-bottom: 4px;
}
.kl-author-bio {
    font-size: 13px;
    color: var(--kl-stone-dark);
    margin: 0;
    line-height: 1.6;
}

/* Tags section */
.kl-tags-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(196, 168, 130, 0.2);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.kl-tags-label {
    font-size: 14px;
}

/* Back to category */
.kl-back-to-category {
    display: inline-block;
    margin-top: var(--space-lg);
    padding: 10px 20px;
    font-family: var(--font-odia);
    font-size: 13px;
    color: var(--kl-charcoal);
    border: 1px solid var(--kl-sandstone-deep);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: var(--transition);
}
.kl-back-to-category:hover {
    background: var(--kl-saffron);
    color: white;
    border-color: var(--kl-saffron);
}

/* Post navigation (prev/next) */
.kl-post-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
    font-family: var(--font-odia);
    font-size: 13px;
}
.kl-post-nav a {
    color: var(--kl-charcoal);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--kl-sandstone);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.kl-post-nav a:hover {
    border-color: var(--kl-saffron);
    color: var(--kl-saffron-deep);
}

/* ============================================
   RELATED POSTS SECTION
   ============================================ */
.kl-related-section {
    padding: var(--space-xxl) var(--space-lg);
    background: linear-gradient(180deg, var(--kl-parchment), rgba(245, 240, 230, 0.3));
}
.kl-related-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.kl-section-torana {
    text-align: center;
    margin-bottom: var(--space-xxl);
}
.kl-torana-ornament {
    font-size: 24px;
    color: var(--kl-saffron);
    opacity: 0.6;
}
.kl-section-torana .kl-torana-title {
    display: inline;
    margin: 0 var(--space-md);
}
.kl-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}
.kl-related-card {
    display: block;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.kl-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.kl-related-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--kl-sandstone);
}
.kl-related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.kl-related-card:hover .kl-related-card-img img {
    transform: scale(1.05);
}
.kl-related-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}
.kl-related-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    border-radius: var(--radius-pill);
    text-decoration: none;
}
.kl-related-card-body {
    padding: var(--space-lg);
}
.kl-related-card-body h3 {
    font-family: var(--font-odia);
    font-size: 16px;
    color: var(--kl-charcoal);
    margin: 0 0 var(--space-sm);
    line-height: 1.4;
}
.kl-related-card-body p {
    font-size: 13px;
    color: var(--kl-stone-dark);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}
.kl-related-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--kl-stone);
}

@media (max-width: 768px) {
    .kl-related-grid { grid-template-columns: 1fr; }
    .kl-author-box { flex-direction: column; text-align: center; }
    .kl-post-nav { flex-direction: column; }
    .kl-post-nav a { text-align: center; }
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.kl-share {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xxl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(196, 168, 130, 0.2);
    flex-wrap: wrap;
}

.kl-share-label {
    font-family: var(--font-odia);
    font-size: 14px;
    font-weight: 500;
    color: var(--kl-stone-dark);
}

.kl-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--kl-sandstone);
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.kl-share-btn:hover {
    background: var(--kl-saffron);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kl-tag-pill {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    background: var(--kl-sandstone);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--kl-charcoal);
    text-decoration: none;
    transition: var(--transition);
}

.kl-tag-pill:hover {
    background: var(--kl-saffron);
    color: white;
}

/* ============================================
   LOTUS PETALS (Hero decoration)
   ============================================ */
.kl-hero-petals {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.kl-petal {
    position: absolute;
    font-size: 16px;
    opacity: 0;
    animation: kl-petal-fall linear infinite;
}

@keyframes kl-petal-fall {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0deg);
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.1; }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

/* ============================================
   KONARK WHEEL DIVIDER
   ============================================ */
.kl-konark-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) 0;
}

.kl-konark-wheel {
    width: 48px;
    height: 48px;
    position: relative;
}

.kl-konark-wheel::before {
    content: '☸';
    font-size: 48px;
    color: var(--kl-saffron);
    opacity: 0.4;
    animation: kl-spin 20s linear infinite;
}

.kl-konark-divider::before,
.kl-konark-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kl-saffron), transparent);
    opacity: 0.3;
}

/* ============================================
   PATACHITRA SVG BORDER (Enhanced)
   ============================================ */
.kl-pattachitra-border {
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='16' viewBox='0 0 80 16'%3E%3Cpath d='M0 8 Q10 0 20 8 Q30 16 40 8 Q50 0 60 8 Q70 16 80 8' fill='none' stroke='%23D4722A' stroke-width='1.5' opacity='0.4'/%3E%3Ccircle cx='20' cy='8' r='2' fill='%23C9A84C' opacity='0.3'/%3E%3Ccircle cx='40' cy='8' r='2' fill='%23C9A84C' opacity='0.3'/%3E%3Ccircle cx='60' cy='8' r='2' fill='%23C9A84C' opacity='0.3'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 80px 16px;
}

/* ============================================
   LAZY IMAGES
   ============================================ */
.kl-card-image img,
.kl-single-body img,
.kl-card-featured img {
    opacity: 1;
    transition: opacity 0.4s var(--ease);
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].kl-loaded {
    opacity: 1;
}
/* Fallback: show images after 3s even if observer missed them */
img[loading="lazy"] {
    animation: klLazyReveal 3s ease forwards;
}
@keyframes klLazyReveal {
    0%, 90% { opacity: 0; }
    100% { opacity: 1; }
}

/* ============================================
   INFINITY PULSE (Stats)
   ============================================ */
.kl-infinity-pulse {
    animation: kl-pulse 2s ease-in-out infinite;
}

@keyframes kl-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* ============================================
   FOOTER TEMPLE SILHOUETTE
   ============================================ */
.kl-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent 0%, rgba(44, 37, 32, 0.03) 100%);
    pointer-events: none;
}

/* ============================================
   RESPONSIVE ADDITIONS
   ============================================ */
@media (max-width: 1024px) {
    .kl-breadcrumb-inner { font-size: 11px; }
    .kl-toc { padding: var(--space-md) var(--space-lg); }
}

@media (max-width: 768px) {
    .kl-share { justify-content: center; }
    .kl-toc-list .kl-toc-h3 { padding-left: var(--space-md); }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .kl-hero-slide { animation: none !important; }
    .kl-reveal { opacity: 1; transform: none; }
    .kl-stagger > * { opacity: 1; transform: none; }
}

/* ============================================
   ENHANCEMENTS v4.1 — All 18 items
   ============================================ */

/* === #1 HERO TEXT CONTRAST === */
.kl-hero::after {
    background:
        linear-gradient(180deg,
            rgba(44, 37, 32, 0.5) 0%,
            rgba(44, 37, 32, 0.15) 35%,
            rgba(44, 37, 32, 0.55) 100%),
        var(--texture-grain) !important;
}

.kl-hero-title-or {
    text-shadow:
        0 2px 20px rgba(0,0,0,0.5),
        0 4px 40px rgba(0,0,0,0.3) !important;
}

.kl-hero-title-en {
    text-shadow: 0 1px 10px rgba(0,0,0,0.4) !important;
}

.kl-hero-badge {
    background: rgba(212, 168, 67, 0.2) !important;
    border-color: rgba(212, 168, 67, 0.4) !important;
    color: var(--kl-gold) !important;
}

.kl-page-hero-overlay {
    background:
        linear-gradient(180deg,
            rgba(44, 37, 32, 0.35) 0%,
            rgba(44, 37, 32, 0.6) 100%),
        var(--texture-grain) !important;
}

.kl-page-hero .kl-hero-title-or,
.kl-page-hero h1 {
    text-shadow:
        0 2px 20px rgba(0,0,0,0.5),
        0 4px 40px rgba(0,0,0,0.3) !important;
}

/* === #2 STRIP HESTIA PARENT THEME BLEED === */
.navbar, .navbar-default, .navbar:not(.kl-nav),
nav.navbar, header.navbar {
    display: none !important;
}

.btn.btn-primary,
.btn.btn-rose,
button:not(.kl-lang-btn):not(.kl-back-top):not(.kl-nav-toggle):not(.kl-mobile-close):not([type="submit"]):not(.wpforms-submit) {
    background: var(--kl-saffron) !important;
    box-shadow: none !important;
    color: white !important;
}

footer.footer, footer.footer-black, footer.footer.footer-black {
    display: none !important;
}

.hestia-top-bar, .page-header, .hestia-title, .hestia-subtitle,
.main.main-raised, .blog-post .section-text,
.single-post .blog-post {
    display: none !important;
}

/* WPForms Kalinga override */
div.wpforms-container .wpforms-form .wpforms-field {
    padding: 0 0 16px 0 !important;
}

div.wpforms-container .wpforms-form input[type="text"],
div.wpforms-container .wpforms-form input[type="email"],
div.wpforms-container .wpforms-form textarea,
div.wpforms-container .wpforms-form select {
    background: var(--kl-parchment) !important;
    border: 1px solid rgba(196, 168, 130, 0.3) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 16px !important;
    font-family: var(--font-odia) !important;
    font-size: 15px !important;
    color: var(--kl-charcoal) !important;
    box-shadow: none !important;
    background-image: none !important;
    transition: border-color 0.3s ease !important;
}

div.wpforms-container .wpforms-form input:focus,
div.wpforms-container .wpforms-form textarea:focus {
    border-color: var(--kl-saffron) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(184, 90, 24, 0.1) !important;
}

div.wpforms-container .wpforms-form label {
    font-family: var(--font-odia) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--kl-maroon) !important;
    margin-bottom: 4px !important;
}

div.wpforms-container .wpforms-form button[type="submit"].wpforms-submit {
    background: var(--kl-saffron) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 32px !important;
    font-family: var(--font-odia) !important;
    font-size: 15px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background 0.3s ease !important;
}

div.wpforms-container .wpforms-form button[type="submit"].wpforms-submit:hover {
    background: var(--kl-maroon) !important;
}

/* === #3 ARTICLE TYPOGRAPHY ENHANCED === */
.kl-single-body {
    font-size: 17px !important;
    line-height: 2 !important;
}

.kl-single-body h2 {
    font-size: 26px !important;
    position: relative;
    padding-left: var(--space-lg) !important;
    border-bottom: none !important;
}

.kl-single-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: linear-gradient(180deg, var(--kl-saffron), var(--kl-gold));
    border-radius: 2px;
}

.kl-single-body h3 {
    font-size: 21px !important;
}

.kl-single-body p {
    margin: 0 0 1.8em !important;
}

.kl-single-body ul, .kl-single-body ol {
    padding-left: 1.5em !important;
    margin: 0 0 1.5em !important;
}

.kl-single-body li {
    margin-bottom: 0.5em !important;
    padding-left: 0.3em;
}

.kl-single-body li::marker {
    color: var(--kl-saffron);
}

.kl-single-body blockquote {
    border-left: 4px solid var(--kl-saffron) !important;
    background: linear-gradient(135deg, var(--kl-parchment), rgba(245, 240, 230, 0.8)) !important;
    padding: 20px 24px 20px 32px !important;
    border-radius: 0 8px 8px 0 !important;
    position: relative;
}

.kl-single-body blockquote::before {
    content: '\275D';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 32px;
    color: var(--kl-saffron);
    opacity: 0.3;
}

.kl-single-body pre {
    background: var(--kl-charcoal) !important;
    color: var(--kl-sandstone) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-lg) !important;
    overflow-x: auto;
    font-size: 14px !important;
}

.kl-single-body pre code {
    background: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

.kl-single-body table {
    width: 100% !important;
    border-collapse: collapse;
    margin: var(--space-lg) 0 !important;
    font-size: 15px !important;
}

.kl-single-body th {
    background: var(--kl-maroon) !important;
    color: white !important;
    padding: 10px 14px !important;
    text-align: left !important;
    font-weight: 600 !important;
}

.kl-single-body td {
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--kl-sandstone) !important;
}

.kl-single-body tr:nth-child(even) td {
    background: var(--kl-parchment) !important;
}

.kl-single-body .wp-block-separator {
    border: none !important;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kl-saffron), transparent) !important;
    margin: var(--space-xxl) auto !important;
}

/* Drop cap for first paragraph */
.kl-single-body > p:first-of-type::first-letter {
    font-size: 3.2em;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 4px;
    font-family: var(--font-heading);
    color: var(--kl-maroon);
    font-weight: 700;
}

/* === #4 HOMEPAGE DEDUP === */
.kl-hall:first-of-type .kl-card {
    border: 1px solid rgba(196, 168, 130, 0.15);
}

/* === #5 CARD IMAGE CROP FIX === */
.page-about .kl-card-image,
.kl-card-image {
    overflow: hidden;
}

.page-about .kl-card-image img,
.kl-card-image img {
    object-fit: cover !important;
    width: 100%;
    height: 100%;
    transition: transform 0.5s var(--ease);
}

/* === #7 FOOTER REDESIGN === */
.kl-footer {
    position: relative;
    background: var(--kl-charcoal) !important;
    padding: var(--space-section) var(--space-lg) 0 0;
    overflow: hidden;
}

.kl-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background:
        linear-gradient(180deg, rgba(139, 69, 19, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

.kl-footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xxl);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.kl-footer-heading {
    font-family: var(--font-odia) !important;
    font-size: 16px !important;
    color: var(--kl-gold) !important;
    margin-bottom: var(--space-md) !important;
    padding-bottom: var(--space-sm) !important;
    border-bottom: 2px solid rgba(212, 168, 67, 0.2);
}

.kl-footer-links li a {
    color: rgba(245, 240, 230, 0.7) !important;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.kl-footer-links li a:hover {
    color: var(--kl-gold) !important;
    padding-left: 6px;
}

/* === #8 CATEGORY ARCHIVE HEADERS === */
.kl-archive-header {
    background: linear-gradient(135deg, var(--kl-maroon-deep), var(--kl-maroon), var(--kl-saffron-deep));
    padding: var(--space-section) var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kl-archive-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--texture-grain);
    opacity: 0.3;
}

.kl-archive-title {
    font-family: var(--font-odia);
    font-size: clamp(28px, 5vw, 42px);
    color: white;
    margin: 0 0 var(--space-md);
    position: relative;
    text-shadow: 0 2px 15px rgba(0,0,0,0.4);
}

.kl-archive-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto var(--space-sm);
    position: relative;
}

.kl-archive-count {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-pill);
    color: var(--kl-gold);
    font-size: 13px;
    position: relative;
}

/* === #9 CARD HOVER POLISH === */
.kl-card {
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease) !important;
}

.kl-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.1) !important;
}

.kl-card:hover .kl-card-image img {
    transform: scale(1.05);
}

.kl-card:hover .kl-card-title a {
    color: var(--kl-saffron-deep);
}

.kl-card-title a {
    transition: color 0.3s ease !important;
}

.kl-explore-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
}

/* === #10 LOADING SKELETON === */
.kl-card-image {
    background: linear-gradient(90deg, var(--kl-sandstone) 25%, rgba(245,240,230,0.6) 50%, var(--kl-sandstone) 75%);
    background-size: 200% 100%;
    animation: kl-shimmer 2s ease-in-out infinite;
}

.kl-card-image img {
    position: relative;
    z-index: 1;
}

@keyframes kl-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.kl-card-image:has(img[complete]) {
    animation: none;
    background: transparent;
}

/* === #11 SCROLL-TO-TOP KALINGA === */
.kl-back-top {
    width: 44px;
    height: 44px;
    background: var(--kl-maroon) !important;
    color: var(--kl-gold) !important;
    border: 2px solid var(--kl-gold) !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    z-index: 999;
    /* Left-aligned with dark toggle & lang switch */
    bottom: var(--space-xl) !important;
    left: var(--space-xl) !important;
    right: auto !important;
}

.kl-back-top.kl-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kl-back-top:hover {
    background: var(--kl-saffron) !important;
    transform: translateY(-2px) !important;
}

/* === #12 PRINT STYLES === */
@media print {
    .kl-nav, .kl-lang-switch, .kl-back-top, .kl-scroll-progress,
    .kl-reading-progress, .kl-hero, .kl-hero-slides, .kl-hero-petals,
    .kl-share, .kl-toc, .kl-breadcrumb, .kl-lotus-divider,
    .kl-konark-divider, .kl-pattachitra-border, .kl-pattachitra-top,
    .kl-newsletter-form, footer, .wpforms-container {
        display: none !important;
    }

    .kl-single-body {
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: black !important;
    }

    .kl-single-body h2 { color: #333 !important; }
    .kl-single-body h2::before { background: #666 !important; }

    .kl-page-hero {
        background: none !important;
        height: auto !important;
        min-height: auto !important;
        padding: 20px 0 !important;
    }

    .kl-page-hero-overlay { display: none !important; }

    .kl-page-hero-content {
        position: static !important;
        text-align: left !important;
        padding: 0 !important;
    }

    .kl-page-hero h1 {
        font-size: 20pt !important;
        color: black !important;
        text-shadow: none !important;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 9pt;
        color: #666;
    }
}

/* === #13 DARK MODE === */
.kl-dark-mode {
    --kl-sandstone: #2a2420;
    --kl-parchment: #1e1a16;
    --kl-charcoal: #e8e0d4;
    --kl-stone: #a09888;
    --kl-stone-dark: #c0b8a8;
    --kl-white: #1a1612;
    --kl-palm: #7ab858;
    --kl-chilika: #5ab0b0;
    --kl-sky: #8ab4cc;
    --texture-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background: var(--kl-white) !important;
    color: var(--kl-charcoal) !important;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Force dark bg on ALL wrappers — override Hestia inline styles */
.kl-dark-mode,
.kl-dark-mode body,
body.kl-dark-mode {
    background-color: #1a1612 !important;
}
.kl-dark-mode .kl-page-hero-overlay {
    background: rgba(0,0,0,0.7) !important;
}

.kl-dark-mode .kl-nav {
    background: rgba(26, 22, 18, 0.95) !important;
    border-bottom-color: rgba(212, 168, 67, 0.15);
}

.kl-dark-mode .kl-hall {
    background: var(--kl-parchment) !important;
}

.kl-dark-mode .kl-hall-sacred {
    background: linear-gradient(135deg, #1a1612, #2a2420) !important;
}

.kl-dark-mode .kl-card {
    background: var(--kl-sandstone) !important;
    border-color: rgba(212, 168, 67, 0.1) !important;
}

.kl-dark-mode .kl-card-body {
    color: var(--kl-charcoal);
}

.kl-dark-mode .kl-footer {
    background: #0f0c0a !important;
}

.kl-dark-mode .kl-torana-title,
.kl-dark-mode .kl-card-title {
    color: var(--kl-charcoal) !important;
}

.kl-dark-mode .kl-single-body {
    color: #e8e0d4 !important;
    background: #1a1612 !important;
}
.kl-dark-mode .kl-single-body p,
.kl-dark-mode .kl-single-body span,
.kl-dark-mode .kl-single-body li,
.kl-dark-mode .kl-single-body div:not(.kl-ticker-cat):not(.kl-ticker-sep) {
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-single-body h1,
.kl-dark-mode .kl-single-body h2,
.kl-dark-mode .kl-single-body h3,
.kl-dark-mode .kl-single-body h4,
.kl-dark-mode .kl-single-body h5,
.kl-dark-mode .kl-single-body h6 {
    color: #D4722A !important;
}
.kl-dark-mode .kl-single-body strong,
.kl-dark-mode .kl-single-body b {
    color: #fff !important;
}
.kl-dark-mode .kl-single-body a {
    color: #e8c84a !important;
}
.kl-dark-mode .kl-single-body blockquote {
    background: rgba(42, 36, 32, 0.6) !important;
    border-left-color: #D4722A !important;
}
.kl-dark-mode .kl-single-body hr {
    border-top-color: rgba(201,168,76,0.3) !important;
}
/* Dark: article wrapper + new elements */
.kl-dark-mode .kl-article-wrapper {
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-featured-image {
    border-color: rgba(201,168,76,0.2);
}
.kl-dark-mode .kl-author-box {
    background: linear-gradient(135deg, rgba(42,36,32,0.6), rgba(26,22,18,0.8)) !important;
    border-color: rgba(201,168,76,0.15);
}
.kl-dark-mode .kl-author-name {
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-author-bio {
    color: #a09888 !important;
}
.kl-dark-mode .kl-author-avatar {
    background: rgba(201,168,76,0.15);
}
.kl-dark-mode .kl-share {
    border-top-color: rgba(201,168,76,0.15) !important;
}
.kl-dark-mode .kl-share-label {
    color: #a09888 !important;
}
.kl-dark-mode .kl-share-btn {
    background: rgba(42,36,32,0.8);
}
.kl-dark-mode .kl-share-btn:hover {
    background: var(--kl-saffron);
}
.kl-dark-mode .kl-tag-pill {
    background: rgba(42,36,32,0.6);
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-tag-pill:hover {
    background: var(--kl-saffron);
    color: white !important;
}
.kl-dark-mode .kl-tags-section {
    border-top-color: rgba(201,168,76,0.15) !important;
}
.kl-dark-mode .kl-back-to-category {
    color: #e8e0d4 !important;
    border-color: rgba(201,168,76,0.2);
}
.kl-dark-mode .kl-back-to-category:hover {
    background: var(--kl-saffron);
    color: white !important;
}
.kl-dark-mode .kl-post-nav a {
    color: #e8e0d4 !important;
    border-color: rgba(201,168,76,0.15);
}
.kl-dark-mode .kl-post-nav a:hover {
    border-color: var(--kl-saffron);
    color: #e8c84a !important;
}
.kl-dark-mode .kl-related-section {
    background: linear-gradient(180deg, rgba(26,22,18,0.8), rgba(42,36,32,0.4)) !important;
}
.kl-dark-mode .kl-related-card {
    background: rgba(30,26,22,0.9) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.kl-dark-mode .kl-related-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.kl-dark-mode .kl-related-card-body h3 {
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-related-card-body p {
    color: #a09888 !important;
}
.kl-dark-mode .kl-related-card-meta {
    color: #6a6258 !important;
}
.kl-dark-mode .kl-related-card-placeholder {
    background: rgba(42,36,32,0.5);
}
.kl-dark-mode .kl-toc {
    background: rgba(30,26,22,0.9) !important;
    border-color: rgba(201,168,76,0.15) !important;
}
.kl-dark-mode .kl-toc-title {
    color: #e8e0d4 !important;
}
.kl-dark-mode .kl-toc-list a {
    color: #a09888 !important;
}
.kl-dark-mode .kl-toc-list a:hover,
.kl-dark-mode .kl-toc-list li.active a {
    color: #e8c84a !important;
}

.kl-dark-mode .kl-breadcrumb {
    background: var(--kl-sandstone);
}

.kl-dark-mode .kl-back-top {
    background: var(--kl-gold) !important;
    color: var(--kl-charcoal) !important;
}

/* Dark mode toggle button */
.kl-dark-toggle {
    position: fixed;
    bottom: calc(var(--space-xl) + 112px);
    left: var(--space-xl);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(212, 168, 67, 0.3);
    background: var(--kl-sandstone);
    color: var(--kl-charcoal);
    font-size: 18px;
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.kl-dark-toggle:hover {
    transform: scale(1.1);
    border-color: var(--kl-saffron);
}

/* === #14 PAGE TRANSITIONS === */
.kl-page-transition {
    animation: kl-fade-in 0.4s var(--ease);
}

@keyframes kl-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === #15 NEWSLETTER SECTION === */
.kl-newsletter {
    text-align: center;
}

.kl-newsletter-title {
    font-family: var(--font-odia);
    font-size: 24px;
    color: var(--kl-maroon);
    margin-bottom: var(--space-sm);
}

.kl-newsletter-desc {
    color: var(--kl-stone-dark);
    margin-bottom: var(--space-xl);
}

.kl-newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 460px;
    margin: 0 auto;
}

.kl-newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(196, 168, 130, 0.3);
    border-radius: var(--radius-md);
    background: white;
    font-family: var(--font-odia);
    font-size: 14px;
    color: var(--kl-charcoal);
}

.kl-newsletter-form input:focus {
    outline: none;
    border-color: var(--kl-saffron);
}

.kl-newsletter-form button {
    padding: 12px 24px;
    background: var(--kl-saffron);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-odia);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.kl-newsletter-form button:hover {
    background: var(--kl-maroon);
}

/* === #16 READING TIME BADGE ON CARDS === */
.kl-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--kl-stone);
    margin-top: var(--space-sm);
}

.kl-card-date::before {
    content: '\1F4C5 ';
}

.kl-card-reading {
    color: var(--kl-saffron-deep);
}

/* === #17 ACCESSIBILITY === */
.kl-hero-title-en {
    color: rgba(255, 255, 255, 0.9) !important;
}

.kl-torana-sub {
    color: var(--kl-stone-dark) !important;
}

.kl-card-excerpt {
    color: var(--kl-charcoal) !important;
}

.kl-explore-odia,
.kl-explore-en {
    color: var(--kl-charcoal) !important;
}

/* Focus visible for keyboard nav */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.kl-lang-btn:focus-visible {
    outline: 3px solid var(--kl-saffron);
    outline-offset: 2px;
}

/* Skip link */
.odia-skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 12px 24px;
    background: var(--kl-maroon);
    color: white;
    z-index: 10000;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top 0.3s ease;
}

.odia-skip-link:focus {
    top: 0;
}

/* === #18 STATS SECTION === */
.kl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-xl);
    text-align: center;
}

.kl-stat-item {
    padding: var(--space-xl) var(--space-md);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 168, 67, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.kl-stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 168, 67, 0.4);
}

.kl-stat-number {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--kl-gold);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.kl-stat-label {
    font-family: var(--font-odia);
    font-size: 14px;
    color: var(--kl-sandstone);
}

/* === MOBILE RESPONSIVE ENHANCEMENTS === */
@media (max-width: 768px) {
    .kl-footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .kl-hero-title-or {
        font-size: clamp(26px, 7vw, 40px) !important;
    }

    .kl-hero-title-en {
        font-size: clamp(14px, 3vw, 18px) !important;
    }

    .kl-hero-badge {
        font-size: 11px !important;
        padding: 4px 14px !important;
    }

    .kl-newsletter-form {
        flex-direction: column;
    }

    .kl-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .kl-dark-toggle {
        bottom: calc(var(--space-xl) + 112px);
        left: var(--space-xl);
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .kl-back-top {
        bottom: var(--space-xl) !important;
        left: var(--space-xl) !important;
    }

    .kl-lang-switch {
        bottom: calc(var(--space-xl) + 156px);
        left: var(--space-xl);
    }

    .kl-reading-circle {
        bottom: calc(var(--space-xl) + 52px) !important;
        left: var(--space-xl) !important;
        width: 38px !important;
        height: 38px !important;
    }

    .kl-single-body h2 {
        font-size: 22px !important;
        padding-left: var(--space-md) !important;
    }

    .kl-archive-header {
        padding: var(--space-xxl) var(--space-lg) !important;
    }

    .kl-lang-switch {
        bottom: 12px !important;
    }
}

/* === PAGINATION KALINGA === */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xxl);
}

.nav-links > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: var(--kl-parchment);
    color: var(--kl-charcoal);
    font-family: var(--font-odia);
    font-size: 14px;
    text-decoration: none;
    border: 1px solid rgba(196, 168, 130, 0.2);
    transition: all 0.3s ease;
}

.nav-links > *:hover {
    background: var(--kl-saffron);
    color: white;
    border-color: var(--kl-saffron);
}

.nav-links .current {
    background: var(--kl-maroon) !important;
    color: var(--kl-gold) !important;
    border-color: var(--kl-maroon) !important;
    font-weight: 600;
}

/* === COOKIE CONSENT === */
.kl-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--kl-charcoal);
    color: var(--kl-sandstone);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 10000;
    font-size: 14px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.kl-cookie-bar.kl-cookie-visible {
    transform: translateY(0);
}

.kl-cookie-text {
    max-width: 600px;
    text-align: center;
}

.kl-cookie-accept {
    padding: 8px 24px;
    background: var(--kl-saffron);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-odia);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.kl-cookie-accept:hover {
    background: var(--kl-maroon);
}

/* === SHARE BUTTONS ENHANCED === */
.kl-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--kl-parchment);
    border: 1px solid rgba(196, 168, 130, 0.2);
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.kl-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === TAG PILLS === */
.kl-tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--kl-parchment);
    border: 1px solid rgba(196, 168, 130, 0.2);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--kl-stone-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.kl-tag-pill:hover {
    background: var(--kl-saffron);
    color: white;
    border-color: var(--kl-saffron);
}

/* === NEWSLETTER CONFIRMATION === */
.kl-newsletter-msg {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-top: var(--space-md);
    display: none;
}

.kl-newsletter-msg.kl-newsletter-ok {
    display: block;
    background: rgba(122, 184, 88, 0.15);
    color: var(--kl-palm);
    border: 1px solid rgba(122, 184, 88, 0.3);
}

.kl-newsletter-msg.kl-newsletter-err {
    display: block;
    background: rgba(184, 90, 24, 0.15);
    color: var(--kl-saffron-deep);
    border: 1px solid rgba(184, 90, 24, 0.3);
}

/* ============================================
   PATTACHITRA BORDERS — Temple Frame System
   ============================================ */

/* Outer page frame */
.kl-hall, .kl-hall-parchment, .kl-hall-stone, .kl-hall-sacred {
    position: relative;
}
.kl-hall::before,
.kl-hall-parchment::before,
.kl-hall-stone::before,
.kl-hall-sacred::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}
.kl-hall > *, .kl-hall-parchment > *, .kl-hall-stone > *, .kl-hall-sacred > * {
    position: relative;
    z-index: 1;
}

/* Corner ornaments for major sections */
.kl-torana {
    position: relative;
}
.kl-torana::before,
.kl-torana::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: rgba(201, 168, 76, 0.4);
    line-height: 1;
}
.kl-torana::before { left: 12px; }
.kl-torana::after { right: 12px; }

/* Lotus divider between sections */
.kl-konark-divider {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-xl) auto;
    max-width: 600px;
}
.kl-konark-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.3) 15%,
        rgba(201, 168, 76, 0.6) 50%,
        rgba(201, 168, 76, 0.3) 85%,
        transparent 100%
    );
}
.kl-konark-divider::after {
    content: '❖';
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: var(--kl-gold);
    background: var(--kl-cream);
    padding: 0 16px;
    opacity: 0.5;
}

/* Pattachitra top border for footer */
.kl-footer .kl-pattachitra-top {
    height: 6px;
    background:
        repeating-linear-gradient(90deg,
            rgba(201, 168, 76, 0.4) 0px, rgba(201, 168, 76, 0.4) 4px,
            transparent 4px, transparent 12px
        ),
        repeating-linear-gradient(90deg,
            transparent 0px, transparent 6px,
            rgba(201, 168, 76, 0.15) 6px, rgba(201, 168, 76, 0.15) 8px
        );
    background-size: 100% 2px, 100% 2px;
    background-position: 0 0px, 0 4px;
}

/* Card Pattachitra borders — on hover for articles */
.kl-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.kl-card::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid transparent;
    border-radius: inherit;
    pointer-events: none;
    transition: border-color 0.4s ease;
    z-index: 5;
}
.kl-card:hover::after {
    border-color: rgba(201, 168, 76, 0.35);
}

/* Fact card Pattachitra permanent border */
.kl-fact-card::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: inherit;
    pointer-events: none;
}

/* Festival card Pattachitra border */
.kl-fest-slide::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    pointer-events: none;
    transition: border-color 0.3s ease;
}
.kl-fest-slide:hover::after {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Today in History card border */
.kl-today-history > div[style*="background:rgba"]::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    pointer-events: none;
}

/* ============================================
   SCROLL ANIMATIONS & EFFECTS
   ============================================ */

/* Stagger fade-in for children */
.kl-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.kl-stagger > *.kl-visible {
    opacity: 1;
    transform: translateY(0);
}
.kl-stagger > *:nth-child(1) { transition-delay: 0s; }
.kl-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.kl-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.kl-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.kl-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.kl-stagger > *:nth-child(6) { transition-delay: 0.5s; }
.kl-stagger > *:nth-child(7) { transition-delay: 0.6s; }
.kl-stagger > *:nth-child(8) { transition-delay: 0.7s; }
.kl-stagger > *:nth-child(n+9) { transition-delay: 0.8s; }

/* Section reveal — slide from bottom */
.kl-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.kl-reveal.kl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Torana entrance — slide line from left */
.kl-reveal .kl-torana {
    overflow: hidden;
}
.kl-reveal .kl-torana::before {
    transition: opacity 0.8s ease 0.2s;
    opacity: 0;
}
.kl-reveal .kl-torana::after {
    transition: opacity 0.8s ease 0.2s;
    opacity: 0;
}
.kl-reveal.kl-visible .kl-torana::before,
.kl-reveal.kl-visible .kl-torana::after {
    opacity: 1;
}

/* Article card hover glow */
.kl-card:hover {
    box-shadow: 0 8px 32px rgba(123, 24, 24, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.kl-card-featured:hover {
    box-shadow: 0 16px 48px rgba(123, 24, 24, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Festival countdown pulse when < 7 days */
@keyframes klCountdownPulse {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
}
.kl-countdown[data-urgent="true"] .cd-d {
    animation: klCountdownPulse 2s ease-in-out infinite;
    color: #FFD700 !important;
}

/* Quote rotation transition */
.kl-quote-slide {
    animation: klQuoteFadeIn 0.6s ease;
}
@keyframes klQuoteFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero parallax effect */
@media (min-width: 768px) {
    .kl-hero-slide {
        background-attachment: fixed !important;
    }
}

/* Dark mode adjustments */
body.kl-lang-en .kl-hall::before,
body.kl-lang-en .kl-hall-parchment::before,
body.kl-lang-en .kl-hall-stone::before,
body.kl-lang-en .kl-hall-sacred::before {
    border-color: rgba(201, 168, 76, 0.1);
}
body.kl-lang-en .kl-card:hover::after {
    border-color: rgba(201, 168, 76, 0.25);
}

/* Mobile: reduce animation intensity */
@media (max-width: 768px) {
    .kl-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .kl-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* News Ticker - desktop/laptop only, sticky below nav */
@media (min-width: 769px) {
.kl-news-ticker {
    position: sticky;
    top: 62px;
    margin-top: 78px;
    z-index: 999;
    background: linear-gradient(90deg, #3d0c0c 0%, #5a1515 50%, #3d0c0c 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid rgba(201,168,76,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.kl-ticker-label {
    background: var(--kl-saffron, #C9A84C);
    color: var(--kl-maroon, #5a1515);
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.kl-ticker-viewport {
    overflow: hidden;
    flex: 1;
    position: relative;
    height: 30px;
    mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
}
.kl-ticker-track {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    animation: klTickerScroll 60s linear infinite;
    will-change: transform;
}
.kl-ticker-track:hover {
    animation-play-state: paused;
}
@keyframes klTickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.kl-ticker-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 6px;
    flex-shrink: 0;
}
.kl-ticker-cat {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    flex-shrink: 0;
}
.kl-ticker-text {
    font-size: 11px;
    line-height: 30px;
    color: rgba(255,255,255,0.95);
}
.kl-ticker-sep {
    margin: 0 12px;
    color: rgba(201,168,76,0.4);
    font-size: 10px;
    flex-shrink: 0;
}
} /* end desktop ticker */
@media (max-width: 768px) {
    .kl-news-ticker { display: none !important; }
}
