/* ekmaryachting.com (main site). Loaded after site.css, base.css and glass.css.
   Brand: Ekmar orange #ff7700 and navy. Headings Montserrat, text Inter (as on the WordPress site).
   base.css still holds the charter rules (form, drawer, 404 ...); unused ones are removed in a later build. */

:root {
  --orange: #ff7700;
  --orange-deep: #c25a00;
  --accent: #ff7700;
  --accent-dark: #c25a00;
  --gold: #ff7700;
  --gold-light: #ff9a3d;
  --gold-dark: #c25a00;
  --navy: #001647;
  --navy-soft: #1e3a8a;
  --btn-navy: #001647;
  --btn-navy-hover: #14306b;
}

/* ---- Pages: full-width parts and the centred text column ---- */
.page { max-width: none; padding: 0 0 4rem; }
.page .wrap { max-width: 52rem; }
.page .band .wrap, .page .hero .wrap, .page .cards-sec .wrap { max-width: var(--wrap); }
.page > .wrap:first-child { padding-top: 2.25rem; }
.page--hero > .wrap:first-child { padding-top: 0; }
.page .page-body { padding-top: 1.5rem; padding-bottom: 0.5rem; }
.page--hero { padding-bottom: 0; }
.page--hero > .wrap:last-child { padding-bottom: 3rem; }
main > .page--hero { margin-top: 0; }

/* ---- Picture or video behind a hero or section ---- */
.bgm { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: var(--navy); }
.bgm-img, .bgm-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgm-video { opacity: 0; transition: opacity 0.8s ease; }
.bgm-video.is-playing { opacity: 1; }
.hero-shade { position: absolute; inset: 0; z-index: 1; }
.hero-shade--light { background: linear-gradient(180deg, rgba(0, 12, 40, 0.25), rgba(0, 12, 40, 0.35)); }
.hero-shade--medium { background: linear-gradient(180deg, rgba(0, 12, 40, 0.4), rgba(0, 12, 40, 0.5)); }
.hero-shade--dark { background: linear-gradient(180deg, rgba(0, 12, 40, 0.55), rgba(0, 12, 40, 0.65)); }

