/* Styles for the standalone /route/{id} itinerary article page */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a2a35;
}

/* ── Header ── */

.itin-header {
    background: #EAEFF2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 200;
}

.itin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.itin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.itin-logo {
    width: 48px;
    height: 48px;
}

.itin-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.itin-brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2C5F7C;
    line-height: 1;
}

.itin-brand-sub {
    font-size: 11px;
    color: #888;
    letter-spacing: 0.3px;
}

.itin-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.itin-nav-link {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
}

.itin-nav-link:hover { color: #2C5F7C; }

.itin-nav-btn {
    background: #2C5F7C;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}

.itin-nav-btn:hover { background: #1e4a62; }

/* ── Hero ── */

.itin-hero {
    position: relative;
    background-color: #2C5F7C;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 48px 24px;
    text-align: center;
}

/* Gradient overlay — sits between photo and text */
.itin-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44,95,124,0.82) 0%, rgba(26,61,82,0.9) 100%);
}

.itin-hero > * {
    position: relative;
}

.itin-title {
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.itin-tagline {
    font-size: clamp(15px, 2vw, 18px);
    opacity: 0.88;
    margin: 0 0 12px;
    line-height: 1.5;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.itin-meta {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.75;
    margin: 0;
}

.itin-highlights {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
    min-height: 0;
}

.itin-highlight-chip {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.itin-photo-credit {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    background: rgba(0,0,0,0.3);
    padding: 2px 7px;
    border-radius: 3px;
}

.itin-photo-credit:hover { color: #fff; }

/* ── Map ── */

.itin-map-wrap {
    width: 100%;
    height: 55vh;
    min-height: 320px;
    max-height: 600px;
    position: relative;
    background: #d0dde5;
}

#map {
    width: 100%;
    height: 100%;
}

/* Numbered stop markers */
.itin-stop-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2C5F7C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: transform 0.1s;
}

.itin-stop-marker:hover { transform: scale(1.15); }
.itin-stop-marker-first { background: #1a6b3a; }
.itin-stop-marker-last  { background: #8b1a1a; }

/* ── Open-in-planner bar ── */

.itin-open-bar {
    background: #fff;
    border-bottom: 1px solid #e5eaed;
    padding: 18px 24px;
    text-align: center;
}

.itin-open-btn {
    display: inline-block;
    background: #2C5F7C;
    color: #fff;
    padding: 13px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s;
}

.itin-open-btn:hover { background: #1e4a62; }

/* ── Content area ── */

.itin-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.itin-about,
.itin-stops {
    margin-bottom: 48px;
}

.itin-about h2,
.itin-stops h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a2a35;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e8ed;
}

.itin-desc p {
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    margin: 0 0 16px;
}

.itin-desc p:last-child { margin-bottom: 0; }

/* ── Stop list ── */

.itin-stop-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: stop-counter;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.itin-stop-item {
    counter-increment: stop-counter;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 16px;
    align-items: start;
}

.itin-stop-item::before {
    content: counter(stop-counter);
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2C5F7C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.itin-stop-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a2a35;
    margin: 0 0 4px;
}

.itin-stop-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ── Footer ── */

.itin-footer {
    background: #EAEFF2;
    border-top: 1px solid #d0d8df;
    padding: 20px 24px;
}

.itin-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.itin-footer a {
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

.itin-footer a:hover { color: #2C5F7C; text-decoration: underline; }

/* ── Responsive ── */

@media (max-width: 600px) {
    .itin-header-inner { padding: 10px 16px; }
    .itin-nav-link { display: none; }
    .itin-nav-btn { padding: 8px 14px; font-size: 13px; }
    .itin-hero { padding: 32px 16px; }
    .itin-map-wrap { height: 45vmax; min-height: 260px; }
    .itin-content { padding: 32px 16px 48px; }
}
