/* Custom CSS for BenixFind */

:root {
    --primary-color: #4A90E2;
    --primary-hover: #357ABD;
    --primary-light: #87CEEB;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: #fafbfc;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Navbar removed - styles now in navbar.ejs 
Commented out to allow white navbar to show
.navbar-brand {
    color: white !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    color: white !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    margin: 0 0.2rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    color: white !important;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-nav .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057 !important;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #007bff !important;
    transform: translateX(5px);
}

.navbar-nav .dropdown-item i {
    color: #6c757d;
}

.navbar-nav .dropdown-item:hover i {
    color: #007bff;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease !important;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05) !important;
}

.navbar-toggler.clicked {
    transform: scale(0.95) !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.4) !important;
    outline: none !important;
}

/* High specificity navbar toggler icon to prevent Bootstrap override */
.navbar .navbar-toggler .navbar-toggler-icon,
.navbar-dark .navbar-toggler .navbar-toggler-icon,
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em !important;
    height: 1.5em !important;
}

/* Enhanced Mobile Navbar */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(10, 115, 141, 0.1);
        border-radius: 12px;
        margin-top: 1rem;
        padding: 1rem;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav {
        align-items: center;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin: 0.25rem 0;
        padding: 0.75rem 1.5rem !important;
        border-radius: 8px;
        width: 100%;
    }
    
    .navbar-nav .dropdown-menu {
        background: white !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
        width: 100%;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
    .navbar-nav .dropdown-item {
        color: #495057 !important;
        padding: 0.75rem 1rem;
        background: transparent !important;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: #f8f9fa !important;
        color: #007bff !important;
    }
    
    .navbar-toggler {
        border-width: 3px !important;
        padding: 8px 10px !important;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .navbar-toggler {
        border-width: 4px !important;
        padding: 10px 12px !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    .navbar-toggler-icon {
        width: 1.8em !important;
        height: 1.8em !important;
    }
    
    .navbar-brand {
        font-size: 1.3rem !important;
    }
    
    .navbar-brand img {
        width: 100px !important;
        height: 35px !important;
    }
}
End of navbar styles commented out */

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.card-title a {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color);
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #d1e7dd;
    color: #0a3622;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
    color: #58151c;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #cff4fc;
    color: #055160;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
}

/* Hero Section */
.hero-stats {
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

/* Wallet Balance Display */
.wallet-balance {
    font-weight: 600;
}

/* Post Card Specific */
.post-card {
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
}

/* Search Results */
.search-results .card {
    margin-bottom: 1rem;
}

/* Admin Panel */
.admin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.admin-card .card-body {
    padding: 2rem;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Toast Container */
.toast-container {
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: var(--box-shadow-lg);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Print styles */
@media print {
    .navbar, .footer, .btn, .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
    }
    
    .dark-mode body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .dark-mode .card {
        background-color: var(--card-bg);
        color: var(--text-color);
    }
}

/* Focus improvements for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    transition: top 0.3s;
    border-radius: 0 0 4px 4px;
}

.skip-to-main:focus {
    top: 0;
    color: white;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Dashboard Styles */
.dashboard-item {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.dashboard-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.dashboard-stats .card {
    transition: all 0.3s ease;
}

.dashboard-stats .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.alert-light {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 9999;
    display: none;
    animation: slideUp 0.5s ease-out;
}

.pwa-install-banner .install-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.pwa-install-banner .install-text {
    flex: 1;
    min-width: 200px;
}

.pwa-install-banner .install-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pwa-install-banner .install-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.pwa-install-banner .install-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-install {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-install:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-dismiss {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.7;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: opacity 0.3s ease;
}

.btn-dismiss:hover {
    opacity: 1;
}

/* Global Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    display: none;
}

.loader-backdrop {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.loader-content .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.loader-text {
    font-weight: 500;
    color: var(--primary-color);
    margin: 0;
}

/* Button Loading States */
.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Page Loading Indicator */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    background-size: 200% 100%;
    animation: pageLoading 2s linear infinite;
    z-index: 9999;
    display: none;
}

.page-loader.active {
    display: block;
}

/* Content Loading Skeleton */
.content-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.long {
    width: 90%;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.skeleton-card {
    height: 8rem;
    border-radius: 0.5rem;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pageLoading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* PWA-specific styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .pwa-install-banner {
        display: none !important;
    }
}

/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .hover-opacity-100:hover {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

footer h5, footer h6 {
    color: white !important;
}

footer .text-light {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer .opacity-75 {
    opacity: 0.75 !important;
}

footer a:hover {
    transform: translateX(3px);
    transition: all 0.3s ease;
}

footer .bi-heart-fill {
    color: #e74c3c !important;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Clean search form styling */
.navbar .form-control {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #2c3e50;
}

.navbar .form-control:focus {
    background: white !important;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar .btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.navbar .btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Responsive navbar improvements */
@media (max-width: 768px) {
    .navbar-brand img {
        width: 100px !important;
        height: 33px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        margin: 0.1rem 0;
    }
    
    .navbar-collapse {
        background: rgba(44, 62, 80, 0.95);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 1rem;
        backdrop-filter: blur(10px);
    }
}

/* Mobile responsiveness for PWA banner */
@media (max-width: 576px) {
    .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-install-banner .install-content {
        flex-direction: column;
        text-align: center;
    }
    
    .pwa-install-banner .install-actions {
        width: 100%;
        justify-content: center;
    }
}

/* FINAL OVERRIDE - Maximum specificity for navbar toggler */
.navbar.navbar-dark .navbar-toggler .navbar-toggler-icon,
.navbar .navbar-toggler .navbar-toggler-icon,
button.navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Ensure toggler button has proper background */
.navbar .navbar-toggler,
button.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

/* CUSTOM HAMBURGER MENU - Cannot be overridden by Bootstrap */
.custom-toggler,
button.custom-toggler,
.navbar .custom-toggler,
.navbar-dark .custom-toggler {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

.custom-toggler:hover,
button.custom-toggler:hover,
.navbar .custom-toggler:hover {
    background-color: rgba(255, 255, 255, 1) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05) !important;
    box-shadow: none !important;
}

.custom-toggler:focus,
button.custom-toggler:focus,
.navbar .custom-toggler:focus {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.4) !important;
    outline: none !important;
}

.custom-toggler:active,
button.custom-toggler:active,
.navbar .custom-toggler:active {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    transform: scale(0.95) !important;
}

.custom-hamburger,
.custom-toggler .custom-hamburger,
button.custom-toggler .custom-hamburger {
    width: 24px !important;
    height: 18px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.custom-hamburger span,
.custom-toggler .custom-hamburger span,
button.custom-toggler .custom-hamburger span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background-color: #212529 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force override any Bootstrap or other interference */
.custom-hamburger span:nth-child(1),
.custom-hamburger span:nth-child(2),
.custom-hamburger span:nth-child(3) {
    background-color: #212529 !important;
    background-image: none !important;
    background: #212529 !important;
    border: none !important;
    color: #212529 !important;
}

/* Animation when toggler is active */
.custom-toggler[aria-expanded="true"] .custom-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
    background-color: #212529 !important;
}

.custom-toggler[aria-expanded="true"] .custom-hamburger span:nth-child(2) {
    opacity: 0 !important;
}

.custom-toggler[aria-expanded="true"] .custom-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
    background-color: #212529 !important;
}

/* Mobile specific styling */
@media (max-width: 575.98px) {
    .custom-toggler {
        padding: 10px 12px !important;
        border-width: 3px !important;
    }
    
    .custom-hamburger {
        width: 26px;
        height: 20px;
    }
    
    .custom-hamburger span {
        height: 4px;
    }
}

/* ========================================
   Mobile Bottom Navigation
   ======================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1), 0 -1px 3px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition: transform 0.3s ease;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    max-width: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    max-width: 80px;
    min-width: 60px;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-size: 0.65rem;
    margin-top: 2px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Active state */
.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.08);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
    color: var(--primary-color);
}

.bottom-nav-item.active span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Hover effect (for devices that support it) */
@media (hover: hover) {
    .bottom-nav-item:hover {
        color: var(--primary-color);
        background: rgba(74, 144, 226, 0.05);
        transform: translateY(-2px);
    }
    
    .bottom-nav-item:hover i {
        transform: scale(1.05);
    }
}

/* Active press effect */
.bottom-nav-item:active {
    transform: scale(0.95);
    background: rgba(74, 144, 226, 0.12);
}

/* Special styling for Create button */
.bottom-nav-create {
    position: relative;
}

.bottom-nav-create .create-btn-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3), 0 2px 4px rgba(74, 144, 226, 0.2);
    margin-bottom: 4px;
    transition: all 0.3s ease;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
}

.bottom-nav-create i {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0;
}

.bottom-nav-create span {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 28px;
}

.bottom-nav-create.active span {
    color: var(--primary-color);
}

@media (hover: hover) {
    .bottom-nav-create:hover .create-btn-wrapper {
        transform: translateX(-50%) scale(1.08);
        box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4), 0 3px 6px rgba(74, 144, 226, 0.25);
    }
}

.bottom-nav-create:active .create-btn-wrapper {
    transform: translateX(-50%) scale(0.95);
}

/* Add padding to body to prevent content from being hidden behind bottom nav */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
    }
    
    /* Adjust footer to account for bottom nav */
    footer {
        padding-bottom: 20px !important;
    }
}

