/* Enhanced Málaga Directory Styles - Consistent across all pages */

/* Base Theme */
body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: white;
}

/* Modern Navigation */
.modern-navbar {
    background: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

.modern-dropdown {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px 0;
}

.modern-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.modern-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Enhanced Page Headers */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    margin-top: 80px;
}

/* Category-Specific Background Images */
.page-header.category-restaurants {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5)),
        url('/category_banners/restaurants.jpg');
}

.page-header.category-hotels {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/hotels.jpg');
}

.page-header.category-attractions {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/attractions.jpg');
}

.page-header.category-transport {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/transport.jpg');
}

.page-header.category-shopping {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/shopping.jpg');
}

.page-header.category-nightlife {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/nightlife.jpg');
}

.page-header.category-services {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/services.jpg');
}

.page-header.category-health {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/health.jpg');
}

.page-header.category-sports {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/sports.jpg');
}

.page-header.category-education {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('/category_banners/education.jpg');    
}

/* Default fallback for any other categories */
.page-header:not([class*="category-"]) {
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)),
        url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1920&h=600&fit=crop&auto=format&q=80');
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Enhanced Business Cards */
.business-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.business-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.business-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.business-card:hover .card-img-top {
    transform: scale(1.05);
}

.business-card .card-body {
    padding: 1.5rem;
    color: white;
}

.business-card .card-title {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.business-card .card-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.business-card .badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    color: #1a1a2e !important;
    font-weight: 600;
}

.business-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.business-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
}

/* Filter Section */
.filter-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem 2rem 0.75rem 2rem;
    margin: -40px auto 60px;
    max-width: 1290px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.filter-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* Stats Section */
.stats-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced Footer */
.enhanced-footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.enhanced-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.footer-description {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.footer-section h5 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.footer-links a i {
    margin-right: 8px;
    width: 16px;
    opacity: 0.7;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: #667eea;
    transform: translateX(5px);
}

.footer-link i {
    width: 20px;
    margin-right: 10px;
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px) scale(1.1);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
    border-radius: 25px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.newsletter-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    background: transparent;
    color: white;
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
}

.footer-bottom {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom .heart {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
    margin: 0 5px;
}

.footer-bottom a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #764ba2;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Category Cards */
.category-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Search Forms */
.search-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    padding: 12px 20px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 12px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Search Page Header */
.search-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: linear-gradient(rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8)), 
                      url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=1920&h=600&fit=crop&auto=format&q=80');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
    margin-top: 80px;
    color: white;
    position: relative;
    overflow: hidden;
}

.search-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.search-page-header .container {
    position: relative;
    z-index: 2;
}

.search-page-header .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
}

.search-page-header .btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .filter-section {
        margin: -20px 15px 40px;
        padding: 1.5rem;
    }
    
    .business-card {
        margin-bottom: 2rem;
    }
    
    .search-page-header {
        padding: 3rem 0;
        margin-top: 60px;
    }
}

/* Business.php Card Fixes */
.business-content-card {
    position: relative;
    z-index: 1;
    border-radius: 15px !important;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    
    /* Glass-morphism effect - matching featured.php */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    
    /* Subtle purple shadow */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.business-content-card:hover {
    /* Beautiful hover effects with purple border glow */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5) !important;
    transform: translateY(-2px);
}

.business-content-card .card-header {
    border-radius: 15px 15px 0 0 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.business-content-card .card-body {
    border-radius: 0 0 15px 15px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Image container z-index fix */
.business-image-container {
    position: relative;
    z-index: 0;
}

/* Google Maps Info Window Styling */
.map-info-window {
    color: #333 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 200px;
}

.map-info-window h6 {
    color: #333 !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.map-info-window p {
    color: #666 !important;
    margin-bottom: 8px;
    font-size: 14px;
}

.map-info-window .text-primary {
    color: #007bff !important;
}

.map-info-window .btn {
    font-size: 12px;
    padding: 4px 8px;
}

.map-info-window .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white !important;
}

.map-info-window .btn-outline-primary {
    border-color: #007bff;
    color: #007bff !important;
    background-color: transparent;
}

.map-info-window .btn-outline-primary:hover {
    background-color: #007bff;
    color: white !important;
}

/* Header Featured Button Hover Fix */
.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.navbar .btn-outline-light:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.navbar .btn-outline-light:focus,
.navbar .btn-outline-light:active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: #667eea !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Homepage Search Button Mobile Fix */
@media (max-width: 768px) {
    .hero-section .btn {
        min-width: 50px !important;
        width: 50px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        border-radius: 50% !important;
    }
    
    .hero-section .btn i {
        font-size: 16px !important;
        line-height: 1 !important;
    }
    
    /* Ensure search form doesn't compress the button */
    .hero-section .d-flex {
        flex-wrap: nowrap !important;
    }
    
    .hero-section .form-control {
        flex: 1 !important;
        min-width: 0 !important;
    }
}
