/* ============================================
   Yeshua Word Fellowship - Main Stylesheet
   ============================================ */

/* ============================================
   1. GLOBAL STYLES
   ============================================ */
body {
    padding-top: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.content {
    flex: 1;
}

/* ============================================
   2. COLOR THEME - Rich Medium Blue for Backgrounds, Light Blue for Accents
   ============================================ */
:root {
    --bs-primary: #4D99DE;
    --bs-primary-rgb: 77, 153, 222;
    --primary-color: #4D99DE;
    --primary-dark: #448CCB;
    --primary-light: #87CEEB;
    --primary-accent: #B8E2F2;
}

/* ============================================
   3. NAVIGATION BAR
   ============================================ */
.navbar {
    background-color: #4D99DE;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand, .nav-link {
    color: white !important;
}

.nav-link:hover {
    color: #e0e0e0 !important;
}

.nav-link {
    border-bottom: 2px solid transparent;
}

.nav-link.active {
    font-weight: bold;
    border-bottom-color: white; /* keep highlight without causing height change */
}

/* ============================================
   4. SEARCH CONTAINER
   ============================================ */
.search-container {
    background-color: #4D99DE;
    padding: 0.7rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   5. FOOTER
   ============================================ */
.footer {
    margin-top: 40px;
    padding: 15px 0;
    background-color: #4D99DE;
    color: white;
    border-radius: 8px 8px 0 0;
}

.footer .container {
    padding: 0 20px;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

.footer a {
    color: #e0e0e0;
    text-decoration: none;
    margin: 0 8px;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* ============================================
   6. BOOTSTRAP OVERRIDES - Primary Color
   ============================================ */
.btn-primary {
    background-color: #4D99DE;
    border-color: #4D99DE;
    color: white;
}

.btn-primary:hover {
    background-color: #448CCB;
    border-color: #448CCB;
    color: white;
}

.btn-outline-primary {
    color: #4D99DE;
    border-color: #4D99DE;
}

.btn-outline-primary:hover {
    background-color: #4D99DE;
    border-color: #4D99DE;
    color: white;
}

.text-primary {
    color: #4D99DE !important;
}

.bg-primary {
    background-color: #4D99DE !important;
    color: white !important;
}

/* ============================================
   7. CARDS
   ============================================ */
.card {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-body {
    padding: 1.25rem;
}

/* ============================================
   8. PAGE TITLE
   ============================================ */
.page-title {
    color: #4D99DE;
    border-bottom: 2px solid #4D99DE;
    padding-bottom: 0.5rem;
    margin: 1rem 0 2rem;
    font-weight: 600;
}

/* ============================================
   9. CONTENT COMPONENTS
   ============================================ */
.verse, .note, .comment, .reply {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.verse {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.note {
    margin-bottom: 15px;
    padding: 15px;
    border-left: 3px solid #87CEEB;
    background-color: #E8F5FA;
}

.comment {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.reply {
    margin-left: 30px;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
}

/* ============================================
   10. USER AVATARS
   ============================================ */
.user-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B8E2F2 0%, #A0D4E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto;
    border: 3px solid #B8E2F2;
}

.user-avatar-medium {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B8E2F2 0%, #A0D4E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #B8E2F2;
    flex-shrink: 0;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B8E2F2 0%, #A0D4E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #B8E2F2;
    flex-shrink: 0;
}

.user-avatar-tiny {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B8E2F2 0%, #A0D4E8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

/* ============================================
   11. USER PROFILE COMPONENTS
   ============================================ */
.user-item {
    transition: background-color 0.2s;
    border-radius: 4px;
    padding: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.user-item:hover {
    background-color: #f8f9fa;
}

.user-item a:hover {
    text-decoration: underline !important;
}

.user-list {
    max-height: 500px;
    overflow-y: auto;
}

.user-list::-webkit-scrollbar {
    width: 6px;
}

.user-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.user-list::-webkit-scrollbar-thumb {
    background: #4D99DE;
    border-radius: 3px;
}

.user-list::-webkit-scrollbar-thumb:hover {
    background: #448CCB;
}

/* ============================================
   12. POST CARDS (Community Feed)
   ============================================ */
.post-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: #87CEEB;
}

.post-content-preview {
    line-height: 1.5;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-content {
    line-height: 1.6;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}

/* ============================================
   13. BIBLE PAGE SPECIFIC
   ============================================ */
.list-group-item.active {
    background-color: #4D99DE !important;
    border-color: #4D99DE !important;
    color: white !important;
}

.list-group-item.active:hover {
    background-color: #448CCB !important;
    border-color: #448CCB !important;
}

/* Chapter Discussion Styles */
.comment-card {
    border-left: 3px solid #87CEEB;
    transition: box-shadow 0.2s;
}

.comment-card:hover {
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.2);
}

.reply-card {
    background-color: #f8f9fa;
    border-left: 2px solid #87CEEB;
}

.card-header.bg-primary {
    background-color: #4D99DE !important;
    color: white !important;
}

/* ============================================
   14. USER PROFILE PAGE SPECIFIC
   ============================================ */
.year-section {
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.year-section:hover {
    background-color: #f8f9fa;
}

.month-list {
    border-left: 2px solid #e9ecef;
    padding-left: 1rem;
}

.month-list a {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: all 0.2s;
}

.month-list a:hover {
    background-color: #e9ecef;
    text-decoration: none !important;
}

.month-list a.fw-bold {
    background-color: #e7f3ff;
    color: #0d6efd !important;
}

/* ============================================
   15. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .footer {
        padding: 12px 0;
    }
    
    .user-avatar-large {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .card {
        transition: transform 0.2s;
    }
    
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */
.alert-flash {
    margin-bottom: 1rem;
}

/* Avatar upload icon fix */
#avatarModal label[for="avatar"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
}

#avatarModal label[for="avatar"] i.bi-upload {
    display: inline-block !important;
    font-size: 1rem;
    line-height: 1;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* ============================================
   17. CHARMING TITLE STYLES (Modern, Gentle, Charming)
   ============================================ */
.charming-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #4D99DE 0%, #87CEEB 50%, #B8E2F2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.charming-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #B8E2F2, #A0D4E8, transparent);
    border-radius: 2px;
    animation: titleUnderline 2s ease-in-out infinite;
}

@keyframes titleUnderline {
    0%, 100% {
        width: 60px;
        opacity: 0.8;
    }
    50% {
        width: 100px;
        opacity: 1;
    }
}

.charming-title-main {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 300;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #4A5568 0%, #4D99DE 30%, #87CEEB 60%, #B8E2F2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 1rem;
}

.charming-title-main::before {
    content: '✨';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: sparkle 3s ease-in-out infinite;
}

.charming-title-main::after {
    content: '✨';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: sparkle 3s ease-in-out infinite 1.5s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) scale(1.2);
    }
}

.charming-subtitle {
    font-family: 'Georgia', serif;
    font-weight: 300;
    letter-spacing: 0.3px;
    color: #4D99DE;
    font-style: italic;
}

.section-title-wrapper {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.section-title-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #B8E2F2, #A0D4E8, transparent);
    border-radius: 2px;
}

/* Page title styling - apply charming style to h1.page-title and h1 elements */
h1.page-title,
h1:not(.charming-title-main):not(.charming-hero-title) {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #4D99DE 0%, #87CEEB 50%, #B8E2F2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

h1.page-title::after,
h1:not(.charming-title-main):not(.charming-hero-title)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #B8E2F2, #A0D4E8, transparent);
    border-radius: 2px;
    animation: titleUnderline 2s ease-in-out infinite;
}
