/* =========================================================
   FIRST CLASS TOURS — MASTER CSS (FINAL CLEAN VERSION)
   ========================================================= */

/* ═══════════ 1. VARIABLES & RESET ═══════════ */
:root {
    --wf-primary:        #0a3d26;
    --wf-primary-light:  #125c3a;
    --wf-primary-dark:   #062818;
    --wf-accent:         #d4a72c;
    --wf-navy:           #0d3b66;
    --wf-danger:         #dc2626;
    --wf-success:        #059669;
    --wf-warning:        #d97706;

    --fct-green:        var(--wf-primary);
    --fct-gold:         var(--wf-accent);
    --fct-navy:         var(--wf-navy);

    --wf-bg:            #f4f6f4;
    --wf-bg-alt:        #f8fafc;
    --wf-card:          #ffffff;
    --wf-text:          #0f172a;
    --wf-text-muted:    #64748b;
    --wf-border:        #e2e8f0;
    --wf-border-strong: #cbd5e1;

    --wf-radius-sm:     8px;
    --wf-radius:        14px;
    --wf-radius-lg:     20px;
    --wf-radius-full:   999px;

    --wf-shadow-sm:     0 1px 3px rgba(15,23,42,.06);
    --wf-shadow:        0 4px 20px rgba(10,61,38,.07);
    --wf-shadow-lg:     0 12px 40px rgba(10,61,38,.14);

    --wf-t:             .22s cubic-bezier(.4,0,.2,1);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    background: var(--wf-bg); 
    color: var(--wf-text); 
    line-height: 1.6; 
    font-size: 14px; 
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* 1.1 Gukosora amafoto yose */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wf-navy); text-decoration: none; transition: color var(--wf-t); }
a:hover { color: var(--wf-accent); }
button { font-family: inherit; }

h1,h2,h3,h4,h5 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.25; color: var(--wf-primary); }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; } h4 { font-size: 16px; }

.text-muted { color: var(--wf-text-muted) !important; }
.text-danger { color: var(--wf-danger) !important; }
.text-success { color: var(--wf-success) !important; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.fade-in-up { animation: fadeInUp .5s ease both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════ 2. BUTTONS & FORMS ═══════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border: none; border-radius: var(--wf-radius-full); font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--wf-t); white-space: nowrap; line-height: 1; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--wf-primary) 0%, var(--wf-primary-light) 100%); color: #fff; box-shadow: 0 4px 12px rgba(10,61,38,.25); }
.btn-primary:hover { background: linear-gradient(135deg, var(--wf-primary-light) 0%, var(--wf-accent) 100%); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,167,44,.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--wf-border-strong); color: var(--wf-primary); }
.btn-outline:hover { background: var(--wf-primary); border-color: var(--wf-primary); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 12.5px; }
.btn-block { width: 100%; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--wf-primary); margin-bottom: 6px; }
.form-control { width: 100%; padding: 11px 14px; font-family: inherit; font-size: 14px; color: var(--wf-text); background: #fff; border: 1.5px solid var(--wf-border); border-radius: var(--wf-radius-sm); outline: none; transition: var(--wf-t); }
.form-control:focus { border-color: var(--wf-primary); box-shadow: 0 0 0 3px rgba(10,61,38,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ═══════════ 3. HEADER & NAVIGATION ═══════════ */
.fct-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--wf-border); }
.fct-nav-container { max-width: 1400px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.fct-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.fct-logo img { height: 40px; object-fit: contain; }
.brand-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; color: var(--wf-primary); }
.brand-gold { color: var(--wf-accent); font-style: italic; }
.fct-desktop-menu { display: flex; gap: 4px; }
.fct-desktop-menu a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--wf-radius-full); font-size: 14px; font-weight: 600; color: var(--wf-text-muted); transition: var(--wf-t); }
.fct-desktop-menu a:hover, .fct-desktop-menu a.active { background: rgba(10,61,38,.06); color: var(--wf-primary); }
.fct-welcome-message { flex: 1; text-align: center; font-size: 13.5px; color: var(--wf-text-muted); display: none; }
.fct-nav-icons { display: flex; align-items: center; gap: 4px; }
.fct-nav-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border-radius: 50%; border: 2px solid #fff; }
.fct-avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--wf-accent); }

/* ═══════════ 4. 3-COLUMN LAYOUT ═══════════ */
.fct-layout { max-width: 1280px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.fct-sidebar { position: sticky; top: 84px; height: fit-content; }
.fct-feed { width: 100%; min-width: 0; overflow: hidden; }

/* ═══════════ 5. SIDEBARS & WIDGETS ═══════════ */
.fct-card, .fct-widget { background: var(--wf-card); border: 1px solid var(--wf-border); border-radius: var(--wf-radius); padding: 18px; margin-bottom: 20px; box-shadow: var(--wf-shadow-sm); }
.widget-title { font-size: 13px; font-weight: 800; color: var(--wf-primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--wf-border); display: flex; align-items: center; gap: 8px; }

.fct-nav-menu { background: var(--wf-card); border: 1px solid var(--wf-border); border-radius: var(--wf-radius); padding: 8px; box-shadow: var(--wf-shadow-sm); }
.fct-nav-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--wf-radius-sm); font-size: 14px; font-weight: 600; color: var(--wf-text); transition: var(--wf-t); }
.fct-nav-menu a i { width: 18px; text-align: center; color: var(--wf-text-muted); }
.fct-nav-menu a:hover, .fct-nav-menu a.active { background: rgba(10,61,38,.07); color: var(--wf-primary); transform: translateX(3px); }
.fct-nav-menu a.active i { color: var(--wf-accent); }
.gallery-link { background: rgba(212,167,44,0.1); color: var(--wf-primary) !important; font-weight: 800; }

/* Mini Gallery (Mu Ibumoso) */
.mini-gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-gallery-item { display: block; width: 100%; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; background: #000; }
.mini-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.mini-video-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #1e293b; color: #fff; }
.widget-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.widget-title-mini { margin: 0; font-size: 12px; text-transform: uppercase; font-weight: 800; }
.view-all-link { font-size: 11px; font-weight: 700; color: var(--wf-accent); }

/* Suggested Users (Iburyo) */
.suggested-user-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.suggested-user-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.user-info { flex: 1; }
.user-info strong { font-size: 13px; display: block; color: var(--wf-primary); }
.user-info span { font-size: 11px; color: var(--wf-text-muted); }
.announcement-box { background: #fffbeb; padding: 12px; border-radius: 8px; border-left: 3px solid var(--wf-accent); }
.announcement-box strong { font-size: 13px; color: var(--wf-primary); display: block; }
.announcement-box p { font-size: 12px; color: var(--wf-text-muted); margin: 4px 0 0; }

/* ═══════════ 6. CREATE POST ═══════════ */
.fct-create-post { background: var(--wf-card); border: 1px solid var(--wf-border); border-radius: var(--wf-radius); padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--wf-shadow-sm); }
.create-post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.create-post-header h4 { font-size: 15px; margin: 0; color: var(--wf-primary); }
.avatar-sm { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.create-post-input-area { background: var(--wf-bg-alt); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.post-title-input { width: 100%; padding: 6px 0; border: none; background: transparent; font-size: 14px; font-weight: 700; margin-bottom: 6px; outline: none; border-bottom: 1px dashed var(--wf-border); }
.post-textarea { width: 100%; border: none; background: transparent; font-size: 15px; outline: none; resize: none; min-height: 50px; font-family: inherit; }
.preview-img { max-height: 200px; border-radius: 8px; margin-top: 10px; }
.create-post-actions { display: flex; justify-content: space-between; align-items: center; }
.media-label { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--wf-success); }

/* Tabs (Story / Question) */
.post-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--wf-border); margin-bottom: 12px; }
.p-tab { background: none; border: none; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--wf-text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: var(--wf-t); }
.p-tab.active { color: var(--wf-primary); border-bottom-color: var(--wf-accent); }

/* ═══════════ 7. FEED POSTS (LinkedIn, Twitter, Quora) ═══════════ */
.fct-feed-container { display: flex; flex-direction: column; gap: 20px; }

