/* Málaga Directory - Main Site Styles */
/* Modern, responsive design with glassmorphism effects */

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

/* Navigation Styles */
.modern-navbar {
    background: rgba(26, 26, 46, 0.95);
    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;
}

/* Navbar Toggler Styles */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.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%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* Page Header Styles */
.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: 120px 0 80px;
    text-align: center;
    position: relative;
}

.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);
}

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

.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;
}

/* Business Card Styles */
.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);
}

.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-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.business-content {
    padding: 1.5rem;
}

.business-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.business-category {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.business-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.business-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #ffd700;
    margin-right: 0.5rem;
}

.rating-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.business-contact {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.business-contact i {
    width: 16px;
    margin-right: 8px;
    color: #667eea;
}

.view-business-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

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

/* 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, #4a5568 0%, #2d3748 100%);
    color: white;
    margin-top: 5rem;
}

.footer-content {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
}

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

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

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    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 {
    width: 20px;
    margin-right: 10px;
    color: #667eea;
}

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

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.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;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    margin-top: 1rem;
}

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

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

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

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

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .heart {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #667eea;
}

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

/* 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;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-btn {
        border-radius: 25px;
    }
}

/* Phones: compact list-row business cards (thumbnail left, essentials right)
   instead of the tall stacked-image card. Cuts ~3-4x the scrolling on long
   result pages. Shared markup across near-me / category / search / area, so this
   one block covers them all. Tablet (≥576px) and desktop keep the full card. */
@media (max-width: 575.98px) {
    .business-card {
        display: flex !important;    /* !important: category's card is <a class="…
                                        d-block"> and Bootstrap's .d-block is
                                        display:block!important — without this it
                                        stays block and the row stacks. */
        flex-direction: row !important;
        align-items: stretch;
        height: auto !important;     /* beat the base height:100%, which pins the
                                        card to the column and inflates the row */
        margin-bottom: 0;            /* the column's mb-4 supplies the row gap */
    }
    .business-card:hover { transform: none; box-shadow: none; }

    .business-image {
        flex: 0 0 112px !important;   /* !important: category/area style this more
                                        specifically (.business-card .business-image)
                                        and that inline CSS loads after main-styles. */
        width: 112px !important;
        height: auto !important;
        min-height: 112px;
        aspect-ratio: auto !important;  /* cancel category's 16/10 ratio */
    }
    .business-image img {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;     /* beats near-me's inline height:200px */
        object-fit: cover !important;
    }

    .card-body {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.55rem 0.8rem !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.3rem;
    }
    /* Collapse the stacked Bootstrap margins (mb-2 etc.) — the flex gap handles
       spacing now, so they'd otherwise inflate the row height. */
    .business-card .card-body > * { margin: 0 !important; }

    /* The description is the biggest height-eater — drop it on phones. It's still
       on the full business page, one tap away. */
    .business-card .card-text { display: none !important; }

    /* Keep title + address to a single line so each row stays compact. */
    .business-card .card-title {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .business-card .biz-address,
    .business-card .card-body > p.small {
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        margin-bottom: 0 !important;
        font-size: 0.8rem !important;
    }
    .business-card .card-body > .d-flex { margin-bottom: 0 !important; }
    .business-card .category-badge {
        font-size: 0.66rem;
        max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .business-card .md-card-signals { gap: 0.4rem; font-size: 0.76rem; flex-wrap: nowrap; overflow: hidden; }
    .business-card .md-card-signals > * { flex: 0 0 auto; white-space: nowrap; }

    /* category page: the whole card is already a link → its inner CTA is redundant. */
    a.business-card .btn-view { display: none !important; }
    /* near-me / search / area: the button IS the link — keep it, just compact it. */
    .business-card .btn {
        padding: 0.3rem 0.7rem !important;
        font-size: 0.78rem !important;
        align-self: flex-start;
        margin-top: 0.1rem;
    }
}
