/* Blog pages (index + posts). Builds on /style.css. */

.blog-main {
    padding: 130px 0 80px;
}

.blog-header {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.blog-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--rrugo-blue);
    margin-bottom: 12px;
}

.blog-header h1 {
    font-family: 'Onest', sans-serif;
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.blog-header p {
    color: var(--text-muted);
    font-size: 18px;
}

/* Index cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.blog-card-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--rrugo-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.blog-card h2 {
    font-family: 'Onest', sans-serif;
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.blog-card p {
    color: var(--text-muted);
    font-size: 15px;
    flex: 1;
}

.blog-card-more {
    margin-top: 18px;
    font-weight: 700;
    font-size: 14px;
    color: var(--rrugo-blue);
}

/* Article */
.post {
    max-width: 740px;
    margin: 0 auto;
}

.post-breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.post-breadcrumb a {
    color: var(--rrugo-blue);
    text-decoration: none;
}

.post h1 {
    font-family: 'Onest', sans-serif;
    font-size: 40px;
    line-height: 1.15;
    margin-bottom: 14px;
}

.post-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-gray);
}

.post-lead {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 28px;
}

.post h2 {
    font-family: 'Onest', sans-serif;
    font-size: 28px;
    line-height: 1.25;
    margin: 44px 0 14px;
}

.post h3 {
    font-family: 'Onest', sans-serif;
    font-size: 20px;
    margin: 28px 0 10px;
}

.post p,
.post li {
    font-size: 17px;
    line-height: 1.75;
    color: #334155;
}

.post p {
    margin-bottom: 18px;
}

.post ul,
.post ol {
    margin: 0 0 20px 22px;
}

.post li {
    margin-bottom: 8px;
}

.post a {
    color: var(--rrugo-blue);
}

.post strong {
    color: var(--text-dark);
}

.table-wrap {
    overflow-x: auto;
    margin: 8px 0 24px;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
}

.post table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.post th,
.post td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-gray);
}

.post th {
    background: var(--light-gray);
    font-weight: 700;
    color: var(--text-dark);
}

.post tr:last-child td {
    border-bottom: none;
}

.post-note {
    background: var(--light-gray);
    border-left: 4px solid var(--rrugo-blue);
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 15px;
    color: #334155;
}

.post-cta {
    margin: 48px 0 8px;
    padding: 32px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0d1b3e 0%, var(--rrugo-blue) 100%);
    color: white;
    text-align: center;
}

.post-cta h2 {
    color: white;
    margin: 0 0 10px;
    font-size: 26px;
}

.post-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.post-cta .store-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-block;
    background: white;
    color: var(--text-dark) !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
}

.store-btn:hover {
    opacity: 0.9;
}

.related {
    max-width: 740px;
    margin: 56px auto 0;
}

.related h2 {
    font-family: 'Onest', sans-serif;
    font-size: 22px;
    margin-bottom: 16px;
}

.related .blog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

.related .blog-card {
    padding: 20px 24px;
}

.related .blog-card h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

@media (max-width: 767px) {
    .blog-main {
        padding: 110px 0 60px;
    }

    .blog-header h1,
    .post h1 {
        font-size: 32px;
    }

    .post-lead {
        font-size: 18px;
    }

    .post h2 {
        font-size: 24px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-cta {
        padding: 26px 20px;
    }

    .post table {
        font-size: 14px;
    }

    .post th,
    .post td {
        padding: 10px;
    }
}

/* SQ / EN switch is links here (buttons on the main site) */
a.lang-btn {
    text-decoration: none;
    display: inline-block;
}

/* ── Bus timetable pages ─────────────────────────── */
.bus-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 8px 0 24px;
}

.bus-stat {
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    border-radius: 14px;
    padding: 12px 14px;
}

.bus-stat span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.bus-stat strong {
    font-family: 'Onest', sans-serif;
    font-size: 18px;
    color: var(--text-dark);
}

.post .bus-table td,
.post .bus-table th {
    white-space: nowrap;
}

.post .bus-table td:nth-child(3) {
    white-space: normal;
}

.bus-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 28px 0 8px;
}

.post .bus-link {
    font-weight: 700;
    text-decoration: none;
}

.post .bus-link:hover {
    text-decoration: underline;
}

.bus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post .bus-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 999px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.post .bus-chip:hover {
    border-color: var(--rrugo-blue);
    color: var(--rrugo-blue);
}

.bus-chip span {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--light-gray);
    border-radius: 999px;
    padding: 1px 8px;
}

.bus-index {
    max-width: 960px;
}