.post-card { background: #fff; border: 1px solid var(--wf-border); border-radius: var(--wf-radius-lg); box-shadow: var(--wf-shadow-sm); overflow: hidden; position: relative; }
.post-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; }
.post-avatar-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.post-author-info { flex: 1; min-width: 0; }
.post-author-info strong { display: block; font-size: 15px; color: var(--wf-primary); }
.post-author-info span { font-size: 12px; color: var(--wf-text-muted); }
.verified-icon { color: #3b82f6; font-size: 12px; }
.post-title { padding: 0 20px; font-size: 17px; margin-bottom: 8px; color: var(--wf-primary); font-family: 'Inter', sans-serif; }
.post-caption { padding: 0 20px 16px; font-size: 14.5px; line-height: 1.5; color: var(--wf-text); word-wrap: break-word; }

.post-media-wrapper { background: #000; position: relative; }
.single-post-img { width: 100%; max-height: 500px; object-fit: contain; display: block; }
.post-video { width: 100%; max-height: 500px; display: block; }

.post-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.post-carousel::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; }
.carousel-slide img { width: 100%; max-height: 500px; object-fit: contain; display: block; }

.post-actions { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--wf-border); background: #fff; }
.action-btn { display: flex; align-items: center; gap: 6px; background: transparent; border: none; font-size: 13px; font-weight: 600; color: var(--wf-text-muted); cursor: pointer; padding: 8px 12px; border-radius: 8px; text-decoration: none; transition: var(--wf-t); }
.action-btn i { font-size: 18px; }
.action-btn:hover { background: var(--wf-bg-alt); color: var(--wf-primary); }
.action-meta { font-size: 12px; color: var(--wf-text-muted); }
.btn-like.liked { color: #ef4444; }
.btn-like.liked i { animation: heartbeat .3s ease; }
@keyframes heartbeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

.fct-post-quora { background: #fff; border: 1px solid var(--wf-border); border-radius: var(--wf-radius-lg); padding: 20px; box-shadow: var(--wf-shadow-sm); }
.quora-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.quora-icon { color: var(--wf-accent); font-size: 24px; }
.quora-header h3 { font-size: 18px; margin: 4px 0 0 0; color: var(--wf-primary); font-family: 'Inter', sans-serif; font-weight: 700; }
.quora-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--wf-accent); }

.repost-indicator { position: absolute; top: 12px; left: 20px; background: #fff; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--wf-border); font-size: 11px; font-weight: 600; color: var(--wf-text-muted); display: flex; align-items: center; gap: 6px; }
.repost-indicator i { color: var(--wf-success); }

/* ═══════════ 8. AUTH PAGES (Login / Register) ═══════════ */
.login-wrapper { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(135deg, rgba(10, 61, 38, 0.95) 0%, rgba(13, 59, 102, 0.9) 100%), url('https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?q=80&w=1920') center/cover; }
.login-card { width: 100%; max-width: 440px; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); border-radius: var(--wf-radius-lg); padding: 40px 32px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2); animation: slideUp 0.5s ease; }
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.login-logo img { height: 50px; object-fit: contain; }
.login-logo h1 { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--wf-primary); font-weight: 900; margin: 0; }
.login-logo h1 span { color: var(--wf-accent); font-style: italic; }
.login-header h2 { font-size: 22px; color: var(--wf-primary); margin-bottom: 8px; }
.login-header p { font-size: 14px; color: var(--wf-text-muted); }

.input-icon-wrapper { position: relative; }
.input-icon-wrapper > i:first-child { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--wf-text-muted); font-size: 16px; }
.input-icon-wrapper .form-control { padding-left: 45px; padding-right: 45px; background: var(--wf-bg-alt); }
.toggle-password { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--wf-text-muted); cursor: pointer; font-size: 16px; transition: 0.2s; }
.toggle-password:hover { color: var(--wf-primary); }

.form-options { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 24px; font-size: 13px; }
.remember-me { display: flex; align-items: center; gap: 8px; color: var(--wf-text-muted); cursor: pointer; }
.forgot-link { color: var(--wf-accent); font-weight: 700; }
.login-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--wf-text-muted); border-top: 1px solid var(--wf-border); padding-top: 20px; }
.login-footer a { font-weight: 800; color: var(--wf-primary); }

