/**
 * Directory Styles with Badge Support
 * File: /assets/css/directory.css
 * Colors: #3EA2BE (primary), #8DB63F (secondary)
 */

/* ===================================
   DIRECTORY LAYOUT
   ================================== */

.directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.directory-page .main-content {
    padding-top: 0;
}

/* ===================================
   BREADCRUMBS
   ================================== */

.breadcrumbs {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:first-child)::before {
    content: '/';
    margin: 0 0.75rem;
    color: #9ca3af;
}

.breadcrumb-item a {
    color: #3EA2BE;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #2d7a91;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #374151;
    font-weight: 500;
}

/* ===================================
   DIRECTORY HEADER
   ================================== */

.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.directory-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.directory-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.view-btn:hover {
    border-color: #3EA2BE;
    color: #3EA2BE;
}

.view-btn.active {
    border-color: #3EA2BE;
    background: #3EA2BE;
    color: white;
}

.view-btn i {
    font-size: 1rem;
}

/* ===================================
   BADGE STYLES
   ================================== */

/* Base badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.badge i {
    font-size: 0.875rem;
}

/* Badge size variants */
.badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Business card badges */
.business-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inline-badge {
    border-radius: 6px;
    margin-left: 0.5rem;
    vertical-align: middle;
    font-size: 0.625rem;
    padding: 0.45rem 0.5rem;
}

/* Business header main badge */
.business-badge-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Map badges */
.map-badge {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
}

/* Related card badges */
.related-badge {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    width: fit-content;
}

/* Detail badge in sidebar */
.detail-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* Badge color schemes - using your existing badge data */
.badge-member_verified {
    background-color: #3EA2BE;
    color: white;
}

.badge-sponsor_bronze {
    background-color: #cd7f32;
    color: white;
}

.badge-sponsor_silver {
    background-color: #c0c0c0;
    color: #374151;
}

.badge-sponsor_gold {
    background-color: #ffd700;
    color: #374151;
}

.badge-sponsor_presidents_circle {
    background-color: #9932cc;
    color: white;
}

.badge-honorary_member {
    background-color: #8DB63F;
    color: white;
}

.badge-city_municipality {
    background-color: #666666;
    color: white;
}

.badge-public_safety {
    background-color: #dc3545;
    color: white;
}

.badge-nonprofit_verified {
    background-color: #28a745;
    color: white;
}

/* Badge preview in admin form */
.badge-preview {
    margin-top: 0.5rem;
}

.badge-preview-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Badge description in business detail */
.badge-description {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    border-left: 3px solid #3EA2BE;
}

.badge-description i {
    color: #3EA2BE;
}

/* Badge info in detail sidebar */
.detail-item.badge-info {
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.75rem;
}

/* ===================================
   FILTERS
   ================================== */