.bus-filter {
    width: 100%;
    font: 500 16px 'Onest', sans-serif;
    padding: 14px 18px;
    border: 1px solid var(--border-gray);
    border-radius: 14px;
    margin-bottom: 8px;
    outline: none;
}

.bus-filter:focus {
    border-color: var(--rrugo-blue);
    box-shadow: 0 0 0 3px rgba(30, 98, 207, 0.12);
}

.bus-group h2 {
    font-size: 20px !important;
    margin: 28px 0 12px !important;
}

@media (max-width: 767px) {
    .post .bus-table {
        font-size: 13px;
    }

    .post .bus-table th,
    .post .bus-table td {
        padding: 9px 8px;
    }

    .bus-stat strong {
        font-size: 16px;
    }
}

/* ── Driver page ─────────────────────────────────── */
.drv-hero-cta {
    margin-top: 24px;
}

.drv-hero-cta .store-btn {
    background: var(--text-dark);
    color: white !important;
}

.drv-hero-cta .store-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.drv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.drv-card {
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    border-radius: 20px;
    padding: 24px;
}

.drv-card h3 {
    font-family: 'Onest', sans-serif;
    font-size: 18px;
    margin: 0 0 6px;
}

.drv-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.drv-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: white;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.drv-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--rrugo-blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drv-calc {
    max-width: 860px;
    margin: 0 auto 56px;
    padding: 32px;
    border-radius: 28px;
    background: #0b1530;
    color: white;
}

.drv-calc h2 {
    font-family: 'Onest', sans-serif;
    font-size: 30px;
    color: white;
    margin: 0 0 8px;
}

.drv-sub {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 22px;
}

.drv-calc-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 12px;
}

.drv-calc-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.drv-calc-grid input,
.drv-calc-grid select {
    font: 600 16px 'Onest', sans-serif;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #12224a;
    color: white;
    width: 100%;
}

.drv-out {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.drv-out div {
    background: #12224a;
    border-radius: 16px;
    padding: 16px;
}

.drv-out span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.drv-out strong {
    font-family: 'Onest', sans-serif;
    font-size: 26px;
}

.drv-out .drv-out-main {
    background: linear-gradient(135deg, #1e62cf, #06b6d4);
}

.drv-note {
    margin-top: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.drv-steps {
    list-style: none;
    counter-reset: s;
    margin: 0 0 24px !important;
    padding: 0;
}

.drv-steps li {
    counter-increment: s;
    position: relative;
    padding: 0 0 18px 52px;
}

.drv-steps li::before {
    content: counter(s);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #eef3ff;
    color: var(--rrugo-blue);
    font: 600 16px 'Onest', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drv-steps strong,
.drv-steps span {
    display: block;
}

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

    .drv-calc-grid {
        grid-template-columns: 1fr 1fr;
    }

    .drv-calc-grid label:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .drv-grid,
    .drv-out {
        grid-template-columns: 1fr;
    }

    .drv-calc {
        padding: 22px 16px;
        border-radius: 22px;
    }

    .drv-calc h2 {
        font-size: 24px;
    }
}

/* Calculator: keep every input on the same line even when a label wraps */
.drv-calc-grid label {
    justify-content: flex-end;
}

/* ── Blog search + categories ────────────────────── */
.blog-filter {
    max-width: 760px;
    margin: 0 auto 32px;
}

.blog-search {
    width: 100%;
    font: 500 16px 'Onest', sans-serif;
    padding: 14px 18px;
    border: 1px solid var(--border-gray);
    border-radius: 14px;
    outline: none;
    margin-bottom: 14px;
}

.blog-search:focus {
    border-color: var(--rrugo-blue);
    box-shadow: 0 0 0 3px rgba(30, 98, 207, 0.12);
}

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.blog-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-gray);
    border-radius: 999px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.blog-cat span {
    font-size: 12px;
    color: var(--text-muted);
}

.blog-cat:hover {
    border-color: var(--rrugo-blue);
    color: var(--rrugo-blue);
}

.blog-cat.active {
    background: var(--rrugo-blue);
    border-color: var(--rrugo-blue);
    color: white;
}

.blog-cat.active span {
    color: rgba(255, 255, 255, 0.8);
}

.blog-empty {
    text-align: center;
    color: var(--text-muted);
    margin-top: 24px;
}

@media (max-width: 767px) {
    .blog-cats {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .blog-cat {
        padding: 7px 11px;
        font-size: 13px;
    }
}

/* ── "Plan your trip" partner box (affiliate links) ─ */
.plan-box {
    margin: 40px 0 8px;
    padding: 24px;
    border: 1px solid var(--border-gray);
    border-radius: 20px;
    background: var(--light-gray);
}

.post .plan-box h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.plan-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
}

.plan-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef3ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--rrugo-blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.plan-body {
    min-width: 0;
}

.post .plan-body h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.post .plan-body p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.55;
}

.post .plan-btn {
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.post .plan-btn:hover {
    text-decoration: underline;
}

.post .plan-disclosure {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .plan-box {
        padding: 18px 14px;
    }
}

.plan-also {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 6px;
}

.post .plan-alt {
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Flight search (same look as the bus search) ─────── */
.fl-form {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 20px;
    border: 1px solid var(--border-gray);
    border-radius: 22px;
    background: white;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.fl-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 0.95fr) minmax(0, 0.95fr) minmax(0, 0.5fr);
    gap: 10px;
    align-items: end;
}

.fl-grid > * {
    min-width: 0;
}

.fl-towns {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) auto minmax(0, 1.15fr);
    gap: 8px;
    align-items: end;
}

.fl-grid label {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.fl-grid input,
.fl-grid select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    background: var(--light-gray);
    color: var(--text-dark);
    font: 600 16px 'Onest', sans-serif;
    -webkit-appearance: none;
    appearance: none;
}

.fl-grid select {
    padding-right: 34px;
    background: var(--light-gray) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 18px no-repeat;
}

.fl-grid input:focus,
.fl-grid select:focus {
    outline: 0;
    border-color: var(--rrugo-blue);
    background-color: white;
}

.fl-grid input::placeholder {
    color: #94a3b8;
}

.fl-swap {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border: 1px solid var(--border-gray);
    border-radius: 50%;
    background: white;
    color: var(--rrugo-blue);
    cursor: pointer;
    transform: rotate(90deg);
}

.fl-swap.is-on {
    border-color: var(--rrugo-blue);
}

.fl-swap svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fl-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.fl-chip {
    padding: 6px 12px;
    border: 1px solid var(--border-gray);
    border-radius: 999px;
    background: white;
    color: var(--text-dark);
    font: 600 13px 'Onest', sans-serif;
    cursor: pointer;
}

.fl-chip:hover {
    border-color: var(--rrugo-blue);
    color: var(--rrugo-blue);
}

.fl-error {
    min-height: 0;
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
}

.fl-error:empty {
    display: none;
}

.fl-submit {
    width: 100%;
    margin-top: 14px;
    padding: 15px;
    border: 0;
    border-radius: 12px;
    background: var(--rrugo-blue);
    color: white;
    font: 600 17px 'Onest', sans-serif;
    cursor: pointer;
}

.fl-submit:hover {
    background: #174fa8;
}

.fl-note {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.fl-after {
    max-width: 960px;
}

.fl-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.post .fl-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-gray);
    border-radius: 14px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
}