.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-option { cursor: pointer; display: block; }
.role-option input[type="radio"] { display: none; }
.role-card { border: 2px solid var(--wf-border); border-radius: var(--wf-radius-sm); padding: 16px; text-align: center; transition: all 0.2s ease; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.role-card i { font-size: 24px; color: var(--wf-text-muted); margin-bottom: 4px; }
.role-card strong { font-size: 14px; color: var(--wf-text); }
.role-card span { font-size: 11px; color: var(--wf-text-muted); line-height: 1.3; }
.role-option input[type="radio"]:checked + .role-card { border-color: var(--wf-primary); background: rgba(10, 61, 38, 0.04); box-shadow: 0 0 0 2px rgba(10, 61, 38, 0.1); }
.role-option input[type="radio"]:checked + .role-card i { color: var(--wf-accent); }

/* ═══════════ 9. CHAT / MESSAGES SYSTEM ═══════════ */
.chat-layout { max-width: 1100px; margin: 20px auto; padding: 0 20px; display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 120px); gap: 20px; }
.chat-sidebar { background: #fff; border-radius: var(--wf-radius-lg); border: 1px solid var(--wf-border); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--wf-shadow-sm); }
.chat-sidebar-header { padding: 20px; border-bottom: 1px solid var(--wf-border); background: var(--wf-primary); color: #fff; }
.chat-sidebar-header h3 { margin: 0; color: #fff; font-size: 18px; }
.chat-contacts { flex: 1; overflow-y: auto; background: var(--wf-bg-alt); }

.contact-item { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--wf-border); transition: background 0.2s; color: var(--wf-text); }
.contact-item:hover, .contact-item.active { background: #fff; border-left: 4px solid var(--wf-accent); }
.contact-item img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.contact-info strong { display: block; font-size: 14.5px; color: var(--wf-primary); }
.contact-info small { font-size: 12px; color: var(--wf-text-muted); }

.chat-main { background: #fff; border-radius: var(--wf-radius-lg); border: 1px solid var(--wf-border); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--wf-shadow-sm); }
.chat-header { padding: 15px 20px; border-bottom: 1px solid var(--wf-border); display: flex; align-items: center; gap: 15px; background: #fff; }
.chat-header img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.chat-header-info strong { display: block; font-size: 15px; color: var(--wf-primary); }
.chat-header-info small { font-size: 12px; color: var(--wf-text-muted); }
.back-btn { display: none; color: var(--wf-primary); font-size: 18px; margin-right: 5px; cursor: pointer; }

.chat-messages { flex: 1; padding: 20px; overflow-y: auto; background: #efeae2; display: flex; flex-direction: column; gap: 8px; }
.message-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; word-wrap: break-word; position: relative; }
.message-bubble p { margin: 0 0 4px 0; }
.message-bubble small { display: block; font-size: 10px; color: #667781; text-align: right; }
.message-bubble.sent { align-self: flex-end; background: #d9fdd3; color: #111; border-bottom-right-radius: 2px; }
.message-bubble.received { align-self: flex-start; background: #fff; color: #111; border-bottom-left-radius: 2px; box-shadow: 0 1px 1px rgba(0,0,0,0.1); }

.chat-input-area { padding: 12px 15px; background: #fff; border-top: 1px solid var(--wf-border); }
.chat-input-area form { display: flex; gap: 10px; }
.chat-input-area input { flex: 1; padding: 12px 18px; border: 1px solid var(--wf-border); border-radius: 30px; outline: none; font-size: 14px; background: var(--wf-bg-alt); }
.chat-input-area input:focus { border-color: var(--wf-primary); }
.chat-input-area .btn { width: 48px; height: 48px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; }

.chat-empty, .chat-empty-small { text-align: center; padding: 40px 20px; color: var(--wf-text-muted); }
.chat-empty i, .chat-empty-small i { font-size: 50px; opacity: 0.3; margin-bottom: 15px; }
.chat-empty h3 { margin-bottom: 5px; }
.chat-empty p, .chat-empty-small p { font-size: 13px; margin-bottom: 10px; }

/* ═══════════ 10. FOOTER & MOBILE NAV ═══════════ */
/* Hisha utubuto twa Mobile kuri Desktop */
.fct-bottom-nav { display: none; }

/* Desktop Footer */
.fct-desktop-footer { 
    display: block; 
    background: var(--wf-primary-dark, #062818); 
    color: #fff; 
    padding: 60px 20px 20px; 
    margin-top: 60px; 
    clear: both; 
    position: relative; 
    z-index: 10; 
}
.footer-container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; text-decoration: none; }
.footer-brand .footer-logo img { height: 40px; }
.footer-brand .footer-logo h3 { font-family: 'Playfair Display', serif; font-size: 24px; color: #fff; margin: 0; }
.footer-brand .footer-logo h3 span { color: var(--wf-accent); font-style: italic; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.6; margin-bottom: 20px; max-width: 300px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; transition: 0.3s; }
.footer-social a:hover { background: var(--wf-accent); color: #000; transform: translateY(-3px); }
.footer-links h4 { color: var(--wf-accent); font-size: 14px; text-transform: uppercase; margin-bottom: 20px; }
.footer-links a { display: block; color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 12px; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: #fff; transform: translateX(5px); }
.footer-bottom { max-width: 1280px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.5); }

/* ═══════════ 11. FLOATING CHAT WIDGET ═══════════ */
.chat-widget-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.chat-widget-btn { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-light)); color: #fff; border: none; font-size: 26px; cursor: pointer; box-shadow: 0 10px 25px rgba(10,61,38,0.4); transition: transform 0.3s ease; display: flex; align-items: center; justify-content: center; }
.chat-widget-btn:hover { transform: scale(1.1) rotate(-5deg); }
.chat-widget-popup { position: absolute; bottom: 75px; right: 0; width: 340px; height: 480px; background: #fff; border-radius: var(--wf-radius-lg); box-shadow: 0 20px 50px rgba(0,0,0,0.2); display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--wf-border); transform-origin: bottom right; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chat-widget-popup.active { display: flex; }
.chat-widget-header { background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-light)); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.cw-header-user { display: flex; align-items: center; gap: 12px; }
.cw-header-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); }
.cw-header-user h4 { margin: 0; font-size: 15px; color: #fff; font-family: 'Inter', sans-serif; }
.cw-header-user span { font-size: 11px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 4px; }
.cw-header-user span i { color: #4ade80; font-size: 8px; }
.cw-close-btn { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.cw-close-btn:hover { background: rgba(255,255,255,0.3); }
.chat-widget-body { flex: 1; overflow-y: auto; background: var(--wf-bg-alt); }
.chat-widget-loading { text-align: center; padding: 30px; color: var(--wf-text-muted); font-size: 13px; }
.chat-widget-body .contact-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--wf-border); background: #fff; text-decoration: none; transition: 0.2s; }
.chat-widget-body .contact-item:hover { background: var(--wf-bg); }
.chat-widget-body .contact-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-widget-body .contact-item strong { display: block; font-size: 14px; color: var(--wf-primary); }
.chat-widget-body .contact-item small { font-size: 12px; color: var(--wf-text-muted); }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* ═══════════ 12. MODALS & ANIMATIONS ═══════════ */
.voice-note-modal { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: var(--wf-radius-lg); padding: 20px; box-shadow: var(--wf-shadow-lg); z-index: 10000; display: none; flex-direction: column; align-items: center; width: 90%; max-width: 350px; border: 2px solid var(--wf-accent); }
.voice-note-modal.active { display: flex; }
.audio-wave { display: flex; justify-content: center; gap: 4px; height: 40px; align-items: center; margin: 15px 0; }
.audio-wave span { width: 5px; background: var(--wf-primary); border-radius: 4px; animation: wave 1s infinite alternate; }
.video-room-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 10000; display: none; align-items: center; justify-content: center; }
.video-room-backdrop.active { display: flex; }
.video-room-container { background: #1e293b; width: 90%; max-width: 700px; height: 450px; border-radius: var(--wf-radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wave { 0% { opacity: 0.5; transform: scaleY(0.8); } 100% { opacity: 1; transform: scaleY(1); } }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* ═══════════ 13. RESPONSIVE (MOBILE & TABLET) ═══════════ */
@media (max-width: 1100px) { 
    .fct-layout { grid-template-columns: 240px minmax(0, 1fr); } 
    .fct-sidebar.right-sidebar { display: none; } 
}

@media (max-width: 900px) {
    .fct-desktop-menu, .brand-title, .fct-welcome-message { display: none; }
    .fct-nav-container { padding: 10px 14px; justify-content: space-between; }
    
    .fct-layout { display: block; padding: 10px; margin: 10px auto; max-width: 100%; }
    .fct-sidebar { display: none !important; } 
    .fct-feed { max-width: 100%; }
    
    .form-row { grid-template-columns: 1fr; }
    .login-card { padding: 30px 20px; }
    
    .chat-layout { display: block; padding: 10px; height: calc(100vh - 140px); }
    .chat-sidebar, .chat-main { height: 100%; border-radius: 12px; }
    .hide-on-mobile { display: none !important; }
    .back-btn { display: block; }
    .message-bubble { max-width: 85%; }

    .fct-desktop-footer { display: none; }

    .fct-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--wf-border);
        justify-content: space-around;
        padding: 8px 0 12px;
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(10,61,38,.08);
    }
    .fct-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--wf-text-muted); font-size: 10px; font-weight: 600; }
    .fct-bottom-nav a i { font-size: 20px; }
    .fct-bottom-nav a.active { color: var(--wf-primary); }
    
    body { padding-bottom: 80px !important; }

    .chat-widget-container { bottom: 90px !important; right: 15px !important; }
    .chat-widget-popup { width: calc(100vw - 30px) !important; right: -5px !important; height: 60vh !important; }
}/* =========================================================
   PREMIUM HEADER STYLING (Innovative & Clean)
   ========================================================= */

.fct-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: saturate(180%) blur(15px);
    -webkit-backdrop-filter: saturate(180%) blur(15px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 20px rgba(10, 61, 38, 0.03);
}

.fct-nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ibi bituma ibintu bigenda kumpande */
    gap: 20px;
}

/* Logo */
.fct-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}
.fct-logo img {
    height: 38px;
    object-fit: contain;
}
.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--wf-primary);
    letter-spacing: -0.5px;
}
.brand-gold {
    color: var(--wf-accent);
    font-style: italic;
}

/* Desktop Menu */
.fct-desktop-menu {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    flex: 1; /* Ifata umwanya uri hagati */
}
.fct-desktop-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--wf-radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--wf-text-muted);
    transition: all 0.2s ease;
}
.fct-desktop-menu a:hover {
    background: rgba(10, 61, 38, 0.05);
    color: var(--wf-primary);
}
.fct-desktop-menu a.active {
    background: rgba(10, 61, 38, 0.08);
    color: var(--wf-primary);
    font-weight: 700;
}

/* Search Bar (Desktop) */
.fct-global-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--wf-bg-alt);
    border: 1.5px solid transparent;
    border-radius: var(--wf-radius-full);
    transition: all 0.3s ease;
    width: 280px;
}
.fct-global-search:focus-within {
    background: #fff;
    border-color: var(--wf-primary);
    box-shadow: 0 0 0 4px rgba(10, 61, 38, 0.08);
}
.fct-global-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: var(--wf-text);
}
.fct-global-search i {
    color: var(--wf-text-muted);
    font-size: 14px;
}

/* Icons (Right Side) */
.fct-nav-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--wf-primary);
    font-size: 18px;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
}
.icon-btn:hover {
    background: rgba(10, 61, 38, 0.06);
    color: var(--wf-accent);
}

