/**
 * Bible CMS Frontend CSS Stylesheet
 * Premium Modern, Clean, and Elegant Web Design
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Light Theme Palette */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --primary: #3b82f6;
    --primary-rgb: 59, 130, 246;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --accent: #8b5cf6;
    
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.8);
    --glass-blur: blur(12px);
}

[data-theme="dark"] {
    /* Dark Theme Palette */
    --bg-main: #0b0f19;
    --bg-surface: #141a2e;
    --bg-alt: #1e293b;
    --text-primary: #f3f4f6;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #60a5fa;
    --primary-rgb: 96, 165, 250;
    --primary-gradient: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    --accent: #a78bfa;
    
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(20, 26, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .display-font {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .glass-card:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

/* Navbar Custom Styling */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Banner Ads Area */
.ads-banner {
    max-width: 728px;
    margin: 20px auto;
    background-color: var(--bg-alt);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    height: 90px;
    overflow: hidden;
}

/* Theme Switcher Button */
.btn-theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-theme-toggle:hover {
    background-color: var(--bg-alt);
}

/* Hero Section */
.hero-gradient {
    padding: 80px 0;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 95% 85%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

/* Post Cards */
.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-img {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.category-badge {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.category-badge:hover {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

/* Daily Verse Module */
.daily-verse-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.daily-verse-card::after {
    content: '"';
    position: absolute;
    right: 20px;
    bottom: -40px;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.08);
    font-family: Georgia, serif;
}

.daily-verse-ref {
    font-family: var(--font-heading);
    font-weight: 600;
    opacity: 0.9;
}

/* Chatbot Floating Widget */
.chatbot-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    border: none;
}

.chatbot-launcher:hover {
    transform: scale(1.1) rotate(10deg);
}

.chatbot-container {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 550px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 150px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.chatbot-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-messages {
    flex: 1;
    background-color: var(--bg-surface);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.chat-bubble.bot {
    background-color: var(--bg-alt);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--primary-gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 15px;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input-area input {
    flex: 1;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.9rem;
}

.chatbot-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

.chatbot-input-area button {
    border: none;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Comments System styling */
.comment-item {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-bottom: 25px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-actions button {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 8px;
}

.comment-actions button:hover {
    color: var(--primary);
}

/* Smart Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-result-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: var(--bg-alt);
    color: var(--text-primary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-highlight {
    background-color: rgba(253, 224, 71, 0.4);
    font-weight: 600;
    border-radius: 2px;
    padding: 0 2px;
}
[data-theme="dark"] .search-highlight {
    background-color: rgba(234, 179, 8, 0.4);
}
