/* Professional Visit Arbroath Styles */

/* Loading States */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-state {
    animation: fadeIn 0.3s ease-out;
}

.error-state {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #dc2626;
}

.error-state h3 {
    margin: 0 0 1rem 0;
    color: #dc2626;
}

/* ================================================
   PROFESSIONAL BUTTON STYLES
   ================================================ */

/* Base button styling */
button,
.btn,
.retry-button,
.register-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.06);
    transform: translateY(0);
    outline: none;
}

/* Primary Button (Main actions) */
.retry-button,
.register-btn,
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    box-shadow: 
        0 4px 14px rgba(44, 90, 160, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.retry-button:hover,
.register-btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    box-shadow: 
        0 8px 25px rgba(44, 90, 160, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.retry-button:active,
.register-btn:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(44, 90, 160, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Focus states for accessibility */
.retry-button:focus-visible,
.register-btn:focus-visible,
.btn-primary:focus-visible {
    outline: 3px solid rgba(44, 90, 160, 0.4);
    outline-offset: 2px;
}

/* Disabled state */
.retry-button:disabled,
.register-btn:disabled,
.btn-primary:disabled {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Secondary Button */
.btn-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--primary-color);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 
        0 4px 14px rgba(16, 185, 129, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 
        0 4px 14px rgba(239, 68, 68, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 
        0 8px 25px rgba(239, 68, 68, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Small Button Variant */
.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Large Button Variant */
.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 16px;
}

/* Icon button styling */
.btn-icon {
    padding: 0.75rem;
    border-radius: 50%;
    min-width: auto;
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    color: white;
}

/* Button group styling */
.btn-group {
    display: inline-flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-group .btn,
.btn-group button {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .btn:first-child,
.btn-group button:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.btn-group .btn:last-child,
.btn-group button:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: none;
}

/* ================================================
   LOGO AND BRANDING STYLES
   ================================================ */

/* Main Logo Styles */
.main-logo {
    display: none; /* Hide logo image since using as background */
}

.main-logo:hover {
    transform: scale(1.05);
}

/* Mobile Logo */
.mobile-logo {
    height: 40px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
}

/* Footer Logo */
.footer-logo {
    height: 40px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.footer-logo:hover {
    opacity: 1;
}

/* Logo Container */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Text-based logo fallback */
.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Logo responsive behavior */
@media (max-width: 768px) {
    .main-logo {
        height: 45px;
        max-width: 160px;
    }
    
    .mobile-logo {
        height: 35px;
        max-width: 120px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-logo {
        height: 35px;
        max-width: 140px;
    }
    
    .mobile-logo {
        height: 30px;
        max-width: 100px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
}

/* Logo loading states */
.logo-loading {
    width: 200px;
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Logo error fallback */
.logo-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

:root {
    --primary-color: #1a365d;
    --primary-light: #2d5278;
    --secondary-color: #2c5a9e;
    --accent-color: #e53e3e;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-gray: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Styles */
header {
    background: url('../images/logo/logo.webp') center center / cover no-repeat, linear-gradient(135deg, #2c5aa0 0%, #1a4a8c 100%);
    color: white;
    padding: 2rem 0;
    position: relative;
    text-align: center;
    min-height: 200px;
    width: 100%;
}

header .container {
    display: block;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 2rem;
    backdrop-filter: blur(2px);
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    display: block;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: white;
}

/* Navigation Styles */
nav {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.nav-container a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
}

.nav-container a:hover,
.nav-container a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(26, 54, 93, 0.02);
}

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border-bottom: none !important;
    margin: 0;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main Content */
main {
    padding: 4rem 0;
    min-height: 60vh;
}

/* Professional Business Cards */
.business-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

/* Enhanced Business Card Layout */
.business-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.business-header h3 {
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.business-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    letter-spacing: 0.025em;
}

.business-details {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.business-address {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-weight: 500;
}

.business-phone {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-weight: 500;
}

.business-description {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    padding: 0.75rem 0;
    background: var(--bg-light);
    padding: 0.875rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.business-website {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.business-website:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.business-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.business-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.business-logo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-white);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.business-logo img {
    height: 32px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.business-card .content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.business-card h3 {
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.business-card h3 a {
    text-decoration: none;
    color: inherit;
}

.business-card h3 a:hover {
    color: var(--primary-color);
}

.business-card .tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.business-card .tag {
    background: var(--bg-gray);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
}

.business-card .price-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.business-card .description {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

.business-card .address {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.business-card .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.phone-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.phone-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Feature Icons */
.feature-icon {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

/* Business Grid */
#business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* All Businesses Grid */
.businesses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 420px) {
    #business-grid, .businesses-container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Filter Panel */
.filter-panel,
.filters {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filter-header {
    background: var(--primary-color);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-content {
    padding: 2rem;
}

.filter-group-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.filter-group h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.filter-options label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.filter-options label:hover {
    color: var(--text-primary);
}

.filter-options input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.1);
}

/* Filter Buttons */
.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Professional Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.view-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.view-btn:hover {
    background: rgba(255,255,255,0.1);
}

.view-btn.active {
    background: white;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
}

footer p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Professional No Results */
#no-results {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

#no-results h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

#no-results > div {
    color: var(--text-muted);
    font-size: 4rem !important;
    margin-bottom: 1rem !important;
    line-height: 1;
}

/* Professional Applied Filters */
#applied-filters {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

#filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.filter-chip {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.filter-chip button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.filter-chip button:hover {
    background: rgba(255,255,255,0.2);
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-container a {
        padding: 1rem;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        min-height: 48px; /* Touch target compliance */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dropdown-content {
        position: relative;
        display: block;
        box-shadow: none;
        background: var(--bg-light);
        margin: 0;
        border-radius: 0;
        border: none;
        transform: none;
        left: auto;
        top: auto;
    }
    
    .dropdown-content a {
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0.875rem 1rem !important;
    }
    
    /* Enhanced Filter Panel Mobile */
    .filter-panel,
    .filters {
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-sm);
    }
    
    .filter-header {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .filter-header h3 {
        font-size: 1rem;
        margin: 0;
    }
    
    .filter-content {
        padding: 1.25rem;
    }
    
    .filter-group-advanced {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .filter-group h4 {
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
        color: var(--primary-color);
        font-weight: 600;
    }
    
    /* Touch-Friendly Filter Options */
    .filter-options label {
        margin-bottom: 0.875rem;
        padding: 0.5rem 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        cursor: pointer;
        font-size: 0.95rem;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        transition: background-color 0.2s ease;
    }
    
    .filter-options label:hover,
    .filter-options label:active {
        background-color: var(--bg-light);
    }
    
    .filter-options input[type="checkbox"] {
        margin-right: 0.875rem;
        transform: scale(1.3);
        min-width: 18px;
        min-height: 18px;
    }
    
    /* Enhanced Filter Chips Mobile */
    #filter-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }
    
    .filter-chip {
        background: var(--primary-color);
        color: white;
        padding: 0.625rem 0.875rem;
        border-radius: var(--radius-full);
        font-size: 0.875rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 500;
        min-height: 44px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .filter-chip button {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        font-size: 1rem;
        min-width: 24px;
        min-height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
        flex-shrink: 0;
        -webkit-tap-highlight-color: rgba(255,255,255,0.2);
    }
    
    .filter-chip button:hover,
    .filter-chip button:active {
        background: rgba(255,255,255,0.2);
    }
    
    /* Touch-Friendly Clear All Button */
    button[onclick="clearAllFilters()"] {
        min-height: 48px !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
        border-radius: var(--radius-md) !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* Enhanced Business Cards Mobile */
    .business-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-lg);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .business-card:active {
        transform: translateY(1px);
    }
    
    .business-header {
        margin-bottom: 1rem;
        padding-bottom: 0.875rem;
    }
    
    .business-header h3 {
        font-size: 1.15rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .business-category {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .business-details {
        gap: 0.75rem;
    }
    
    .business-address,
    .business-phone {
        font-size: 0.9rem;
        line-height: 1.4;
        word-wrap: break-word;
    }
    
    .business-description {
        font-size: 0.9rem;
        line-height: 1.5;
        padding: 0.75rem;
        margin: 0.5rem 0;
    }
    
    /* Enhanced Business Logo Mobile */
    .business-logo {
        position: absolute;
        top: 8px;
        right: 8px;
        background: var(--bg-white);
        padding: 6px 8px;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        max-width: 80px;
    }
    
    .business-logo img {
        height: 24px;
        width: auto;
        max-width: 60px;
        object-fit: contain;
    }
    
    /* Touch-Friendly Business Website Links */
    .business-website {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        border-radius: var(--radius-md) !important;
        -webkit-tap-highlight-color: rgba(26, 54, 93, 0.1);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Enhanced Filter Buttons Mobile */
    .filter-group {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .filter-btn {
        padding: 0.875rem 1.25rem;
        text-align: center;
        min-height: 48px;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(26, 54, 93, 0.1);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .filter-btn:active {
        transform: translateY(1px);
    }
    
    /* Search Section Mobile */
    .search-section {
        padding: 1rem !important;
        margin: 2rem 0 !important;
    }
    
    .search-section h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .search-section > div {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .search-section input {
        min-width: 100% !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
        min-height: 48px !important;
        padding: 0.875rem !important;
    }
    
    .search-section button {
        width: 100% !important;
        padding: 0.875rem !important;
        min-height: 48px !important;
        font-size: 1rem !important;
    }
    
    /* Business Grid Mobile */
    #business-grid, .businesses-container, .business-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Business Cards Mobile - More compact */
    .enhanced-business-tile {
        min-height: 320px !important;
        margin: 0 !important;
    }
    
    .enhanced-business-tile > div:first-child {
        min-height: 100px !important;
        padding: 1rem !important;
    }
    
    .enhanced-business-tile h3 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }
    
    /* Business Popup/Detail Views Mobile */
    #business-popup {
        padding: 0.5rem !important;
    }
    
    #business-popup > div {
        margin: 0.5rem !important;
        max-width: none !important;
        max-height: 95vh !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #business-popup .grid {
        grid-template-columns: 1fr !important;
    }
    
    #business-popup h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    #business-popup .business-details {
        gap: 1rem !important;
    }
    
    #business-popup .business-category {
        display: inline-block !important;
        max-width: 100% !important;
        font-size: 0.85rem !important;
    }
    
    /* Feature Tags Mobile */
    .feature-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
        margin-top: 0.75rem;
    }
    
    .feature-tag {
        padding: 0.375rem 0.75rem;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        min-height: 32px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Business Form Mobile */
    #business-form-modal {
        padding: 0.5rem !important;
    }
    
    #business-form-modal > div {
        max-width: 95vw !important;
        margin: 0 !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Categories Mobile */
    .additional-categories-grid {
        grid-template-columns: 1fr !important;
    }
    
    .category-cards {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .category-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .category-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Hours Grid Mobile */
    .hours-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .hours-grid label {
        margin-bottom: 0.25rem;
        margin-top: 0.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Form inputs mobile sizing */
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
        min-height: 48px !important;
        padding: 0.75rem !important;
    }
    
    /* Buttons Mobile Touch Targets */
    .btn-primary,
    .retry-button,
    button {
        min-height: 48px !important;
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .btn-primary:active,
    .retry-button:active,
    button:active {
        transform: translateY(1px);
    }
    
    /* Phone Links Touch Targets */
    .phone-link {
        min-height: 48px !important;
        padding: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1rem !important;
        -webkit-tap-highlight-color: rgba(26, 54, 93, 0.1);
    }
    
    main {
        padding: 2rem 0;
    }
    
    /* No Results Mobile */
    #no-results {
        padding: 2rem 1rem !important;
        text-align: center;
    }
    
    #no-results h3 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    #no-results button {
        min-height: 48px !important;
        padding: 0.875rem 1.5rem !important;
    }
}

/* Extra Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Header and Logo */
    .logo h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .tagline {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    header {
        height: 200px;
    }
    
    /* Enhanced Business Cards for Small Screens */
    .business-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .business-card .content {
        padding: 1rem;
    }
    
    .business-header {
        margin-bottom: 0.875rem;
        padding-bottom: 0.75rem;
    }
    
    .business-header h3 {
        font-size: 1.1rem;
        line-height: 1.25;
    }
    
    .business-category {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    .business-address,
    .business-phone {
        font-size: 0.85rem;
    }
    
    .business-description {
        font-size: 0.85rem;
        padding: 0.625rem;
    }
    
    /* Extra Small Logo Sizing */
    .business-logo {
        top: 6px;
        right: 6px;
        padding: 4px 6px;
        max-width: 70px;
    }
    
    .business-logo img {
        height: 20px;
        max-width: 50px;
    }
    
    /* Touch-Friendly Links for Small Screens */
    .business-website {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.85rem !important;
        min-height: 44px !important;
    }
    
    /* Compact Filter Panel */
    .filter-header {
        padding: 0.875rem 1rem;
    }
    
    .filter-header h3 {
        font-size: 0.95rem;
    }
    
    .filter-content {
        padding: 1rem;
    }
    
    .filter-group h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .filter-options label {
        font-size: 0.9rem;
        padding: 0.375rem 0;
        margin-bottom: 0.75rem;
    }
    
    .filter-options input[type="checkbox"] {
        transform: scale(1.2);
        margin-right: 0.75rem;
    }
    
    /* Compact Filter Chips */
    .filter-chip {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .filter-chip button {
        min-width: 20px;
        min-height: 20px;
        font-size: 0.9rem;
    }
    
    /* Compact Filter Buttons */
    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Feature Tags Compact */
    .feature-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        min-height: 28px;
        gap: 0.2rem;
    }
    
    /* Search Section Compact */
    .search-section {
        padding: 0.875rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .search-section h2 {
        font-size: 1.2rem !important;
    }
    
    .search-section input {
        padding: 0.75rem !important;
        font-size: 16px !important;
    }
    
    .search-section button {
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Business Grid Compact */
    #business-grid, .businesses-container, .business-grid {
        gap: 1.25rem !important;
    }
    
    /* Business Detail Views Compact */
    #business-popup h3 {
        font-size: 1.15rem !important;
    }
    
    #business-popup .business-category {
        font-size: 0.8rem !important;
    }
    
    /* Category Cards Compact */
    .category-card {
        padding: 1.25rem !important;
    }
    
    .category-card h3 {
        font-size: 1rem !important;
        margin-bottom: 0.625rem !important;
    }
    
    /* Form Elements Compact */
    input, select, textarea {
        padding: 0.625rem !important;
        font-size: 16px !important; /* Still prevent iOS zoom */
    }
    
    /* Buttons Compact but Still Touch-Friendly */
    .btn-primary,
    .retry-button,
    button {
        padding: 0.625rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }
    
    /* Navigation Compact */
    .nav-container a {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Main Content Padding */
    main {
        padding: 1.5rem 0;
    }
    
    /* No Results Compact */
    #no-results {
        padding: 1.5rem 1rem !important;
    }
    
    #no-results h3 {
        font-size: 1.2rem !important;
    }
    
    /* Applied Filters Compact */
    #applied-filters h4 {
        font-size: 0.9rem !important;
    }
    
    button[onclick="clearAllFilters()"] {
        padding: 0.625rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }
}

/* Medium Mobile Devices (481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    /* Optimize for devices like iPhone Plus, smaller Android tablets */
    
    .business-card {
        padding: 1.25rem;
    }
    
    .business-header h3 {
        font-size: 1.2rem;
    }
    
    .business-category {
        font-size: 0.85rem;
    }
    
    .filter-content {
        padding: 1.5rem;
    }
    
    .filter-group-advanced {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Allow some filter groups to show side by side */
    .filter-group {
        margin-bottom: 1.25rem;
    }
    
    .business-logo img {
        height: 28px;
        max-width: 70px;
    }
}

/* Enhanced Footer Mobile Responsiveness */
@media (max-width: 768px) {
    footer {
        padding: 2rem 0;
        text-align: center;
    }
    
    footer p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 0 auto;
        max-width: 90%;
    }
    
    /* VibeMedia Local branding mobile optimization */
    footer .vibemedia-branding {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    footer .vibemedia-branding p {
        font-size: 0.85rem;
        opacity: 0.8;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 414px) {
    /* iPhone landscape and similar devices */
    
    header {
        height: 150px;
    }
    
    .logo h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .nav-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-container a {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        width: auto;
        flex: 0 0 auto;
    }
    
    .nav-container a:last-child {
        border-right: none;
    }
    
    main {
        padding: 1.5rem 0;
    }
    
    .filter-header {
        padding: 0.75rem 1rem;
    }
    
    .filter-content {
        padding: 1rem;
    }
}

/* Prevent horizontal scrolling on all mobile devices */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Prevent text overflow */
    .business-header h3,
    .business-category,
    .business-address,
    .business-phone,
    .business-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Ensure filter chips wrap properly */
    #filter-chips {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Ensure business grid doesn't overflow */
    #business-grid, .businesses-container, .business-grid {
        width: 100%;
        min-width: 0;
    }
}

/* iOS Mobile Safari Zoom Prevention */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"], 
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        min-height: 44px; /* iOS minimum touch target */
        -webkit-appearance: none;
        -webkit-border-radius: 6px;
        border-radius: 6px;
    }
    
    /* Prevent zoom on focus */
    input:focus,
    select:focus,
    textarea:focus {
        font-size: 16px !important;
    }
}

/* Business Detail Feature Tags */
.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.feature-tag {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease;
}

.feature-tag:hover {
    transform: translateY(-1px);
}

.accessibility-tag {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99d3ff;
}

.amenity-tag {
    background: #d4edda;
    color: #155724;
    border: 1px solid #9de2a4;
}

.dietary-tag {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
}

.category-tag {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-light);
}

.subcategory-tag {
    background: #e8f4f0;
    color: var(--primary-color);
    border: 1px solid #d1e7dd;
}