/* Custom styles for Strava Music Pins */

/* ===== LANDING PAGE STYLES ===== */

/* Features Section Background - Deep Teal/Navy */
.features-section {
    background: linear-gradient(180deg, #0A2540 0%, #061a2e 50%, #0d1117 100%);
    padding: 1rem 0;
    margin-top: 0;
    border-radius: 0 0 1rem 1rem;
    position: relative;
    border: 1px solid rgba(10, 37, 64, 0.5);
    border-top: none;
}


/* Feature Cards with Orange Accent */
.feature-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #FC4C02;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(252, 76, 2, 0.25);
    border-color: rgba(252, 76, 2, 0.5);
}

.feature-card .card-body {
    padding: 2rem;
}

.feature-card .feature-icon {
    color: #FC4C02 !important;
    width: 56px;
    height: 56px;
}

.feature-card .card-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.feature-card .card-text {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    line-height: 1.6;
}

/* Hero Section Background */
.hero-section {
    background: linear-gradient(180deg, #0d1117 0%, #0A2540 100%);
    padding: 0 0 0.5rem 0;
    border-radius: 1rem 1rem 0 0;
    margin-bottom: 0;
    position: relative;
    border: 1px solid rgba(10, 37, 64, 0.5);
    border-bottom: none;
}

/* Hero Image - Wide rectangle */
.hero-image {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero Text Content */
.hero-text-content {
    padding: 1rem 0;
}

/* Hero CTA Oval Buttons */
.btn-cta-oval {
    background: linear-gradient(135deg, #FC4C02 0%, #e04400 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(252, 76, 2, 0.3);
}

.btn-cta-oval:hover {
    background: linear-gradient(135deg, #ff5a12 0%, #FC4C02 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 76, 2, 0.4);
}

.btn-cta-oval i {
    width: 18px;
    height: 18px;
}

/* Hero Typography */
.hero-description {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    max-width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 991px) {
    .hero-description {
        text-align: center;
    }
    .hero-image {
        max-width: 320px;
    }
}

/* Highlights Section */
.highlights-section {
    background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%);
    padding: 3rem 0;
    margin-top: 0;
    border-radius: 0 0 1rem 1rem;
    position: relative;
}


.highlight-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(10, 37, 64, 0.4);
    transform: translateY(-4px);
}

.highlight-icon {
    width: 48px;
    height: 48px;
    color: #FC4C02;
    margin-bottom: 1rem;
}

.highlight-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.highlight-text {
    font-weight: 300;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(252, 76, 2, 0.4), transparent);
    margin: 0 auto;
    width: 50%;
}

/* ===== END LANDING PAGE STYLES ===== */

/* Enhanced Brand Title */
.navbar-brand {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #FC4C02 !important;
}

.navbar-brand .brand-icon {
    color: #FC4C02;
    width: 32px;
    height: 32px;
}

/* Navigation Links - Bold & Bright White */
.nav-link {
    font-weight: 700 !important;
    color: #ffffff !important;
}

.nav-link:hover {
    color: #FC4C02 !important;
}

/* Page titles - reduced by 2pts */
main h1 {
    font-size: 1.75rem;
}

main h2 {
    font-size: 1.5rem;
}

main .display-4 {
    font-size: 2.25rem;
}

main .display-5 {
    font-size: 1.75rem;
}

/* Map container styles */
#activity-map {
    border-radius: 0.375rem;
    overflow: hidden;
}

.leaflet-container {
    background-color: var(--bs-body-bg);
}

