/* Routes Page Specific Styles - Only loads on routes.html */
/* Cycling Over Sixty - Routes Page CSS */

/* ===== ROUTES HERO SECTION ===== */
.routes-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    text-align: center;
}

.routes-hero .hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.routes-hero .hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 20px;
    opacity: 0.95;
    font-weight: bold;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.routes-hero .hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* ===== ROUTES NAVIGATION ===== */
.routes-nav {
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    padding: 20px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.routes-nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.routes-nav .nav-link {
    background: var(--primary-green);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    transition: all var(--transition-smooth);
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.routes-nav .nav-link:hover,
.routes-nav .nav-link:focus,
.routes-nav .nav-link.active {
    background: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(164, 226, 31, 0.3);
}

/* ===== ROUTE SECTIONS ===== */
.route-section {
    background: var(--background-white);
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    scroll-margin-top: 100px;
    animation: fadeInUp 0.8s ease-out;
}

.route-header {
    background: linear-gradient(135deg, var(--background-hero), #f8f9fa);
    padding: 25px 30px;
    border-bottom: 1px solid #ddd;
}

.route-header h3 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 15px;
}

.route-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.route-stats .stat {
    background: var(--background-white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-dark);
    border: 2px solid var(--primary-green);
    transition: all var(--transition-smooth);
}

.route-stats .stat:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* ===== MAP CONTAINER ===== */
.map-container {
    position: relative;
    background: #f8f9fa;
    height: 700px; /* Fixed height instead of min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent overflow */
}

.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-medium);
    z-index: 2; /* Above the iframe */
    position: absolute; /* Position over the iframe */
}

.loading-spinner {
    border: 3px solid var(--background-hero);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.route-map {
    width: 100%;
    height: 100%; /* Use full container height */
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.route-map.loaded {
    opacity: 1;
}

/* ===== DOWNLOAD BUTTONS SECTION ===== */
.route-downloads {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    margin: 20px 30px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(164, 226, 31, 0.15);
    transition: all 0.3s ease;
}

.route-downloads:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(164, 226, 31, 0.25);
}

.download-content h5 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-description {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.download-btn {
    background: var(--primary-green);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    border: 2px solid var(--primary-green);
    box-shadow: 0 2px 8px rgba(164, 226, 31, 0.2);
}

.download-btn:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(164, 226, 31, 0.3);
}

.download-btn.view {
    background: #6c757d;
    border-color: #6c757d;
}

.download-btn.view:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.btn-icon {
    font-size: 1rem;
}

.download-help {
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    margin-top: 5px;
}

.download-help small {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ===== ROUTE NOTES ===== */
.route-notes {
    padding: 30px;
}

.route-notes h4 {
    color: var(--text-dark);
    font-size: 1.6rem;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-green);
    padding-bottom: 10px;
}

.notes-content {
    display: grid;
    gap: 25px;
}

.route-overview {
    background: var(--background-hero);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-green);
}

.route-overview p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.route-overview p:last-child {
    margin-bottom: 0;
}

/* ===== RESOURCES SECTION ===== */
.resources-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-green);
}

.resources-section h5 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resources-list {
    margin: 0 0 20px 0;
    padding-left: 0;
    list-style: none;
}

.resources-list li {
    background: var(--background-hero);
    margin-bottom: 8px;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-green);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all var(--transition-smooth);
}

.resources-list li:hover {
    background: rgba(164, 226, 31, 0.1);
    transform: translateX(5px);
}

.resources-list li strong {
    color: var(--text-dark);
}

/* ===== HIGHLIGHTS SECTION ===== */
.highlights-section {
    background: linear-gradient(135deg, #e8f5e9, #f0fff0);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-green);
}

.highlights-section h5 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlights-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.highlights-list li {
    background: white;
    margin-bottom: 8px;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-green);
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    transition: all var(--transition-smooth);
}

.highlights-list li:hover {
    background: rgba(164, 226, 31, 0.1);
    transform: translateX(5px);
}