/* Umukandara w'umuhondo kuri Avatar */
.profile-btn {
    padding: 2px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.profile-btn:hover {
    border-color: var(--wf-accent);
}
.fct-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

/* Logout Icon (Umukandara utukura) */
.logout-btn {
    color: #ef4444;
}
.logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Fisa search bar kuri mobile, werekane icon gusa */
.mobile-search-btn { display: none; }


/* =========================================
   RESPONSIVE (Kuri Telefone)
   ========================================= */
@media (max-width: 900px) {
    .fct-nav-container {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .fct-desktop-menu { display: none; }
    .fct-global-search { display: none; }
    .mobile-search-btn { display: flex; }
    
    .brand-title { font-size: 18px; }
    .fct-logo img { height: 34px; }
    
    /* Gukuraho utubuto tumwe na tumwe kuri telefone kugira ngo bidahira */
    .logout-btn { display: none; } /* Logout izajya kuri mobile bottom nav cyangwa Profile */
    
    .fct-nav-icons { gap: 2px; }
    .icon-btn { width: 36px; height: 36px; font-size: 16px; }
    .fct-avatar-sm { width: 30px; height: 30px; }
}
/* =========================================================
   MOBILE COMMUNITY BANNER (FIXED VERSION)
   ========================================================= */

/* 1. Hisha banner kuri Desktop */
@media (min-width: 901px) {
    .mobile-community-banner {
        display: none !important;
    }
}

/* 2. Erekana banner kuri Mobile gusa */
@media (max-width: 900px) {
    /* Gukuraho umwanya w'ubusa */
    .fct-layout {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    .fct-feed {
        padding: 10px !important;
        margin-top: 0 !important;
    }

    /* Imiterere yuzuye ya Banner */
    .mobile-community-banner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: linear-gradient(135deg, var(--wf-primary) 0%, var(--wf-primary-dark) 100%) !important;
        border-radius: var(--wf-radius) !important;
        padding: 16px 18px !important;
        margin: 10px 10px 16px 10px !important;
        color: #ffffff !important;
        box-shadow: 0 8px 20px rgba(10,61,38,0.15) !important;
        position: relative !important;
        overflow: hidden !important;
    }

    /* Akantu kameze nk'uruziga mu nyuma */
    .mobile-community-banner::before {
        content: '' !important;
        position: absolute !important;
        top: -50% !important; right: -20% !important;
        width: 150px !important; height: 150px !important;
        background: rgba(255,255,255,0.08) !important;
        border-radius: 50% !important;
        z-index: 1 !important;
    }

    /* Umutwe w'inyandiko */
    .mcb-content {
        position: relative !important;
        z-index: 2 !important;
        flex: 1 !important;
    }

    .mcb-content h4 {
        color: #ffffff !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        margin: 0 0 4px 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .mcb-content p {
        color: rgba(255,255,255,0.85) !important;
        font-size: 12px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }

    /* Buto ya "Plan Trip" */
    .mcb-btn {
        position: relative !important;
        z-index: 2 !important;
        background: var(--wf-accent) !important; /* Umuhondo */
        color: #000000 !important;
        font-weight: 800 !important;
        border: none !important;
        white-space: nowrap !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
        transition: transform 0.2s ease !important;
    }

    .mcb-btn:hover {
        background: var(--wf-accent-light) !important;
        transform: translateY(-2px) !important;
    }
}
/* =========================================================
   HEADER & MOBILE SEARCH BAR FIX
   ========================================================= */

/* 1. Hisha Mobile Search kuri Desktop */
.mobile-search-form {
    display: none;
}

/* 2. Kuri Telefone (Mobile) */
@media (max-width: 900px) {
    
    /* --- Header Fix --- */
    .fct-nav-container {
        padding: 10px 14px !important;
        gap: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Hisha Desktop Search */
    .fct-global-search {
        display: none !important;
    }

    /* Erekana Mobile Search */
    .mobile-search-form {
        display: flex !important;
        align-items: center !important;
        background: var(--wf-bg-alt) !important;
        border: 1px solid var(--wf-border) !important;
        border-radius: 20px !important;
        padding: 6px 12px !important;
        flex: 1 !important; /* Ifata umwanya wose uri hagati */
        margin: 0 10px !important;
    }

    .mobile-search-form input {
        border: none !important;
        background: transparent !important;
        outline: none !important;
        font-size: 13px !important;
        width: 100% !important;
        margin-left: 6px !important;
        color: var(--wf-text) !important;
    }
    
    .mobile-search-form i {
        color: var(--wf-text-muted) !important;
        font-size: 13px !important;
    }

    /* --- Community Banner Fix (Kugira ngo igire ibara) --- */
    .mobile-community-banner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: linear-gradient(135deg, #0a3d26 0%, #062818 100%) !important; /* Gradient y'icyatsi */
        color: #ffffff !important;
        border-radius: var(--wf-radius) !important;
        padding: 16px 18px !important;
        margin: 10px 10px 16px 10px !important;
        box-shadow: 0 8px 20px rgba(10,61,38,0.15) !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .mobile-community-banner::before {
        content: '' !important;
        position: absolute !important;
        top: -50% !important; right: -20% !important;
        width: 150px !important; height: 150px !important;
        background: rgba(255,255,255,0.08) !important;
        border-radius: 50% !important;
        z-index: 1 !important;
    }

    .mcb-content {
        position: relative !important;
        z-index: 2 !important;
        flex: 1 !important;
    }

    .mcb-content h4 {
        color: #ffffff !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        margin: 0 0 4px 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .mcb-content p {
        color: rgba(255,255,255,0.85) !important;
        font-size: 12px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }

    .mcb-btn {
        position: relative !important;
        z-index: 2 !important;
        background: #d4a72c !important; /* Umuhondo */
        color: #000000 !important;
        font-weight: 800 !important;
        border: none !important;
        white-space: nowrap !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
        transition: transform 0.2s ease !important;
    }

    .mcb-btn:hover {
        background: #e8bf4d !important;
        transform: translateY(-2px) !important;
    }
}
        case 'create_post':
            $content = trim($_POST['content'] ?? '');
            $video_url = trim($_POST['video_url'] ?? ''); // 🚨 Fata link
            $post_type = 'general';
            
            $media_paths = [];
            
            // 🚨 Gufata Amafoto NA Video byose hamwe
            if (isset($_FILES['media']) && is_array($_FILES['media']['name'])) {
                $file_count = count($_FILES['media']['name']);
                $max_files = min($file_count, 5); // Fata 5 gusa niba ari menshi
                
                for ($i = 0; $i < $max_files; $i++) {
                    if ($_FILES['media']['error'][$i] === UPLOAD_ERR_OK) {
                        $tmp_name = $_FILES['media']['tmp_name'][$i];
                        $name = $_FILES['media']['name'][$i];
                        $file_ext = strtolower(pathinfo($name, PATHINFO_EXTENSION));
                        
                        $allowed_img = ['jpg', 'jpeg', 'png', 'gif', 'webp'];
                        $allowed_vid = ['mp4', 'webm', 'mov'];

                        if (in_array($file_ext, $allowed_img)) {
                            $single_file = [
                                'name' => $name,
                                'type' => $_FILES['media']['type'][$i],
                                'tmp_name' => $tmp_name,
                                'error' => $_FILES['media']['error'][$i],
                                'size' => $_FILES['media']['size'][$i]
                            ];
                            $path = handle_image_upload($single_file, 'post');
                            if ($path) $media_paths[] = $path;
                        } elseif (in_array($file_ext, $allowed_vid)) {
                            $upload_dir = 'uploads/videos/';
                            if (!is_dir($upload_dir)) mkdir($upload_dir, 0777, true);
                            
                            $filename = uniqid('vid_') . '.' . $file_ext;
                            $target_file = $upload_dir . $filename;
                            
                            if (move_uploaded_file($tmp_name, $target_file)) {
                                $media_paths[] = $target_file; // 🚨 Bikiza muri array imwe
                            }
                        }
                    }
                }
            }

            if (empty($content) && empty($media_paths) && empty($video_url)) {
                echo json_encode(['status' => 'error', 'message' => 'Post cannot be empty']);
                exit;
            }

            // 🚨 Bika byose nka string imwe (img1.jpg,vid1.mp4,img2.jpg)
            $media_string = !empty($media_paths) ? implode(',', $media_paths) : null;
            $id = bin2hex(random_bytes(16));
            
            $stmt = $db->prepare("INSERT INTO community_posts (id, user_id, content, image, video_url, post_type, status, created_at) VALUES (?, ?, ?, ?, ?, ?, 'active', NOW())");
            
            if ($stmt->execute([$id, $user_id, $content, $media_string, $video_url, $post_type])) {
                echo json_encode(['status' => 'success', 'message' => 'Post created successfully!']);
            } else {
                echo json_encode(['status' => 'error', 'message' => 'Failed to create post']);
            }
            break;
            /* =========================================
   POST MEDIA & CAROUSEL STYLING (Kuri Media)
   ========================================= */

/* Ibi bituma amafoto n'amavideo agira size imwe kandi ase neza */
.post-media-wrapper {
    background: #000;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    max-height: 500px; /* Ntarenga 500px */
}

.single-post-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover; /* Ikatisha ifoto nta kuyimenagura */
    display: block;
}

.post-video {
    width: 100%;
    max-height: 500px;
    object-fit: contain; /* Video igaragara yose nta kugabanywa */
    display: block;
}

/* Carousel (Amafoto anyerera) */
.post-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    width: 100%;
}
.post-carousel::-webkit-scrollbar { display: none; }

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    max-height: 500px;
}

.carousel-slide img {
    width: 100%;
    max-height: 500px;
    object-fit: cover; /* Ifoto iguma mu buryo bwiza */
    display: block;
}

.carousel-slide video {
    width: 100%;
    max-height: 500px;
    object-fit: contain; /* Video igaragara yose */
    display: block;
}/* =========================================
   CONNECTION BUTTONS (Connect, Accept, Pending)
   ========================================= */

/* Buto ya Connect (Icyatsi kibisi) */
.btn-connect {
    background: var(--wf-primary);
    color: #fff;
    border: none;
    transition: 0.2s;
}
.btn-connect:hover {
    background: var(--wf-primary-light);
    transform: translateY(-2px);
}

/* Buto ya Accept (Icyatsi gikeye cyane - Success) */
.btn-accept {
    background: #10b981; /* Success green */
    color: #fff;
    border: none;
    transition: 0.2s;
}
.btn-accept:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Buto ya Pending (Iyijimye itakora) */
.btn-pending {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Buto ya Chat (Icyatsi kijimye) */
.btn-chat-action {
    background: var(--wf-primary);
    color: #fff;
    border: none;
}
.btn-chat-action:hover {
    background: var(--wf-primary-light);
}/* =========================================================
   CHAT WIDGET - FLOATING POPUP (Kuri Mobile ni nto)
   ========================================================= */

/* Ibi ni byo bikora kuri Desktop na Mobile */
.chat-widget-container {
    position: fixed;
    bottom: 30px; 
    right: 30px;
    z-index: 9999;
}

.chat-widget-btn {
    width: 55px; height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-light));
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(10,61,38,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-widget-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 340px; /* Ubugari kuri Desktop */
    height: 480px; /* Uburebure kuri Desktop */
    background: #fff;
    border-radius: var(--wf-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none; 
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--wf-border);
    animation: popIn 0.2s ease-out;
}

.chat-widget-popup.active {
    display: flex;
}

/* =========================================
   KURI TELEFONE (Mobile)
   ========================================= */
@media (max-width: 900px) {
    /* Gushyira akabuto hejuru gato y'utubuto two hasi (Bottom Nav) */
    .chat-widget-container {
        bottom: 85px !important; 
        right: 15px !important;
    }

    /* Guhindura iyi Popup kugira ngo ibe nto, ariko ibere ku ruhande */
    .chat-widget-popup {
        position: fixed !important;
        bottom: 85px !important; /* Iri hejuru y'utubuto twa hasi */
        right: 15px !important;
        width: calc(100vw - 30px) !important; /* Ifata ubugari bwose uretse imyanya 15px impande zombi */
        max-width: 350px !important; /* Ntirenza 350px */
        height: 60vh !important; /* Ifata 60% y'uburebure bw'ecran */
        max-height: 500px !important;
        border-radius: 15px !important; /* Ifite impande zikomeye nziza */
        z-index: 99999 !important; 
        border: 1px solid var(--wf-border) !important;
    }
}

/* Kugira ngo Input yoherezeho ubutumwa igume hasi neza */
#chatConversationView {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#chatMessagesContainer {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #efeae2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#chatConversationView form {
    padding: 10px;
    background: #fff;
    border-top: 1px solid var(--wf-border);
    display: flex;
    gap: 8px;
    align-items: center;
}/* =========================================================
   GALLERY PAGE STYLING (FIXED LAYOUT)
   ========================================================= */