.directory-filters {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.search-group {
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3EA2BE;
    box-shadow: 0 0 0 3px rgba(62, 162, 190, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
}

.clear-search:hover {
    color: #374151;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background-color: #f9fafb;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3EA2BE;
    box-shadow: 0 0 0 3px rgba(62, 162, 190, 0.1);
}

/* Active Filters */
.active-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.remove-filter {
    color: #6b7280;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

.remove-filter:hover {
    color: #374151;
}

.clear-all-filters {
    color: #ef4444;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.clear-all-filters:hover {
    text-decoration: underline;
}

/* ===================================
   RESULTS SUMMARY
   ================================== */

.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-count {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* ===================================
   DIRECTORY GRID
   ================================== */

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3EA2BE;
}

/* Featured Listings */
.listing-card.featured-listing {
    border-color: #8DB63F;
    box-shadow: 0 4px 12px rgba(141, 182, 63, 0.15);
}

.listing-card.featured-listing:hover {
    border-color: #8DB63F;
    box-shadow: 0 10px 25px rgba(141, 182, 63, 0.2);
}

.featured-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #8DB63F, #7aa232);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-badge i {
    font-size: 0.625rem;
}

/* Listing Image */
.listing-image {
    height: 120px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.listing-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.default-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
    font-size: 2rem;
}

/* Listing Content */
.listing-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.listing-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.listing-name a:hover {
    color: #3EA2BE;
}

.listing-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.listing-category i {
    color: #3EA2BE;
}

.listing-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #3EA2BE;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #2d7a91;
}

.contact-link i {
    width: 1rem;
    text-align: center;
}

.listing-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.stars i {
    color: #fbbf24;
    font-size: 0.875rem;
}

.rating-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.listing-location i {
    color: #3EA2BE;
    width: 1rem;
    text-align: center;
}

/* Listing Actions */
.listing-actions {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-primary {
    background: #3EA2BE;
    color: white;
}

.btn-primary:hover {
    background: #2d7a91;
}

.btn-outline {
    background: transparent;
    color: #3EA2BE;
    border: 1px solid #3EA2BE;
}

.btn-outline:hover {
    background: #3EA2BE;
    color: white;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-sm i {
    font-size: 0.875rem;
}

/* ===================================
   NO RESULTS
   ================================== */

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px dashed #e5e7eb;
}

.no-results-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.no-results p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* ===================================
   MAP VIEW
   ================================== */

.directory-map-container {
    display: flex;
    height: 600px;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.directory-map {
    flex: 1;
    min-height: 600px;
}

.map-listings-sidebar {
    width: 350px;
    background: white;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.map-listing-item {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.map-listing-item:hover {
    background: #f9fafb;
}

.map-listing-item.active {
    background: #eff6ff;
    border-left: 3px solid #3EA2BE;
}

.item-content {
    flex: 1;
}

.item-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.item-actions {
    flex-shrink: 0;
}

/* ===================================
   PAGINATION
   ================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.page-item {
    display: flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    background: white;
    transition: all 0.2s ease;
    min-width: 44px;
    height: 44px;
}

.page-link:hover {
    background: #f9fafb;
    border-color: #3EA2BE;
    color: #3EA2BE;
}

.page-item.active .page-link {
    background: #3EA2BE;
    border-color: #3EA2BE;
    color: white;
}

.page-item.disabled .page-link {
    color: #d1d5db;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background: white;
    border-color: #e5e7eb;
    color: #d1d5db;
}

.page-item:first-child .page-link {
    border-radius: 0.5rem 0 0 0.5rem;
}

.page-item:last-child .page-link {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* ===================================
   DIRECTORY DETAIL PAGE
   ================================== */

.directory-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Business Header */
.business-header {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.business-header-content {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.business-logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
}

.business-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.business-logo .default-logo {
    font-size: 2.5rem;
    color: #9ca3af;
}

.business-info {
    flex: 1;
}

.business-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.business-name {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.business-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.business-status.open {
    background: #d1fae5;
    color: #065f46;
}

.business-status.closed {
    background: #fef2f2;
    color: #991b1b;
}

.business-status i {
    font-size: 0.5rem;
}

.business-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.business-category,
.business-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #6b7280;
}

.business-category a {
    color: #3EA2BE;
    text-decoration: none;
}

.business-category a:hover {
    text-decoration: underline;
}

.business-category i,
.business-location i {
    color: #3EA2BE;
}

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

.business-rating .stars {
    gap: 0.25rem;
}

.business-rating .stars i {
    font-size: 1.125rem;
}

.business-rating .rating-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Business Actions */
.business-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.business-actions .btn {
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
}

i.fas.fa-share-alt {
    margin: 0 5px 0 0 !important;
}

/* Business Content */
.business-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.content-main {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.content-main section {
    margin-bottom: 2.5rem;
}

.content-main section:last-child {
    margin-bottom: 0;
}

.content-main h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

.description-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}

/* Services and Specialties */
.services-list,
.specialties-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-tag,
.specialty-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f9ff;
    color: #0c4a6e;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #bae6fd;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid #e5e7eb;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease;
}

.event-item:hover {
    border-color: #3EA2BE;
}

.event-date {
    text-align: center;
    padding: 0.75rem;
    background: #3EA2BE;
    color: white;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 60px;
}

.event-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.event-link {
    color: #3EA2BE;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    text-decoration: underline;
}

/* Sidebar */
.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Contact Info */
.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    color: #3EA2BE;
    width: 1.25rem;
    text-align: center;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.contact-item div {
    flex: 1;
}

.contact-item strong {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.contact-item a {
    color: #3EA2BE;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item address {
    font-style: normal;
    line-height: 1.5;
    color: #6b7280;
}

/* Business Hours */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.hours-item:last-child {
    border-bottom: none;
}

.hours-day {
    font-weight: 500;
    color: #374151;
}

.hours-time {
    color: #6b7280;
}

.hours-time.closed {
    color: #9ca3af;
}

/* Business Details */
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #374151;
    font-weight: 600;
}

.detail-item span {
    color: #6b7280;
}

/* Social Media */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    border-color: #3EA2BE;
    background: #f8fafc;
}

.social-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.social-facebook i { color: #1877f2; }
.social-twitter i { color: #1da1f2; }
.social-instagram i { color: #e4405f; }
.social-linkedin i { color: #0077b5; }
.social-youtube i { color: #ff0000; }

/* Map */
.map-container {
    height: 200px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

/* Related Listings */
.related-listings {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.related-listings h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.related-card:hover {
    border-color: #3EA2BE;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-image {
    height: 80px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.related-content {
    padding: 1rem;
}

.related-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.related-name a {
    color: #1f2937;
    text-decoration: none;
}

.related-name a:hover {
    color: #3EA2BE;
}

.related-category {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.related-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #3EA2BE;
    text-decoration: none;
}

.related-phone:hover {
    text-decoration: underline;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-modal.show {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.gallery-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gallery-prev {
    left: -60px;
}

.gallery-next {
    right: -60px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.875rem;
}

/* ===================================
   RESPONSIVE DESIGN
   ================================== */

@media (max-width: 1024px) {
    .directory-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .business-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .map-listings-sidebar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .directory-container,
    .directory-detail-container {
        padding: 1rem;
    }
    
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .business-header {
        padding: 1.5rem;
    }
    
    .business-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .business-logo {
        align-self: center;
    }
    
    .business-name {
        font-size: 1.75rem;
        justify-content: center;
    }
    
    .business-title-row {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .business-actions {
        justify-content: center;
    }
    
    .content-main,
    .sidebar-section {
        padding: 1.25rem;
    }
    
    .directory-map-container {
        flex-direction: column;
        height: auto;
    }
    
    .directory-map {
        height: 400px;
    }
    
    .map-listings-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile badge adjustments */
    .business-badge-main {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .listing-name {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .directory-title h1 {
        font-size: 2rem;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
    }
    
    .business-meta {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .business-actions {
        flex-direction: column;
    }
    
    .business-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .pagination {
        gap: 0.125rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
    }
    
    /* Mobile badge responsive adjustments */
    .business-badge {
        position: static;
        margin-bottom: 0.5rem;
        align-self: flex-start;
    }
    
    .inline-badge {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
        width: fit-content;
    }
}

/* ===================================
   UTILITIES
   ================================== */

.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Smooth transitions for JS interactions */
.directory-grid,
.directory-map-container {
    transition: opacity 0.3s ease;
}

.directory-grid.loading,
.directory-map-container.loading {
    opacity: 0.7;
}

/* Focus styles for accessibility */
.btn:focus,
.filter-select:focus,
.search-input:focus {
    outline: 2px solid #3EA2BE;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .directory-filters,
    .pagination-wrapper,
    .view-toggle,
    .business-actions {
        display: none;
    }
    
    .business-content {
        grid-template-columns: 1fr;
    }
    
    .directory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .badge {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* ===================================
   GOOGLE MAPS STYLES - Add to directory.css
   =================================== */

/* Directory Map Container */
.directory-map-container {
    display: flex;
    height: 600px;
    gap: 0;
    position: relative;
}

#directoryMap {
    flex: 1;
    height: 100%;
}

/* Map Sidebar */
.map-listings-sidebar {
    width: 350px;
    background: white;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.map-listings-sidebar.collapsed {
    transform: translateX(100%);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-toggle:hover {
    color: #1f2937;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

/* Map Listing Items in Sidebar */
.map-listing-item {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-listing-item:hover {
    background: #f9fafb;
}

.map-listing-item.active {
    background: #eff6ff;
    border-left: 3px solid #3EA2BE;
}

.map-listing-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.map-listing-item p {
    margin: 0 0 0.75rem 0;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #9ca3af;
}

.item-meta .category,
.item-meta .location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.item-actions {
    margin-top: 0.75rem;
}

.item-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Map Info Window Styles */
.gm-style .map-info-window {
    padding: 1rem;
    min-width: 280px;
    max-width: 320px;
}

.gm-style .info-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.gm-style .info-description {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.gm-style .info-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.gm-style .info-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gm-style .info-location {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: 0.8125rem;
}

.gm-style .info-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gm-style .info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.gm-style .info-btn-primary {
    background: #3EA2BE;
    color: white;
}

.gm-style .info-btn-primary:hover {
    background: #2d8aa3;
    transform: translateY(-1px);
}

.gm-style .info-btn-outline {
    background: white;
    border: 1.5px solid #e5e7eb;
    color: #374151;
}

.gm-style .info-btn-outline:hover {
    border-color: #3EA2BE;
    color: #3EA2BE;
    background: #f0f9ff;
}

/* Business Detail Map */
.business-map {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    position: relative;
}

#businessMap {
    width: 100%;
    height: 100%;
}

/* Street View Toggle Button - Already styled in JS but can be overridden here */
.street-view-toggle:hover {
    background: #f3f4f6 !important;
}

/* Map Badge/Marker Labels */
.gm-style .map-badge {
    background: rgba(62, 162, 190, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .directory-map-container {
        flex-direction: column;
        height: auto;
    }
    
    #directoryMap {
        height: 500px;
    }
    
    .map-listings-sidebar {
        width: 100%;
        max-height: 400px;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .map-listings-sidebar.collapsed {
        transform: translateY(100%);
    }
}

@media (max-width: 768px) {
    .directory-map-container {
        height: auto;
    }
    
    #directoryMap {
        height: 400px;
    }
    
    .map-listings-sidebar {
        max-height: 300px;
    }
    
    .business-map {
        height: 300px;
    }
    
    .gm-style .map-info-window {
        min-width: 240px;
        max-width: 280px;
    }
    
    .gm-style .info-actions {
        flex-direction: column;
    }
    
    .gm-style .info-btn {
        width: 100%;
    }
}

/* Loading State for Map */
.directory-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Map Marker Cluster Styles (override default if needed) */
.cluster {
    background: #3EA2BE;
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cluster:hover {
    background: #2d8aa3;
}