/* City hub pages ("Outstation Cabs from Bhubaneswar" and the like): the .ys-hub-* classes used in their CMS content.
   Loaded by app/views/cms/view_landing_page.phtml only when the page content uses them; the script that runs the
   map, tabs and selected trip is at the bottom of that view. */

/* City hub ("Outstation cabs from X") for page content:
   input.ys-hub-radio#ys-hub-{all|b1..b4} + .ys-hub-tabs label = "how far" tabs; they filter the
   .ys-hub-explore view = .ys-hub-mapcard (travel-time map, a.ys-hub-pin per place) beside .ys-hub-list (a .ys-hub-row per route).
   Pins and rows share data-pin, so hovering a row lights up its pin (script at the bottom of this view).
   .ys-hub-seasons > .ys-hub-season = best time to go. */
.ys-hub-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ys-hub-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    padding: 6px;
    border: 1px solid #dce8fb;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(9, 39, 102, .05);
}

.ys-hub-tabs label {
    margin: 0;
    padding: 9px 18px;
    border-radius: 999px;
    color: #52698f;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.ys-hub-tabs label small {
    margin-left: 4px;
    opacity: .7;
    font-size: 12px;
}

#ys-hub-all:checked ~ .ys-hub-tabs label[for="ys-hub-all"],
#ys-hub-b1:checked ~ .ys-hub-tabs label[for="ys-hub-b1"],
#ys-hub-b2:checked ~ .ys-hub-tabs label[for="ys-hub-b2"],
#ys-hub-b3:checked ~ .ys-hub-tabs label[for="ys-hub-b3"],
#ys-hub-b4:checked ~ .ys-hub-tabs label[for="ys-hub-b4"] {
    background: #092766;
    color: #fff;
}

#ys-hub-b1:checked ~ .ys-hub-explore .ys-hub-row:not([data-band="b1"]),
#ys-hub-b2:checked ~ .ys-hub-explore .ys-hub-row:not([data-band="b2"]),
#ys-hub-b3:checked ~ .ys-hub-explore .ys-hub-row:not([data-band="b3"]),
#ys-hub-b4:checked ~ .ys-hub-explore .ys-hub-row:not([data-band="b4"]) {
    display: none;
}

#ys-hub-b1:checked ~ .ys-hub-explore .ys-hub-pin:not([data-band="b1"]),
#ys-hub-b2:checked ~ .ys-hub-explore .ys-hub-pin:not([data-band="b2"]),
#ys-hub-b3:checked ~ .ys-hub-explore .ys-hub-pin:not([data-band="b3"]),
#ys-hub-b4:checked ~ .ys-hub-explore .ys-hub-pin:not([data-band="b4"]) {
    opacity: .15;
    pointer-events: none;
}

.ys-hub-explore {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ys-hub-mapcard {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    /* Card, map and legend always fit the screen while it sticks: the map gives up height, never the others. */
    max-height: calc(100vh - 130px);
    box-sizing: border-box;
    padding: 18px 18px 16px;
    border: 1px solid #dce8fb;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(9, 39, 102, .06);
}

.ys-hub-mapcard > svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: inherit;
}

.ys-hub-pin {
    transition: opacity .2s ease;
}

/* The route from the city to a place, drawn in when its pin or row is hovered (pathLength=1, so the dash covers it). */
.ys-hub-route {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0;
    pointer-events: none;
    transition: stroke-dashoffset .7s ease, opacity .2s ease;
}

.ys-hub-route.is-active {
    stroke-dashoffset: 0;
    opacity: .85;
}

/* The city marker on the map: a soft ring growing out of it. */
.ys-hub-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: ysHubPulse 2.4s ease-out infinite;
}

