/**
 * "Classic Layout" trip template.
 *
 * Loads alongside new-itinerary.css (not instead of it) - that file already
 * carries the shared layout/typography/header/footer rules (.hero, .subnav,
 * .layout, .band, .btn*, .modal, .quotes, .guide, .trust, .profile-card,
 * .seasons/.pane, etc.) that both templates use identically. This file only
 * adds the section styles that are unique to the classic design, using the
 * original mockup's class names - the redesign template renamed away from
 * all of these, so there is no collision when both stylesheets are enqueued.
 */

/* ---------- copy: rich text from the WP editor (overview + guide bio) ---------- */
.copy h2,
.copy h3,
.copy h4 {
    margin-top: 1.4em;
    margin-bottom: .5em
}

.copy h2:first-child,
.copy h3:first-child,
.copy h4:first-child {
    margin-top: 0
}

.copy h2 {
    font-size: clamp(1.4rem, 2.1vw, 1.85rem)
}

.copy h3 {
    font-size: 1.24rem
}

.copy h4 {
    font-size: 1rem
}

.copy p {
    color: var(--ink-2);
    font-size: 1rem;
    max-width: 74ch;
    margin: 0 0 1.1em
}

.copy ul,
.copy ol {
    margin: 0 0 1.1em;
    padding-left: 1.3em;
    color: var(--ink-2)
}

.copy li {
    font-size: 1rem;
    margin-bottom: .4em
}

.copy li:last-child {
    margin-bottom: 0
}

.copy strong,
.copy b {
    color: var(--ink);
    font-weight: 700
}

.copy a {
    color: var(--primary)
}

.copy>*:last-child {
    margin-bottom: 0
}

/* ---------- hero mosaic: this template uses 5 tiles, not 4, so it needs its
   own grid rather than the redesign's .mosaic-primary/-secondary-a/b/c ---------- */
.mosaic {
    display: grid;
    grid-template-columns: 1fr 168px 168px;
    grid-template-rows: 172px 172px;
    gap: 12px
}

.mosaic .m1 {
    grid-column: 1;
    grid-row: 1/3
}

.mosaic .m2 {
    grid-column: 2;
    grid-row: 1
}

.mosaic .m3 {
    grid-column: 3;
    grid-row: 1
}

.mosaic .m4 {
    grid-column: 2;
    grid-row: 2
}

.mosaic .m5 {
    grid-column: 3;
    grid-row: 2
}

@media (max-width:1180px) {
    .mosaic {
        grid-template-columns: 1fr 150px 150px;
        grid-template-rows: 158px 158px
    }
}

@media (max-width:1080px) {
    .mosaic {
        grid-template-rows: 240px 240px
    }
}

@media (max-width:760px) {
    .mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 198px 96px;
        gap: 8px
    }

    .mosaic .m1 {
        grid-column: 1/3;
        grid-row: 1
    }

    .mosaic .m2 {
        grid-column: 1;
        grid-row: 2
    }

    .mosaic .m3 {
        grid-column: 2;
        grid-row: 2
    }

    .mosaic .m4,
    .mosaic .m5 {
        display: none
    }
}

/* ---------- trip facts (grid of icon/label/value cells) ---------- */
.tf {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden
}

.cell {
    background: var(--card);
    padding: 18px 20px 20px;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 0 12px;
    align-items: start
}

.ci {
    padding-top: 2px
}

.ci svg,
.ci img {
    width: 22px;
    height: 22px;
    display: block
}

.cx {
    min-width: 0
}

.cell .k {
    font-size: .77rem;
    color: var(--ink-3);
    margin-bottom: 3px
}

.cell .v {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.15
}

.cell .v em {
    font-style: normal;
    font-size: 1.04rem
}

/* ---------- season / note panel ---------- */
.sgpanel {
    margin-top: 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    padding: 22px 26px
}

.sgpanel h3 {
    font-size: 1.08rem;
    margin-bottom: 8px
}

.sgpanel p {
    font-size: .95rem;
    color: var(--ink-2);
    max-width: 74ch
}

.sgpanel ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 26px;
    font-size: .9rem;
    color: var(--ink-2)
}

