/**
 * TKD City Pages CSS
 * 
 * Professional styling for city directory pages with unified typography
 * Matches dashboard colors and business listings design
 */

/* Font import removed - fonts are loaded dynamically via performance optimizer based on dashboard settings */

/* City Directory Container */
.tkd-city-directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--tkd-font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    line-height: 1.6;
}

/* City Header with Gradient */
.tkd-city-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 60px 30px;
    background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8) 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.3);
    position: relative;
    overflow: hidden;
}

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

.tkd-city-header > * {
    position: relative;
    z-index: 1;
}

/* Breadcrumb Navigation */
.tkd-breadcrumb {
    margin-bottom: 25px;
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tkd-breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.tkd-breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.tkd-breadcrumb .separator {
    margin: 0 12px;
    font-weight: 300;
}

.tkd-breadcrumb .current {
    font-weight: 600;
}

/* City Title Section */
.tkd-city-title {
    font-size: 3em;
    margin: 0 0 20px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    /* text-shadow removed */
}

.tkd-city-description {
    font-size: 1.2em;
    margin: 0 0 30px 0;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Statistics Section */
.tkd-city-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.tkd-stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    min-width: 120px;
    transition: transform 0.2s ease;
}

.tkd-stat-item:hover {
    transform: translateY(-2px);
}

.tkd-stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 8px;
    color: white;
}

.tkd-stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls Section */
.tkd-city-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    align-items: center;
    flex-wrap: wrap;
}

.tkd-search-bar {
    flex: 1;
    display: flex;
    gap: 12px;
    min-width: 300px;
}

.tkd-search-bar input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.tkd-search-bar input:focus {
    outline: none;
    border-color: var(--tkd-accent-color, #ff9500);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.1);
}

.tkd-search-bar button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tkd-search-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.4);
}