/* Custom marker styles */
.start-marker, .end-marker {
    z-index: 1000 !important;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--bs-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Card enhancements */
.card {
    border: 1px solid var(--bs-border-color);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Activity stats styling */
.bg-body-secondary {
    background-color: var(--bs-secondary-bg) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    #activity-map {
        height: 400px !important;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body .row.g-3 > .col-6 {
        margin-bottom: 0.5rem;
    }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
}

.leaflet-popup-tip {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
}

/* Navigation enhancements */
.navbar {
    margin-left: 2rem;
    margin-right: 2rem;
    border-radius: 0.375rem;
}

.navbar-brand {
    font-weight: 600;
}

/* Flash message styling */
.alert {
    border: none;
    border-radius: 0.5rem;
    background-color: #1e3a8a !important;
    color: white !important;
    border-left: 4px solid #3b82f6;
}

.alert-success {
    background-color: #1e3a8a !important;
}

.alert-danger {
    background-color: #1e3a8a !important;
}

.alert-warning {
    background-color: #1e3a8a !important;
}

.alert-info {
    background-color: #1e3a8a !important;
}

.alert .btn-close {
    filter: brightness(1) invert(1);
}

/* Form styling */
.form-select, .form-control {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.form-select:focus, .form-control:focus {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-primary);
    color: var(--bs-body-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Button improvements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Pagination styling */
.pagination .page-link {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.pagination .page-link:hover {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-secondary);
}

/* Stats cards */
.text-center.p-3 {
    transition: transform 0.2s ease-in-out;
}

.text-center.p-3:hover {
    transform: translateY(-2px);
}

/* Empty state styling */
.text-center.py-5 i[data-feather] {
    opacity: 0.5;
}

/* Footer styling */
footer {
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    margin-left: 2rem;
    margin-right: 2rem;
    margin-top: 2rem;
    border-radius: 0.375rem;
}

footer .container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Map controls for mobile */
@media (max-width: 576px) {
    .leaflet-control-zoom {
        margin-left: 5px !important;
        margin-top: 5px !important;
    }
    
    .leaflet-control-attribution {
        font-size: 10px !important;
    }
}

/* Activity cards hover effect */
.card.h-100 {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card.h-100:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Sport type badge - ovalized with gold color */
.sport-type-badge {
    background-color: #FFC107 !important;
    color: #000 !important;
    border-radius: 25px;
    padding: 0.4rem 0.75rem !important;
    font-weight: 600;
}

/* Text utilities */
.text-truncate {
    max-width: 200px;
}

/* Loading overlay for sync */
.sync-loading {
    position: relative;
}

.sync-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(var(--bs-body-bg-rgb), 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Activity Grid with Map Thumbnails */
.activity-card {
    position: relative;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.activity-map-thumbnail {
    height: 160px;
    width: 100%;
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    position: relative;
}

.map-placeholder {
    height: 100%;
    background-color: var(--bs-secondary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.card-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    text-decoration: none;
}

.card-click-overlay:hover {
    text-decoration: none;
}

/* Compact activity stats */
.activity-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.stat-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bs-primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive thumbnail maps */
@media (max-width: 768px) {
    .activity-map-thumbnail {
        height: 140px;
    }
    
    .activity-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        min-width: 40px;
    }
}

@media (max-width: 576px) {
    .activity-map-thumbnail {
        height: 120px;
    }
    
    .stat-value {
        font-size: 0.85rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* Leaflet thumbnail map adjustments */
.activity-map-thumbnail .leaflet-container {
    border-radius: 0;
}

.thumbnail-start-marker,
.thumbnail-end-marker {
    z-index: 1000 !important;
}

/* Badge adjustments */
.activity-card .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Segments styling */
.segment-item {
    transition: background-color 0.2s ease;
}

.segment-item:hover {
    background-color: var(--bs-body-tertiary);
}

.segment-item:last-child {
    border-bottom: none !important;
}

.segment-name {
    color: var(--bs-emphasis-color);
    font-size: 0.95rem;
    line-height: 1.3;
}

.segments-container {
    max-height: none;
}

/* Toggle icon animation */
.toggle-icon {
    transition: transform 0.3s ease;
}

/* Segment achievements badges */
.segment-item .badge {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.segment-item .badge.bg-success {
    background-color: var(--bs-success) !important;
}

.segment-item .badge.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Responsive adjustments for segments */
@media (max-width: 768px) {
    .segment-item .row {
        --bs-gutter-x: 1rem;
    }
    
    .segment-item .col-md-6:first-child {
        margin-bottom: 1rem;
    }
    
    .segment-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .segment-item {
        padding: 1rem !important;
    }
    
    .segment-item .col-6 {
        margin-bottom: 0.5rem;
    }
}

/* Simulation Mode Styles */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 82, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 82, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 82, 0, 0);
    }
}

#simulation-section .card-header {
    background-color: rgba(255, 82, 0, 0.1);
    border-bottom: 2px solid #FF5200;
}

#simulation-section .card-header h5 {
    color: #FF5200;
}

#simulation-map {
    border: 2px solid var(--bs-border-color);
}

.simulation-start-marker,
.simulation-end-marker,
.segment-simulation-marker {
    z-index: 1000 !important;
}

.music-note-marker {
    z-index: 1001 !important;
}

/* AI Button Styling - Make them pop */
.btn-warning {
    background: linear-gradient(135deg, #FC4C02 0%, #FF6B35 100%) !important;
    color: #ffffff !important;
    border: 2px solid #FC4C02 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(252, 76, 2, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-warning:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #FC4C02 100%) !important;
    border-color: #FF6B35 !important;
    box-shadow: 0 4px 12px rgba(252, 76, 2, 0.35) !important;
    transform: translateY(-2px);
}

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

.btn-warning:active {
    box-shadow: 0 2px 6px rgba(252, 76, 2, 0.3) !important;
    transform: translateY(0);
}

/* AI Sparkle styling for contrast */
.ai-sparkle {
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}
