/* Community Map Page Styles */

/* Tool Hero - Fixed header spacing */
.tool-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.tool-hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-gray, #64748B);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.tool-badge-icon {
    font-size: 1.2rem;
}

.tool-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark, #1E293B);
    margin-bottom: 1rem;
}

.tool-hero-desc {
    font-size: 1.05rem;
    color: var(--text-gray, #64748B);
    line-height: 1.7;
}

/* Map Container */
.community-map-container {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    overflow: hidden;
}

.map-wrapper {
    position: relative;
    width: 100%;
    overflow: auto;
    max-height: 70vh;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8faf5 0%, #e8f4e0 100%);
    cursor: grab;
}

.map-wrapper:active {
    cursor: grabbing;
}

.community-map-image {
    display: block;
    width: 100%;
    height: auto;
    min-width: 600px;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

/* Zoom Controls */
.map-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* City Highlights Section */
.city-highlights-section {
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.city-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.city-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.city-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.city-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.city-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

/* Map Markers */
.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.map-marker {
    position: absolute;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.marker-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: markerBounce 1.2s ease-in-out infinite;
}

.marker-label {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

@keyframes markerBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-6px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-3px);
    }
}

/* Staggered animation delays for each marker */
.map-marker:nth-child(1) .marker-icon {
    animation-delay: 0s;
}

.map-marker:nth-child(2) .marker-icon {
    animation-delay: 0.2s;
}

.map-marker:nth-child(3) .marker-icon {
    animation-delay: 0.4s;
}

.map-marker:nth-child(4) .marker-icon {
    animation-delay: 0.6s;
}

.map-marker:nth-child(5) .marker-icon {
    animation-delay: 0.8s;
}

.map-marker:nth-child(6) .marker-icon {
    animation-delay: 1.0s;
}

/* Location Popup */
.location-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 320px;
    width: 90%;
    text-align: center;
}

.location-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f0f0f0;
    color: var(--text-primary);
}

.popup-city {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.popup-address {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.popup-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-copy:hover {
    background: var(--primary-dark, #2563eb);
    transform: translateY(-2px);
}

.popup-copy.copied {
    background: #22c55e;
}

/* Map Hint */
.map-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding: 0.5rem;
}

/* City Rank Badge */
.city-rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.city-card {
    position: relative;
}

/* Featured City Card */
.city-card.featured {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.city-card.featured:hover {
    border-color: #d97706;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.25);
}

.city-card.featured .city-rank {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Contact Section */
.contact-section {
    margin-bottom: 3rem;
}

.contact-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: shimmer 15s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contact-highlight {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.contact-desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-btn.btn-primary {
    background: white;
    color: #764ba2;
}

.contact-btn.btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.contact-btn.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.contact-btn.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-3px);
}

.contact-note {
    font-size: 0.85rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Tips Section */
.tips-section {
    margin-bottom: 2rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.tip-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tip-card:hover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
}

.tip-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.tip-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tip-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .community-map-container {
        padding: 1rem;
    }

    .map-wrapper {
        max-height: 50vh;
    }

    .map-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .city-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .section-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .community-map-image {
        min-width: 400px;
    }

    .city-card {
        padding: 1.25rem;
    }

    .city-icon {
        font-size: 2rem;
    }

    .city-name {
        font-size: 1.1rem;
    }
}

/* Animation for map loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-card {
    animation: fadeIn 0.5s ease forwards;
}

.city-card:nth-child(1) {
    animation-delay: 0.1s;
}

.city-card:nth-child(2) {
    animation-delay: 0.15s;
}

.city-card:nth-child(3) {
    animation-delay: 0.2s;
}

.city-card:nth-child(4) {
    animation-delay: 0.25s;
}

.city-card:nth-child(5) {
    animation-delay: 0.3s;
}

.city-card:nth-child(6) {
    animation-delay: 0.35s;
}

.tip-card {
    animation: fadeIn 0.5s ease forwards;
}

.tip-card:nth-child(1) {
    animation-delay: 0.4s;
}

.tip-card:nth-child(2) {
    animation-delay: 0.45s;
}

.tip-card:nth-child(3) {
    animation-delay: 0.5s;
}

.tip-card:nth-child(4) {
    animation-delay: 0.55s;
}