.post .fl-link:hover {
    border-color: var(--rrugo-blue);
    color: var(--rrugo-blue);
}

.fl-link i {
    font-style: normal;
    color: var(--rrugo-blue);
}

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

    .fl-towns {
        grid-column: 1 / -1;
    }

    .fl-pax {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .fl-form {
        padding: 14px;
        border-radius: 20px;
    }

    .fl-towns {
        grid-template-columns: 1fr;
    }

    /* Round swap button on the right edge, between From and To */
    .fl-swap {
        position: absolute;
        right: 12px;
        top: 50%;
        z-index: 1;
        width: 38px;
        height: 38px;
        margin: 0;
        transform: none;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    }

    .fl-towns .fl-to {
        margin-top: 4px;
    }

    .fl-grid input[type="date"] {
        padding: 12px 10px;
        font-size: 15px;
    }
}

/* Bus pages: next bus today + slim app bar */
.bus-next {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 4px 0 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #0b1530;
    color: white;
}

.bus-next[hidden] {
    display: none;
}

.bus-next-label {
    width: 100%;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.bus-next-time {
    font-family: 'Onest', sans-serif;
    font-size: 30px;
    line-height: 1;
}

.bus-next-meta {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.post .bus-appbar {
    display: block;
    margin: 0 0 22px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #dbe6ff;
    background: #eef3ff;
    color: var(--rrugo-blue);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.post .bus-appbar:hover {
    border-color: var(--rrugo-blue);
}

.post .bus-table tr.is-next td {
    background: #eef3ff;
    font-weight: 700;
}

.post .bus-next-time {
    color: white;
}

/* ---------- Bus index: search card, stats, route cards, towns, promos ---------- */
.bus-home .container {
    max-width: 1080px;
}

.bus-hero {
    position: relative;
    padding: 8px 0 4px;
    text-align: left;
}

.bus-hero h1 {
    margin: 6px 0 6px;
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.12;
    color: var(--rrugo-blue);
}

.bus-hero > p {
    margin: 0 0 18px;
    color: var(--text-muted);
}

.bus-search {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) auto;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border-gray);
    border-radius: 20px;
    background: white;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.bus-search-towns {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.bus-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    background: var(--light-gray);
}

.bus-field:focus-within {
    border-color: var(--rrugo-blue);
    background: white;
}

.bus-field svg,
.bus-swap svg,
.bus-search-btn svg,
.bus-statrow-icon svg,
.bus-town-pin svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bus-field svg {
    color: #94a3b8;
}

.bus-field input {
    width: 100%;
    min-width: 0;
    padding: 14px 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: 600 16px 'Onest', sans-serif;
    color: var(--text-dark);
}

.bus-swap {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-gray);
    border-radius: 50%;
    background: white;
    color: var(--rrugo-blue);
    cursor: pointer;
    transform: rotate(90deg);
}

.bus-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--rrugo-blue);
    color: white;
    font: 600 16px 'Onest', sans-serif;
    cursor: pointer;
}