/* Smooth appearance animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-bottom-nav {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification badge for future use */
.bottom-nav-item .badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 2px 5px;
    font-size: 0.65rem;
    border-radius: 9px;
    background: #dc3545;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for very small screens */
@media (max-width: 375px) {
    .bottom-nav-item {
        padding: 6px 8px;
        max-width: 70px;
        min-width: 55px;
    }
    
    .bottom-nav-item i {
        font-size: 1.3rem;
    }
    
    .bottom-nav-item span {
        font-size: 0.6rem;
    }
    
    .bottom-nav-create .create-btn-wrapper {
        width: 44px;
        height: 44px;
    }
    
    .bottom-nav-create i {
        font-size: 1.6rem;
    }
}

/* For larger mobile devices */
@media (min-width: 576px) and (max-width: 991.98px) {
    .bottom-nav-item {
        padding: 8px 14px;
        max-width: 90px;
    }
    
    .bottom-nav-item i {
        font-size: 1.5rem;
    }
    
    .bottom-nav-item span {
        font-size: 0.7rem;
    }
    
    .bottom-nav-create .create-btn-wrapper {
        width: 52px;
        height: 52px;
    }
}

/* Dark mode support (if implemented in the future) */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: linear-gradient(180deg, rgba(33, 37, 41, 0.98) 0%, rgba(33, 37, 41, 1) 100%);
        border-top-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3), 0 -1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .bottom-nav-item {
        color: #adb5bd;
    }
    
    .bottom-nav-item.active {
        background: rgba(74, 144, 226, 0.15);
    }
}