.gallery-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}
.gallery-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--wf-primary);
    margin-bottom: 10px;
}
.gallery-header h1 span {
    color: var(--wf-accent);
    font-style: italic;
}
.gallery-header p {
    color: var(--wf-text-muted);
    max-width: 600px;
    margin: 0 auto 24px;
    font-size: 15px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.g-filter {
    background: #fff;
    border: 1.5px solid var(--wf-border);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wf-text);
    cursor: pointer;
    transition: 0.3s ease;
}
.g-filter:hover, 
.g-filter.active {
    background: var(--wf-primary);
    color: #fff;
    border-color: var(--wf-primary);
    transform: translateY(-2px);
    box-shadow: var(--wf-shadow);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.gallery-card {
    position: relative;
    border-radius: var(--wf-radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--wf-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--wf-shadow-lg);
}

.gallery-media {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}
.media-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.video-thumb {
    position: relative;
    width: 100%;
    height: 350px;
}
.play-btn-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    border: 2px solid rgba(255,255,255,0.5);
    animation: pulseBorder 2s infinite;
}
@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.pro-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: linear-gradient(135deg, var(--wf-accent), #f59e0b);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    z-index: 3;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    opacity: 0; 
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.author-info {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
}
.author-info img {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--wf-accent);
}
.author-info span { font-size: 13px; font-weight: 600; }

.caption {
    color: #fff; font-size: 14px; line-height: 1.4; margin: 0 0 15px;
}
.gallery-actions {
    display: flex; gap: 10px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    .gallery-header h1 { font-size: 26px; }
    .media-img, .video-thumb { height: 220px; }
    
    .gallery-overlay {
        opacity: 1; 
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
        padding: 12px;
    }
    .author-info img { width: 24px; height: 24px; }
    .author-info span { font-size: 11px; }
    .caption { font-size: 11px; margin-bottom: 8px; }
    .gallery-actions .btn { font-size: 10px; padding: 4px 8px; }
}/* =========================================================
   INSTAGRAM GALLERY STYLING
   ========================================================= */

.gallery-wrapper { max-width: 1000px; margin: 30px auto; padding: 0 20px; }

/* Toggles (Grid / List) */
.view-toggles { display: flex; gap: 5px; }
.v-toggle { background: none; border: none; font-size: 20px; color: #cbd5e1; cursor: pointer; transition: 0.2s; }
.v-toggle.active { color: var(--wf-primary); }

/* =========================================
   1. GRID VIEW (Nka Instagram Profile)
   ========================================= */
.gallery-container.view-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Masike 3 kuri Desktop */
    gap: 4px; /* Imyanya mike nk'iya Instagram */
    margin-top: 20px;
}

.view-grid .gallery-item {
    position: relative;
    aspect-ratio: 1 / 1; /* Kare itunganye */
    overflow: hidden;
    cursor: pointer;
}

.view-grid .gi-media img { width: 100%; height: 100%; object-fit: cover; }
.view-grid .gi-list-details { display: none; } /* Hisha details kuri Grid */

/* Overlay ya Grid (Igaragara iyo uyikojweho) */
.view-grid .gi-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px;
    opacity: 0; transition: 0.3s;
}
.view-grid .gallery-item:hover .gi-overlay { opacity: 1; }

/* =========================================
   2. LIST VIEW (Nka Instagram Feed)
   ========================================= */
.gallery-container.view-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 470px; /* Ubugari bwa Feed ya Instagram */
    margin: 30px auto;
}

