/* ========================================
   JAIN JINVANI - COMPONENT STYLES
   Buttons, cards, forms, badges, lists
   ======================================== */

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    white-space: nowrap;
    min-height: var(--touch-target-min);
    /* Fitts's Law compliance */
    /* Level 3: Micro-interaction */
    transition: transform 0.1s, background-color 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.96);
    /* Click Press Effect */
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gold);
    color: var(--kumkum-red-dark);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: var(--gold-light);
    box-shadow: var(--shadow-glow);
    color: var(--kumkum-red-dark);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--kumkum-red);
}

.btn-outline {
    background: transparent;
    color: var(--kumkum-red);
    border-color: var(--kumkum-red);
}

.btn-outline:hover {
    background: var(--kumkum-red);
    color: white;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    /* 8px 16px */
    font-size: 0.85rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    /* 16px 32px */
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--spring-apple), box-shadow var(--duration-normal) var(--ease-apple);
    will-change: transform;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-elevated);
}

/* Content Card (for category pages) */
.content-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--space-lg);
    transition: transform var(--duration-normal) var(--spring-apple);
}

/* Sadhana Category Cards */
.sadhana-category-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.category-row {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--spring-apple), box-shadow var(--duration-fast) var(--ease-apple);
}

.category-row:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-soft);
}

.category-row.featured {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.category-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: background-color var(--duration-fast) ease;
}

.category-link:hover {
    background: var(--cream-bg);
}

.category-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-family: var(--font-devanagari);
    font-size: 1.1rem;
    color: var(--deep-maroon);
    margin-bottom: 4px;
}

.category-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.category-link .arrow {
    font-size: 1.2rem;
    color: var(--primary-saffron);
    transition: transform var(--duration-fast) var(--spring-apple);
}

.category-link:hover .arrow {
    transform: translateX(4px);
}

/* Temple Cards */
.temple-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-normal) var(--spring-apple), box-shadow var(--duration-normal) var(--ease-apple);
    will-change: transform;
}

.temple-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-elevated);
}

.temple-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.temple-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out-apple);
}

.temple-card:hover .temple-image img {
    transform: scale(1.05);
    /* Slight zoom on image too */
}

.temple-tag {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gradient-sacred);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.temple-content {
    padding: var(--space-lg);
}

.temple-content h4 {
    margin-bottom: var(--space-xs);
    /* Reduced from sm for better Proximity to location */
}

.temple-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.temple-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-saffron);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: var(--space-sm);
}

.temple-link:hover {
    color: var(--kumkum-red);
}

/* ===== India Post Stamp Style - Tirthankara Cards ===== */
.tirthankaras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-md);
}