.sgpanel li {
    padding-left: 24px;
    position: relative
}

.sgpanel li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700
}

/* ---------- highlights ---------- */
.hl {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line-soft)
}

.hl .alt {
    font-family: var(--display);
    font-size: 1.02rem;
    color: var(--primary);
    min-width: 66px;
    padding-top: 1px
}

.hl h4 {
    font-family: var(--body);
    font-weight: 600;
    font-size: .99rem;
    margin-bottom: 2px
}

.hl p {
    font-size: .92rem;
    color: var(--ink-2);
    margin: 0
}

/* ---------- brief (tour-in-brief) itinerary list ---------- */
.brief {
    margin-top: 26px;
    border-top: 1px solid var(--line)
}

.brief-row {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: .95rem;
    align-items: baseline
}

.brief-row .d {
    color: var(--ink-3);
    font-size: .85rem
}

.brief-row .a {
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    font-size: .88rem
}

.brief-row.peak {
    background: linear-gradient(90deg, rgba(238, 188, 29, .22), transparent 72%)
}

.brief-row.peak .t {
    font-weight: 600
}

/* ---------- detailed itinerary accordion ---------- */
.acc-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 16px;
    flex-wrap: wrap
}

.linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px
}

.day-n {
    font-family: var(--display);
    color: var(--ink-3);
    font-size: .95rem
}

.day-t {
    font-weight: 600;
    font-size: 1rem
}

.day-bar {
    display: flex;
    align-items: center;
    gap: 12px
}

.day-alt {
    font-size: .85rem;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: right
}

.chev {
    width: 14px;
    height: 14px;
    border-right: 1.8px solid var(--ink-3);
    border-bottom: 1.8px solid var(--ink-3);
    transform: rotate(45deg) translate(-3px, -3px);
    transition: transform .22s ease
}

.day.open .chev {
    transform: rotate(225deg) translate(-2px, -2px)
}

.day.hi .bar i {
    background: var(--gold)
}

/* ---------- included / not included ---------- */
.inc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px
}

.inc {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px 26px
}

.inc h3 {
    font-size: 1.06rem;
    margin-bottom: 14px
}

.inc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .93rem;
    color: var(--ink-2)
}

.inc li {
    padding: 7px 0 7px 26px;
    position: relative;
    border-bottom: 1px solid var(--line-soft)
}

.inc li:last-child {
    border-bottom: 0
}

.inc li::before {
    position: absolute;
    left: 0;
    top: 7px;
    font-size: .9rem
}

.inc.yes li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700
}

.inc.no li::before {
    content: "–";
    color: var(--ink-3);
    font-weight: 700
}

/* ---------- departures ---------- */
.dep-intro {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    padding: 18px 22px;
    margin-top: 22px
}

.dep-intro p {
    margin: 0;
    font-size: .95rem;
    color: var(--ink-2)
}

.dep-intro b {
    color: var(--ink)
}

.dep-table {
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--card)
}

.dep-th {
    display: grid;
    grid-template-columns: 1.5fr 1.15fr .95fr .9fr 40px;
    gap: 18px;
    padding: 12px 22px;
    background: #F3EDEA;
    font-size: .81rem;
    color: var(--ink-2);
    font-weight: 600;
    border-bottom: 1px solid var(--line)
}

.dep {
    border-bottom: 1px solid var(--line-soft)
}

.dep:last-child {
    border-bottom: 0
}

.dep-row {
    display: grid;
    grid-template-columns: 1.5fr 1.15fr .95fr .9fr 40px;
    gap: 18px;
    align-items: center;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    font: inherit;
    padding: 18px 22px;
    cursor: pointer
}

.dep-row:hover {
    background: #FCFAF9
}

.dep-date {
    font-family: var(--display);
    font-size: 1.08rem
}

.dep-date small {
    display: block;
    font-family: var(--body);
    font-size: .82rem;
    color: var(--ink-3);
    margin-top: 2px
}

.dep-variant {
    font-size: .9rem;
    color: var(--ink-2)
}

.dep-variant b {
    display: block;
    color: var(--ink);
    font-weight: 600;
    font-size: .93rem
}

