/* Track Map Header */
.track-map-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: #3CB371;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    color: white;
}

.track-map-header-info {
    flex: 1;
}

.track-map-header h1 {
    color: white;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: bold;
}

.track-map-header .subtitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
    opacity: 0.9;
}

.track-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Map Privacy Placeholder */
.map-privacy-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 10;
}

.privacy-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid #e9ecef;
}

.privacy-icon {
    font-size: 3rem;
    color: #3CB371;
    margin-bottom: 20px;
}

.privacy-content h3 {
    color: #333;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.privacy-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.privacy-details {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: left;
}

.privacy-details p {
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
}

.privacy-details ul {
    color: #666;
    margin: 0;
    padding-left: 20px;
}

.privacy-details li {
    margin-bottom: 5px;
}

.consent-button {
    background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(60, 179, 113, 0.3);
}

.consent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60, 179, 113, 0.4);
    background: linear-gradient(135deg, #2E8B57 0%, #228B22 100%);
}

.consent-button:active {
    transform: translateY(0);
}

.privacy-note {
    margin-top: 20px;
    color: #888;
    font-size: 0.9rem;
}

.privacy-note i {
    margin-right: 5px;
    color: #3CB371;
}

.map-container {
    position: relative;
    height: 90vh;
    min-height: 500px;
    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.track-map {
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

/* Custom Track Marker */
.track-marker {
    background-color: #e31818;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.track-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.track-marker i {
    color: white;
    font-size: 16px;
}

/* Track Popup Styles */
.track-popup {
    padding: 15px;
    min-width: 250px;
    max-width: 280px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.track-popup h3 {
    color: #e31818;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-location i {
    margin-right: 5px;
    color: #e31818;
    flex-shrink: 0;
}

.popup-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.popup-stats span {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.popup-stats i {
    margin-right: 5px;
    color: #e31818;
    flex-shrink: 0;
}

.popup-details-btn {
    display: inline-flex;
    align-items: center;
    background-color: #e31818;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.popup-details-btn:hover {
    background-color: #c01414;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.popup-details-btn i {
    margin-right: 8px;
    flex-shrink: 0;
}

/* Track List Section */
.track-list-section {
    padding: 80px 0;
    background-color: #111E0A;
}

.track-list-section h2 {
    text-align: center;
    color: #ffd700;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.track-list-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    cursor: pointer;
}

.track-list-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: #ffd700;
}

.track-list-image {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    min-height: 120px;
    height: 200px;
    overflow: hidden;
}

.track-list-image img {
    max-width: 100%;
    height: auto;
    height: 200px;
    filter: brightness(0) saturate(100%) invert(89%) sepia(22%) saturate(5939%) hue-rotate(0deg) brightness(105%) contrast(103%);
    transition: transform 0.3s ease;
}

.track-list-item:hover .track-list-image img {
    transform: scale(1.05);
}

.track-list-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.track-list-info h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.track-location {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.track-location i {
    margin-right: 8px;
    color: #ffd700;
}

.track-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

.track-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.track-length, .track-turns {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.track-length i, .track-turns i {
    color: #ffd700;
    font-size: 0.9rem;
}

.track-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e31818 0%, #c01414 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto;
    text-decoration: none;
    font-size: 1rem;
}

.track-details-btn:hover {
    background: linear-gradient(135deg, #ff2e2e 0%, #e31818 100%);
    color: white;
    transform: translateY(-2px);
}

.track-details-btn i {
    margin-right: 8px;
}

/* Mapbox Popup Customization */
.mapboxgl-popup-content {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-width: 300px;
    overflow: hidden;
}

.mapboxgl-popup-tip {
    border-top-color: white;
}

.mapboxgl-popup-close-button {
    font-size: 20px;
    color: #666;
    padding: 5px;
    right: 8px;
    top: 8px;
}

.mapboxgl-popup-close-button:hover {
    color: #e31818;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: white;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: white;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: white;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .track-map-header {
        flex-direction: column;
        text-align: center;
        padding: 25px;
        margin-bottom: 30px;
    }
    
    .track-map-header h1 {
        font-size: 2.2rem;
    }
    
    .track-map-header .subtitle {
        font-size: 1rem;
    }
    
    .map-container {
        height: 90vh;
        min-height: 500px;
        border-radius: 15px;
    }
    
    .privacy-content {
        max-width: 95%;
        padding: 25px 15px;
        margin: 15px;
    }
    
    .privacy-icon {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .privacy-content h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .privacy-text {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .privacy-details {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .consent-button {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .track-map {
        border-radius: 15px;
    }
    
    .track-list-section h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .track-list-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .track-list-item {
        margin: 0;
    }
    
    .track-list-info {
        padding: 20px;
    }
    
    .track-stats {
        flex-direction: row;
        gap: 10px;
    }
    
    .track-popup {
        min-width: 200px;
        padding: 12px;
    }
    
    .track-popup h3 {
        font-size: 1.1rem;
    }
    
    .popup-stats {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .track-map-header {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .track-map-header h1 {
        font-size: 1.8rem;
    }
    
    .track-map-header .subtitle {
        font-size: 0.9rem;
    }
    
    .track-count {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .map-container {
        height: 80vh;
        min-height: 450px;
        border-radius: 12px;
    }
    
    .privacy-content {
        padding: 20px 12px;
        margin: 10px;
    }
    
    .privacy-icon {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    
    .privacy-content h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .privacy-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .privacy-details {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .consent-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .track-map {
        border-radius: 12px;
    }
    
    .track-list-section {
        padding: 60px 0;
    }
    
    .track-list-section h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .track-list-grid {
        padding: 0 15px;
        gap: 15px;
    }
    
    .track-list-info {
        padding: 15px;
    }
    
    .track-list-info h3 {
        font-size: 1.1rem;
    }
    
    .track-location {
        font-size: 1rem;
    }
    
    .track-description {
        font-size: 0.85rem;
    }
    
    .track-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .track-length, .track-turns {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
    
    .track-details-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}
