/**
 * TKD City Pages - Mobile Optimization
 * 
 * Comprehensive mobile-first responsive design for city directory pages
 * Optimizes layout, touch targets, and user experience on mobile devices
 * Based on country and state mobile optimization patterns
 */

/* ============================================
   CRITICAL MOBILE LAYOUT FIXES
   ============================================ */

/* Mobile: 320px - 768px */
@media (max-width: 768px) {
    /* === CONTAINER & LAYOUT === */
    .tkd-city-page,
    .tkd-city-directory-container {
        padding: 1rem 0 !important;
        overflow-x: hidden;
    }

    /* === GLOBAL ICON ALIGNMENT === */
    .tkd-section-title i,
    .tkd-social-title i,
    .tkd-city-header h1 i,
    .tkd-stat-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        vertical-align: middle !important;
    }

    /* === CONTAINER OPTIMIZATION === */
    .glass-business-container {
        padding: 1rem 0.75rem !important; /* REDUCED: Less padding on mobile */
        min-height: auto !important;
    }

    .glass-main-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 0.75rem !important; /* REDUCED: Less padding */
        gap: 1rem !important; /* REDUCED: Tighter spacing */
        border-radius: 12px !important;
    }

    /* === BREADCRUMB - Mobile Optimized === */
    .tkd-breadcrumb {
        padding: 0.625rem 0.875rem !important; /* REDUCED: More compact */
        margin: 0 auto 1.25rem auto !important; /* REDUCED: Less bottom margin */
        font-size: 0.8rem !important; /* REDUCED: Smaller text */
        max-width: calc(100% - 1.5rem) !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .tkd-breadcrumb ol {
        gap: 0.4rem !important; /* REDUCED: Tighter gap */
        font-size: 0.8rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .tkd-breadcrumb a,
    .tkd-breadcrumb span {
        font-size: 0.8rem !important;
    }

    .tkd-breadcrumb li {
        white-space: nowrap !important;
    }

    .tkd-breadcrumb .separator {
        margin: 0 0.35rem !important;
    }

    /* === HERO HEADER - Mobile Optimized === */
    .tkd-hero-header,
    .tkd-city-header {
        padding: 1.5rem 0.75rem !important; /* REDUCED: Less padding */
        margin: 0 auto 1.5rem auto !important; /* REDUCED: Less margin */
        text-align: center !important;
        border-radius: 12px !important;
    }

    .tkd-hero-header h1,
    .tkd-city-title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important; /* RESPONSIVE: Scales with viewport */
        line-height: 1.2 !important;
        margin: 0 0 0.875rem 0 !important; /* REDUCED: Less margin */
        word-wrap: break-word !important;
        hyphens: auto !important;
        padding: 0 0.5rem !important; /* ADDED: Prevent edge touching */
    }

    .tkd-hero-subtitle,
    .tkd-hero-header p,
    .tkd-city-description {
        font-size: 0.9rem !important; /* REDUCED: Smaller subtitle */
        line-height: 1.5 !important;
        margin: 0 auto 1.5rem auto !important; /* REDUCED: Less margin */
        padding: 0 0.75rem !important; /* ADDED: Side padding */
        max-width: 100% !important;
        opacity: 0.85 !important;
    }

    /* === STATISTICS SECTION - Mobile Optimized === */
    .tkd-hero-header .tkd-hero-stats,
    .tkd-hero-stats,
    .tkd-city-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* TWO COLUMNS: Better for mobile */
        gap: 0.75rem !important; /* REDUCED: Tighter gap */
        margin: 1.5rem auto !important; /* REDUCED: Less margin */
        padding: 1rem 0.75rem !important; /* REDUCED: Less padding */
        border-radius: 12px !important;
        max-width: 100% !important;
    }

    .tkd-hero-header .tkd-hero-stats .tkd-stat-item,
    .tkd-hero-stats .tkd-stat-item,
    .tkd-city-stats .tkd-stat-item,
    .tkd-stat-item {
        padding: 0.875rem 0.625rem !important; /* REDUCED: More compact */
        min-width: auto !important;
        max-width: none !important;
        border-radius: 10px !important;
        display: flex !important;
        flex-direction: row !important; /* CHANGED: Horizontal layout for hero stats */
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        min-height: auto !important;
        overflow: visible !important;
        gap: 0.625rem !important; /* REDUCED: Tighter gap */
        flex: 0 0 auto !important;
    }

    /* 5th stat item - spans full width on mobile */
    .tkd-hero-header .tkd-hero-stats .tkd-stat-item:nth-child(5),
    .tkd-hero-stats .tkd-stat-item:nth-child(5) {
        grid-column: 1 / -1 !important; /* SPAN: Full width for 5th item */
        max-width: none !important;
        margin: 0 !important;
    }

    /* City stats keep column layout */
    .tkd-city-stats .tkd-stat-item {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .tkd-hero-stats .tkd-stat-icon,
    .tkd-stat-icon {
        font-size: 1.25rem !important; /* REDUCED: Smaller icon */
        margin: 0 !important;
        flex-shrink: 0 !important;
        display: block !important;
        width: auto !important;
    }

    .tkd-hero-stats .tkd-stat-text,
    .tkd-stat-text {
        font-size: 0.7rem !important;
        line-height: 1.4 !important;
        text-align: left !important; /* CHANGED: Left align for hero stats */
        display: flex !important;
        flex-direction: column !important;
        gap: 0.15rem !important;
        width: 100% !important;
        flex: 1 !important;
        min-width: 0 !important; /* ALLOW: Text to shrink */
    }

    .tkd-city-stats .tkd-stat-text {
        text-align: center !important; /* KEEP: Center for city stats */
    }

    .tkd-hero-stats .tkd-stat-number,
    .tkd-stat-text .tkd-stat-number,
    .tkd-stat-number {
        font-size: 1.1rem !important; /* REDUCED: Smaller number */
        margin: 0 0.25rem 0 0 !important; /* CHANGED: Right margin for inline */
        display: inline !important; /* CHANGED: Inline for horizontal layout */
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }

    .tkd-hero-stats .tkd-stat-label,
    .tkd-hero-stats .tkd-stat-text > span:not(.tkd-stat-number),
    .tkd-stat-label {
        font-size: 0.7rem !important; /* REDUCED: Smaller label */
        line-height: 1.3 !important;
        opacity: 0.85 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        text-transform: none !important; /* REMOVED: No uppercase */
        letter-spacing: normal !important;
        max-width: 100%;
    }

    /* === SEARCH FILTER CARD - Mobile Optimized (Match Category Page Style) === */
    .tkd-search-card {
        padding: 1.25rem 0.875rem !important; /* REDUCED: Match category page */
        margin-bottom: 1.5rem !important; /* REDUCED: Less margin */
        border-radius: 12px !important; /* REDUCED: Smaller radius */
    }

    /* === SECTION HEADER === */
    .tkd-search-card .tkd-section-header {
        margin-bottom: 1rem !important; /* REDUCED: Less space */
    }

    .tkd-search-card .tkd-section-title {
        font-size: 1.1rem !important; /* REDUCED: Smaller title */
        margin-bottom: 0.375rem !important; /* REDUCED: Less margin */
        gap: 0.35rem !important;
    }

    .tkd-search-card .tkd-section-title i {
        font-size: 1rem !important; /* REDUCED: Smaller icon */
    }

    .tkd-search-card .tkd-section-subtitle {
        font-size: 0.8rem !important; /* REDUCED: Smaller subtitle */
        margin-bottom: 1rem !important; /* REDUCED: Less margin */
        padding: 0 0.25rem !important; /* ADDED: Side padding */
        line-height: 1.4 !important;
    }

    /* === QUICK FILTERS - Mobile Dropdown === */
    .tkd-quick-filters {
        margin-bottom: 1rem !important; /* REDUCED: Less margin */
    }

    .tkd-quick-filters-label {
        font-size: 0.75rem !important; /* REDUCED: Smaller label */
        margin-bottom: 0.5rem !important; /* REDUCED: Less margin */
        gap: 0.35rem !important;
        font-weight: 600 !important;
    }

    .tkd-quick-filters-label i {
        font-size: 0.7rem !important; /* REDUCED: Smaller icon */
    }

    /* Mobile Dropdown Toggle Button */
    .tkd-quick-filters-mobile-toggle {
        display: flex !important; /* SHOW: Mobile only */
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important; /* TOUCH-FRIENDLY: Good padding */
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.12) 0%, 
            rgba(0, 0, 0, 0.05) 100%) !important;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
        border-radius: 10px !important;
        color: #333333 !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        margin-bottom: 0.5rem !important;
        min-height: 44px !important; /* TOUCH-FRIENDLY: Minimum touch target */
        box-sizing: border-box !important;
    }

    .tkd-quick-filters-mobile-toggle:hover {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.18) 0%, 
            rgba(0, 0, 0, 0.08) 100%) !important;
        border-color: rgba(0, 0, 0, 0.25) !important;
    }

    .tkd-quick-filters-mobile-toggle i {
        font-size: 0.8rem !important;
        transition: transform 0.3s ease !important;
    }

    .tkd-quick-filters-mobile-toggle.active i {
        transform: rotate(180deg) !important;
    }

    /* Quick Filter Tags - Hidden on Mobile, Show as Dropdown */
    .tkd-quick-filter-tags {
        display: none !important; /* HIDDEN: Mobile default */
        flex-direction: column !important; /* STACK: Vertical when shown */
        gap: 0.5rem !important;
        padding: 0.75rem !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
        border-radius: 10px !important;
        margin-top: 0.5rem !important;
        max-height: 0 !important; /* COLLAPSED: Default state */
        overflow: hidden !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important; /* SMOOTH: Animation per Rule 3 */
    }

    /* Show dropdown when active */
    .tkd-quick-filters.active .tkd-quick-filter-tags {
        display: flex !important; /* SHOW: When active */
        max-height: 500px !important; /* EXPAND: Allow content */
        opacity: 1 !important;
        visibility: visible !important;
    }

    .tkd-quick-filter-tag {
        padding: 0.625rem 0.875rem !important; /* INCREASED: Better touch target */
        font-size: 0.8rem !important; /* INCREASED: More readable */
        border-radius: 8px !important;
        gap: 0.4rem !important;
        width: 100% !important; /* FULL WIDTH: Better for mobile */
        justify-content: flex-start !important;
        line-height: 1.3 !important;
        min-height: 44px !important; /* TOUCH-FRIENDLY: Minimum touch target */
        box-sizing: border-box !important;
    }

    .tkd-quick-filter-tag i {
        font-size: 0.75rem !important; /* INCREASED: More visible */
    }

    /* === SEARCH INPUT WRAPPER - Fix Width === */
    .tkd-search-input-wrapper {
        position: relative !important;
        width: 100% !important; /* ENSURE: Full width container */
        max-width: 100% !important; /* PREVENT: Overflow */
        box-sizing: border-box !important;
    }

    .tkd-search-input-wrapper input {
        width: 100% !important; /* FULL WIDTH: Fit container */
        max-width: 100% !important; /* PREVENT: Overflow */
        box-sizing: border-box !important; /* INCLUDE: Padding in width */
    }

    /* === ACTIVE FILTERS === */
    .tkd-active-filters {
        margin-bottom: 1rem !important; /* REDUCED: Less margin */
    }

    .tkd-active-filters-label {
        font-size: 0.75rem !important; /* REDUCED: Smaller */
        margin-bottom: 0.5rem !important; /* REDUCED: Less margin */
    }

    .tkd-filter-chip {
        padding: 0.35rem 0.625rem !important; /* REDUCED: More compact */
        font-size: 0.7rem !important; /* REDUCED: Smaller */
    }

    /* === FORM GRID === */
    .tkd-form-grid {
        grid-template-columns: 1fr !important; /* SINGLE COLUMN: Better for mobile */
        gap: 1rem !important; /* REDUCED: Tighter gap (match category page) */
        margin-bottom: 1.25rem !important; /* REDUCED: Less margin */
    }

    /* === FORM GROUPS === */
    .tkd-form-group {
        gap: 0.35rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-form-group label {
        font-size: 0.75rem !important; /* REDUCED: Smaller label */
        gap: 0.35rem !important;
        font-weight: 600 !important;
    }

    .tkd-form-group label i {
        font-size: 0.7rem !important; /* REDUCED: Smaller icon */
    }

    .tkd-form-group input,
    .tkd-form-group select {
        padding: 0.75rem 0.875rem !important; /* REDUCED: Match category page */
        font-size: 16px !important; /* PREVENTS: iOS zoom on focus */
        border-radius: 10px !important; /* REDUCED: Smaller radius */
        min-height: 44px !important; /* TOUCH-FRIENDLY: Minimum touch target */
    }

    /* === SEARCH INPUT WRAPPER === */
    .tkd-search-input-wrapper {
        position: relative !important;
    }

    .tkd-search-input-wrapper input {
        padding-left: 2.5rem !important; /* REDUCED: Less left padding */
        padding-right: 2.5rem !important; /* ADDED: Right padding for clear icon */
    }

    .tkd-search-input-wrapper .search-icon {
        left: 0.875rem !important; /* ADJUSTED: Position */
        font-size: 0.9rem !important; /* REDUCED: Smaller icon */
    }

    .tkd-search-input-wrapper .clear-icon {
        right: 0.875rem !important; /* ADJUSTED: Position */
        font-size: 0.85rem !important; /* REDUCED: Smaller icon */
    }

    /* === SEARCH ACTIONS === */
    .tkd-search-actions {
        display: flex !important;
        flex-direction: column !important; /* STACK: Vertical on mobile */
        gap: 0.75rem !important; /* REDUCED: Match category page */
        margin-top: 1.25rem !important; /* REDUCED: Less margin */
    }

    .tkd-search-options {
        display: flex !important;
        flex-direction: column !important; /* STACK: Vertical */
        gap: 0.625rem !important; /* REDUCED: Tighter gap */
        width: 100% !important;
    }

    .tkd-checkbox-wrapper,
    .tkd-live-search-toggle {
        font-size: 0.8rem !important; /* REDUCED: Smaller */
        padding: 0.4rem 0 !important; /* REDUCED: Less padding */
    }

    .tkd-advanced-toggle {
        font-size: 0.8rem !important; /* REDUCED: Smaller */
        padding: 0.4rem 0 !important; /* REDUCED: Less padding */
    }

    .tkd-search-actions > div:last-child {
        display: flex !important;
        flex-direction: column !important; /* STACK: Buttons vertical */
        gap: 0.75rem !important; /* REDUCED: Match category page */
        width: 100% !important;
    }

    .tkd-clear-filters-btn,
    .tkd-search-btn {
        width: 100% !important; /* FULL WIDTH: Better for mobile */
        padding: 0.75rem 1.25rem !important; /* REDUCED: Match category page */
        font-size: 0.85rem !important; /* REDUCED: Smaller text */
        min-height: 44px !important; /* TOUCH-FRIENDLY: Minimum touch target */
        justify-content: center !important;
        border-radius: 10px !important;
    }

    /* === ADVANCED FILTERS === */
    .tkd-advanced-filters {
        margin-top: 1rem !important; /* REDUCED: Less margin */
        padding-top: 1rem !important; /* REDUCED: Less padding */
    }

    .tkd-advanced-grid {
        grid-template-columns: 1fr !important; /* SINGLE COLUMN */
        gap: 1rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-range-group {
        gap: 0.4rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-range-value {
        font-size: 0.8rem !important; /* REDUCED: Smaller */
    }

    /* === CONTROLS SECTION === */
    .tkd-city-controls {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem !important;
        margin: 0 8px 1.5rem 8px !important;
    }

    .tkd-search-bar {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
        min-width: auto !important;
    }

    .tkd-search-bar input {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        flex: none !important;
    }

    .tkd-search-bar button {
        width: 100% !important;
        padding: 0.875rem 1.5rem !important;
        min-height: 48px !important;
    }

    .tkd-filter-controls {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .tkd-filter-controls select,
    .tkd-filter-controls button {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        min-height: 48px !important;
    }

    /* === SECTION TITLES === */
    .tkd-city-section {
        margin-bottom: 1.5rem !important;
        padding: 0 8px !important;
    }

    .tkd-section-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.875rem !important;
        padding-bottom: 0.5rem !important;
        display: inline-flex !important;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        width: auto !important;
    }

    .tkd-section-title i {
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
        line-height: 1 !important;
        vertical-align: middle !important;
        margin: 0 !important;
        display: inline-block !important;
    }

    .tkd-section-title::after {
        width: 40px !important;
        height: 2px !important;
        bottom: 0 !important;
    }

    /* === TOP RATED GRID === */
    .tkd-top-rated-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* === BUSINESS GRID === */
    .tkd-businesses-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* === BUSINESS CARDS === */
    .tkd-business-card,
    .tkd-top-rated-card {
        margin-bottom: 10px !important;
        border-radius: 12px !important;
        padding: 0.875rem !important;
    }

    .tkd-card-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .tkd-business-image {
        width: 90px !important;
        height: 90px !important;
        margin: 0 auto !important;
    }

    .tkd-business-info {
        width: 100% !important;
    }

    .tkd-business-header {
        margin-bottom: 0.625rem !important;
    }

    .tkd-business-name {
        font-size: 1rem !important;
        text-align: center !important;
        margin: 0 0 0.5rem 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        line-height: 1.3 !important;
    }

    .tkd-business-name a {
        word-wrap: break-word;
        word-break: break-word;
    }

    .tkd-business-meta {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .tkd-business-rating,
    .tkd-rating-compact {
        margin-bottom: 0.375rem !important;
    }

    .tkd-stars {
        gap: 1px !important;
    }

    .tkd-star {
        font-size: 1em !important;
    }

    .tkd-rating-number {
        font-size: 0.95rem !important;
    }

    .tkd-review-count,
    .tkd-rating-text {
        font-size: 0.8rem !important;
    }

    /* === STATUS BADGES === */
    .tkd-status-sponsored,
    .tkd-status-verified {
        padding: 4px 9px !important;
        font-size: 0.65rem !important;
        border-radius: 10px !important;
    }

    /* === BUSINESS DETAILS === */
    .tkd-business-details {
        text-align: center !important;
        margin-bottom: 0.875rem !important;
    }

    .tkd-business-address,
    .tkd-business-phone,
    .tkd-detail-item {
        justify-content: center !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.375rem !important;
    }

    .tkd-detail-item i {
        font-size: 0.95rem !important;
    }

    .tkd-business-description {
        font-size: 0.8rem !important;
        margin-top: 0.625rem !important;
        text-align: center !important;
        line-height: 1.4 !important;
    }

    /* === CARD ACTIONS === */
    .tkd-card-actions {
        flex-direction: column !important;
        gap: 0.625rem !important;
        margin-top: 0.875rem !important;
        padding-top: 0.875rem !important;
    }

    .tkd-btn {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.8rem !important;
        min-height: 44px !important;
        border-radius: 8px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .tkd-btn-primary,
    .tkd-btn-secondary,
    .tkd-btn-call {
        padding: 0.75rem 1rem !important;
    }

    /* === DIRECTORY META === */
    .tkd-directory-meta {
        margin: 0 8px 1rem 8px !important;
        padding: 0.875rem 1rem !important;
        border-radius: 8px !important;
        font-size: 0.875rem !important;
    }

    .tkd-directory-meta p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    /* === PAGINATION === */
    .tkd-pagination {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin: 2rem 8px !important;
        padding: 0 0.5rem !important;
    }

    .tkd-page-link {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.875rem !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 6px !important;
    }

    .tkd-page-link.tkd-prev,
    .tkd-page-link.tkd-next {
        padding: 0.625rem 1rem !important;
    }

    .tkd-page-ellipsis {
        padding: 0.625rem 0.5rem !important;
    }

    /* === RELATED CITIES === */
    .tkd-related-cities,
    .tkd-related-cities-section {
        margin: 2rem 8px !important;
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }

    .tkd-related-cities-container {
        padding: 0 !important;
    }

    .tkd-related-cities-grid {
        grid-template-columns: 1fr !important; /* SINGLE COLUMN: Better for mobile */
        gap: 1rem !important;
        margin-top: 1rem !important;
    }

    .tkd-related-city-card {
        padding: 1rem !important; /* INCREASED: More padding for touch */
        border-radius: 12px !important;
        min-height: auto !important; /* REMOVED: Allow natural height */
        height: auto !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important; /* LIGHTER: Less shadow on mobile */
    }

    .tkd-related-city-card:hover {
        transform: translateY(-2px) !important; /* REDUCED: Less movement on mobile */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* Card Header - Mobile */
    .tkd-city-card-header {
        margin-bottom: 0 !important;
        padding-bottom: 0.75rem !important; /* REDUCED: Less space on mobile */
    }

    .tkd-city-name {
        font-size: 1.05rem !important; /* REDUCED: Slightly smaller */
        margin: 0 0 0.3rem 0 !important;
        gap: 0.45rem !important;
        line-height: 1.25 !important;
    }

    .tkd-city-name i {
        font-size: 0.9rem !important;
        width: 15px !important;
    }

    .tkd-city-state {
        font-size: 0.8rem !important; /* REDUCED: Smaller on mobile */
        line-height: 1.3 !important;
    }

    /* Stats Section - Mobile */
    .tkd-city-stats {
        gap: 0.35rem !important; /* REDUCED: Tighter spacing */
        margin-bottom: 0.875rem !important; /* REDUCED: Less space before button */
        margin-top: 0.75rem !important; /* REDUCED: Less space after divider */
    }

    .tkd-city-stat {
        gap: 0.45rem !important; /* REDUCED: Tighter icon-text gap */
        font-size: 0.8rem !important; /* REDUCED: Smaller text */
        line-height: 1.35 !important;
    }

    .tkd-city-stat i {
        font-size: 0.8rem !important;
        width: 16px !important; /* REDUCED: Smaller icons */
    }

    /* Button - Touch-Friendly Mobile */
    .tkd-city-actions {
        margin-top: auto !important;
    }

    .tkd-city-explore-btn,
    .tkd-related-city-card .tkd-city-explore-btn {
        padding: 0.75rem 1rem !important; /* INCREASED: Larger touch target */
        font-size: 0.9rem !important; /* INCREASED: More readable */
        min-height: 44px !important; /* TOUCH-FRIENDLY: Minimum 44px for touch */
        border-radius: 10px !important;
        gap: 0.5rem !important;
    }

    .tkd-city-explore-btn i,
    .tkd-related-city-card .tkd-city-explore-btn i {
        font-size: 0.95rem !important; /* INCREASED: Larger icon */
    }

    .tkd-related-city-card h3 {
        font-size: 1.05rem !important;
        margin: 0 0 0.3rem 0 !important;
    }

    .tkd-related-city-card p {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   EXTRA SMALL MOBILE: ≤480px
   ============================================ */

@media (max-width: 480px) {
    /* === ULTRA-COMPACT LAYOUT === */
    .glass-business-container {
        padding: 10px 5px !important;
    }

    .glass-main-card {
        padding: 12px 6px !important;
        gap: 12px !important;
        border-radius: 10px !important;
    }

    /* === BREADCRUMB === */
    .tkd-breadcrumb {
        padding: 0.625rem 0.875rem !important;
        margin: 0 6px 0.875rem 6px !important;
        font-size: 0.8rem !important;
    }

    .tkd-breadcrumb ol {
        gap: 0.35rem !important;
        font-size: 0.8rem !important;
    }

    .tkd-breadcrumb .separator {
        margin: 0 0.25rem !important;
    }

    /* === CITY HEADER === */
    .tkd-city-header {
        padding: 1.5rem 0.875rem !important;
        margin: 0 6px 1.25rem 6px !important;
    }

    .tkd-city-title {
        font-size: clamp(1.25rem, 5.5vw, 1.8rem) !important;
        margin: 0 0 0.75rem 0 !important;
    }

    .tkd-city-description {
        font-size: 0.875rem !important;
        margin: 0 0 1.25rem 0 !important;
        padding: 0 0.25rem;
    }

    /* === STATISTICS === */
    .tkd-city-stats {
        grid-template-columns: 1fr !important;
        gap: 0.625rem !important;
        margin-top: 1.25rem !important;
    }

    .tkd-stat-item {
        padding: 0.875rem 0.625rem !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    .tkd-stat-number {
        font-size: 1.5rem !important;
        margin-bottom: 0 !important;
        margin-right: 0.5rem !important;
    }

    .tkd-stat-label {
        font-size: 0.7rem !important;
        text-align: right !important;
    }

    /* === SEARCH FILTER CARD === */
    .tkd-search-card {
        padding: 1rem 0.75rem !important; /* REDUCED: Even less padding */
        margin-bottom: 1.25rem !important; /* REDUCED: Less margin */
    }

    .tkd-search-card .tkd-section-title {
        font-size: 1rem !important; /* REDUCED: Smaller */
        margin-bottom: 0.25rem !important;
    }

    .tkd-search-card .tkd-section-subtitle {
        font-size: 0.75rem !important; /* REDUCED: Smaller */
        margin-bottom: 0.875rem !important; /* REDUCED: Less margin */
    }

    /* === QUICK FILTERS === */
    .tkd-quick-filters {
        margin-bottom: 0.875rem !important; /* REDUCED: Less margin */
    }

    .tkd-quick-filters-label {
        font-size: 0.7rem !important; /* REDUCED: Smaller */
        margin-bottom: 0.4rem !important;
    }

    .tkd-quick-filters-mobile-toggle {
        padding: 0.7rem 0.875rem !important; /* REDUCED: Slightly less */
        font-size: 0.8rem !important; /* REDUCED: Smaller */
        min-height: 42px !important; /* REDUCED: Slightly smaller but still touch-friendly */
    }

    .tkd-quick-filter-tags {
        gap: 0.4rem !important; /* REDUCED: Tighter gap */
        padding: 0.625rem !important; /* REDUCED: Less padding */
    }

    .tkd-quick-filter-tag {
        padding: 0.55rem 0.75rem !important; /* REDUCED: Slightly less */
        font-size: 0.75rem !important; /* REDUCED: Smaller */
        min-height: 42px !important; /* REDUCED: Slightly smaller but still touch-friendly */
    }

    /* === SEARCH INPUT WRAPPER - Fix Width === */
    .tkd-search-input-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .tkd-search-input-wrapper input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* === FORM GRID === */
    .tkd-form-grid {
        gap: 0.875rem !important; /* REDUCED: Tighter gap */
        margin-bottom: 1rem !important; /* REDUCED: Less margin */
    }

    .tkd-form-group {
        gap: 0.3rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-form-group label {
        font-size: 0.7rem !important; /* REDUCED: Smaller */
    }

    .tkd-form-group input,
    .tkd-form-group select {
        padding: 0.7rem 0.75rem !important; /* REDUCED: Slightly less */
        font-size: 16px !important; /* KEEP: Prevents iOS zoom */
        min-height: 42px !important; /* REDUCED: Slightly smaller but still touch-friendly */
    }

    .tkd-search-input-wrapper input {
        padding-left: 2rem !important; /* REDUCED: Less padding */
        padding-right: 2rem !important;
    }

    .tkd-search-input-wrapper .search-icon {
        left: 0.625rem !important; /* ADJUSTED: Position */
        font-size: 0.85rem !important; /* REDUCED: Smaller */
    }

    .tkd-search-input-wrapper .clear-icon {
        right: 0.625rem !important; /* ADJUSTED: Position */
        font-size: 0.8rem !important; /* REDUCED: Smaller */
    }

    /* === SEARCH ACTIONS === */
    .tkd-search-actions {
        gap: 0.625rem !important; /* REDUCED: Tighter gap */
        margin-top: 1rem !important; /* REDUCED: Less margin */
    }

    .tkd-search-options {
        gap: 0.5rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-checkbox-wrapper,
    .tkd-live-search-toggle,
    .tkd-advanced-toggle {
        font-size: 0.75rem !important; /* REDUCED: Smaller */
        padding: 0.35rem 0 !important; /* REDUCED: Less padding */
    }

    .tkd-search-actions > div:last-child {
        gap: 0.625rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-clear-filters-btn,
    .tkd-search-btn {
        padding: 0.7rem 1rem !important; /* REDUCED: Slightly less */
        font-size: 0.8rem !important; /* REDUCED: Smaller */
        min-height: 42px !important; /* REDUCED: Slightly smaller but still touch-friendly */
    }

    /* === ADVANCED FILTERS === */
    .tkd-advanced-filters {
        margin-top: 0.875rem !important;
        padding-top: 0.875rem !important;
    }

    .tkd-advanced-grid {
        gap: 0.875rem !important; /* REDUCED: Tighter gap */
    }

    .tkd-range-value {
        font-size: 0.75rem !important; /* REDUCED: Smaller */
    }

    /* === CONTROLS === */
    .tkd-city-controls {
        padding: 0.875rem !important;
        margin: 0 6px 1.25rem 6px !important;
        gap: 0.875rem !important;
    }

    .tkd-search-bar {
        gap: 0.625rem !important;
    }

    .tkd-search-bar input {
        padding: 0.75rem 0.875rem !important;
        min-height: 42px !important;
    }

    .tkd-search-bar button {
        padding: 0.75rem 1.25rem !important;
        min-height: 42px !important;
    }

    .tkd-filter-controls select,
    .tkd-filter-controls button {
        padding: 0.75rem 0.875rem !important;
        min-height: 42px !important;
    }

    /* === SECTIONS === */
    .tkd-city-section {
        margin-bottom: 1.5rem !important;
        padding: 0 6px !important;
    }

    .tkd-section-title {
        font-size: 1.375rem !important;
        margin-bottom: 0.875rem !important;
        padding-bottom: 0.625rem !important;
        gap: 0.45rem !important;
    }

    .tkd-section-title i {
        font-size: 1.125rem !important;
    }

    /* === BUSINESS CARDS === */
    .tkd-business-card,
    .tkd-top-rated-card {
        padding: 0.875rem !important;
    }

    .tkd-card-header {
        gap: 0.875rem !important;
        margin-bottom: 0.875rem !important;
    }

    .tkd-business-image {
        width: 80px !important;
        height: 80px !important;
    }

    .tkd-business-name {
        font-size: 1rem !important;
        margin: 0 0 0.375rem 0 !important;
    }

    .tkd-star {
        font-size: 1em !important;
    }

    .tkd-rating-number {
        font-size: 0.95rem !important;
    }

    .tkd-review-count {
        font-size: 0.8rem !important;
    }

    .tkd-status-sponsored,
    .tkd-status-verified {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
    }

    .tkd-detail-item {
        font-size: 0.8rem !important;
    }

    .tkd-business-description {
        font-size: 0.8rem !important;
    }

    .tkd-btn {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.8rem !important;
        min-height: 42px !important;
    }

    /* === PAGINATION === */
    .tkd-pagination {
        gap: 0.375rem !important;
        margin: 1.5rem 6px !important;
    }

    .tkd-page-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    /* === RELATED CITIES === */
    .tkd-related-cities,
    .tkd-related-cities-section {
        margin: 1.5rem 6px !important;
        padding: 1.25rem 0.875rem !important;
        border-radius: 12px !important;
    }

    .tkd-related-cities-grid {
        grid-template-columns: 1fr !important;
        gap: 0.875rem !important; /* REDUCED: Tighter gap */
        margin: 1.25rem 0 !important;
    }

    .tkd-related-city-card {
        padding: 0.875rem !important; /* REDUCED: Slightly less padding */
        border-radius: 10px !important;
    }

    /* Card Header */
    .tkd-city-card-header {
        padding-bottom: 0.625rem !important; /* REDUCED: Less space */
    }

    .tkd-city-name {
        font-size: 1rem !important; /* REDUCED: Smaller font */
        margin: 0 0 0.25rem 0 !important;
        gap: 0.4rem !important;
    }

    .tkd-city-name i {
        font-size: 0.85rem !important;
        width: 14px !important;
    }

    .tkd-city-state {
        font-size: 0.75rem !important; /* REDUCED: Smaller state text */
        line-height: 1.3 !important;
    }

    /* Stats Section */
    .tkd-city-stats {
        gap: 0.3rem !important; /* REDUCED: Even tighter */
        margin-bottom: 0.75rem !important;
        margin-top: 0.625rem !important;
    }

    .tkd-city-stat {
        gap: 0.4rem !important;
        font-size: 0.75rem !important; /* REDUCED: Smaller text */
        line-height: 1.3 !important;
    }

    .tkd-city-stat i {
        font-size: 0.75rem !important;
        width: 15px !important;
    }

    /* Button - Extra Small Mobile */
    .tkd-city-explore-btn,
    .tkd-related-city-card .tkd-city-explore-btn {
        padding: 0.7rem 0.875rem !important; /* REDUCED: Slightly less padding */
        font-size: 0.85rem !important; /* REDUCED: Smaller text */
        min-height: 42px !important; /* REDUCED: Slightly smaller but still touch-friendly */
        gap: 0.45rem !important;
    }

    .tkd-city-explore-btn i,
    .tkd-related-city-card .tkd-city-explore-btn i {
        font-size: 0.9rem !important;
    }

    .tkd-related-city-card h3 {
        font-size: 1rem !important;
        margin: 0 0 0.25rem 0 !important;
    }

    .tkd-related-city-card p {
        font-size: 0.75rem !important;
    }

    /* === DIRECTORY META === */
    .tkd-directory-meta {
        padding: 0.75rem 0.875rem !important;
        margin: 0 6px 0.875rem 6px !important;
    }

    .tkd-directory-meta p {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   TABLET OPTIMIZATIONS: 481px - 768px
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
    /* Two-column grids for tablets */
    .tkd-city-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .tkd-top-rated-grid {
        grid-template-columns: 1fr !important;
    }

    .tkd-businesses-grid {
        grid-template-columns: 1fr !important;
    }

    .tkd-related-cities-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ============================================
   LARGE MOBILE/SMALL TABLET: 481px - 640px
   ============================================ */

@media (min-width: 481px) and (max-width: 640px) {
    .tkd-city-title {
        font-size: clamp(1.75rem, 5vw, 2.25rem) !important;
    }

    .tkd-section-title {
        font-size: 1.625rem !important;
    }

    .tkd-related-cities-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .tkd-btn,
    .tkd-search-bar button,
    .tkd-filter-controls button,
    .tkd-page-link {
        min-height: 48px !important;
        padding: 0.875rem 1rem !important;
    }

    /* Remove hover effects, use active states */
    .tkd-business-card:hover,
    .tkd-top-rated-card:hover,
    .tkd-related-city-card:hover,
    .tkd-btn:hover,
    .tkd-page-link:hover {
        transform: none !important;
    }

    .tkd-business-card:active,
    .tkd-top-rated-card:active,
    .tkd-related-city-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    /* Ensure touch-friendly button for city cards */
    .tkd-city-explore-btn,
    .tkd-related-city-card .tkd-city-explore-btn {
        min-height: 48px !important; /* TOUCH-FRIENDLY: 48px minimum for touch */
    }

    .tkd-city-explore-btn:active,
    .tkd-related-city-card .tkd-city-explore-btn:active {
        transform: translateY(1px) !important;
        transition: transform 0.1s ease !important;
    }

    .tkd-btn:active,
    .tkd-page-link:active {
        transform: translateY(1px) !important;
        transition: transform 0.1s ease !important;
    }

    /* Disable touch callout */
    * {
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Enable tap highlight for interactive elements */
    a, button, .tkd-business-card, .tkd-related-city-card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Reduce animations for better performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }

    /* Simplify shadows on mobile */
    .tkd-city-header,
    .tkd-city-controls,
    .tkd-business-card,
    .tkd-related-cities {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    }

    .tkd-business-card::before,
    .tkd-top-rated-card::before {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Reduced motion for accessibility */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .tkd-business-card:active,
    .tkd-btn:active {
        transform: none !important;
    }
}

/* High contrast mode */
@media (max-width: 768px) and (prefers-contrast: high) {
    .tkd-business-card,
    .tkd-city-controls,
    .tkd-city-header {
        border: 2px solid #000 !important;
    }
}

/* Dark mode considerations */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .tkd-business-card,
    .tkd-city-controls {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .tkd-city-header {
        padding: 1.25rem 1rem !important;
    }

    .tkd-city-description {
        margin: 0 0 1rem 0 !important;
    }

    .tkd-city-stats {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
    }

    .tkd-stat-item {
        padding: 0.75rem 0.5rem !important;
    }

    .tkd-stat-number {
        font-size: 1.5rem !important;
    }

    .tkd-stat-label {
        font-size: 0.65rem !important;
    }

    .tkd-related-cities-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* TWO COLUMNS: Use horizontal space */
        gap: 1rem !important;
    }

    .tkd-related-city-card {
        min-height: 200px !important; /* REDUCED: Less height in landscape */
    }
}

/* ============================================
   VERY SMALL SCREENS: ≤360px
   ============================================ */

@media (max-width: 360px) {
    /* === CONTAINER === */
    .glass-business-container {
        padding: 0.625rem 0.375rem !important;
    }

    .glass-main-card {
        padding: 0.625rem 0.375rem !important;
    }

    /* === BREADCRUMB === */
    .tkd-breadcrumb {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.7rem !important;
    }

    /* === HERO HEADER === */
    .tkd-hero-header h1,
    .tkd-city-title {
        font-size: clamp(1.25rem, 7vw, 1.75rem) !important;
    }

    .tkd-hero-subtitle,
    .tkd-hero-header p,
    .tkd-city-description {
        font-size: 0.8rem !important;
    }

    /* === HERO STATS === */
    .tkd-hero-stats,
    .tkd-city-stats {
        gap: 0.5rem !important;
        padding: 0.75rem 0.375rem !important;
    }

    .tkd-hero-stats .tkd-stat-item,
    .tkd-city-stats .tkd-stat-item {
        padding: 0.625rem 0.375rem !important;
        gap: 0.4rem !important;
    }

    .tkd-hero-stats .tkd-stat-icon,
    .tkd-stat-icon {
        font-size: 1rem !important;
    }

    .tkd-hero-stats .tkd-stat-number,
    .tkd-stat-number {
        font-size: 0.95rem !important;
    }

    .tkd-hero-stats .tkd-stat-label,
    .tkd-hero-stats .tkd-stat-text > span:not(.tkd-stat-number),
    .tkd-stat-label {
        font-size: 0.6rem !important;
    }

    /* Allow text wrapping on very small screens if needed */
    .tkd-section-title {
        white-space: normal !important;
        text-align: left;
        word-wrap: break-word;
        font-size: 1.25rem !important;
    }

    .tkd-business-name {
        font-size: 0.95rem !important;
    }

    .tkd-btn {
        font-size: 0.725rem !important;
        padding: 0.625rem 0.75rem !important;
    }

    /* Very Small Screens - Related Cities */
    .tkd-related-cities,
    .tkd-related-cities-section {
        padding: 1.25rem 0.625rem !important;
    }

    .tkd-related-cities-grid {
        gap: 0.75rem !important;
    }

    .tkd-related-city-card {
        padding: 0.75rem !important;
    }

    .tkd-city-name {
        font-size: 0.95rem !important;
    }

    .tkd-city-state {
        font-size: 0.7rem !important;
    }

    .tkd-city-stat {
        font-size: 0.7rem !important;
    }

    .tkd-city-explore-btn,
    .tkd-related-city-card .tkd-city-explore-btn {
        font-size: 0.8rem !important;
        padding: 0.65rem 0.75rem !important;
        min-height: 40px !important; /* MINIMUM: Still touch-friendly */
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .tkd-city-controls,
    .tkd-pagination {
        display: none !important;
    }

    .tkd-business-card,
    .tkd-related-city-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .tkd-city-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
}