.dep-price {
    font-family: var(--display);
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums
}

.dep-price small {
    display: block;
    font-family: var(--body);
    font-size: .8rem;
    color: var(--ink-3)
}

.tag {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px
}

.tag.open {
    background: #F3E7E9;
    color: #791E30
}

.tag.few {
    background: #FBF0CE;
    color: #8A6A06
}

.tag.full {
    background: #F0EBE9;
    color: var(--ink-3)
}

.dep-body {
    display: none;
    padding: 4px 22px 26px 22px;
    background: #FCFAF9;
    border-top: 1px solid var(--line-soft)
}

.dep.open .dep-body {
    display: block
}

.dep.open .dep-row {
    background: #FCFAF9
}

.dep-body h4 {
    font-family: var(--body);
    font-size: .93rem;
    font-weight: 600;
    margin: 16px 0 8px
}

.dep-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line)
}

.privatebox {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 26px 28px;
    margin-top: 20px
}

.privatebox h3 {
    font-size: 1.15rem;
    margin-bottom: 10px
}

.privatebox p {
    font-size: .96rem;
    color: var(--ink-2);
    max-width: 70ch
}

/* ---------- essential information accordion ---------- */
.ei {
    margin-top: 24px;
    border-top: 1px solid var(--line)
}

.eirow {
    border-bottom: 1px solid var(--line)
}

.eihead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    font: inherit;
    padding: 17px 2px;
    cursor: pointer
}

.eihead:hover .eit {
    color: var(--primary)
}

.eit {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.06rem;
    line-height: 1.3
}

.eihead .chev {
    flex: none
}

.eibody {
    display: none;
    padding: 0 2px 24px;
    max-width: 76ch
}

.eirow.open .eibody {
    display: block
}

.eibody p {
    font-size: .96rem;
    color: var(--ink-2);
    margin: 0 0 14px
}

.eibody p:last-child {
    margin-bottom: 0
}

.eibody ul {
    margin: 0 0 14px;
    padding-left: 20px;
    font-size: .96rem;
    color: var(--ink-2)
}

.eibody li {
    margin-bottom: 7px
}

.eibody b {
    color: var(--ink)
}

/* ---------- reviewer (who left the quote) ---------- */
.quote .who {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft)
}

.quote .who img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--line-soft)
}

.quote .who b {
    font-size: .93rem;
    display: block;
    font-weight: 600
}

.quote .who span {
    font-size: .84rem;
    color: var(--ink-3)
}

/* ---------- related trip cards ---------- */
.trip {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column
}

.trip:hover {
    border-color: var(--ink-3)
}

.trip img {
    height: 150px;
    width: 100%;
    object-fit: cover;
    background: var(--line-soft)
}

.trip .tb {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.trip h4 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.06rem;
    margin-bottom: 6px;
    line-height: 1.25
}

.trip p {
    font-size: .88rem;
    color: var(--ink-2);
    margin-bottom: 14px
}

.trip .tm {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--ink-3);
    padding-top: 12px;
    border-top: 1px solid var(--line-soft)
}

.trip .tm b {
    color: var(--ink);
    font-weight: 600
}

/* ---------- sidebar (price card + trip facts + map) ---------- */
.rail {
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 58px
}

.pricecard {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    overflow: hidden
}

.pc-top {
    padding: 22px 24px 20px;
    border-bottom: 1px solid var(--line-soft)
}

.pc-from {
    font-size: .84rem;
    color: var(--ink-3)
}

.pc-price {
    font-family: var(--display);
    font-weight: 700;
    font-size: 2.05rem;
    line-height: 1.1;
    margin: 2px 0 6px;
    color: var(--primary)
}

.pc-note {
    font-size: .84rem;
    color: var(--ink-2)
}

.pc-top .smallgroup {
    margin-top: 13px;
    font-size: .78rem;
    padding: 5px 12px 5px 9px
}

.pc-top .smallgroup svg {
    width: 15px;
    height: 15px
}

.pc-acts {
    padding: 18px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.pc-meta {
    font-size: .82rem;
    color: var(--ink-3);
    text-align: center;
    margin-top: 4px
}

.railfacts {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden
}

.railhead {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: #FBF8F6;
    font-family: var(--body);
    font-weight: 700;
    font-size: .79rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-2)
}