@keyframes ysHubPulse {
    from {
        opacity: .45;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(3.2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ys-hub-pulse {
        animation: none;
        opacity: .2;
    }
}

.ys-hub-pin circle {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .2s ease;
}

.ys-hub-pin text {
    transition: fill .2s ease;
}

.ys-hub-pin:hover circle,
.ys-hub-pin.is-active circle {
    transform: scale(1.6);
}

.ys-hub-pin:hover text,
.ys-hub-pin.is-active text {
    fill: #0757dc;
}

/* A town with no free space for its name: the name shows only on hover or when the trip is picked. */
.ys-hub-quiet {
    opacity: 0;
    transition: opacity .2s ease;
}

.ys-hub-pin:hover .ys-hub-quiet,
.ys-hub-pin.is-active .ys-hub-quiet,
.ys-hub-pin.is-selected .ys-hub-quiet {
    opacity: 1;
}

.ys-hub-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid #eef3fb;
    list-style: none;
    color: #52698f;
    font-size: 12px;
    font-weight: 700;
}

.ys-hub-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ys-hub-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ys-hub-legend li:last-child {
    margin-left: auto;
}

.ys-hub-list {
    display: grid;
    gap: 10px;
}

.ys-hub-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 2px 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: #fff;
    scroll-margin-top: 140px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.ys-hub-row:hover,
.ys-hub-row:target {
    border-color: #0757dc;
    background: #f8fbff;
    box-shadow: 0 8px 20px rgba(7, 87, 220, .1);
}

.ys-hub-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eef2ff;
    font-size: 19px;
}

.ys-hub-row[data-kind="temple"] .ys-hub-icon {
    background: #fff4e0;
}

.ys-hub-row[data-kind="beach"] .ys-hub-icon {
    background: #e0f7fb;
}

.ys-hub-row[data-kind="nature"] .ys-hub-icon {
    background: #e7f8ef;
}

.ys-hub-row h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 0;
    color: #092766;
    font-size: 16px;
    font-weight: 800;
}

.ys-hub-row h3 small {
    color: #0757dc;
    font-size: 13px;
    font-weight: 800;
}

.ys-hub-see {
    grid-column: 2;
    color: #52698f;
    font-size: 13px;
    line-height: 1.5;
}

.ys-hub-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    background: #092766;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.ys-hub-btn:hover {
    background: #0757dc;
    color: #fff;
}
/* The selected trip (.is-selected on its row, pin and route, set by the script at the bottom of this view)
   and the one card that books it: under the map, or under the row on phones. */
.ys-hub-row {
    cursor: pointer;
}

