/* Modern AeroMarket Styles */

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

/* CSS Variables for consistent theming */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* General styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2d3748;
    line-height: 1.6;
    padding-top: 80px; /* Account for fixed navbar height */
}

main {
    flex: 1;
    padding: 2rem 0;
    margin-top: 0; /* Remove margin-top since body has padding-top */
}

/* Modern Navigation */
.navbar {
    background: var(--primary-gradient) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-medium);
    padding: 1rem 0;
    z-index: 1030;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Listing Cards */
.listing-card, .card.h-100 {
    transition: var(--transition);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 280px; /* Ensure cards have minimum readable width */
}

.listing-card:hover, .card.h-100:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.listing-card .card-img-top, .card.h-100 .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.listing-card:hover .card-img-top, .card.h-100:hover .card-img-top {
    transform: scale(1.1);
}

.listing-card .card-body, .card.h-100 .card-body {
    padding: 1.5rem;
}

.listing-card .card-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.listing-card .card-text {
    color: #718096;
    font-size: 0.95rem;
}

/* Price Badge */
.price-badge {
    background: var(--success-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: var(--shadow-light);
}

/* Modern Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: var(--shadow-light);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-warning {
    background: var(--warning-gradient);
    box-shadow: var(--shadow-light);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Glassmorphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
}

/* Modern Forms */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* Image Previews */
.image-preview {
    position: relative;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.image-preview:hover img {
    transform: scale(1.05);
}

.image-preview .delete-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.image-preview .delete-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Messages */
.message-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.message:hover {
    transform: translateX(5px);
}

.message.sent {
    background: var(--success-gradient);
    color: white;
    margin-left: 2rem;
}

.message.received {
    background: rgba(255, 255, 255, 0.9);
    margin-right: 2rem;
    border: 1px solid #e2e8f0;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(56, 178, 172, 0.1) 100%);
    border-left-color: #48bb78;
    color: #22543d;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(254, 178, 178, 0.1) 100%);
    border-left-color: #f56565;
    color: #742a2a;
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.badge.bg-danger {
    background: var(--secondary-gradient) !important;
}

/* Footer */
footer {
    margin-top: auto;
    background: var(--dark-gradient);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

footer h4, footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

footer a:hover {
    color: white;
    transform: translateX(5px);
}

footer ul {
    list-style: none;
    padding: 0;
}

footer li {
    margin-bottom: 0.5rem;
}

footer i {
    margin-right: 0.5rem;
    color: #667eea;
}

/* Social Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.social-links a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
    color: white !important;
}

/* Footer Brand */
.footer-brand h4 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact Info */
.contact-info .d-flex {
    transition: var(--transition);
}

.contact-info .d-flex:hover {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .listing-card:hover {
        transform: translateY(-5px);
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    main {
        padding: 1rem 0;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Prevent Bootstrap auto-dismiss behavior */
.alert.no-auto-dismiss {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.alert.no-auto-dismiss.fade {
    opacity: 1 !important;
}

.alert.no-auto-dismiss.show {
    opacity: 1 !important;
}

/* Completely disable Bootstrap alert auto-dismiss */
.alert.no-auto-dismiss {
    animation: none !important;
    transition: none !important;
}

/* Override any Bootstrap alert hiding */
.alert.no-auto-dismiss[style*="display: none"],
.alert.no-auto-dismiss[style*="opacity: 0"],
.alert.no-auto-dismiss[style*="visibility: hidden"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Required field styling */
.required-field {
    font-weight: 600;
}

/* Removed red highlighting for required fields - keeping only red asterisks */

/* Required field indicator */
.text-danger {
    font-weight: bold;
    font-size: 1.1em;
}

/* Form section headers with required field count */
.form-section-header {
    position: relative;
    padding-left: 20px;
}

.form-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 2px;
}

/* Clickable Cards */
.clickable-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clickable-card:hover .card-body {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Filters */
.mobile-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filters-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-filters-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-filters-overlay.show .mobile-filters-panel {
    right: 0;
}

/* Ensure mobile filter panel is visible when overlay is shown */
.mobile-filters-overlay.show {
    display: block !important;
    opacity: 1 !important;
}


.mobile-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-filters-header h5 {
    flex: 1;
    margin: 0;
    font-weight: 600;
}

.mobile-filters-header .btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filters-header .btn-close:hover {
    color: #495057;
}

.mobile-filters-body {
    padding: 1rem;
}

/* Mobile filter button spacing */
.fixed-bottom {
    z-index: 1040;
}

/* Ensure mobile filter button is clickable */
#mobileFilterToggle {
    z-index: 1041;
    position: relative;
}

/* Ensure mobile filters don't interfere with other elements */
@media (max-width: 991.98px) {
    body.mobile-filters-open {
        overflow: hidden;
    }
}

/* Hide mobile filters completely on desktop */
@media (min-width: 992px) {
    .mobile-filters-overlay {
        display: none !important;
    }
}

/* Full-screen image viewer */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-viewer-container {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.image-viewer-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Clickable images */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image gallery improvements */
.listing-image {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.listing-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.listing-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-image:hover img {
    transform: scale(1.05);
}
.notification-category-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.notification-category-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.notification-category-card .form-check-input:checked + .form-check-label {
    color: #667eea;
}

.notification-subcategory {
    border-left: 2px solid #e9ecef;
    padding-left: 1rem;
    margin-left: 0.5rem;
}

.notification-subcategory .form-check-input:checked + .form-check-label {
    color: #6c757d;
} 