.view-list .gallery-item {
    background: #fff;
    border: 1px solid var(--wf-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.view-list .gi-media { width: 100%; aspect-ratio: 4 / 5; background: #000; }
.view-list .gi-media img { width: 100%; height: 100%; object-fit: cover; }

.view-list .gi-overlay { display: none; } /* Hisha overlay kuri List */

/* Details za List */
.view-list .gi-list-details { padding: 15px; }
.view-list .gi-list-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.view-list .gi-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.view-list .gi-username { font-weight: 700; font-size: 14px; color: var(--wf-primary); }
.view-list .gi-caption { font-size: 14px; line-height: 1.5; margin-bottom: 15px; color: var(--wf-text); }
.view-list .gi-list-actions { display: flex; gap: 15px; font-size: 22px; color: var(--wf-text); }

.gi-play {
    position: absolute; top: 10px; right: 10px;
    color: white; font-size: 18px; text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.gi-pro {
    background: var(--wf-accent); color: #000;
    font-size: 10px; font-weight: 800;
    padding: 2px 6px; border-radius: 4px;
}

/* =========================================
   3. INSTAGRAM MODAL (Iyo ukanze ku ifoto)
   ========================================= */
.ig-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85); /* Umwijima nka Instagram */
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: none; align-items: center; justify-content: center;
}

.ig-modal-backdrop.active { display: flex; }

.ig-modal-content {
    background: #fff;
    width: 90%; max-width: 1000px;
    height: 85vh; max-height: 800px;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.ig-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; font-size: 24px;
    color: #fff; z-index: 10; cursor: pointer; text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.ig-modal-media {
    flex: 1.5; /* Ifoto ifata umwanya munini */
    background: #000;
    display: flex; align-items: center; justify-content: center;
}
.ig-modal-media img, .ig-modal-media video { max-width: 100%; max-height: 100%; object-fit: contain; }

.ig-modal-details {
    flex: 1; /* Details zifata gato */
    display: flex; flex-direction: column;
    background: #fff; border-left: 1px solid var(--wf-border);
}

.ig-modal-header {
    padding: 15px 20px; border-bottom: 1px solid var(--wf-border);
    display: flex; align-items: center; gap: 12px;
}
.ig-modal-header img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ig-modal-header strong { font-size: 14px; color: var(--wf-primary); display: block; }

.ig-modal-caption-area { flex: 1; padding: 20px; overflow-y: auto; }

.ig-modal-actions {
    padding: 15px 20px; border-top: 1px solid var(--wf-border);
    display: flex; justify-content: space-between; align-items: center;
}

.ig-modal-footer { padding: 0 20px 20px; }

/* KURI TELEFONE (Mobile Modal isa na App) */
@media (max-width: 768px) {
    .gallery-container.view-grid { gap: 2px; } /* Masike 3 kuri telefone */
    
    .ig-modal-content { flex-direction: column; height: 100vh; width: 100%; border-radius: 0; }
    .ig-modal-media { flex: none; height: 50vh; }
    .ig-modal-details { flex: 1; }
    .ig-modal-close { color: #000; background: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; top: 10px; right: 10px; }
}/* =========================================================
   INSTAGRAM GALLERY STYLING (FORCED FIX)
   ========================================================= */

/* 1. Gutegeka Gallery kuguma hagati neza */
.gallery-wrapper { 
    max-width: 1000px !important; 
    margin: 40px auto !important; 
    padding: 0 20px !important; 
    display: block !important;
    width: 100% !important;
}

.gallery-header { text-align: center; margin-bottom: 30px; }
.gallery-header h1 { font-family: 'Playfair Display', serif; font-size: 36px; color: var(--wf-primary); margin-bottom: 10px; }
.gallery-header h1 span { color: var(--wf-accent); font-style: italic; }
.gallery-header p { color: var(--wf-text-muted); max-width: 600px; margin: 0 auto 20px; font-size: 15px; }

/* Toggles (Grid / List) */
.view-toggles { display: flex; gap: 5px; }
.v-toggle { background: none; border: none; font-size: 20px; color: #cbd5e1; cursor: pointer; transition: 0.2s; }
.v-toggle.active { color: var(--wf-primary); }

/* =========================================
   2. GRID VIEW (Nka Instagram Profile)
   ========================================= */
.gallery-container.view-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Masike 3 */
    gap: 4px !important; 
    margin-top: 20px !important;
    width: 100% !important;
}

.view-grid .gallery-item {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; /* Ifoto igira kare itunganye */
    overflow: hidden !important;
    cursor: pointer !important;
    background: #f1f5f9 !important;
}

/* Gutegeka ifoto kuba kare kandi igaragare neza */
.view-grid .gi-media {
    width: 100% !important;
    height: 100% !important;
}
.view-grid .gi-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.view-grid .gi-list-details { display: none !important; } 

/* Overlay ya Grid (Igaragara iyo uyikojweho) */
.view-grid .gi-overlay {
    position: absolute !important; inset: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: white !important; font-size: 18px !important;
    opacity: 0 !important; transition: 0.3s !important;
}
.view-grid .gallery-item:hover .gi-overlay { opacity: 1 !important; }


/* =========================================
   3. LIST VIEW (Nka Instagram Feed)
   ========================================= */
.gallery-container.view-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    max-width: 470px !important;
    margin: 30px auto !important;
}

.view-list .gallery-item {
    background: #fff !important;
    border: 1px solid var(--wf-border) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    width: 100% !important;
}

.view-list .gi-media { width: 100% !important; aspect-ratio: 4 / 5 !important; background: #000 !important; }
.view-list .gi-media img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

.view-list .gi-overlay { display: none !important; }

.view-list .gi-list-details { padding: 15px !important; }
.view-list .gi-list-header { display: flex !important; align-items: center !important; gap: 10px !important; margin-bottom: 10px !important; }
.view-list .gi-avatar { width: 32px !important; height: 32px !important; border-radius: 50% !important; object-fit: cover !important; }
.view-list .gi-username { font-weight: 700 !important; font-size: 14px !important; color: var(--wf-primary) !important; }
.view-list .gi-caption { font-size: 14px !important; line-height: 1.5 !important; margin-bottom: 15px !important; color: var(--wf-text) !important; }
.view-list .gi-list-actions { display: flex !important; gap: 15px !important; font-size: 22px !important; color: var(--wf-text) !important; }


.gi-play {
    position: absolute !important; top: 10px !important; right: 10px !important;
    color: white !important; font-size: 18px !important; text-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
}

.gi-pro {
    background: var(--wf-accent) !important; color: #000 !important;
    font-size: 10px !important; font-weight: 800 !important;
    padding: 2px 6px !important; border-radius: 4px !important;
}

/* =========================================
   4. INSTAGRAM MODAL (Iyo ukanze ku ifoto)
   ========================================= */
.ig-modal-backdrop {
    position: fixed !important; inset: 0 !important;
    background: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 99999 !important;
    display: none !important; align-items: center !important; justify-content: center !important;
}

.ig-modal-backdrop.active { display: flex !important; }

.ig-modal-content {
    background: #fff !important;
    width: 90% !important; max-width: 1000px !important;
    height: 85vh !important; max-height: 800px !important;
    border-radius: 4px !important;
    display: flex !important;
    overflow: hidden !important;
    position: relative !important;
}

.ig-modal-close {
    position: absolute !important; top: 15px !important; right: 15px !important;
    background: none !important; border: none !important; font-size: 24px !important;
    color: #fff !important; z-index: 10 !important; cursor: pointer !important; text-shadow: 0 1px 5px rgba(0,0,0,0.5) !important;
}

.ig-modal-media {
    flex: 1.5 !important; 
    background: #000 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
}
.ig-modal-media img, .ig-modal-media video { max-width: 100% !important; max-height: 100% !important; object-fit: contain !important; }

.ig-modal-details {
    flex: 1 !important; 
    display: flex !important; flex-direction: column !important;
    background: #fff !important; border-left: 1px solid var(--wf-border) !important;
}

.ig-modal-header {
    padding: 15px 20px !important; border-bottom: 1px solid var(--wf-border) !important;
    display: flex !important; align-items: center !important; gap: 12px !important;
}
.ig-modal-header img { width: 40px !important; height: 40px !important; border-radius: 50% !important; object-fit: cover !important; }
.ig-modal-header strong { font-size: 14px !important; color: var(--wf-primary) !important; display: block !important; }

.ig-modal-caption-area { flex: 1 !important; padding: 20px !important; overflow-y: auto !important; }

.ig-modal-actions {
    padding: 15px 20px !important; border-top: 1px solid var(--wf-border) !important;
    display: flex !important; justify-content: space-between !important; align-items: center !important;
}

.ig-modal-footer { padding: 0 20px 20px !important; }

/* KURI TELEFONE (Mobile Modal isa na App) */
@media (max-width: 768px) {
    .gallery-container.view-grid { gap: 2px !important; } 
    
    .ig-modal-content { flex-direction: column !important; height: 100vh !important; width: 100% !important; border-radius: 0 !important; }
    .ig-modal-media { flex: none !important; height: 50vh !important; }
    .ig-modal-details { flex: 1 !important; }
    .ig-modal-close { color: #000 !important; background: #fff !important; width: 30px !important; height: 30px !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; top: 10px !important; right: 10px !important; }
}/* =========================================================
   FCT CINEMATIC LIGHTBOX (Unique View)
   ========================================================= */

.fct-cinematic-backdrop {
    position: fixed; inset: 0;
    background: rgba(5, 15, 10, 0.95); /* Ijimye ryinshi cyane nk'ikinamico */
    backdrop-filter: blur(15px);
    z-index: 99999;
    display: none; align-items: center; justify-content: center;
}

.fct-cinematic-backdrop.active { display: flex; }

/* Ifoto nini yose */
.cinematic-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cinematic-media {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    overflow: hidden;
}
.cinematic-media img, .cinematic-media video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.cinematic-close {
    position: absolute; top: 20px; right: 25px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 24px; cursor: pointer;
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; z-index: 10;
}
.cinematic-close:hover { background: #ef4444; border-color: #ef4444; transform: rotate(90deg); }

/* Akarita ka Glassmorphism (Iri hejuru gato y'ifoto) */
.cinematic-glass-card {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    background: rgba(10, 61, 38, 0.6); /* Icyatsi kijimye gifite ubuyo */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 5;
}

.cgc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.cgc-author { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.cgc-author img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--wf-accent); object-fit: cover; }
.cgc-author strong { display: block; font-size: 16px; color: #fff; font-weight: 700; }
.cgc-author span { font-size: 13px; color: rgba(255,255,255,0.7); }

.cgc-caption { font-size: 15px; line-height: 1.6; margin-bottom: 20px; color: rgba(255,255,255,0.9); }

.cgc-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }

.cgc-icons { display: flex; gap: 20px; font-size: 24px; color: #fff; }
.cgc-icons i { cursor: pointer; transition: 0.2s; }
.cgc-icons i:hover { transform: scale(1.1); }

.cgc-cta-buttons { display: flex; gap: 10px; }

.cgc-time { display: block; margin-top: 15px; font-size: 11px; text-transform: uppercase; color: rgba(255,255,255,0.5); letter-spacing: 1px; }

/* Kuri Telefone */
@media (max-width: 768px) {
    .cinematic-container { padding: 0; align-items: flex-start; padding-top: 10vh; }
    .cinematic-media { max-width: 100vw; max-height: 60vh; border-radius: 0; }
    .cinematic-media img, .cinematic-media video { max-height: 60vh; }
    
    .cinematic-glass-card {
        bottom: 20px; width: 95%; padding: 15px;
        border-radius: 15px;
    }
    .cgc-caption { font-size: 13.5px; }
    .cgc-cta-buttons { width: 100%; justify-content: space-between; }
    .cgc-cta-buttons .btn { flex: 1; }
}/* =========================================================
   FCT CINEMATIC LIGHTBOX (Slim Bar & Comments)
   ========================================================= */

.fct-cinematic-backdrop {
    position: fixed; inset: 0;
    background: rgba(5, 15, 10, 0.95);
    backdrop-filter: blur(15px);
    z-index: 99999;
    display: none; align-items: center; justify-content: center;
}
.fct-cinematic-backdrop.active { display: flex; }

.cinematic-container {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

/* Ifoto nini yose */
.cinematic-media {
    max-width: 95vw; max-height: 80vh;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 8px; overflow: hidden;
}
.cinematic-media img, .cinematic-media video {
    max-width: 100%; max-height: 80vh; object-fit: contain; display: block;
}

.cinematic-close {
    position: absolute; top: 20px; right: 25px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 24px; cursor: pointer;
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; z-index: 10;
}
.cinematic-close:hover { background: #ef4444; border-color: #ef4444; transform: rotate(90deg); }

/* 🚨 IYI NI YO BAR NTO YO HASI */
.cinematic-slim-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 800px;
    background: rgba(10, 61, 38, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px; /* Ifite impande zikomeye nka pill */
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 5;
}

/* Umwanditsi */
.csb-author { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.csb-author img { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--wf-accent); object-fit: cover; }
.csb-author strong { display: block; font-size: 13px; color: #fff; }
.csb-author span { font-size: 11px; color: rgba(255,255,255,0.6); }

/* Aho kwandikira comment */
.csb-comment-area { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    background: rgba(255,255,255,0.1); 
    border-radius: 20px; 
    padding: 5px 15px;
}
.csb-comment-area .my-avatar-sm { width: 24px; height: 24px; border-radius: 50%; margin-right: 10px; }
.csb-comment-area input { 
    flex: 1; 
    background: transparent; 
    border: none; 
    outline: none; 
    color: #fff; 
    font-size: 13px; 
}
.csb-comment-area input::placeholder { color: rgba(255,255,255,0.5); }

/* Utubuto */
.csb-actions { display: flex; gap: 15px; font-size: 20px; color: #fff; flex-shrink: 0; }
.csb-actions i { cursor: pointer; transition: 0.2s; }
.csb-actions i:hover { transform: scale(1.1); }

/* =========================================
   COMMENTS PANEL (Iyo ukanze kuri comment icon)
   ========================================= */
.cinematic-comments-panel {
    position: absolute;
    top: 0; right: 0;
    width: 350px; height: 100%;
    background: rgba(10, 61, 38, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 15;
    display: flex; flex-direction: column;
}
.cinematic-comments-panel.active { transform: translateX(0); }

.ccp-header {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.ccp-header h4 { margin: 0; color: #fff; font-size: 16px; }
.ccp-header button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }

.ccp-list { flex: 1; overflow-y: auto; padding: 20px; }

.comment-item { display: flex; gap: 12px; margin-bottom: 15px; }
.comment-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-content strong { display: block; font-size: 13px; color: var(--wf-accent); margin-bottom: 2px; }
.comment-content p { margin: 0; font-size: 13px; color: #fff; line-height: 1.4; }

/* Kuri Telefone */
@media (max-width: 768px) {
    .cinematic-container { padding: 0; align-items: flex-start; padding-top: 5vh; }
    .cinematic-media { max-width: 100vw; max-height: 60vh; border-radius: 0; }
    .cinematic-media img, .cinematic-media video { max-height: 60vh; }
    
    .cinematic-slim-bar {
        bottom: 15px; border-radius: 15px; flex-direction: column; align-items: stretch; gap: 10px;
    }
    .csb-author { display: none; } /* Hisha umwanditsi kuri telefone kugira ngo habeho umwanya */
    .csb-comment-area { width: 100%; }
    .csb-actions { justify-content: center; }
    
    .cinematic-comments-panel { width: 100%; } /* Ifata ecran yose kuri telefone */
}/* =========================================================
   FCT CINEMATIC LIGHTBOX (Full Screen & Clean)
   ========================================================= */

/* 🚨 Ibi bituma iyi Modal igaragara hejuru y'ibintu byose (Header, Footer, n'ibindi) */
.fct-cinematic-backdrop {
    position: fixed !important; inset: 0 !important;
    background: rgba(5, 10, 15, 0.95) !important; /* Umwijima nka filime */
    backdrop-filter: blur(15px) !important;
    z-index: 999999 !important; /* Igaragara hejuru y'ibintu byose */
    display: none !important; align-items: center !important; justify-content: center !important;
}
.fct-cinematic-backdrop.active { display: flex !important; }

.cinematic-container {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.cinematic-media {
    max-width: 90vw !important; max-height: 80vh !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
    border-radius: 8px !important; overflow: hidden !important;
}
.cinematic-media img, .cinematic-media video {
    max-width: 100% !important; max-height: 80vh !important; object-fit: contain !important; display: block !important;
}

.cinematic-close {
    position: absolute !important; top: 20px !important; right: 25px !important;
    background: rgba(255,255,255,0.1) !important; border: 1px solid rgba(255,255,255,0.2) !important;
    color: #fff !important; font-size: 24px !important; cursor: pointer !important;
    width: 45px !important; height: 45px !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    transition: 0.3s !important; z-index: 100 !important;
}
.cinematic-close:hover { background: #ef4444 !important; border-color: #ef4444 !important; transform: rotate(90deg) !important; }

/* 🚨 IYI NI YO BAR YO HASI (Iri hejuru y'ifoto kandi iri hagati) */
.cinematic-bottom-bar {
    position: absolute !important;
    bottom: 30px !important; left: 50% !important; transform: translateX(-50%) !important;
    width: 95% !important; max-width: 1000px !important;
    background: rgba(20, 30, 25, 0.8) !important; /* Icyatsi kijimye cyane gifite ubuyo */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 15px !important;
    padding: 12px 20px !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    gap: 15px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    z-index: 5 !important;
}

/* Umwanditsi */
.cbb-author { display: flex !important; align-items: center !important; gap: 12px !important; flex-shrink: 0 !important; }
.cbb-author img { width: 40px !important; height: 40px !important; border-radius: 50% !important; border: 2px solid var(--wf-accent) !important; object-fit: cover !important; }
.cbb-author strong { display: block !important; font-size: 14px !important; color: #fff !important; }
.cbb-author span { font-size: 12px !important; color: #94a3b8 !important; }

/* Aho kwandikira comment */
.cbb-comment-input { 
    flex: 1 !important; max-width: 500px !important;
    display: flex !important; align-items: center !important; 
    background: rgba(0,0,0,0.3) !important; 
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 30px !important; 
    padding: 4px 4px 4px 15px !important;
}
.cbb-comment-input .my-avatar-sm { width: 24px !important; height: 24px !important; border-radius: 50% !important; margin-right: 10px !important; }
.cbb-comment-input input { 
    flex: 1 !important; background: transparent !important; border: none !important; outline: none !important; 
    color: #fff !important; font-size: 14px !important; min-width: 0 !important;
}
.cbb-comment-input input::placeholder { color: #94a3b8 !important; }
.cbb-comment-input button {
    background: var(--wf-accent) !important; color: #000 !important; border: none !important;
    padding: 6px 15px !important; border-radius: 20px !important; font-weight: 700 !important; 
    font-size: 12px !important; cursor: pointer !important; transition: 0.2s !important;
}
.cbb-comment-input button:hover { background: #e8bf4d !important; transform: scale(1.05) !important; }

/* Utubuto (Like, Comment, Share) */
.cbb-actions { display: flex !important; gap: 18px !important; font-size: 22px !important; color: #fff !important; flex-shrink: 0 !important; }
.cbb-actions i { cursor: pointer !important; transition: 0.2s !important; }
.cbb-actions i:hover { color: var(--wf-accent) !important; transform: scale(1.1) !important; }

/* Comments Panel (Irahishwa) */
.cinematic-comments-panel {
    position: absolute !important; top: 0 !important; right: 0 !important;
    width: 350px !important; height: 100% !important;
    background: rgba(15, 23, 42, 0.98) !important; /* Dark slate */
    backdrop-filter: blur(20px) !important;
    border-left: 1px solid rgba(255,255,255,0.1) !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 15 !important;
    display: flex !important; flex-direction: column !important;
}
.cinematic-comments-panel.active { transform: translateX(0) !important; }

.ccp-header {
    padding: 20px !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    display: flex !important; justify-content: space-between !important; align-items: center !important;
}
.ccp-header h4 { margin: 0 !important; color: #fff !important; font-size: 16px !important; }
.ccp-header button { background: none !important; border: none !important; color: #fff !important; font-size: 18px !important; cursor: pointer !important; }

.ccp-list { flex: 1 !important; overflow-y: auto !important; padding: 20px !important; }
.comment-item { display: flex !important; gap: 12px !important; margin-bottom: 15px !important; }
.comment-item img { width: 32px !important; height: 32px !important; border-radius: 50% !important; object-fit: cover !important; }
.comment-item strong { display: block !important; font-size: 13px !important; color: var(--wf-accent) !important; margin-bottom: 2px !important; }
.comment-item p { margin: 0 !important; font-size: 13px !important; color: #e2e8f0 !important; line-height: 1.4 !important; }

/* Kuri Telefone */
@media (max-width: 768px) {
    .cinematic-container { padding: 0 !important; align-items: flex-start !important; padding-top: 10vh !important; }
    .cinematic-media { max-width: 100vw !important; max-height: 60vh !important; border-radius: 0 !important; }
    
    .cinematic-bottom-bar {
        bottom: 10px !important; border-radius: 15px !important; 
        flex-direction: column !important; align-items: stretch !important; gap: 10px !important;
        padding: 15px !important;
    }
    .cbb-author { display: none !important; } /* Hisha umwanditsi kuri telefone */
    .cbb-comment-input { max-width: 100% !important; margin-bottom: 5px !important; }
    .cbb-actions { justify-content: center !important; }
    
    .cinematic-comments-panel { width: 100% !important; } 
}/* =========================================================
   FCT CINEMATIC LIGHTBOX (Contained View & Premium Colors)
   ========================================================= */

/* 🚨 IYI NI YO IKUBAHO IYO MODAL ISOHOKA HANZE Y'IBINTU BYOSE
   Iyi code ituma iyi Modal iguma imbere ya Header na Footer */
.fct-cinematic-backdrop {
    position: fixed !important;
    top: 80px !important; /* Itangira hejuru gato y'umutwe (Header) */
    bottom: 30px !important; /* Irangira hejuru gato y'ikirenge (Footer) */
    left: 20px !important; 
    right: 20px !important;
    /* Amabara meza y'icyatsi n'ubwijimye gato */
    background: rgba(10, 35, 22, 0.90) !important; 
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(212, 167, 44, 0.3) !important; /* Umukandara wa Gold */
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    display: none !important; align-items: center !important; justify-content: center !important;
    overflow: hidden !important; /* Kugira ngo ifoto ntihagure */
    animation: fadeInScale 0.3s ease-out !important;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fct-cinematic-backdrop.active { display: flex !important; }

.cinematic-container {
    position: relative !important; width: 100% !important; height: 100% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    padding: 20px !important;
}

/* Ifoto Nini */
.cinematic-media {
    max-width: 90% !important; 
    max-height: 80% !important; /* Igaragaza ifoto ariko isige umwanya w'ubusa hepfo */
    display: flex !important; align-items: center !important; justify-content: center !important;
    border-radius: 12px !important; 
    overflow: hidden !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4) !important;
}
.cinematic-media img, .cinematic-media video {
    max-width: 100% !important; max-height: 100% !important; 
    object-fit: contain !important; display: block !important;
}

/* Close Button (Iri hejuru iburyo) */
.cinematic-close {
    position: absolute !important; top: 15px !important; right: 20px !important;
    background: rgba(255,255,255,0.1) !important; 
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #fff !important; font-size: 20px !important; cursor: pointer !important;
    width: 38px !important; height: 38px !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    transition: 0.3s !important; z-index: 100 !important;
}
.cinematic-close:hover { background: #ef4444 !important; border-color: #ef4444 !important; transform: rotate(90deg) !important; }

/* 🚨 BOTTOM BAR (Iri imbere muri iyi Modal, hejuru gato y'ikirenge) */
.cinematic-bottom-bar {
    position: absolute !important;
    bottom: 20px !important; left: 50% !important; transform: translateX(-50%) !important;
    width: 90% !important; max-width: 800px !important;
    /* Amabara ya Glassmorphism nziza */
    background: rgba(20, 40, 28, 0.7) !important; 
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 15px !important;
    padding: 12px 20px !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    gap: 15px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    z-index: 10 !important;
}

/* Umwanditsi */
.cbb-author { display: flex !important; align-items: center !important; gap: 12px !important; flex-shrink: 0 !important; }
.cbb-author img { width: 40px !important; height: 40px !important; border-radius: 50% !important; border: 2px solid var(--wf-accent) !important; object-fit: cover !important; }
.cbb-author strong { display: block !important; font-size: 14px !important; color: #fff !important; }
.cbb-author span { font-size: 12px !important; color: #a7f3d0 !important; /* Icyatsi cyeruye */ }

/* Aho kwandikira comment */
.cbb-comment-input { 
    flex: 1 !important; max-width: 450px !important;
    display: flex !important; align-items: center !important; 
    background: rgba(0,0,0,0.25) !important; 
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 30px !important; 
    padding: 4px 4px 4px 15px !important;
}
.cbb-comment-input .my-avatar-sm { width: 24px !important; height: 24px !important; border-radius: 50% !important; margin-right: 10px !important; }
.cbb-comment-input input { 
    flex: 1 !important; background: transparent !important; border: none !important; outline: none !important; 
    color: #fff !important; font-size: 14px !important; min-width: 0 !important;
}
.cbb-comment-input input::placeholder { color: #94a3b8 !important; }
.cbb-comment-input button {
    background: var(--wf-accent) !important; color: #000 !important; border: none !important;
    padding: 6px 16px !important; border-radius: 20px !important; font-weight: 700 !important; 
    font-size: 12px !important; cursor: pointer !important; transition: 0.2s !important;
}
.cbb-comment-input button:hover { background: #e8bf4d !important; transform: scale(1.05) !important; }

/* Utubuto (Like, Comment, Share) */
.cbb-actions { display: flex !important; gap: 18px !important; font-size: 22px !important; color: #fff !important; flex-shrink: 0 !important; }
.cbb-actions i { cursor: pointer !important; transition: 0.2s !important; }
.cbb-actions i:hover { color: var(--wf-accent) !important; transform: scale(1.1) !important; }

/* Comments Panel (Irahishwa) */
.cinematic-comments-panel {
    position: absolute !important; top: 0 !important; right: 0 !important;
    width: 350px !important; height: 100% !important;
    background: rgba(10, 30, 20, 0.98) !important; 
    backdrop-filter: blur(20px) !important;
    border-left: 1px solid rgba(255,255,255,0.1) !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 15 !important;
    display: flex !important; flex-direction: column !important;
}
.cinematic-comments-panel.active { transform: translateX(0) !important; }

.ccp-header {
    padding: 20px !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    display: flex !important; justify-content: space-between !important; align-items: center !important;
}
.ccp-header h4 { margin: 0 !important; color: #fff !important; font-size: 16px !important; }
.ccp-header button { background: none !important; border: none !important; color: #fff !important; font-size: 18px !important; cursor: pointer !important; }

.ccp-list { flex: 1 !important; overflow-y: auto !important; padding: 20px !important; }
.comment-item { display: flex !important; gap: 12px !important; margin-bottom: 15px !important; }
.comment-item img { width: 32px !important; height: 32px !important; border-radius: 50% !important; object-fit: cover !important; }
.comment-item strong { display: block !important; font-size: 13px !important; color: var(--wf-accent) !important; margin-bottom: 2px !important; }
.comment-item p { margin: 0 !important; font-size: 13.5px !important; color: #e2e8f0 !important; line-height: 1.4 !important; }

/* Kuri Telefone */
@media (max-width: 768px) {
    .fct-cinematic-backdrop {
        top: 70px !important; bottom: 80px !important; /* Siga umwanya w'utubuto two hasi */
        left: 10px !important; right: 10px !important;
        border-radius: 15px !important;
    }
    .cinematic-container { padding: 10px !important; }
    .cinematic-media { max-width: 100% !important; max-height: 65% !important; }
    
    .cinematic-bottom-bar {
        bottom: 10px !important; border-radius: 12px !important; 
        flex-direction: column !important; align-items: stretch !important; gap: 10px !important;
        padding: 12px !important;
    }
    .cbb-author { display: none !important; } /* Hisha umwanditsi kuri telefone */
    .cbb-comment-input { max-width: 100% !important; margin-bottom: 5px !important; }
    .cbb-actions { justify-content: center !important; }
    
    .cinematic-comments-panel { width: 100% !important; } 
}
/* =========================================================
   PREMIUM DESKTOP GALLERY GRID
   ========================================================= */

/* Ibi bikorera kuri Desktop gusa (Mudasobwa) */
@media (min-width: 769px) {
    
    /* 1. Kongera umwanya hagati y'amafoto */
    .gallery-container.view-grid {
        gap: 15px !important; /* Kuva kuri 4px, tujya kuri 15px */
        padding: 10px 0 !important;
    }

    /* 2. Guhindura imiterere y'ifoto */
    .view-grid .gallery-item {
        border-radius: 12px !important; /* Impande zikomeye */
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; /* Igicucu gito */
        transition: all 0.3s ease !important; /* Animation yo kuzamuka */
    }

    /* 3. Iyo uyikojweho (Hover) */
    .view-grid .gallery-item:hover {
        transform: translateY(-5px) !important; /* Izamuka gato */
        box-shadow: 0 15px 30px rgba(10, 61, 38, 0.15) !important; /* Igicucu kinini */
    }

    /* 4. Kongera ubwiza kuri Overlay iyo uyikojweho */
    .view-grid .gi-overlay {
        border-radius: 12px !important;
        background: rgba(10, 61, 38, 0.7) !important; /* Ijimye rifite ibara ry'icyatsi */
        backdrop-filter: blur(4px) !important; /* Ubuyo */
    }
}