.ys-hub-pick {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ys-hub-pick:focus-visible {
    outline: 2px solid #0757dc;
    outline-offset: 3px;
    border-radius: 4px;
}

.ys-hub-row.is-selected {
    border-color: #0757dc;
    background: #eef5ff;
    box-shadow: inset 4px 0 0 #0757dc, 0 8px 20px rgba(7, 87, 220, .1);
}

.ys-hub-chev {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: #b8c7e0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    transition: color .2s ease, transform .2s ease;
}

.ys-hub-row:hover .ys-hub-chev,
.ys-hub-row.is-selected .ys-hub-chev {
    color: #0757dc;
    transform: translateX(3px);
}

.ys-hub-row-book {
    display: none;
    grid-column: 3;
    grid-row: 1 / span 2;
}

.ys-hub-row.is-selected .ys-hub-chev {
    display: none;
}

.ys-hub-row.is-selected .ys-hub-row-book {
    display: inline-block;
}

/* Side by side (desktop): the selected row has the one Book button, so the card above the map is details only. */
@media (min-width: 992px) {
    .ys-hub-trip .ys-hub-btn {
        display: none;
    }

    /* WhatsApp sits beside the trip name, top right (Route guide, where there is one, just under it). */
    .ys-hub-trip {
        position: relative;
    }

    .ys-hub-trip .ys-hub-trip-go {
        position: absolute;
        top: 16px;
        right: 16px;
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 8px;
    }

    .ys-hub-trip-main h3,
    .ys-hub-trip-main small {
        padding-right: 170px;
    }
}

/* Stacked (phones): the card opens under the row with its own Book button. */
@media (max-width: 991.98px) {
    .ys-hub-row.is-selected .ys-hub-chev {
        display: inline;
        transform: rotate(90deg);
    }
    .ys-hub-row.is-selected .ys-hub-row-book {
        display: none;
    }
}

.ys-hub-route.is-selected {
    stroke-dashoffset: 0;
    opacity: .85;
}

.ys-hub-pin.is-selected circle {
    transform: scale(1.6);
}

.ys-hub-pin.is-selected text {
    fill: #0757dc;
}

/* The map fills the card's width; when the box needs it shorter, the image's extra area fills the sides with map. */
.ys-hub-mapcard > svg {
    flex: 0 1 auto;
    min-height: 240px;
    border-radius: 14px;
    overflow: hidden;
}

.ys-hub-mapcard > :not(svg) {
    flex-shrink: 0;
}

.ys-hub-trip {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px 14px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid #c9dbf7;
    border-radius: 18px;
    background: linear-gradient(135deg, #f5f9ff 0%, #eaf2ff 100%);
}

.ys-hub-list > .ys-hub-trip {
    margin-bottom: 0;
}

.ys-hub-trip .ys-hub-icon {
    grid-row: auto;
    width: 46px;
    height: 46px;
    background: #fff;
}

.ys-hub-trip-main small {
    display: block;
    color: #0757dc;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ys-hub-trip-main h3 {
    margin: 2px 0 2px;
    color: #092766;
    font-size: 18px;
    font-weight: 800;
}

.ys-hub-trip-meta {
    margin: 0 0 6px;
    color: #0757dc;
    font-size: 13px;
    font-weight: 800;
}

.ys-hub-trip-main > p:not(.ys-hub-trip-meta) {
    margin: 0 0 10px;
    color: #52698f;
    font-size: 13px;
    line-height: 1.55;
}

.ys-hub-sights {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ys-hub-sights li {
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    color: #092766;
    font-size: 12px;
    font-weight: 600;
}

.ys-hub-trip-go {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.ys-hub-trip-go > a:not(.ys-hub-btn) {
    color: #0757dc;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.ys-hub-trip-go > a[hidden] {
    display: none;
}

/* Ask on WhatsApp about the selected trip. */
.ys-hub-trip-go > a.ys-hub-wa,
.lp-content-desc .ys-hub-trip-go > a.ys-hub-wa:hover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.ys-hub-trip-go > a.ys-hub-wa:hover {
    background: #1ebe5a;
}

.ys-hub-seasons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

/* Icon in a tinted box beside the months, then the title and text full width. */
.ys-hub-season {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    align-content: start;
    padding: 18px;
    border: 1px solid #dce8fb;
    border-radius: 18px;
    background: #fff;
}

.ys-hub-season > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef5ff;
    font-size: 22px;
    line-height: 1;
}

.ys-hub-season small {
    color: #0757dc;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ys-hub-season strong,
.ys-hub-season p {
    grid-column: 1 / -1;
}

.ys-hub-season strong {
    display: block;
    margin: 14px 0 6px;
    color: #092766;
    font-size: 16px;
    font-weight: 800;
}

.ys-hub-season p {
    margin: 0;
    color: #52698f;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .ys-hub-explore {
        grid-template-columns: 1fr;
    }

    .ys-hub-mapcard {
        position: static;
        max-height: none;
    }

    .ys-hub-seasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .ys-hub-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        border-radius: 16px;
    }

    .ys-hub-mapcard {
        padding: 12px;
    }

    /* Place labels are in map units; make them readable once the map is shrunk to the phone. */
    .ys-hub-pin text {
        font-size: 28px;
    }

    .ys-hub-row {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 12px;
    }

    .ys-hub-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .ys-hub-seasons {
        grid-template-columns: 1fr;
    }
}

/* Intro text beside the fact tiles. */
.ys-hub-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 36px;
    align-items: center;
}

.ys-hub-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ys-hub-fact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dce8fb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(9, 39, 102, .04);
}

.ys-hub-fact > span {
    display: inline-flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #e8f1ff;
    font-size: 21px;
}

.ys-hub-fact strong {
    display: block;
    color: #0757dc;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.ys-hub-fact small {
    display: block;
    margin-top: 2px;
    color: #52698f;
    font-size: 13px;
    line-height: 1.45;
}