.bus-search-btn:hover {
    background: #174fa8;
}

.bus-search-msg {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef9c3;
    color: #854d0e;
    font-size: 14px;
    font-weight: 600;
}

.bus-statrow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0 8px;
}

.bus-statrow > div {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
}

.bus-statrow-icon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--rrugo-blue);
}

.bus-statrow strong {
    font: 600 22px 'Onest', sans-serif;
    color: var(--text-dark);
    line-height: 1.1;
}

.bus-statrow span:last-child {
    font-size: 13px;
    color: var(--text-muted);
}

.bus-home .post.bus-index {
    max-width: none;
    margin: 0;
    padding: 8px 0 0;
}

.bus-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.post .bus-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    background: white;
    color: var(--text-dark);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post .bus-card:hover {
    border-color: var(--rrugo-blue);
    box-shadow: 0 8px 22px rgba(30, 98, 207, 0.1);
}

.bus-card-route {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.bus-card-route i {
    font-style: normal;
    color: var(--rrugo-blue);
}

.bus-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.bus-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
}

.bus-promos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 28px 0 8px;
}

.post .bus-promo {
    display: grid;
    gap: 6px;
    align-content: start;
    min-height: 170px;
    padding: 20px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    background-size: cover;
    background-position: center;
}

/* Photos (Unsplash): Luke Stackpoole (rides), Cameron Cox (eSIM). Darkened on the text side. */
.bus-promo-rides {
    background: linear-gradient(90deg, rgba(10, 37, 90, 0.94) 0%, rgba(14, 60, 140, 0.78) 48%, rgba(14, 60, 140, 0.1) 100%), url('/assets/bus-promo-rides.webp') center / cover no-repeat #1e62cf;
}

.bus-promo-esim {
    background: linear-gradient(90deg, rgba(11, 21, 48, 0.92) 0%, rgba(11, 21, 48, 0.7) 50%, rgba(11, 21, 48, 0.12) 100%), url('/assets/bus-promo-esim.webp') center 55% / cover no-repeat #0b1530;
}

.bus-promo-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.8;
}

.post .bus-promo strong {
    max-width: 22em;
    color: white;
    font: 600 22px 'Onest', sans-serif;
    line-height: 1.2;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.bus-promo > span:not(.bus-promo-eyebrow) {
    max-width: 30em;
    font-size: 14px;
    opacity: 0.92;
}

.bus-promo em {
    justify-self: start;
    margin-top: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: white;
    color: #0b1530;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
}

.post .bus-promo {
    min-height: 200px;
}

.bus-towns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    align-items: start;
}

.bus-town {
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    background: white;
}

.bus-town[open] {
    grid-column: 1 / -1;
    border-color: var(--rrugo-blue);
}

.bus-town summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.bus-town summary::-webkit-details-marker {
    display: none;
}

.bus-town summary::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-left: 4px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg) translateY(-2px);
}

.bus-town[open] summary::after {
    transform: rotate(-135deg);
}

.bus-town-pin {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--rrugo-blue);
}

.bus-town summary strong {
    flex: 1;
    font-size: 16px;
}

.bus-town-count {
    font-size: 13px;
    color: var(--text-muted);
}

.bus-town .bus-chips {
    padding: 0 14px 14px;
}

.bus-daynote {
    margin: 0 0 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--text-dark);
    font-size: 14px;
}

.bus-daynote a {
    margin-left: 6px;
    font-weight: 700;
}