.stamp-card {
    position: relative;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.stamp-card .stamp-outer {
    background: linear-gradient(135deg, #f8f4e8 0%, #f0e8d6 100%);
    padding: 12px;
    position: relative;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 0 20px rgba(139, 69, 19, 0.05);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Perforated edge effect using mask */
    --perforation-size: 8px;
    --perforation-gap: 4px;
    mask-image: radial-gradient(circle at var(--perforation-size) 0, transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at var(--perforation-size) 100%, transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at 0 var(--perforation-size), transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at 100% var(--perforation-size), transparent var(--perforation-size), black var(--perforation-size));
    mask-size: calc(var(--perforation-size) * 2 + var(--perforation-gap)) 100%,
        calc(var(--perforation-size) * 2 + var(--perforation-gap)) 100%,
        100% calc(var(--perforation-size) * 2 + var(--perforation-gap)),
        100% calc(var(--perforation-size) * 2 + var(--perforation-gap));
    mask-position: 0 0, 0 100%, 0 0, 100% 0;
    mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    -webkit-mask-image: radial-gradient(circle at var(--perforation-size) 0, transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at var(--perforation-size) 100%, transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at 0 var(--perforation-size), transparent var(--perforation-size), black var(--perforation-size)),
        radial-gradient(circle at 100% var(--perforation-size), transparent var(--perforation-size), black var(--perforation-size));
    -webkit-mask-size: calc(var(--perforation-size) * 2 + var(--perforation-gap)) 100%,
        calc(var(--perforation-size) * 2 + var(--perforation-gap)) 100%,
        100% calc(var(--perforation-size) * 2 + var(--perforation-gap)),
        100% calc(var(--perforation-size) * 2 + var(--perforation-gap));
    -webkit-mask-position: 0 0, 0 100%, 0 0, 100% 0;
    -webkit-mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
}

.stamp-card:hover .stamp-outer {
    transform: translateY(-8px) rotate(-2deg);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(139, 69, 19, 0.08);
}

.stamp-card .stamp-inner {
    background: linear-gradient(180deg, #fff9f0 0%, #f5ede0 100%);
    border: 3px solid var(--kumkum-red);
    padding: 15px 10px;
    text-align: center;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Stamp number badge */
.stamp-card .stamp-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--kumkum-red);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    font-family: 'Georgia', serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* India Post inspired header */
.stamp-card .stamp-header {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--kumkum-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Georgia', serif;
}

/* Symbol/Image area */
.stamp-card .stamp-symbol {
    font-size: 3rem;
    margin: 10px 0;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.stamp-card .stamp-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tirthankara name */
.stamp-card .stamp-name {
    font-family: var(--font-devanagari);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--deep-maroon);
    margin: 8px 0 4px;
    line-height: 1.2;
}

/* Tirthankara title */
.stamp-card .stamp-title {
    font-size: 0.75rem;
    color: var(--gold-dark);
    font-weight: 600;
    font-style: italic;
}

/* Lanchhan info */
.stamp-card .stamp-lanchhan {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--gold);
    width: 100%;
}

/* Stamp value decoration */
.stamp-card .stamp-value {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--kumkum-red);
    font-family: 'Georgia', serif;
}

/* Featured stamp (24th Tirthankara) */
.stamp-card.featured .stamp-inner {
    border-color: var(--gold);
    background: linear-gradient(180deg, #fffdf5 0%, #fff5e0 100%);
}

.stamp-card.featured .stamp-outer {
    background: linear-gradient(135deg, #fff8e8 0%, #ffefd0 100%);
}

.stamp-card.featured .stamp-number {
    background: var(--gold);
    color: var(--deep-maroon);
}

/* Dark mode adjustments */
[data-theme="dark"] .stamp-card .stamp-outer {
    background: linear-gradient(135deg, #3a3530 0%, #2d2825 100%);
}

[data-theme="dark"] .stamp-card .stamp-inner {
    background: linear-gradient(180deg, #2a2520 0%, #1f1b18 100%);
    border-color: var(--gold);
}

[data-theme="dark"] .stamp-card .stamp-name {
    color: var(--gold);
}

[data-theme="dark"] .stamp-card .stamp-number,
[data-theme="dark"] .stamp-card .stamp-header,
[data-theme="dark"] .stamp-card .stamp-value {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
}

/* Stamp Image Cards */
.stamp-card .stamp-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stamp-card:hover .stamp-img {
    transform: translateY(-8px) rotate(-2deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Placeholder for pending stamps */
.stamp-placeholder {
    background: linear-gradient(135deg, #f8f4e8 0%, #f0e8d6 100%);
    border: 3px dashed var(--gold);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stamp-placeholder .stamp-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gold);
    color: var(--deep-maroon);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.stamp-placeholder .stamp-symbol {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stamp-placeholder .stamp-name {
    font-family: var(--font-devanagari);
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-maroon);
}

/* Responsive grid */
@media (max-width: 768px) {
    .tirthankaras-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .stamp-card .stamp-inner {
        min-height: 160px;
        padding: 12px 8px;
    }

    .stamp-card .stamp-symbol {
        font-size: 2.2rem;
    }

    .stamp-card .stamp-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tirthankaras-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xs);
    }

    .stamp-card .stamp-inner {
        min-height: 140px;
    }

    .stamp-card .stamp-title,
    .stamp-card .stamp-lanchhan {
        display: none;
    }
}

/* ===== Content List (for category pages) ===== */
.content-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    max-width: 100%;
    margin: 0;
}

.content-list li {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, var(--cream-bg) 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-saffron);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.15);
    border-left-color: var(--gold);
}

.content-list li .number {
    background: var(--gradient-sacred);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.25);
}

.content-list li .title {
    font-weight: 600;
    color: var(--deep-maroon);
    font-family: var(--font-devanagari);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Responsive grid for tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Category Header ===== */
.category-header {
    font-size: 1.5rem;
    color: var(--deep-maroon);
    margin-bottom: var(--space-lg);
    padding-bottom: 12px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent 0%, var(--gold) 15%, var(--kumkum-red) 50%, var(--gold) 85%, transparent 100%) 1;
    text-align: center;
    font-family: var(--font-devanagari);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--kumkum-red);
    color: white;
}

.badge-gold {
    background: var(--gold);
    color: var(--kumkum-red-dark);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-dark);
}

