/*
 * [hub_statek] — ship page (?statek=...) and the ship index (no parameter).
 * Cruise cards are [hub_boxy]'s own .hub-cs-box-card (boxes.css); only the
 * page's own chrome lives here. Colors inherit the theme (see README →
 * Theming): nothing below hardcodes an accent.
 */
.hub-cs-ship {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hub-cs-ship-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    background: #0b2b50;
}

.hub-cs-ship-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-cs-ship-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 60%);
}

.hub-cs-ship-hero-plain {
    min-height: 0;
}

.hub-cs-ship-hero-plain::after {
    display: none;
}

.hub-cs-ship-hero-text {
    position: relative;
    z-index: 1;
    padding: 24px 28px;
    color: #fff;
}

/* The logo files are trimmed to the artwork, so their proportions vary a lot
   (Carnival is a thin strip, AIDA nearly square). A fixed white box with the
   logo contained inside makes every operator's logo the same size. */
.hub-cs-ship-operator-logo {
    display: block;
    box-sizing: border-box;
    width: 140px;
    max-width: 40vw;
    height: 80px;
    padding: 10px 12px;
    margin-bottom: 10px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.hub-cs-ship-operator {
    display: block;
    font-size: calc(var(--hub-cs-base-font, 16px) * .875);
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .85;
}

.hub-cs-ship-name {
    margin: 4px 0 0;
    color: inherit;
    line-height: 1.15;
}

.hub-cs-ship-count {
    margin: 6px 0 0;
    opacity: .9;
}

.hub-cs-ship-description {
    max-width: none;
}

/* Full container width also for the paragraphs, headings and lists inside —
   some themes cap those on their own (e.g. a "readable width" on p). */
.hub-cs-ship-description > * {
    max-width: none;
}

.hub-cs-ship-description > :first-child {
    margin-top: 0;
}

.hub-cs-ship-description > :last-child {
    margin-bottom: 0;
}

/* ---- Accordion: same look as the offer card's (offer.css .hub-cs-acc*) ---- */
.hub-cs-ship-accordion {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    overflow: hidden;
}

.hub-cs-ship-accordion .hub-cs-acc {
    border-top: 1px solid rgba(0, 0, 0, .12);
}

.hub-cs-ship-accordion .hub-cs-acc:first-child {
    border-top: none;
}

.hub-cs-ship-accordion .hub-cs-acc-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.hub-cs-ship-accordion .hub-cs-acc-summary::-webkit-details-marker {
    display: none;
}

.hub-cs-ship-accordion .hub-cs-acc-summary::after {
    content: "";
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: .5;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

.hub-cs-ship-accordion .hub-cs-acc[open] > .hub-cs-acc-summary::after {
    transform: rotate(-135deg);
}

.hub-cs-ship-accordion .hub-cs-acc-label {
    margin: 0;
    font-size: 1.05em;
}

.hub-cs-ship-accordion .hub-cs-acc-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    object-fit: contain;
}

.hub-cs-ship-accordion .hub-cs-acc-body {
    padding: 0 20px 20px 57px;
    line-height: 1.6;
}

.hub-cs-ship-accordion .hub-cs-acc-body > :first-child {
    margin-top: 0;
}

.hub-cs-ship-cabin-group {
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.hub-cs-ship-cabin-group:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.hub-cs-ship-cabin-group > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}

.hub-cs-ship-cabin-group > summary::-webkit-details-marker {
    display: none;
}

.hub-cs-ship-cabin-group > summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 400;
    opacity: .6;
}

.hub-cs-ship-cabin-group[open] > summary::after {
    content: "−";
}

.hub-cs-ship-cabin-count {
    font-weight: 400;
    opacity: .6;
}

.hub-cs-ship-cabin-group > .hub-cs-ship-cabins {
    padding-bottom: 16px;
}

.hub-cs-ship-cabins {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.hub-cs-ship-cabin {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.hub-cs-ship-cabin img {
    width: 120px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
}

.hub-cs-ship-cabin-desc {
    font-size: .9em;
    opacity: .8;
}

.hub-cs-ship-cabin-desc p {
    margin: 4px 0 0;
}

.hub-cs-ship-specs {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0 28px;
}

.hub-cs-ship-specs > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.hub-cs-ship-specs dt {
    opacity: .7;
}

.hub-cs-ship-specs dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.hub-cs-ship-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.hub-cs-ship-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.hub-cs-ship-offers-heading {
    margin: 0;
}

.hub-cs-ship-pagination a.hub-cs-page-btn {
    color: inherit;
    text-decoration: none;
}

/* Gallery on tablet/phone: a swipe slider instead of a grid that stacks the
   photos down the page — same scroll-snap pattern as boxes.css (no JS),
   per request: tablet 3 photos + a sliver of the 4th, phone 1 + a sliver. */
@media (max-width: 900px) {
    .hub-cs-ship-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hub-cs-ship-gallery::-webkit-scrollbar {
        display: none;
    }

    .hub-cs-ship-gallery img {
        scroll-snap-align: start;
        flex: 0 0 calc((100% - 3 * 10px) / 3.1);
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .hub-cs-ship-gallery img {
        flex: 0 0 calc((100% - 10px) / 1.1);
    }
}

/* The cruise cards deliberately get NO mobile override here: they use
   boxes.css's own swipe slider exactly like [hub_boxy] (per request —
   phone: 1 card + a sliver of the next, tablet: 2 + a sliver). */
@media (max-width: 600px) {
    .hub-cs-ship-accordion .hub-cs-acc-body {
        padding-left: 20px;
    }

    .hub-cs-ship-cabin img {
        width: 88px;
    }

    .hub-cs-ship-hero {
        min-height: 220px;
    }

    .hub-cs-ship-hero-text {
        padding: 18px 16px;
    }
}

/* ---- Index (no ?statek=): operator logos, a click opens the operator's ships ---- */
.hub-cs-ship-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    align-items: start;
}

.hub-cs-ship-index-group > summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
    text-align: center;
    transition: background-color .15s ease;
}

.hub-cs-ship-index-group > summary::-webkit-details-marker {
    display: none;
}

.hub-cs-ship-index-group > summary:hover,
.hub-cs-ship-index-group[open] > summary {
    background: rgba(0, 0, 0, .05);
}

.hub-cs-ship-index-group > summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.hub-cs-ship-index-group .hub-cs-ship-operator-logo {
    margin-bottom: 4px;
}

.hub-cs-ship-index-name {
    font-weight: 600;
}

.hub-cs-ship-index-count {
    font-size: .85em;
    opacity: .7;
}

.hub-cs-ship-index-count::after {
    content: " ▾";
}

.hub-cs-ship-index-group[open] .hub-cs-ship-index-count::after {
    content: " ▴";
}

/* The ships open under the operator's logo, in place: the other logos keep their spots. */
.hub-cs-ship-index-group ul {
    margin: 6px 0 8px;
    padding: 0 8px;
    list-style: none;
}

.hub-cs-ship-index-group li {
    padding: 3px 0;
}

.hub-cs-ship-index-group a {
    color: var(--theme-link-initial-color, inherit);
}

.hub-cs-ship-deckplan {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: var(--hub-cs-button-radius, 8px);
    color: inherit;
    text-decoration: none;
}

.hub-cs-ship-deckplan:hover {
    border-color: currentColor;
}