/* ---- Hero ---- */
.hero { position: relative; display: flex; align-items: center; color: #ffffff; background: var(--navy); overflow: hidden; }
.hero--tall { min-height: min(100vh, 52rem); }
.hero--medium { min-height: 26rem; }
.hero-inner { width: 100%; position: relative; z-index: 2; padding-top: 9rem; padding-bottom: 4rem; }
.hero-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.12; margin: 0 0 1.2rem; color: #ffffff; max-width: 14ch; }
.hero-text { max-width: 36rem; font-size: 1.05rem; line-height: 1.6; margin: 0 0 0.6rem; color: #ffffff; }
.hero-line { max-width: 36rem; font-size: 0.95rem; margin: 0 0 1.6rem; color: rgba(255, 255, 255, 0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
/* Buttons on dark backgrounds: navy metal with a thin orange border (lighter at the top, deeper at the bottom). */
.hero .btn--primary, .band--photo .btn--primary, .band--navy .btn--primary {
  background: linear-gradient(180deg, #14307a 0%, #001647 100%);
  border: 1px solid #ff8a1f; border-top-color: #ffb066; border-bottom-color: #d96200; color: #ffffff;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; padding: 0.9rem 1.6rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.hero .btn--primary:hover, .band--photo .btn--primary:hover, .band--navy .btn--primary:hover,
.hero .btn--primary:focus-visible, .band--photo .btn--primary:focus-visible, .band--navy .btn--primary:focus-visible {
  background: linear-gradient(180deg, #1c3d96 0%, #0a1f5c 100%); color: #ffffff; border-color: #ffb066;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 138, 31, 0.25);
}

/* ---- Header over a hero: transparent, scrolls away with the page (no sticky header anywhere). Desktop: logo and menu list; phone: logo only (the drawer is the menu) ---- */
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 30; padding: 0; }
.site-header--overlay .site-header-inner { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.site-header--overlay .site-nav { display: none; }
@media (min-width: 900px) {
  .site-header--overlay .site-nav { display: flex; align-items: center; gap: 1.7rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
  .site-header--overlay .site-nav a { color: #ffffff; font-weight: 500; padding: 0.4rem 0; border-bottom: 2px solid transparent; text-shadow: 0 1px 8px rgba(0, 12, 40, 0.55); }
  .site-header--overlay .site-nav a:hover, .site-header--overlay .site-nav a[aria-current="page"] { color: #ffffff; border-bottom-color: var(--orange, #ff7700); }
}
@media (max-width: 899px) { .site-header--overlay .brand { width: 100%; } }
.site-header--overlay .brand-logo--on-light { display: none; }
.site-header--overlay .site-header-inner { padding-top: 0.9rem; }
@media (max-width: 639px) { .hero-inner { padding-top: 10rem; } .site-header--overlay .site-header-inner { margin-left: 0; margin-right: 0; } }

/* ---- Sections ---- */
.band { position: relative; padding: 4.5rem 0; overflow: hidden; }
.band-inner { position: relative; z-index: 2; }
.band--light { background: #ffffff; }
.band--soft { background: #f3f5f9; }
.band--navy { background: var(--navy); color: #ffffff; }
.band--navy .band-title, .band--navy .prose, .band--navy .prose p, .band--navy a { color: #ffffff; }
.band--photo { color: #ffffff; background: var(--navy); text-align: center; }
.band--photo .band-title, .band--photo .prose, .band--photo .prose p, .band--photo a { color: #ffffff; }
.band--photo .band-body { margin: 0 auto; max-width: 44rem; }
.band-kicker, .band-subtitle { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin: 0 0 0.8rem; }
.band--photo .band-subtitle, .band--navy .band-subtitle { color: #ffd2a1; margin-top: 1.6rem; }
.band-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2; margin: 0 0 1.1rem; color: var(--heading); }
.band .prose { font-size: 1.05rem; }
.band-actions { margin-top: 1.6rem; }
.band--photo .band-actions { display: flex; justify-content: center; }
/* Build 21: a closing text block keeps some air above the footer; a coloured band runs straight into it. */
.page > .page-body:last-child { padding-bottom: 3rem; }
/* Photo band: the picture shows through, darker at the top and bottom edges so it melts into the page and the footer. */
.band--photo .hero-shade--dark { background: linear-gradient(180deg, rgba(0, 12, 40, 0.72) 0%, rgba(0, 12, 40, 0.5) 45%, rgba(0, 12, 40, 0.78) 100%); }
.band.band--photo { padding: 5rem 0 5.25rem; }
.band--photo .band-numbers { gap: 0.7rem 3.2rem; }
@media (max-width: 639px) { .band.band--photo { padding: 3.5rem 0 3.75rem; } .band--photo .band-numbers { flex-direction: column; align-items: center; gap: 0.9rem; } }
.band-numbers { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.2rem; font-size: 1.35rem; font-weight: 600; }
.band-numbers li { display: flex; align-items: center; gap: 0.5rem; }
.band-numbers a { text-decoration: none; }
.band-numbers a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.band--with-picture .band-inner { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
.band-picture img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 39, 0.18); }
@media (min-width: 860px) {
  .band--with-picture .band-inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .band--picture-left .band-picture { order: -1; }
  .band--picture-right .band-picture { order: 2; }   /* The picture comes first in the page code; "right" moves it behind the text. */
}
@media (max-width: 639px) { .band { padding: 3rem 0; } }

/* ---- Cards and gallery ---- */
.cards-head { max-width: 46rem; margin: 0 auto 2.2rem; text-align: center; }
.cards-more { text-align: center; margin: 2.2rem 0 0; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards--2, .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.cards > .card { background: #ffffff; border: 1px solid var(--card-line); border-radius: 14px; box-shadow: var(--card-shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-picture img, .card--photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin: 0 0 0.6rem; color: var(--heading); }
.card-body p { margin: 0 0 1rem; font-size: 0.97rem; line-height: 1.6; }
.card-link { margin: auto 0 0; }
/* Fleet cards (from the charter feed) */
.card--yacht .card-picture { position: relative; display: block; }
.card--yacht .card-body h3 a { color: inherit; text-decoration: none; }
.card--yacht .card-body h3 a:hover { color: var(--orange); }
.card-place { color: var(--muted, #5b6577); font-size: 0.9rem !important; margin-bottom: 0.4rem !important; }
.card-specs { font-size: 0.88rem !important; color: var(--muted, #5b6577); }
.card-specs strong { color: var(--heading); font-weight: 600; }
.card-price { font-size: 0.95rem !important; }
.card-price strong { color: var(--navy, #001647); font-size: 1.1rem; }   /* Navy, not green: the green failed the PageSpeed contrast check. */
/* Badges (build 28): one stack at the top left of the picture. "Ekmar's Choice" first; the discount sits below it,
   or in the place of the ribbon when there is none. The owner's design, moved here from Site settings > Extra CSS. */
.card-badges { position: absolute; top: 1.7rem; left: -4px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.card-badge { background: #0a1146; color: #ffffff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.5rem 0.6rem; border-radius: 5px; border: 1px solid #ffffff; }
.cards--gallery > .card { padding: 0; border: 0; box-shadow: none; border-radius: 10px; }
.cards--gallery .card--photo img { aspect-ratio: 3 / 2; }

/* Aligned text and headings (build 08). A list stays lined up inside itself; the whole list moves. */
.align-center { text-align: center; }
.align-right { text-align: right; }
.prose.align-center ul, .prose.align-center ol { display: table; margin-left: auto; margin-right: auto; text-align: left; }
.prose.align-right ul, .prose.align-right ol { display: table; margin-left: auto; margin-right: 0; text-align: left; }
/* Text block with a strip behind it: the usual text column, not the wide section width. */
.page .band--text .wrap { max-width: 52rem; }
.band--text .band-inner { padding-top: 0; padding-bottom: 0; }
.band--photo.band--text { text-align: inherit; }
.band--navy .prose h2, .band--navy .prose h3, .band--photo .prose h2, .band--photo .prose h3,
.band--navy .prose strong, .band--photo .prose strong, .band--navy .prose li, .band--photo .prose li { color: #ffffff; }

/* Build 10: with extra menu links the transparent-header menu gets tighter on narrower screens. */
@media (min-width: 900px) and (max-width: 1179px) {
  .site-header--overlay .site-nav { gap: 1rem; font-size: 0.74rem; letter-spacing: 0.04em; }
}

/* Build 12: blog. Category links, post cards, post header and footer. */
.blog-filter { display: flex; justify-content: center; margin: 0 0 2rem; }
.blog-select { position: relative; width: min(100%, 22rem); }
.blog-select summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.1rem; border: 1px solid var(--card-line, #d8dde8); border-radius: 999px; background: #ffffff; color: var(--navy, #001647); font-size: 0.95rem; cursor: pointer; list-style: none; }
.blog-select summary::-webkit-details-marker { display: none; }
.blog-select summary::after { content: ""; margin-left: auto; width: 0.5rem; height: 0.5rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 0.15s; }
.blog-select[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.blog-select summary:hover, .blog-select[open] summary { border-color: var(--orange, #ff7700); }
.blog-select-label { color: var(--muted, #5a6478); }
.blog-select ul { position: absolute; z-index: 20; left: 0; right: 0; margin: 0.4rem 0 0; padding: 0.4rem; list-style: none; max-height: 18rem; overflow-y: auto; background: #ffffff; border: 1px solid var(--card-line, #d8dde8); border-radius: 1rem; box-shadow: 0 10px 30px rgba(0, 22, 71, 0.15); }
.blog-select li a { display: block; padding: 0.5rem 0.8rem; border-radius: 0.6rem; color: var(--navy, #001647); font-size: 0.95rem; text-decoration: none; }
.blog-select li a:hover { background: #f2f4f9; }
.blog-select li a[aria-current="page"] { background: var(--navy, #001647); color: #ffffff; }
.blog-empty, .blog-term-text { text-align: center; color: var(--muted, #5a6478); }
.card--post .card-picture { display: block; }
.post-card-meta { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted, #5a6478); }
.post-card-meta a { color: inherit; }
.card--post h3 a { color: inherit; text-decoration: none; }
.card--post h3 a:hover { color: var(--orange, #ff7700); }
.post-meta { margin: 0.4rem 0 1.4rem; font-size: 0.95rem; color: var(--muted, #5a6478); }
.post-meta a { color: inherit; }
.post-cover { margin: 0 0 2rem; }
.post-cover img { display: block; width: 100%; height: auto; max-height: 30rem; object-fit: cover; border-radius: 14px; }
.post-end { padding-top: 1.5rem; padding-bottom: 2rem; }
.post-tags { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tags a { display: inline-block; padding: 0.25rem 0.8rem; border-radius: 999px; background: #eef1f7; color: var(--navy, #001647); font-size: 0.85rem; text-decoration: none; }
.post-tags a:hover { background: #dfe5f1; }
.post-back { margin: 1.4rem 0 0; text-align: center; }
/* Previous / next article row (build 13) */
.post-nav { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0 1.2rem; }
.post-nav a { flex: 1 1 16rem; display: block; padding: 0.8rem 1rem; border: 1px solid var(--card-line, #d8dde8); border-radius: 0.6rem; background: #ffffff; text-decoration: none; color: var(--navy, #001647); }
.post-nav a:hover { border-color: var(--orange, #ff7700); }
.post-nav-next { text-align: right; }
.post-nav-prev:only-child, .post-nav-next:only-child { max-width: 32rem; }
.post-nav-next:only-child { margin-left: auto; }
.post-nav-label { display: block; font-size: 0.8rem; color: var(--muted, #5a6478); margin-bottom: 0.2rem; }
.post-nav-title { display: block; font-weight: 600; line-height: 1.3; }
.post-end .post-back { text-align: left; margin: 0; }
.post-cta { text-align: center; }
.post-cta p { margin-left: auto; margin-right: auto; max-width: 38rem; }

/* ---- Right-hand pills (build 27): the owner's slimmer pills, moved here from Site settings > Extra CSS ---- */
.drawer > summary { padding: 0 1rem 0 0.4rem; }
.drawer--menu { --tip: 2.4rem; --intro: 7rem; }
.drawer--share { --drawer-w: 7.6rem; --tip: 2.15rem; --intro: 7rem; }
.to-top { right: -2.99rem; padding-right: calc(1.4rem + 2rem); }
html.js .contact-drawer { right: -15px; padding-left: 0.5rem; }
/* The share panel has its own width, so the slim pill no longer squeezes it: four buttons per row. */
.drawer-panel--share { width: 12.6rem; max-width: calc(100vw - 1.2rem); }

/* Pills (build 28): the Share pill sits right above Menu and shows its full button once per visit, like Menu.
   The Menu arrow moves to the same spot as the arrow of Back to top; only the Menu arrow, the Share icon keeps its place. */
html.js.share-intro-done .drawer--share.is-intro:not([open]) { transform: translateX(calc(var(--drawer-w) - var(--tip))); }
html.js.share-intro-done .drawer--share:not([open]):not(.is-sliding) .drawer-label {
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--tip) - 3.6rem), transparent calc(var(--tip) - 2.65rem));
  mask-image: linear-gradient(to right, #000 calc(var(--tip) - 3.6rem), transparent calc(var(--tip) - 2.65rem));
}
.drawer--menu .drawer-icon { margin-left: 0.5rem; }   /* Build 28: the Menu and Back to top arrows sit on the same line as the Share, Message and WhatsApp icons. */
.to-top .drawer-icon { margin-left: -0.3rem; }

/* ---- Cards (build 28): the button is always at the bottom and as wide as the card; where the browser can,
   the rows of a card (title, place, facts, text, price, button) line up across the cards of one row ---- */
.card-body .card-link { margin: auto 0 0; height: auto; }   /* The generic "p" rule above was stronger, so the buttons were not at the bottom; the charter rule ".card .card-link { height: 100% }" made the button row overlap the price and text. */
.card .card-link .btn { display: block; width: 100%; text-align: center; }
@supports (grid-template-rows: subgrid) {
  .cards:not(.slider-track):not(.cards--gallery) { row-gap: 0; grid-auto-rows: auto; margin-bottom: -1.6rem; }
  .cards:not(.slider-track):not(.cards--gallery) > .card {
    container-type: normal; display: grid; grid-template-rows: subgrid; align-items: stretch; align-content: stretch; justify-content: stretch; grid-row: span var(--card-rows, 4); margin-bottom: 1.6rem;
  }
  .cards:not(.slider-track):not(.cards--gallery) > .card--yacht { --card-rows: 7; }
  .cards:not(.slider-track):not(.cards--gallery) > .card--post { --card-rows: 5; }
  .cards:not(.slider-track):not(.cards--gallery) > .card > .card-picture { grid-row: 1; }
  .cards:not(.slider-track):not(.cards--gallery) > .card > .card-body { display: contents; }
  .cards:not(.slider-track):not(.cards--gallery) > .card > .card-body > * { margin-left: 1.4rem; margin-right: 1.4rem; }
  .cards:not(.slider-track):not(.cards--gallery) > .card > .card-body > h3 { padding-top: 1.3rem; margin-bottom: 0.6rem; }
  .cards:not(.slider-track):not(.cards--gallery) > .card > .card-body > .card-link { align-self: end; height: auto; margin-top: 0.4rem; margin-bottom: 1.5rem; }
  /* Row numbers: yacht cards (7 rows), blog cards (5 rows), other cards (4 rows). */
  .cards > .card--yacht > .card-body > h3 { grid-row: 2; }
  .cards > .card--yacht > .card-body > .card-place { grid-row: 3; }
  .cards > .card--yacht > .card-body > .card-specs { grid-row: 4; }
  .cards > .card--yacht > .card-body > .card-excerpt { grid-row: 5; }
  .cards > .card--yacht > .card-body > .card-price { grid-row: 6; }
  .cards > .card--yacht > .card-body > .card-link { grid-row: 7; }
  .cards > .card--post > .card-body > .post-card-meta { grid-row: 2; padding-top: 1.3rem; }
  .cards > .card--post > .card-body > h3 { grid-row: 3; }
  .cards:not(.slider-track):not(.cards--gallery) > .card--post > .card-body > h3 { padding-top: 0.1rem; }
  .cards > .card--post > .card-body > .card-excerpt { grid-row: 4; }
  .cards > .card--post > .card-body > .card-link { grid-row: 5; }
  .cards > .card:not(.card--yacht):not(.card--post) > .card-body > h3 { grid-row: 2; }
  .cards > .card:not(.card--yacht):not(.card--post) > .card-body > .card-excerpt { grid-row: 3; }
  .cards > .card:not(.card--yacht):not(.card--post) > .card-body > .card-link { grid-row: 4; }
}
/* "More articles" slider on a phone: one card with a peek of the next, like Related Yachts on the charter site (1.15 cards). */
@media (max-width: 639px) {
  .slider-track.cards { gap: 1rem; }
  .slider-track.cards > li { flex-basis: calc((100% - 0.15rem) / 1.15); }
}

/* Footer: company registrations under the logo text. */
.footer-reg { list-style: none; margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid #33506f; font-size: 0.85rem; line-height: 1.75; }
.footer-reg span { font-weight: 600; }
.footer-reg-name { color: var(--white); font-weight: 600; }

/* Pills: an open Menu panel stays in front of the Share pill. */
.drawer--menu[open] { z-index: 33; }

/* Pictures (build 28.03): every picture that has width and height gets that shape as an explicit aspect ratio.
   Chrome (DevTools Issues, Lighthouse) reports "Lazy-loaded images should have explicit dimensions" for a lazy picture
   with only width/height attributes plus "width: 100%; height: auto", because the ratio taken from the attributes is
   "auto". An explicit ratio removes the warning for every picture, also for new uploads and pictures inside text.
   :where() keeps this rule weaker than any other ratio on the site (card pictures keep their 4 / 3).
   Only lazy pictures get it: padded, border-box pictures such as the footer badges would be squeezed by a ratio
   (Lighthouse: "Displays images with incorrect aspect ratio"), and they are not lazy, so they never had the warning. */
:where(img[loading="lazy"][width][height]) { aspect-ratio: attr(width type(<number>)) / attr(height type(<number>)); }
