/* ============================================
   BKingStudio - Mobile-First Professional Theme
   Start Small, Scale Up - Perfect Mobile Experience
   ============================================ */

/* ===== Color Palette - Dark Theme Community Design ===== */
:root {
    /* Light Theme Base Colors */
    --bs-dark-bg: #ffffff;
    --bs-dark-bg-secondary: #ffffff;
    --bs-dark-card: rgba(255, 255, 255, 0.05);
    --bs-dark-border: rgba(255, 255, 255, 0.1);
    
    /* Accent Colors - Blue/Teal Gradient */
    --bs-accent-blue: #3b82f6;
    --bs-accent-blue-light: #60a5fa;
    --bs-accent-teal: #06b6d4;
    --bs-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    
    /* Text Colors */
    --bs-text-light: #ffffff;
    --bs-text-light-secondary: rgba(255, 255, 255, 0.7);
    --bs-text-light-muted: rgba(255, 255, 255, 0.5);
    
    /* Legacy Support */
    --bs-light: #ffffff;
    --bs-light-secondary: #f8f9fa;
    --bs-light-tertiary: #e9ecef;
    --bs-light-card: #ffffff;
    --bs-light-border: #dee2e6;
    --bs-primary-color: #3b82f6;
    --bs-primary-dark: #2563eb;
    --bs-primary-light: #60a5fa;
    --bs-secondary-color: #6c757d;
    --bs-secondary-dark: #545b62;
    --bs-secondary-light: #868e96;
    --bs-accent-white: #ffffff;
    --bs-primary: var(--bs-primary-color);
    --bs-primary-dark: var(--bs-primary-dark);
    --bs-primary-light: var(--bs-primary-light);
    --bs-secondary: var(--bs-secondary-color);
    --bs-secondary-dark: var(--bs-secondary-dark);
    --bs-secondary-light: var(--bs-secondary-light);
    --bs-text-primary: #ffffff;
    --bs-text-secondary: rgba(255, 255, 255, 0.7);
    --bs-text-muted: rgba(255, 255, 255, 0.5);
    --bs-text-dark: #212529;
    --bs-text-light: #ffffff;
    --bs-success: #10b981;
    --bs-info: #06b6d4;
    --bs-warning: #fbbf24;
    --bs-danger: #ef4444;
    --bs-gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --bs-gradient-secondary: linear-gradient(135deg, var(--bs-secondary-color) 0%, var(--bs-secondary-dark) 100%);
    --bs-gradient-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --bs-gradient-card: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --bs-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --bs-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --bs-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --bs-shadow-primary: 0 4px 12px rgba(59, 130, 246, 0.4);
    --bs-shadow-secondary: 0 4px 12px rgba(108, 117, 125, 0.25);
    --bs-spacing-xs: 0.25rem;
    --bs-spacing-sm: 0.5rem;
    --bs-spacing-md: 0.75rem;
    --bs-spacing-lg: 1rem;
    --bs-spacing-xl: 1.5rem;
    --bs-radius-sm: 0.375rem;
    --bs-radius-md: 0.5rem;
    --bs-radius-lg: 0.75rem;
    --bs-radius-xl: 1rem;
    --bs-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base Reset - Mobile First ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== MOBILE-FIRST BASE (320px+) - NO MEDIA QUERY ===== */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

html {
    background: #ffffff !important; /* White background */
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff !important; /* White background */
    color: #000000 !important; /* Dark text */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    font-size: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Allow horizontal scroll for specific containers - removed overflow-x: hidden */
}

.page-scaling-wrapper {
    background: #ffffff !important; /* White background */
    width: 100%;
    min-height: 100vh;
}

/* Allow horizontal scroll for feed grids and scrollable containers */
.feed-grid,
.home-content-filters,
.home-professionals-scroll,
.community-members-scroll,
.discovery-results-scroll,
.horizontal-scroll-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Ensure parent containers don't block horizontal scroll */
.feed-container,
.feed-container-dark,
.home-header-dark,
.community-members-section,
.discovery-results-section,
.home-page-content {
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* ===== DARK THEME HOME PAGE ===== */
body.home-page,
body[class*="home"],
.home-page-content {
    background: var(--bs-dark-bg) !important;
    color: var(--bs-text-light) !important;
}

/* ===== HOME PAGE HEADER - Dark Theme ===== */
.home-header-dark {
    background: var(--bs-dark-bg) !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid var(--bs-dark-border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.home-header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1rem !important;
}

.home-logo-section {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.home-logo-square {
    width: 40px !important;
    height: 40px !important;
    background: var(--bs-accent-blue) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--bs-text-light) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
}

.home-header-title {
    color: var(--bs-text-light) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.home-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.home-notification-bell {
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--bs-text-light) !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
}

.home-notification-dot {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 8px !important;
    height: 8px !important;
    background: var(--bs-danger) !important;
    border-radius: 50% !important;
    border: 2px solid var(--bs-dark-bg) !important;
}

.home-profile-picture {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    cursor: pointer !important;
}

/* ===== LOCATION AND DATE ROW ===== */
.home-location-date-row {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 0 0.25rem !important;
}

.home-location-chip,
.home-date-chip {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: var(--bs-text-light) !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    background: var(--bs-dark-card) !important;
    transition: background 0.2s ease !important;
}

.home-location-chip:active,
.home-date-chip:active {
    background: rgba(255, 255, 255, 0.1) !important;
}

.home-location-chip i,
.home-date-chip i {
    font-size: 1rem !important;
    opacity: 0.8 !important;
}

/* ===== SEARCH BAR - Dark Theme ===== */
.home-search-bar-dark {
    margin-bottom: 1rem !important;
    position: relative !important;
}

.home-search-bar-dark .input-group {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--bs-dark-border) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.home-search-bar-dark .input-group-text {
    background: transparent !important;
    border: none !important;
    color: var(--bs-text-light-secondary) !important;
    padding: 0.875rem 1rem !important;
}

.home-search-bar-dark .form-control {
    background: transparent !important;
    border: none !important;
    color: var(--bs-text-light) !important;
    padding: 0.875rem 0.75rem !important;
    font-size: 0.9375rem !important;
}

.home-search-bar-dark .form-control::placeholder {
    color: var(--bs-text-light-muted) !important;
    font-weight: 400 !important;
}

/* ===== CONTENT FILTERS ===== */
.home-content-filters {
    display: flex !important;
    gap: 0.75rem !important;
    margin-bottom: 1.5rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.5rem !important;
}

.home-content-filters::-webkit-scrollbar {
    display: none !important;
}

.home-filter-button {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.625rem 1rem !important;
    border-radius: 10px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--bs-text-light-secondary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.home-filter-button.active {
    background: var(--bs-accent-gradient) !important;
    color: var(--bs-text-light) !important;
}

.home-filter-button i {
    font-size: 1rem !important;
}

/* ===== VERIFIED PROFESSIONALS SECTION ===== */
.home-section-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1rem !important;
    padding: 0 1rem !important;
}

.home-section-title {
    color: var(--bs-text-light) !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    margin: 0 !important;
}

.home-section-link {
    color: var(--bs-accent-blue) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.home-professionals-scroll {
    display: flex !important;
    gap: 1rem !important;
    padding: 0 1rem 1rem 1rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
}

.home-professionals-scroll::-webkit-scrollbar {
    display: none !important;
}

.home-professional-card {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    scroll-snap-align: start !important;
    width: 80px !important;
}

.home-professional-avatar {
    position: relative !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 2px solid var(--bs-dark-border) !important;
    animation: avatarRotate 20s linear infinite !important;
    transform-origin: center center !important;
}

.home-professional-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    animation: avatarRotateReverse 20s linear infinite !important;
    transform-origin: center center !important;
}

@keyframes avatarRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes avatarRotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.home-online-dot {
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 14px !important;
    height: 14px !important;
    background: var(--bs-success) !important;
    border-radius: 50% !important;
    border: 2px solid var(--bs-dark-bg) !important;
    z-index: 2 !important;
}

.home-professional-name {
    color: var(--bs-text-light) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 !important;
}

.home-professional-role {
    color: var(--bs-text-light-secondary) !important;
    font-size: 0.6875rem !important;
    text-align: center !important;
    margin: 0 !important;
}

.home-professional-rating {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: var(--bs-warning) !important;
    font-size: 0.6875rem !important;
}

/* ===== LATEST FEED SECTION ===== */
.home-feed-section {
    padding: 0 1rem 1rem 1rem !important;
}

.home-feed-sort {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: var(--bs-text-light-secondary) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
}

.home-feed-post {
    background: var(--bs-dark-card) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    border: 1px solid var(--bs-dark-border) !important;
}

.home-feed-post-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.home-feed-post-avatar {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}

.home-feed-post-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.home-verified-badge {
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    width: 18px !important;
    height: 18px !important;
    background: var(--bs-accent-blue) !important;
    border-radius: 50% !important;
    border: 2px solid var(--bs-dark-bg) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--bs-text-light) !important;
    font-size: 0.625rem !important;
    font-weight: 700 !important;
}

.home-feed-post-info {
    flex: 1 !important;
}

.home-feed-post-name {
    color: var(--bs-text-light) !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    margin: 0 0 0.25rem 0 !important;
}

.home-feed-post-role {
    color: var(--bs-text-light-secondary) !important;
    font-size: 0.8125rem !important;
    margin: 0 0 0.25rem 0 !important;
}

.home-feed-post-rating {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: var(--bs-warning) !important;
    font-size: 0.8125rem !important;
}

.home-feed-post-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

.home-feed-post-more {
    color: var(--bs-text-light-secondary) !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
}

.home-feed-post-add {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--bs-accent-gradient) !important;
    border: none !important;
    color: var(--bs-text-light) !important;
    font-size: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

.home-feed-post-add:active {
    transform: scale(0.95) !important;
}

.home-feed-post-image {
    width: 100% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin-bottom: 0.75rem !important;
}

.home-feed-post-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ===== BOTTOM NAVIGATION - Navy Blue Glass Effect - Fixed to Viewport - Universal (All Screen Sizes) ===== */
/* Universal mobile nav - fixed to viewport (screen) on ALL pages */
.mobile-bottom-nav,
body .mobile-bottom-nav,
body.home-page .mobile-bottom-nav,
body.community-feed .mobile-bottom-nav,
body[class*="community"] .mobile-bottom-nav,
html .mobile-bottom-nav,
html body .mobile-bottom-nav {
    position: fixed !important; /* Fixed to viewport, not page */
    bottom: 0 !important; /* Bottom of viewport */
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 9999 !important; /* Higher z-index to ensure it's always on top */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(180deg, rgba(11, 42, 74, 0.95), rgba(9, 26, 92, 0.98)) !important; /* Navy blue */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    height: 60px !important;
    transform: translateZ(0) !important; /* GPU acceleration for smooth scrolling */
    will-change: transform !important;
    /* Ensure it's always relative to viewport */
}

/* Ensure nav is visible on ALL screen sizes including desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    body .mobile-bottom-nav,
    body.home-page .mobile-bottom-nav,
    html .mobile-bottom-nav,
    html body .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
    }
}

@media (min-width: 1024px) {
    .mobile-bottom-nav,
    body .mobile-bottom-nav,
    body.home-page .mobile-bottom-nav,
    html .mobile-bottom-nav,
    html body .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
    }
}

@media (min-width: 1440px) {
    .mobile-bottom-nav,
    body .mobile-bottom-nav,
    body.home-page .mobile-bottom-nav,
    html .mobile-bottom-nav,
    html body .mobile-bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
    }
}

/* White icons and text */
.mobile-bottom-nav .mobile-nav-item,
.mobile-bottom-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.mobile-bottom-nav .mobile-nav-item.active,
.mobile-bottom-nav .nav-link.active {
    color: #ffffff !important;
}

.mobile-bottom-nav .mobile-nav-item i,
.mobile-bottom-nav .nav-link i,
.mobile-bottom-nav .mobile-nav-icon-wrapper i {
    color: rgba(255, 255, 255, 0.9) !important;
}

.mobile-bottom-nav .mobile-nav-item.active i,
.mobile-bottom-nav .nav-link.active i,
.mobile-bottom-nav .mobile-nav-icon-wrapper.active i {
    color: #ffffff !important;
}

.mobile-bottom-nav .mobile-nav-item span,
.mobile-bottom-nav .nav-link span {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.625rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-top: 0.25rem !important;
}

.mobile-bottom-nav .mobile-nav-item.active span,
.mobile-bottom-nav .nav-link.active span {
    color: #ffffff !important;
}

/* Icon Wrapper - White icons with glass effect */
.mobile-nav-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
}

.mobile-nav-icon-wrapper.active {
    background: rgba(255, 255, 255, 0.15) !important;
}

.mobile-nav-icon-wrapper i {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.25rem !important;
}

.mobile-nav-icon-wrapper.active i {
    color: #ffffff !important;
}

/* Dropdown item when clicked/active - white icons */
.mobile-bottom-nav .mobile-nav-item.dropdown.show .mobile-nav-icon-wrapper i,
.mobile-bottom-nav .mobile-nav-item.dropdown[aria-expanded="true"] .mobile-nav-icon-wrapper i {
    color: #ffffff !important;
}

.mobile-bottom-nav .mobile-nav-item.dropdown.show .mobile-nav-icon-wrapper,
.mobile-bottom-nav .mobile-nav-item.dropdown[aria-expanded="true"] .mobile-nav-icon-wrapper {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Ensure dropdown menu shows when .show class is added */
.mobile-nav-item.dropdown .dropdown-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-nav-item.dropdown .dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ===== SEARCH SUGGESTIONS - Dark Theme ===== */
.home-search-suggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--bs-dark-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
    z-index: 1000 !important;
    margin-top: 4px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.home-search-suggestions-list {
    padding: 8px 0 !important;
}

.home-search-suggestion-item {
    padding: 10px 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: var(--bs-text-light) !important;
    transition: background 0.2s ease !important;
    justify-content: space-between !important;
}

.home-search-suggestion-item:hover,
.home-search-suggestion-item:active {
    background: rgba(255, 255, 255, 0.1) !important;
}

.home-search-suggestion-item i {
    color: var(--bs-text-light-secondary) !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}

.home-search-suggestion-item span:first-of-type {
    flex: 1 !important;
    color: var(--bs-text-light) !important;
}

.home-search-suggestion-type {
    font-size: 11px !important;
    color: var(--bs-text-light-secondary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
    .home-header-dark {
        padding: 0.625rem 0.875rem !important;
    }
    
    .home-logo-square {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
    
    .home-header-title {
        font-size: 1rem !important;
    }
    
    .home-notification-bell,
    .home-profile-picture {
        width: 36px !important;
        height: 36px !important;
    }
}
