/* Detail Pages CSS - Route & Blog Detail Styling */

/* Detail Sections Layout */
.route-detail,
.blog-detail {
    background: var(--white);
    padding-top: 0;
    min-height: 100vh;
}

/* Hero Sections for Detail Pages */
.route-detail-hero,
.blog-detail-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary); /* Fallback */
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}

.route-detail-hero::before,
.blog-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom, 
        rgba(0,0,0,0.2) 0%, 
        rgba(0,0,0,0.7) 100%
    );
}

.route-detail-hero-content,
.blog-detail-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 3rem;
    width: 100%;
    color: white;
}

/* Detail Page Headers */
.route-detail-header,
.blog-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.route-detail-title,
.blog-detail-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
}

.route-detail-subtitle,
.blog-detail-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Badges */
.route-difficulty-badge,
.blog-category-badge {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Blog Meta Information */
.blog-detail-meta {
    display: flex;
    gap: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-top: 1rem;
}

.blog-detail-date,
.blog-detail-reading-time,
.blog-detail-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content Layout */
.route-detail-content,
.blog-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.route-detail-main,
.blog-detail-article {
    grid-column: 1;
}

.route-detail-sidebar {
    grid-column: 2;
}

/* Content Sections */
.route-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary);
    margin-bottom: 3rem;
}

/* Highlights Section */
.route-highlights {
    margin-bottom: 3rem;
}

.route-highlights h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.route-highlights ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.route-highlights li {
    padding: 0.5rem 0;
    color: var(--secondary);
    position: relative;
    padding-left: 1.5rem;
}

.route-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Waypoints Section */
.route-waypoints {
    margin-bottom: 3rem;
}

.route-waypoints h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.waypoints-list {
    display: grid;
    gap: 1.5rem;
}

.waypoint {
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary);
    transition: var(--transition-smooth);
}

.waypoint:hover {
    background: var(--gray-200);
    transform: translateX(5px);
}

.waypoint h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.waypoint p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.waypoint-distance {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Gallery Section */
.route-gallery,
.blog-gallery {
    margin-bottom: 3rem;
}

.route-gallery h3,
.blog-gallery h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

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

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
}

.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* Sidebar Styling */
.route-detail-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Stats Detail Box */
.route-stats-detail {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: var(--radius-medium);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.route-stats-detail h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.stat-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
}

.stat-value {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Action Buttons */
.route-actions-detail {
    margin-bottom: 2rem;
}

.route-actions-detail .btn-primary {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Tips Section */
.route-tips {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary);
    margin-bottom: 2rem;
}

.route-tips h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.route-tips ul {
    list-style-position: inside;
    color: var(--secondary);
    line-height: 1.6;
}

.route-tips li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Blog Content Styling */
.blog-introduction {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary);
    font-style: italic;
}

.blog-section {
    margin-bottom: 3rem;
}

.blog-section-headline {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.blog-section-content {
    line-height: 1.8;
    color: var(--secondary);
    font-size: 1.05rem;
}

.blog-section-content p {
    margin-bottom: 1.5rem;
}

.blog-section-content ul,
.blog-section-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-section-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.blog-section-content strong {
    color: var(--primary);
    font-weight: 700;
}

.blog-conclusion {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary);
    font-style: italic;
}

.blog-cta {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-medium);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Related Posts */
.blog-detail-related {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
    grid-column: 1 / -1;
}

.blog-detail-related h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-post-card {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid var(--gray-200);
}

.related-post-card:hover {
    background: var(--gray-200);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.related-post-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--secondary);
    line-height: 1.3;
}

.related-post-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.related-post-date {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 968px) {
    .route-detail-content,
    .blog-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .route-detail-sidebar {
        position: static;
        order: -1;
    }

    .route-detail-hero,
    .blog-detail-hero {
        height: 50vh;
        min-height: 300px;
    }

    .route-detail-header,
    .blog-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .route-difficulty-badge,
    .blog-category-badge {
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .route-highlights ul {
        grid-template-columns: 1fr;
    }

    .blog-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .route-detail-hero-content,
    .blog-detail-hero-content {
        padding-bottom: 2rem;
    }

    .route-stats-detail {
        padding: 1.5rem;
    }
}