.highlights-list li:before {
    content: "✨";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

/* ===== GENERAL INFO SECTION ===== */
.general-info {
    margin: 50px 0;
}

.general-info h3 {
    font-size: 2.2rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-card {
    background: var(--background-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-green);
    transition: all var(--transition-smooth);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-left-color: var(--accent-green);
}

.info-card h4 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card p {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 15px;
}

.info-card ul {
    margin: 0;
    padding-left: 20px;
}

.info-card li {
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ===== ROUTE CTA SECTION ===== */
.route-cta {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: white;
    padding: 50px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 40px 0;
    box-shadow: var(--shadow-heavy);
}

.route-cta h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.route-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button.large {
    font-size: 1.3rem;
    padding: 18px 35px;
    background: white;
    color: var(--accent-green);
    text-decoration: none;
    border: 3px solid white;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: all var(--transition-smooth);
    display: inline-block;
}

.cta-button.large:hover,
.cta-button.large:focus {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .routes-hero {
        padding: 60px 20px;
    }
    
    .routes-hero .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .routes-hero .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .routes-hero .hero-description {
        font-size: 1rem;
    }
    
    .routes-nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .routes-nav .nav-link {
        padding: 12px 20px;
        text-align: center;
        min-width: 150px;
    }
    
    .routes-nav {
        position: static;
        padding: 15px;
    }
    
    .route-header {
        padding: 20px 25px;
    }
    
    .route-header h3 {
        font-size: 1.6rem;
    }
    
    .route-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .route-stats .stat {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .route-map {
        height: 500px; /* Smaller height on mobile */
    }
    
    .map-container {
        height: 500px; /* Match the map height */
    }
    
    .route-downloads {
        margin: 15px 20px;
        padding: 20px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .download-btn {
        width: 100%;
        max-width: 250px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .download-content h5 {
        font-size: 1.2rem;
    }
    
    .download-description {
        font-size: 0.9rem;
    }
    
    .route-notes {
        padding: 20px;
    }
    
    .route-notes h4 {
        font-size: 1.4rem;
    }
    
    .notes-content {
        gap: 20px;
    }
    
    .route-overview,
    .resources-section,
    .highlights-section {
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card h4 {
        font-size: 1.2rem;
    }
    
    .route-cta {
        padding: 40px 25px;
    }
    
    .route-cta h3 {
        font-size: 1.8rem;
    }
    
    .cta-button.large {
        font-size: 1.1rem;
        padding: 15px 25px;
    }
}

@media (max-width: 480px) {
    .routes-hero {
        padding: 40px 15px;
    }
    
    .routes-hero .hero-content h2 {
        font-size: 2rem;
    }
    
    .routes-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .routes-hero .hero-description {
        font-size: 0.95rem;
    }
    
    .routes-nav .nav-link {
        padding: 10px 15px;
        font-size: 0.8rem;
        min-width: 120px;
    }
    
    .route-header {
        padding: 15px 20px;
    }
    
    .route-header h3 {
        font-size: 1.4rem;
    }
    
    .route-map {
        height: 400px; /* Even smaller on very small screens */
    }
    
    .map-container {
        height: 400px; /* Match the map height */
    }
    
    .route-downloads {
        margin: 10px 15px;
        padding: 18px;
    }
    
    .download-content h5 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .download-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .download-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .download-help small {
        font-size: 0.75rem;
    }
    
    .route-notes {
        padding: 15px;
    }
    
    .route-notes h4 {
        font-size: 1.2rem;
    }
    
    .route-overview,
    .resources-section,
    .highlights-section {
        padding: 12px;
    }
    
    .resources-list li,
    .highlights-list li {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .info-card {
        padding: 18px;
    }
    
    .info-card h4 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .route-cta {
        padding: 30px 20px;
    }
    
    .route-cta h3 {
        font-size: 1.6rem;
    }
    
    .route-cta p {
        font-size: 1rem;
    }
    
    .cta-button.large {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .routes-nav,
    .route-cta,
    .back-to-top,
    .map-loading {
        display: none;
    }
    
    .route-section {
        break-inside: avoid;
        margin-bottom: 30px;
        border: 1px solid #ddd;
    }
    
    .route-map {
        height: 400px;
        position: static;
        opacity: 1;
    }
    
    .route-downloads {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin: 15px 0 !important;
    }
    
    .download-btn {
        background: white !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        break-inside: avoid;
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }
    
    .resources-list li,
    .highlights-list li {
        background: white !important;
        border: 1px solid #ddd;
    }
}

/* ===== ANIMATION DELAYS ===== */
.route-section:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.1s both; }
.route-section:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.2s both; }
.route-section:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.3s both; }

.info-card:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.1s both; }
.info-card:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.2s both; }
.info-card:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.3s both; }
.info-card:nth-child(4) { animation: fadeInUp 0.8s ease-out 0.4s both; }

/* ===== MAP LOADING ENHANCEMENTS ===== */
.map-container.loading .map-loading {
    display: flex;
}

.map-container.loaded .map-loading {
    display: none;
}

.map-container.loaded .route-map {
    opacity: 1;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.route-section:target {
    animation: highlightSection 2s ease-in-out;
}

@keyframes highlightSection {
    0% { background-color: rgba(164, 226, 31, 0.1); }
    50% { background-color: rgba(164, 226, 31, 0.2); }
    100% { background-color: transparent; }
}

/* ===== ENHANCED INTERACTIVE STATES ===== */
.resources-list li:hover:before {
    content: "→ ";
    font-weight: bold;
    color: var(--primary-green);
}

.highlights-list li:hover:before {
    content: "⭐";
    left: -15px;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}