/* Links in page content get "color: initial" on hover from cms-hero.css; keep the hub's own colours. */
.lp-content-desc a.ys-hub-btn:hover,
.lp-content-desc a.ys-hub-tile:hover {
    color: #fff;
    text-decoration: none;
}

.lp-content-desc .ys-hub-trip-go > a:not(.ys-hub-btn):not(.ys-hub-wa):hover {
    color: #0757dc;
    text-decoration: none;
}

.ys-hub-bento {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-rows: 230px 230px;
    gap: 16px;
}

.ys-hub-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: 22px;
    overflow: hidden;
    background: #092766;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(9, 39, 102, .14);
}

.ys-hub-tile:first-child {
    grid-row: 1 / span 2;
}

.ys-hub-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.ys-hub-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 39, 102, 0) 30%, rgba(9, 39, 102, .9) 100%);
}

.ys-hub-tile > *:not(img) {
    position: relative;
    z-index: 1;
}

.ys-hub-tile:hover {
    color: #fff;
}

.ys-hub-tile:hover img {
    transform: scale(1.06);
}

.ys-hub-tile small {
    align-self: flex-start;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 800;
}

.ys-hub-tile h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.ys-hub-tile:first-child h3 {
    font-size: 30px;
}

.ys-hub-tile p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    line-height: 1.55;
}

.ys-hub-tile span {
    margin-top: 12px;
    color: #ffc107;
    font-size: 13px;
    font-weight: 800;
}

.ys-hub-how {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    counter-reset: ys-hub-how;
}

/* The number sits beside the step's title, with the text across the card underneath. */
.ys-hub-how-step {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 16px 18px;
    border: 1px solid #dce8fb;
    border-radius: 18px;
    background: #fff;
    counter-increment: ys-hub-how;
}

.ys-hub-how-step::before {
    content: counter(ys-hub-how);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #092766;
    color: #ffc107;
    font-size: 14px;
    font-weight: 800;
}

.ys-hub-how-step strong {
    display: block;
    color: #092766;
    font-size: 16px;
    font-weight: 800;
}

.ys-hub-how-step p {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    color: #52698f;
    font-size: 13px;
    line-height: 1.6;
}

.ys-hub-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ys-hub-compare-card {
    border: 1px solid #dce8fb;
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
}

.ys-hub-compare-card > div {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: #f5f9ff;
}

.ys-hub-compare-card > div > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #092766;
    color: #fff;
    font-size: 22px;
}

.ys-hub-compare-card h3 {
    margin: 0;
    color: #092766;
    font-size: 19px;
    font-weight: 800;
}

.ys-hub-compare-card h3 small {
    display: block;
    margin-top: 2px;
    color: #52698f;
    font-size: 13px;
    font-weight: 600;
}

.ys-hub-compare-card ul {
    margin: 0;
    padding: 18px 22px 22px;
    list-style: none;
}

.ys-hub-compare-card li {
    position: relative;
    padding: 0 0 10px 26px;
    color: #092766;
    font-size: 14px;
    line-height: 1.55;
}

.ys-hub-compare-card li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: #16a34a;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .ys-hub-intro {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ys-hub-how {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ys-hub-bento {
        grid-template-columns: 1fr;
        grid-template-rows: 260px 200px 200px;
    }

    .ys-hub-tile:first-child {
        grid-row: auto;
    }

    .ys-hub-compare {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .ys-hub-fact {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .ys-hub-fact strong {
        font-size: 19px;
    }

    /* One column: the text sits next to the number, under the title, so the 4 steps stay short. */
    .ys-hub-how {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ys-hub-how-step {
        align-items: start;
        padding: 14px 16px;
    }

    .ys-hub-how-step::before {
        grid-row: span 2;
    }

    .ys-hub-how-step strong {
        margin-top: 5px;
        font-size: 15px;
    }

    .ys-hub-how-step p {
        grid-column: 2;
        margin-top: 2px;
    }

}