.railfacts .tf {
    display: block;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent
}

.railfacts .cell {
    padding: 11px 18px;
    grid-template-columns: 24px 1fr;
    gap: 0 11px;
    align-items: center;
    border-bottom: 1px solid var(--line-soft)
}

.railfacts .cell:last-child {
    border-bottom: 0
}

.railfacts .ci img {
    width: 20px;
    height: 20px
}

.railfacts .cell .k {
    font-size: .74rem;
    margin-bottom: 1px
}

.railfacts .cell .v {
    font-size: 1.04rem
}

.railfacts .cell .v em {
    font-size: .95rem
}

.railmap {
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--card)
}

.railmap img {
    width: 100%
}

.railmap .cap {
    padding: 10px 16px;
    font-size: .82rem;
    color: var(--ink-3);
    border-top: 1px solid var(--line-soft)
}

/* ---------- mobile bar ---------- */
.mobar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px -14px rgba(24, 35, 43, .4)
}

.mobar .r {
    display: flex;
    align-items: center;
    gap: 12px
}

.mobar .p {
    flex: 1;
    font-size: .82rem;
    color: var(--ink-3);
    line-height: 1.25
}

.mobar .p b {
    display: block;
    font-family: var(--display);
    font-size: 1.2rem;
    color: var(--ink)
}

/* ---------- responsive ---------- */
@media (max-width:1080px) {
    .sgpanel ul {
        grid-template-columns: 1fr 1fr
    }

    .rail {
        order: -1;
        position: static;
        padding-top: 26px;
        gap: 0
    }

    .pricecard,
    .railmap {
        display: none
    }

    .railfacts {
        width: 100%
    }

    .railfacts .tf {
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .railfacts .cell {
        border-right: 1px solid var(--line-soft)
    }

    .railfacts .cell:nth-child(2n) {
        border-right: 0
    }

    .mobar {
        display: block
    }

    .inc-grid {
        grid-template-columns: 1fr;
        gap: 24px
    }
}

@media (max-width:980px) {

    .dep-th,
    .dep-row {
        grid-template-columns: 1.4fr 1.1fr .9fr .9fr;
        gap: 14px
    }

    .dep-th div:last-child,
    .dep-row .chev {
        display: none
    }
}

@media (max-width:760px) {
    .sgpanel {
        padding: 18px 20px
    }

    .sgpanel ul {
        grid-template-columns: 1fr
    }

    .cell {
        padding: 15px 17px 17px;
        grid-template-columns: 24px 1fr;
        gap: 0 11px
    }

    .railfacts .tf {
        grid-template-columns: 1fr
    }

    .railfacts .cell {
        border-right: 0
    }

    .inc {
        padding: 20px 20px
    }

    .acc-tools {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }

    .day-bar {
        display: contents
    }

    .bar,
    .day-alt {
        display: none
    }

    .brief-row {
        grid-template-columns: 52px 1fr;
        gap: 10px;
        padding: 10px 0
    }

    .brief-row .a {
        grid-column: 2;
        font-size: .82rem
    }

    .dep-th {
        display: none
    }

    .dep-row {
        grid-template-columns: 1fr auto;
        gap: 6px 14px;
        padding: 15px 15px
    }

    .dep-row .dep-variant {
        grid-column: 1/-1;
        order: 3
    }

    .dep-date {
        font-size: 1rem
    }

    .dep-body {
        padding: 4px 15px 22px
    }

    .dep-actions {
        gap: 9px
    }

    .dep-actions .btn {
        flex: 1 1 100%;
        justify-content: center
    }

    .privatebox {
        padding: 20px
    }

    .trip .tb {
        padding: 14px 16px 16px
    }
}

@media (max-width:520px) {
    .hl {
        flex-direction: column;
        gap: 3px
    }

    .hl .alt {
        min-width: 0
    }

    .mobar .p {
        font-size: .76rem
    }

    .mobar .p b {
        font-size: 1rem
    }

    .mobar .btn {
        padding: 10px 14px;
        font-size: .86rem
    }
}
