/* Mobile-First Responsive Design */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

/* Base Mobile Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    font-size: 14px; /* Smaller base font for mobile */
}

/* Mobile Navigation */
.navbar {
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

/* Mobile Hero Section */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.hero-section h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.custom-btn {
    padding: 10px 25px;
    font-size: 0.9rem;
}

/* Mobile Cards and Grid */
.custom-block {
    margin-bottom: 1rem;
}

.custom-block-image {
    height: 180px; /* Smaller images on mobile */
}

.custom-block-info {
    padding: 1rem;
}

.section-padding {
    padding: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Mobile Forms */
.form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 15px;
}

/* Mobile Tables */
.table-responsive {
    font-size: 0.85rem;
}

/* Mobile Footer */
.site-footer {
    padding: 30px 0 15px;
    text-align: center;
}

.site-footer .row > div {
    margin-bottom: 1.5rem;
}

/* Mobile Image Gallery */
.carousel-image {
    height: 300px; /* Smaller carousel on mobile */
}

.thumbnail-gallery .row {
    margin: 0 -5px;
}

.thumbnail-gallery .col-3 {
    padding: 0 5px;
}

/* Mobile Admin Dashboard */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1050;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .navbar {
        padding-left: 0;
    }
    
    .content-wrapper {
        margin-top: 60px;
    }
}

/* Touch-friendly buttons */
.btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-height: 44px; /* Minimum touch target size */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-optimized modals */
.modal-dialog {
    margin: 1rem;
}

/* Hide unnecessary elements on mobile */
.mobile-hidden {
    display: none;
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .custom-block-image {
        height: 220px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

/* Desktop Styles (992px and up) */
@media (min-width: 992px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .custom-block-image {
        height: 250px;
    }
    
    .section-padding {
        padding: 80px 0;
    }
    
    .mobile-hidden {
        display: block;
    }
}

/* Large Desktop Styles (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Mobile-specific utilities */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Fix for mobile dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Mobile search bars */
.search-bar-mobile {
    width: 100%;
    padding: 10px 15px;
}

/* Loading states for mobile */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Swipe-friendly carousel */
.carousel-item {
    user-select: none;
}

/* Mobile-optimized text */
.mobile-text-large {
    font-size: 1.1rem;
}

.mobile-text-small {
    font-size: 0.85rem;
}

/* Safe area insets for notch phones */
@supports(padding: max(0px)) {
    .container-fluid {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}
/* Fix Explore Listings button color */
.custom-btn {
    background: #e74c3c !important; /* Red color */
    color: white !important;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
}

.custom-btn:hover {
    background: #c0392b !important; /* Darker red on hover */
    color: white !important;
}
/* Recent Listings Section */
.recent-listing-card {
    transition: all 0.4s ease;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: white;
}

.recent-listing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.recent-listing-image {
    transition: all 0.4s ease;
}

.recent-listing-card:hover .recent-listing-image {
    transform: scale(1.1);
}

.recent-listing-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.recent-listing-card:hover .recent-listing-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content {
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.recent-listing-card:hover .overlay-content {
    transform: translateY(0);
}

/* Animated Border Effect */
.card-border-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.recent-listing-card:hover .card-border-animation {
    opacity: 1;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Listing Badge */
.listing-badge .badge {
    font-size: 0.7rem;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Price Tag Animation */
.price-tag {
    position: relative;
    display: inline-block;
}

.price-tag::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -5px;
    right: -5px;
    bottom: -2px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.recent-listing-card:hover .price-tag::before {
    opacity: 0.1;
}

/* No Listings Placeholder */
.no-listings-placeholder {
    padding: 60px 20px;
}

/* AOS Animation Delays */
[data-aos] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Staggered Animation for Cards */
.recent-listing-card:nth-child(1) {
    transition-delay: 0.1s;
}

.recent-listing-card:nth-child(2) {
    transition-delay: 0.2s;
}

.recent-listing-card:nth-child(3) {
    transition-delay: 0.3s;
}

.recent-listing-card:nth-child(4) {
    transition-delay: 0.4s;
}

.recent-listing-card:nth-child(5) {
    transition-delay: 0.5s;
}

.recent-listing-card:nth-child(6) {
    transition-delay: 0.6s;
}