/* Image Upload Styles */
.image-preview-item {
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: scale(1.05);
}

.image-preview-item img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.image-preview-item:hover img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Carousel thumbnail styles */
.thumbnail-image {
    transition: all 0.3s ease;
}

.thumbnail-image:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Post card with image styles */
.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Image validation feedback */
#image-validation-feedback .alert {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Homepage carousel styles */
#latestPostsCarousel {
    padding-bottom: 50px;
}

#latestPostsCarousel .carousel-item {
    transition: transform 0.8s ease-in-out;
}

#latestPostsCarousel .card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}

#latestPostsCarousel .card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

#latestPostsCarousel .card:hover .card-img-top {
    transform: scale(1.1);
}

.shadow-hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#latestPostsCarousel .carousel-control-prev,
#latestPostsCarousel .carousel-control-next {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#latestPostsCarousel .carousel-control-prev:hover,
#latestPostsCarousel .carousel-control-next:hover {
    opacity: 1;
}

#latestPostsCarousel .carousel-control-prev-icon,
#latestPostsCarousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1.2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#latestPostsCarousel .carousel-control-prev-icon:hover,
#latestPostsCarousel .carousel-control-next-icon:hover {
    background-color: #212529;
    transform: scale(1.15);
}

#latestPostsCarousel .carousel-indicators {
    margin-bottom: 0;
}

#latestPostsCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

#latestPostsCarousel .carousel-indicators button.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
    border-color: rgba(74, 144, 226, 0.3);
}

#latestPostsCarousel .carousel-indicators button:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

/* Card animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-item.active .card {
    animation: fadeInUp 0.6s ease forwards;
}

.carousel-item.active .card:nth-child(1) {
    animation-delay: 0.1s;
}

.carousel-item.active .card:nth-child(2) {
    animation-delay: 0.2s;
}

.carousel-item.active .card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    #latestPostsCarousel .carousel-inner {
        padding: 0 15px;
    }
    
    #latestPostsCarousel .card-body {
        padding: 1rem !important;
    }
    
    #latestPostsCarousel {
        padding-bottom: 50px;
    }
    
    #latestPostsCarousel .carousel-control-prev,
    #latestPostsCarousel .carousel-control-next {
        width: 40px !important;
    }
    
    #latestPostsCarousel .carousel-control-prev-icon,
    #latestPostsCarousel .carousel-control-next-icon {
        padding: 0.8rem !important;
    }
    
    /* Single column on mobile */
    #latestPostsCarousel .col-12 {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Adjust card heights on mobile */
    #latestPostsCarousel .card-title {
        min-height: auto !important;
        -webkit-line-clamp: 2;
    }
    
    #latestPostsCarousel .card-text {
        min-height: auto !important;
        -webkit-line-clamp: 2;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    /* 2 columns on small tablets */
    #latestPostsCarousel .col-sm-6 {
        max-width: 50%;
        flex: 0 0 50%;
    }
}

@media (min-width: 768px) {
    /* 3 columns on desktop */
    #latestPostsCarousel .col-md-4 {
        max-width: 33.333333%;
        flex: 0 0 33.333333%;
    }
}

/* Dashboard stat cards */
.stat-card {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Dashboard item styling */
.dashboard-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.dashboard-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dashboard-item:last-child {
    border-bottom: none;
}

/* Floating animations for background */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-delayed {
    animation: float 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* Gradient backgrounds */
.bg-gradient {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

/* Card improvements */
.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Button hover effects */
.btn {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Badge styling */
.badge {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.35em 0.65em;
}

/* Image hover effects */
img {
    transition: transform 0.3s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile-specific styles */
@media (max-width: 576px) {
    /* Hero section adjustments */
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .hero-section .btn-lg {
        padding: 0.75rem 1.25rem !important;
        font-size: 1rem !important;
    }
    
    /* Stats cards smaller on mobile */
    .hero-stats h3 {
        font-size: 1.5rem !important;
    }
    
    .hero-stats small {
        font-size: 0.7rem !important;
    }
    
    /* Section padding adjustments */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Trending badge */
    .badge.fs-6 {
        font-size: 0.875rem !important;
    }
    
    /* Hide carousel on very small screens if needed */
    #latestPostsCarousel .carousel-control-prev,
    #latestPostsCarousel .carousel-control-next {
        opacity: 0.8;
    }
    
    /* Dashboard stat cards on mobile */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Search section adjustments */
    .input-group-lg .form-control {
        font-size: 1rem !important;
    }
    
    .input-group-lg .btn {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    #latestPostsCarousel .card-body {
        padding: 1.25rem !important;
    }
}