.tkd-filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tkd-filter-controls select,
.tkd-filter-controls button {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tkd-filter-controls select:hover,
.tkd-filter-controls button:hover {
    border-color: var(--tkd-accent-color, #ff9500);
    background: #f8f9ff;
}

.tkd-filter-controls button {
    background: #f8f9fa;
    color: #495057;
}

.tkd-filter-controls button:hover {
    background: var(--tkd-accent-color, #ff9500);
    color: white;
}

/* Section Styling */
.tkd-city-section {
    margin-bottom: 60px;
}

.tkd-section-title {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #2d3748;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.tkd-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--tkd-accent-color, #ff9500), rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8));
    border-radius: 2px;
}

/* Top Rated Grid */
.tkd-top-rated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Business Grid */
.tkd-businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* Business Cards */
.tkd-business-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.tkd-business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tkd-accent-color, #ff9500), rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tkd-business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.tkd-business-card:hover::before {
    transform: scaleX(1);
}

.tkd-top-rated-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.tkd-top-rated-card::before {
    background: linear-gradient(90deg, #ffc107, #ff6b6b);
}

/* Card Header */
.tkd-card-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.tkd-business-image {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tkd-business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.tkd-business-info {
    flex: 1;
}

.tkd-business-name {
    font-family: var(--tkd-font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-size: 1.4em;
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
    height: 2.6em; /* Fixed height for exactly 2 lines × 1.3 line-height */
    min-height: 2.6em;
    max-height: 2.6em;
}

.tkd-business-name a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tkd-business-name a:hover {
    color: var(--tkd-accent-color, #ff9500);
}

.tkd-business-header {
    margin-bottom: 15px;
}

.tkd-business-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Rating System */
.tkd-business-rating,
.tkd-rating-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tkd-stars {
    display: flex;
    gap: 2px;
}

.tkd-star {
    font-size: 1.2em;
    transition: color 0.2s ease;
}

.tkd-star.filled {
    color: #ffc107;
    /* text-shadow removed */
}

.tkd-star.empty {
    color: #e9ecef;
}

.tkd-rating-number {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1em;
}

.tkd-review-count,
.tkd-rating-text {
    color: #6c757d;
    font-size: 0.9em;
}

/* Status Badges */
.tkd-status-sponsored {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.tkd-status-verified {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(81, 207, 102, 0.3);
}

/* Business Details */
.tkd-business-details {
    margin-bottom: 20px;
}

.tkd-business-address,
.tkd-business-phone,
.tkd-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #495057;
}

.tkd-detail-item i {
    width: 18px;
    height: 18px;
    color: var(--tkd-accent-color, #ff9500);
    font-size: 1.1em;
}

.tkd-detail-item a {
    color: var(--tkd-accent-color, #ff9500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.tkd-detail-item a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.tkd-business-description {
    margin-top: 15px;
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Card Actions */
.tkd-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.tkd-btn {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.tkd-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.tkd-btn:hover::before {
    left: 100%;
}

.tkd-btn-primary {
    background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.3);
}

.tkd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.4);
}

.tkd-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.tkd-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.tkd-btn-call {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(81, 207, 102, 0.3);
}

.tkd-btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.4);
}

/* Directory Meta */
.tkd-directory-meta {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--tkd-accent-color, #ff9500);
}

.tkd-directory-meta p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

/* Pagination */
.tkd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.tkd-page-link {
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    background: white;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 50px;
    text-align: center;
}

.tkd-page-link:hover {
    background: #f8f9fa;
    border-color: var(--tkd-accent-color, #ff9500);
    color: var(--tkd-accent-color, #ff9500);
}

.tkd-page-link.tkd-current {
    background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8) 100%);
    color: white;
    border-color: var(--tkd-accent-color, #ff9500);
    box-shadow: 0 2px 10px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.3);
}

.tkd-page-link.tkd-prev,
.tkd-page-link.tkd-next {
    font-weight: 600;
    padding: 12px 24px;
}

.tkd-page-ellipsis {
    padding: 12px 18px;
    color: #6c757d;
    font-weight: 500;
}

/* Related Cities */
.tkd-related-cities {
    margin-top: 60px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.tkd-related-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tkd-related-city-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tkd-related-city-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tkd-accent-color, #ff9500), rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.8));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tkd-related-city-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.tkd-related-city-card:hover::before {
    transform: scaleX(1);
}

.tkd-related-city-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.tkd-related-city-card a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tkd-related-city-card a:hover {
    color: var(--tkd-accent-color, #ff9500);
}

.tkd-related-city-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tkd-city-directory-container {
        padding: 15px;
    }
    
    .tkd-city-header {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .tkd-city-title {
        font-size: 2.2em;
    }
    
    .tkd-city-description {
        font-size: 1.1em;
    }
    
    .tkd-city-stats {
        gap: 20px;
    }
    
    .tkd-stat-item {
        padding: 15px;
        min-width: 100px;
    }
    
    .tkd-stat-number {
        font-size: 2em;
    }
    
    .tkd-city-controls {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .tkd-search-bar {
        min-width: auto;
    }
    
    .tkd-filter-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tkd-section-title {
        font-size: 1.8em;
    }
    
    .tkd-top-rated-grid,
    .tkd-businesses-grid {
        grid-template-columns: 1fr;
    }
    
    .tkd-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tkd-business-image {
        align-self: center;
    }
    
    .tkd-business-meta {
        justify-content: center;
    }
    
    .tkd-card-actions {
        flex-direction: column;
    }
    
    .tkd-btn {
        text-align: center;
    }
    
    .tkd-related-cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .tkd-city-title {
        font-size: 1.8em;
    }
    
    .tkd-city-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .tkd-stat-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
    }
    
    .tkd-stat-number {
        font-size: 1.5em;
    }
    
    .tkd-business-card {
        padding: 20px;
    }
    
    .tkd-pagination {
        gap: 5px;
    }
    
    .tkd-page-link {
        padding: 10px 14px;
        font-size: 0.9em;
    }
}

/* Loading Animation */
.tkd-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.tkd-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--tkd-accent-color, #ff9500);
    border-radius: 50%;
    animation: tkd-spin 1s linear infinite;
}

@keyframes tkd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.tkd-btn:focus,
.tkd-page-link:focus,
.tkd-search-bar input:focus,
.tkd-filter-controls select:focus,
.tkd-filter-controls button:focus {
    outline: 2px solid var(--tkd-accent-color, #ff9500);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .tkd-city-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .tkd-city-controls,
    .tkd-pagination,
    .tkd-card-actions {
        display: none !important;
    }
    
    .tkd-business-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
} 