@media (max-width: 760px) {
    .bus-search {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .bus-search-towns {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bus-swap {
        position: absolute;
        right: 12px;
        top: 50%;
        z-index: 1;
        width: 38px;
        height: 38px;
        margin-top: -19px;
        transform: none;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    }

    .bus-search-btn {
        padding: 15px;
    }

    .bus-statrow {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .bus-promos {
        grid-template-columns: 1fr;
    }

    .bus-promo-rides {
        background-position: 0 0, 100% 50%;
    }

    .bus-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .post .bus-card {
        padding: 12px;
        border-radius: 14px;
    }

    .bus-card-route {
        font-size: 14.5px;
    }

    .bus-card-meta,
    .bus-card-price {
        font-size: 12.5px;
    }

    .bus-towns {
        grid-template-columns: 1fr;
    }
}


/* Bus route pages: stats with icons, day chips */
.bus-statrow-route {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    row-gap: 14px;
    margin: 16px 0 18px;
}

.bus-statrow-route strong {
    font-size: 19px;
}

.bus-days {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.bus-days[hidden] {
    display: none;
}

.bus-days button,
.post .bus-days a {
    padding: 7px 13px;
    border: 1px solid var(--border-gray);
    border-radius: 999px;
    background: white;
    color: var(--text-dark);
    font: 600 14px 'Onest', sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.bus-days .is-on,
.post .bus-days a.is-on {
    border-color: var(--rrugo-blue);
    background: var(--rrugo-blue);
    color: white !important;
}

.bus-route-links {
    margin: 18px 0 8px;
}

@media (max-width: 760px) {
    .bus-statrow-route {
        grid-template-columns: 1fr 1fr;
    }

    /* odd number of stats: the last one takes the whole row */
    .bus-statrow-route > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}


/* Route pages: car ride banner under the next bus */
.post .bus-car {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -4px 0 14px;
    padding: 12px 12px 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: linear-gradient(90deg, #eff6ff, #ffffff);
    color: var(--text-dark);
    text-decoration: none;
}

.post .bus-car:hover {
    border-color: var(--rrugo-blue);
}

.bus-car-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--rrugo-blue);
    color: white;
}

.bus-car-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bus-car-text {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.bus-car-text strong {
    display: block;
    font-size: 15px;
}

.bus-car-text span {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
}

.bus-car-btn {
    flex: none;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--rrugo-blue);
    color: white;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 420px) {
    .bus-car {
        gap: 10px;
    }

    .bus-car-icon {
        width: 38px;
        height: 38px;
    }

    .bus-car-btn {
        padding: 8px 11px;
        font-size: 13px;
    }
}

/* Bus timetable: RruGO car rides among the buses, or an invitation to find one in the app */
.post .bus-table tr.bus-ride td {
    background: #f0fdf4;
    cursor: pointer;
}

.post .bus-table tr.bus-ride:hover td {
    background: #dcfce7;
}

.post .bus-ride-who {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    color: #166534;
}

.post .bus-ride-car {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.post .bus-ride-seats {
    display: block;
    font-style: normal;
    font-weight: 700;
    color: #166534;
}

.post .bus-ride-book {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.post .bus-table tr.bus-ride-invite td {
    padding: 0;
    white-space: normal;
}

/* width 0 + min-width 100%: the invitation fills the row without making the table wider. */
.post .bus-ride-link {
    box-sizing: border-box;
    width: 0;
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #166534;
    text-decoration: none;
}

.post .bus-ride-link .bus-ride-car {
    width: 26px;
    height: 26px;
}

.post .bus-ride-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 14px;
}

.post .bus-ride-text span {
    font-weight: 400;
    color: #3f6212;
}

.post .bus-ride-btn {
    flex: none;
    padding: 6px 14px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Phones: the button drops under the text instead of squeezing it. */
@media (max-width: 560px) {
    .post .bus-ride-link {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .post .bus-ride-text {
        flex-basis: calc(100% - 38px);
    }

    .post .bus-ride-btn {
        margin-left: 38px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Listing-page links between journey planning, guides and mobile data. */
.travel-tools{margin:28px 0;padding:24px;border:1px solid #dbe5f3;border-radius:24px;background:#f6f9ff}
.travel-tools h2{margin:0 0 8px;font:600 24px 'Onest',sans-serif;color:#0f172a;line-height:1.25}
.travel-tools>p{margin:0 0 18px;color:#475569;font-size:15px;line-height:1.6}
.travel-tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.travel-tool{display:flex;flex-direction:column;gap:7px;padding:16px;border:1px solid #dbe5f3;border-radius:16px;background:#fff;text-decoration:none!important;color:#0f172a!important;min-width:0}
.travel-tool strong{font-size:16px;line-height:1.4}
.travel-tool>span{font-size:14px;line-height:1.5;color:#475569}
.travel-tool:hover{border-color:#1e62cf;background:#eef4ff}
.travel-tool:focus-visible{outline:3px solid #1e62cf;outline-offset:3px}
[id^="bus-city-"],#compat{scroll-margin-top:92px}
@media(max-width:767px){.travel-tools{padding:18px}.travel-tools-grid{grid-template-columns:1fr}.travel-tools h2{font-size:22px}}

.travel-tools-help>summary{font:600 20px 'Onest',sans-serif;color:#0f172a;cursor:pointer;line-height:1.4}
.travel-tools-help[open]>summary{margin-bottom:12px}
.travel-tools-help>summary:focus-visible{outline:3px solid #1e62cf;outline-offset:5px;border-radius:4px}
@media(max-width:767px){.travel-tools-cities .travel-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Online bus tickets (operators enabled in the app admin): Buy ticket button and checkout dialog. */
.post .bus-buy {
    display: block;
    margin-top: 6px;
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    background: var(--rrugo-blue);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.post .bus-buy:hover,
.post .bus-buy:focus-visible {
    background: #174fa8;
}

.bus-buy-done {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #166534;
    font-weight: 600;
}

.bus-buy-dlg {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: #0b1530;
    box-shadow: 0 24px 60px rgba(11, 21, 48, .25);
}

.bus-buy-dlg::backdrop {
    background: rgba(11, 21, 48, .45);
}

.bus-buy-form {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.bus-buy-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
}

.bus-buy-x {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #eef3ff;
    color: #0b1530;
    cursor: pointer;
}

.bus-buy-x svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.bus-buy-trip {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    line-height: 1.5;
}

.bus-buy-form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.bus-buy-form input,
.bus-buy-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0b1530;
    font: inherit;
    font-size: 16px;
}

.bus-buy-form input:focus,
.bus-buy-form select:focus {
    outline: 2px solid var(--rrugo-blue);
    outline-offset: 1px;
}

.bus-buy-total {
    display: flex;
    justify-content: space-between;
    margin: 4px 0 0;
    font-size: 17px;
}

.bus-buy-err {
    margin: 0;
    color: #b91c1c;
    font-weight: 600;
}

.bus-buy-pay {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--rrugo-blue);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.bus-buy-pay:disabled {
    opacity: .7;
    cursor: progress;
}

.bus-buy-note {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* ---------- Bus route pages, calmer layout ----------
   One header card (title, route line, next bus, facts), a light car banner, a segmented day picker and an
   airy timetable. Table columns are fixed: departure, arrival, company, price (+ buy button), days. */
.post.bus-page {
    max-width: 820px;
}

.bus-head {
    margin: 0 0 14px;
    padding: 30px 30px 0;
    border: 1px solid #e3ebf7;
    border-radius: 24px;
    background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 70%);
    overflow: hidden;
}

.post .bus-head h1 {
    margin-bottom: 10px;
    font-size: 36px;
    letter-spacing: -0.02em;
}

.post .bus-head .post-lead {
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Route line: town, then the bus and travel time on a dashed road, then town */
.bus-line {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}

.bus-line-stop {
    position: relative;
    padding-left: 18px;
    font: 700 17px 'Onest', sans-serif;
    color: var(--text-dark);
    white-space: nowrap;
}

.bus-line-stop::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border: 2.5px solid var(--rrugo-blue);
    border-radius: 50%;
    background: white;
    box-sizing: border-box;
}

.bus-line-end::before {
    background: var(--rrugo-blue);
}

.bus-line-track {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 60px;
}

.bus-line-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 2px dashed #c7d6ee;
}

.bus-line-bus {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border: 1px solid #dbe6f7;
    border-radius: 999px;
    background: white;
    color: var(--rrugo-blue);
    font: 600 13px 'Onest', sans-serif;
    white-space: nowrap;
}

.bus-line-bus svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bus-line-bus span {
    color: var(--text-dark);
}

/* Next bus: a quiet live pill instead of the dark block */
.post .bus-head .bus-next {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 0 0 20px;
    padding: 9px 16px 9px 14px;
    border: 1px solid #dbe6f7;
    border-radius: 999px;
    background: white;
    color: var(--text-dark);
}

.post .bus-head .bus-next[hidden] {
    display: none;
}

.bus-head .bus-next-label {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.bus-head .bus-next-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
    animation: bus-live 2s ease-in-out infinite;
}

@keyframes bus-live {
    50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .bus-head .bus-next-label::before { animation: none; }
}

.post .bus-head .bus-next-time {
    font-size: 18px;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.bus-head .bus-next-meta {
    font-size: 14px;
    color: var(--text-muted);
}

/* Facts: one quiet strip along the bottom of the card */
.bus-head .bus-statrow-route {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    margin: 0 -30px;
    border-top: 1px solid #e8eef8;
    background: white;
}

.bus-head .bus-statrow-route > div {
    display: block;
    padding: 16px 12px 18px 30px;
}

.bus-head .bus-statrow-icon {
    display: none;
}

.bus-head .bus-statrow-route strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.bus-head .bus-statrow-route span:last-child {
    display: block;
    margin-top: 3px;
    font-size: 12px;
}

/* Car banner: light, one line */
.post.bus-page .bus-car {
    margin: 0 0 26px;
    padding: 10px 10px 10px 12px;
    border-color: #e3ebf7;
    background: white;
}

.post.bus-page .bus-car-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef4ff;
    color: var(--rrugo-blue);
}

.post.bus-page .bus-car-icon svg {
    width: 20px;
    height: 20px;
}

.post.bus-page .bus-car-text strong {
    font-size: 14px;
}

.post.bus-page .bus-car-btn {
    padding: 8px 14px;
    border: 1px solid #c9daf6;
    background: #f4f8ff;
    color: var(--rrugo-blue);
    font-size: 13px;
}

.post.bus-page .bus-car:hover .bus-car-btn {
    background: var(--rrugo-blue);
    border-color: var(--rrugo-blue);
    color: white;
}

/* Day picker: one segmented control */
.post.bus-page .bus-days {
    display: flex;
    width: fit-content;
    flex-wrap: nowrap;
    gap: 2px;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 4px;
    overflow-x: auto;
    border-radius: 999px;
    background: #f1f5f9;
    scrollbar-width: none;
}

.post.bus-page .bus-days[hidden] {
    display: none;
}

.post.bus-page .bus-days > span {
    display: none;
}

.post.bus-page .bus-days button,
.post.bus-page .bus-days a {
    flex: none;
    padding: 7px 15px;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 14px;
}

.post.bus-page .bus-days .is-on,
.post.bus-page .bus-days a.is-on {
    background: white;
    color: var(--text-dark) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.post.bus-page .bus-daynote {
    margin: 0 0 12px 4px;
    padding: 0;
    background: none;
    color: var(--text-muted);
    font-size: 14px;
}

.post.bus-page .bus-daynote a {
    text-decoration: none;
}

.post.bus-page .post-note {
    border-left-width: 3px;
    border-radius: 0 12px 12px 0;
    font-weight: 500;
    color: #475569;
}

@media (max-width: 760px) {
    .bus-head {
        padding: 22px 18px 0;
        border-radius: 20px;
    }

    .post .bus-head h1 {
        font-size: 27px;
    }

    .post .bus-head .post-lead {
        font-size: 15px;
    }

    .bus-line-stop {
        font-size: 15px;
    }

    .bus-head .bus-statrow-route {
        grid-template-columns: 1fr 1fr;
        margin: 0 -18px;
    }

    .bus-head .bus-statrow-route > div {
        padding: 12px 12px 14px 18px;
    }

    .post .bus-head .bus-next {
        border-radius: 16px;
    }

}

/* No more buses today: the dot goes quiet */
.bus-head .bus-next.is-none .bus-next-label::before {
    background: #94a3b8;
    box-shadow: none;
    animation: none;
}

.bus-buy-line {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* Timetable as cards: every departure (bus or car ride) is its own card.
   Desktop, one line: company over days | time + town, a line with the journey time, time + town | price + button.
   Phones: company on top, the journey in the middle, days and price + button underneath.
   Cells keep their order (departure, arrival, company, price, days, journey time); the page scripts rely on it. */
.post.bus-page .table-wrap {
    margin: 0 0 22px;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.post.bus-page .bus-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.post.bus-page .bus-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post.bus-page .bus-table tbody tr {
    display: grid;
    /* Fixed outer columns so times, lines and prices line up from card to card. */
    grid-template-columns: 170px 66px minmax(60px, 1fr) 66px 200px;
    grid-template-areas:
        "co dep dur arr price"
        "days dep dur arr price";
    align-items: center;
    column-gap: 16px;
    padding: 14px 18px;
    border: 1px solid #e6ecf5;
    border-radius: 16px;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post.bus-page .bus-table tbody tr[hidden] {
    display: none;
}

.post.bus-page .bus-table tbody tr:hover {
    border-color: #c9daf6;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.post.bus-page .bus-table tbody td {
    padding: 0;
    border: 0;
    background: none;
    white-space: normal;
    font-variant-numeric: tabular-nums;
}

.post.bus-page .bus-table tbody td:nth-child(1) { grid-area: dep; white-space: nowrap; min-width: 0; }
.post.bus-page .bus-table tbody td:nth-child(2) { grid-area: arr; white-space: nowrap; text-align: right; }
.post.bus-page .bus-table tbody td:nth-child(3) { grid-area: co; align-self: end; font-weight: 600; color: var(--text-dark); }
.post.bus-page .bus-table tbody td:nth-child(5) { grid-area: days; align-self: start; margin-top: 2px; font-size: 13px; color: var(--text-muted); }

.post.bus-page .bus-table tbody td:nth-child(4) {
    grid-area: price;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    white-space: nowrap;
    font: 700 17px 'Onest', sans-serif;
    color: var(--text-dark);
}

/* The journey line: ring at the departure end, dot at the arrival end, journey time in the middle. */
.post.bus-page .bus-table tbody td:nth-child(6) {
    grid-area: dur;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
}

.post.bus-page .bus-table tbody td:nth-child(6)::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    border-top: 1.5px dashed #cbd8ec;
}

.post.bus-page .bus-table tbody td:nth-child(6)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 9px;
    margin-top: -4px;
    background:
        radial-gradient(circle at 4.5px 50%, white 2px, var(--rrugo-blue) 2.5px, var(--rrugo-blue) 4px, transparent 4.5px) left / 9px 9px no-repeat,
        radial-gradient(circle at 4.5px 50%, var(--rrugo-blue) 4px, transparent 4.5px) right / 9px 9px no-repeat;
}

.bus-dur {
    position: relative;
    z-index: 1;
    padding: 2px 9px;
    border: 1px solid #e1e9f6;
    border-radius: 999px;
    background: white;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.post.bus-page .bus-table tbody td:nth-child(1) strong,
.post.bus-page .bus-arr {
    display: block;
    font: 700 19px 'Onest', sans-serif;
    line-height: 1.2;
    color: var(--text-dark);
}

.post.bus-page .bus-place {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Buy ticket (bus) and Reserve (car ride): same button, same place, next to the price. */
.post.bus-page .bus-buy,
.post.bus-page .bus-ride-book {
    display: inline-block;
    min-width: 96px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 16px;
    border-radius: 999px;
    font: 700 13px 'Onest', sans-serif;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

/* Next departure today and buses that already left. */
.post.bus-page .bus-table tbody tr.is-next {
    border-color: var(--rrugo-blue);
    box-shadow: 0 0 0 1px var(--rrugo-blue);
    background: #f8fbff;
}

.post.bus-page .bus-table tbody tr.is-next td:nth-child(1) strong {
    color: var(--rrugo-blue);
}

.post.bus-page .bus-table tbody tr.is-past {
    opacity: 0.45;
}

/* Car rides: the same card in green. */
.post.bus-page .bus-table tbody tr.bus-ride {
    border-color: #cdeedb;
    background: #f6fcf8;
    cursor: pointer;
}

.post.bus-page .bus-table tbody tr.bus-ride:hover {
    border-color: #86d6a6;
}

.post.bus-page .bus-ride-who {
    align-items: center;
    font-weight: 600;
    color: #166534;
}

.post.bus-page .bus-ride-who .bus-ride-car {
    width: 18px;
    height: 18px;
}

.post.bus-page .bus-ride-seats {
    display: inline;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
}

/* The invitation (no rides that day) is one full-width card. */
.post.bus-page .bus-table tbody tr.bus-ride-invite {
    display: block;
    padding: 0;
}

.post.bus-page .bus-table tbody tr.bus-ride-invite td {
    display: block;
}

@media (max-width: 760px) {
    .post.bus-page .bus-table tbody tr {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "co co co"
            "dep dur arr"
            "days price price";
        column-gap: 0;
        row-gap: 12px;
        padding: 14px 16px;
    }

    .post.bus-page .bus-table tbody td:nth-child(3) { align-self: center; }
    .post.bus-page .bus-table tbody td:nth-child(6) { margin: 0 12px; }

    /* Footer: days on the left, price and button on the right, under a dashed rule. */
    .post.bus-page .bus-table tbody td:nth-child(4),
    .post.bus-page .bus-table tbody td:nth-child(5) {
        align-self: stretch;
        display: flex;
        align-items: center;
        min-height: 38px;
        margin-top: 0;
        padding-top: 12px;
        border-top: 1px dashed #e2e8f0;
    }

    .post.bus-page .bus-table tbody td:nth-child(4) {
        justify-content: flex-end;
    }
}