/* ===== Hero Badge ===== */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--liquid-glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    color: var(--deep-maroon);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    backdrop-filter: var(--liquid-glass-blur);
    -webkit-backdrop-filter: var(--liquid-glass-blur);
    box-shadow: var(--liquid-glass-shadow);
}

/* ===== Back Link ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-saffron);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    transition: var(--transition-smooth);
}

.back-link:hover {
    color: var(--kumkum-red);
    transform: translateX(-4px);
}

/* ===== Namokar Mantra Special Section ===== */
.namokar-special {
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.05) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid var(--gold);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
    text-align: center;
}

.namokar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.namokar-icon {
    font-size: 2rem;
}

.namokar-header h3 {
    font-family: var(--font-devanagari);
    color: var(--deep-maroon);
    margin: 0;
}

.namokar-mantra {
    font-family: var(--font-devanagari);
    font-size: 1.2rem;
    color: var(--kumkum-red);
    line-height: 2;
    margin-bottom: var(--space-lg);
}

.namokar-mantra p {
    margin-bottom: var(--space-sm);
    color: var(--kumkum-red);
}

.namokar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-sacred);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.namokar-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    color: white;
}

/* ===== Principle Items ===== */
.principles {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.principle-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.principle-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.principle-content h4 {
    color: var(--deep-maroon);
    margin-bottom: 4px;
}

.principle-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== Fact Cards (Tirthankara Highlight) ===== */
.tirthankara-facts {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.fact-card {
    background: var(--cream-bg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.fact-card span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.fact-card strong {
    color: var(--deep-maroon);
    font-size: 0.95rem;
}

/* ===== Intro Box (for content pages) ===== */
.intro-box {
    background: var(--cream-bg);
    border-left: 4px solid var(--primary-saffron);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-body);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ===== Stotra/Prayer Blocks ===== */
.stotra-block {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-xl);
    border-bottom: 1px dashed #eee;
}

.stotra-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.verse-number {
    color: var(--primary-saffron);
    font-weight: bold;
    display: block;
    text-align: center;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.hindi-arth {
    font-family: var(--font-devanagari);
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.8;
    text-align: center;
    background: var(--cream-bg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

/* ===== Enhanced Search Styles ===== */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--cream-bg);
}

.search-result-item.selected {
    border-left: 3px solid var(--primary-saffron);
}

.search-result-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-radius: var(--radius-md);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-family: var(--font-devanagari);
    font-weight: 600;
    color: var(--deep-maroon);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-badge {
    background: var(--gradient-sacred);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    font-family: var(--font-devanagari);
}

/* Search section titles */
.search-section-title {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Recent/Popular search items */
.search-recent,
.search-popular {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-recent-icon,
.search-popular-icon {
    font-size: 1rem;
    opacity: 0.6;
}

/* No results state */
.search-no-results {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
}

.search-no-results-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-no-results p {
    margin-bottom: 8px;
}

.search-did-you-mean {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.suggestion-link {
    color: var(--primary-saffron);
    font-weight: 600;
    cursor: pointer;
}

.suggestion-link:hover {
    color: var(--kumkum-red);
    text-decoration: underline;
}

/* Voice button listening state */
.voice-btn.listening {
    animation: pulse 1s infinite;
    background: var(--kumkum-red) !important;
    color: white !important;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Search loading state */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 8px;
}

.search-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-saffron);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode search adjustments */
[data-theme="dark"] .search-results {
    background: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.selected {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-result-title {
    color: var(--gold-light);
}

[data-theme="dark"] .search-section-title {
    background: rgba(255, 255, 255, 0.03);
}

/* Mobile search enhancements */
@media (max-width: 768px) {
    .search-results {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        max-height: calc(100vh - 150px);
        border-radius: var(--radius-lg);
    }

    .search-result-item {
        padding: 14px 12px;
    }

    .search-result-badge {
        display: none;
    }

    .search-result-title {
        font-size: 0.95rem;
    }
}

/* ===== Intro Box (Inverted Pyramid) ===== */
.intro-box {
    background: linear-gradient(135deg, var(--cream-bg), #fff);
    border-left: 4px solid var(--kumkum-red);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.6;
}

.intro-box strong {
    color: var(--deep-maroon);
    font-size: 1.2rem;
    display: block;
    margin-bottom: var(--space-xs);
}

/* ===== Related Content (CCD - Conversion Loop) ===== */
.related-content {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.related-content h3 {
    font-family: var(--font-heading);
    color: var(--saffron-orange);
    margin-bottom: var(--space-md);
}

.content-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-light);
    /* Level 3: Micro-interaction */
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.content-card:hover {
    transform: translateY(-4px);
    /* Hover Lift Effect */
    box-shadow: var(--shadow-elevated);
}

.related-card {
    display: inline-block;
    background: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid var(--border-light);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--saffron-orange);
    color: var(--deep-maroon);
}

.related-sub {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-top: 4px;
}

/* ========================================
   JAIN JINVANI - macOS FINDER WINDOW
   Authentic "More Options" Interface
   ======================================== */

/* Window Container */
.finder-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 800px;
    max-width: 90vw;
    height: 500px;
    max-height: 80vh;
    z-index: 9999;

    display: flex;
    flex-direction: column;

    /* Apple Liquid Glass Material */
    background: var(--liquid-glass-bg);
    backdrop-filter: var(--liquid-glass-blur);
    -webkit-backdrop-filter: var(--liquid-glass-blur);

    border-radius: 12px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    /* Inner glow border */

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s var(--ease-apple);
}

.finder-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

/* Sidebar structure */
.finder-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ===== Title Bar ===== */
.finder-titlebar {
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Traffic Lights */
.traffic-lights {
    display: flex;
    gap: 8px;
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    position: relative;
    padding: 0;
    cursor: default;
}

.traffic-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1) inset;
    /* Subtle curve shading */
}

/* Hover Symbols */
.traffic-lights:hover .traffic-light::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    color: #333;
    font-size: 8px;
    font-weight: 800;
    font-family: sans-serif;
}

.traffic-close {
    background: #FF5F57;
    border: 1px solid #E0443E;
}

.traffic-minimize {
    background: #FEBC2E;
    border: 1px solid #D6A123;
}

.traffic-expand {
    background: #28C840;
    border: 1px solid #1AAB29;
}

/* Symbols on hover */
.traffic-lights:hover .traffic-close::after {
    content: 'âœ•';
}

.traffic-lights:hover .traffic-minimize::after {
    content: 'âˆ’';
}

.traffic-lights:hover .traffic-expand::after {
    content: 'â¤¢';
    font-size: 6px;
}

/* Title */
.window-title {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    opacity: 0.8;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Toolbar Icons (Right side) */
.window-toolbar {
    display: flex;
    gap: 12px;
    color: #666;
}

.toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toolbar-btn:hover {
    opacity: 1;
}

/* ===== Sidebar ===== */
.finder-sidebar {
    width: 200px;
    background: rgba(255, 255, 255, 0.4);
    /* Translucent sidebar */
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    padding-left: 8px;
    margin-bottom: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-item.active {
    background: rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* ===== Content Area ===== */
.finder-content {
    flex: 1;
    background: white;
    padding: 24px;
    overflow-y: auto;
}

.finder-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.finder-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Content Views */
.content-view {
    display: none;
    animation: fadeIn 0.2s ease;
}

.content-view.active {
    display: block;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] .finder-window {
    background: var(--liquid-glass-bg);
    /* Use dark variable */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .finder-titlebar {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .window-title {
    color: #eee;
}

[data-theme="dark"] .finder-sidebar {
    background: rgba(30, 30, 30, 0.4);
    border-right-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sidebar-group-title {
    color: #aaa;
}

[data-theme="dark"] .sidebar-item {
    color: #ddd;
}

[data-theme="dark"] .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .finder-content {
    background: #1e1e1e;
}

[data-theme="dark"] .finder-content h2 {
    color: #eee;
}

[data-theme="dark"] .finder-content p {
    color: #bbb;
}
