/* WorldGPSMaps – plugin styles. Colours from the approved mockups. */
:root {
	--wgm-navy: #2c3066;
	--wgm-orange: #ffb23d;
	--wgm-line: #dde;
	--wgm-soft: #f4f5fb;
	--wgm-text: #222;
}
.wgm {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 48px;
	color: var(--wgm-text);
	box-sizing: border-box;
}
.wgm *, .wgm *::before, .wgm *::after { box-sizing: inherit; }
.wgm h2 { font-size: 1.4rem; margin: 2rem 0 1rem; }

/* Breadcrumb */
.wgm-breadcrumb { font-size: .9rem; margin-bottom: 16px; color: #666; }
.wgm-breadcrumb a { color: var(--wgm-navy); }
.wgm-breadcrumb-bar { padding-top: 20px; }

/* Top: gallery + buy box */
.wgm-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 32px; align-items: stretch; }
@media (max-width: 800px) { .wgm-top { grid-template-columns: 1fr; } }

/* Stage in the screenshots' aspect ratio (1467x800, coverage map too): they fill it edge to edge, square
   title images get side bars. The buy box stretches to the gallery column's height (grid row). */
.wgm-gallery { display: flex; flex-direction: column; min-width: 0; }
.wgm-gallery-main { margin: 0; }
.wgm-gallery-stage { position: relative; aspect-ratio: 1467 / 800; background: var(--wgm-soft); border-radius: 8px; overflow: hidden; }
.wgm-gallery-zoom { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.wgm-gallery-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wgm-gallery-nav, .wgm-gallery-magnify, .wgm-lightbox button { position: absolute; z-index: 2; border: 0; border-radius: 6px; background: rgba(44, 48, 102, .85); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .15s; }
.wgm-gallery-nav:hover, .wgm-gallery-nav:focus-visible, .wgm-gallery-magnify:hover, .wgm-gallery-magnify:focus-visible,
.wgm-lightbox button:hover, .wgm-lightbox button:focus-visible { background: var(--wgm-orange); color: #1a1a1a; }
.wgm-gallery-nav { top: calc(50% - 28px); width: 36px; height: 56px; }
.wgm-gallery-nav[data-wgm-step="-1"] { left: 8px; }
.wgm-gallery-nav[data-wgm-step="1"] { right: 8px; }
.wgm-gallery-magnify { top: 8px; right: 8px; width: 40px; height: 40px; }
.wgm-gallery-nav svg, .wgm-gallery-magnify svg, .wgm-lightbox button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* Lightbox: image as large as possible, never larger than the screen */
.wgm-lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0d0f24; overflow: hidden; }
.wgm-lightbox::backdrop { background: transparent; }
.wgm-lightbox img { position: absolute; inset: 16px 16px 56px; width: calc(100% - 32px); height: calc(100% - 72px); object-fit: contain; }
.wgm-lightbox p { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; color: #fff; font-size: .95rem; }
.wgm-lightbox [data-wgm-step] { top: calc(50% - 32px); width: 44px; height: 64px; }
.wgm-lightbox [data-wgm-step="-1"] { left: 12px; }
.wgm-lightbox [data-wgm-step="1"] { right: 12px; }
.wgm-lightbox .wgm-lightbox-close { top: 12px; right: 12px; width: 44px; height: 44px; }
body.wgm-noscroll { overflow: hidden; }
.wgm-gallery-main figcaption { font-size: .85rem; color: #666; margin-top: 6px; }
.wgm-gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.wgm-gallery-thumbs a { display: block; border: 2px solid transparent; border-radius: 6px; overflow: hidden; }
.wgm-gallery-thumbs a[aria-current="true"] { border-color: var(--wgm-navy); }
.wgm-gallery-thumbs img { width: 84px; height: 63px; object-fit: cover; display: block; }
.wgm-gallery-empty { aspect-ratio: 4 / 3; background: var(--wgm-soft); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--wgm-navy); font-weight: 600; }
.wgm-flag-large { width: 120px; height: auto; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }

/* line-height compact (theme sets ~2): the box ends level with the gallery thumbnails (Nepal: 3 points, 14 thumbs) */
.wgm-buybox { border: 1px solid var(--wgm-line); border-radius: 10px; padding: 20px; background: #fff; line-height: 1.65; }
.wgm-title { font-size: 1.6rem; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wgm-flag { box-shadow: 0 0 0 1px rgba(0,0,0,.1); border-radius: 2px; vertical-align: middle; }
.wgm-platforms { font-size: .9rem; color: #555; margin: 0 0 14px; }
.wgm-pricing { list-style: none; margin: 0; padding: 0; }
.wgm-plan { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--wgm-line); }
.wgm-plan:first-child { border-top: 0; }
.wgm-label { font-size: .95rem; }
.wgm-price { font-weight: 700; font-size: 1.15rem; white-space: nowrap; color: var(--wgm-navy); }
.wgm-price small { font-weight: 400; font-size: .8rem; color: #555; }
.wgm-plan-once .wgm-price { font-size: 1.5rem; }
.wgm-vat { font-size: .8rem; color: #666; margin: 6px 0 12px; }
.wgm-buy { display: block; width: 100%; text-align: center; background: var(--wgm-orange); color: #1a1a1a; font-weight: 800; font-size: 1.1rem; padding: 14px; border: 0; border-radius: 8px; text-decoration: none; cursor: pointer; }
.wgm-buy:hover, .wgm-buy:focus-visible { filter: brightness(.95); color: #1a1a1a; }
.wgm-buy[disabled] { background: #ddd; color: #666; cursor: not-allowed; }
.wgm-updates { font-size: .88rem; color: #444; margin-top: 12px; }
.wgm-updates p { margin: 0; }
.wgm-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 16px 0 0; font-size: .9rem; }
.wgm-facts dt { color: #666; }
.wgm-facts dd { margin: 0; font-weight: 600; }

/* Tabs: sections without JS, tabs with JS */
.wgm-tabs { margin-top: 40px; }
.wgm-tabnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 3px solid var(--wgm-navy); }
.wgm-tabnav button { background: var(--wgm-soft); color: var(--wgm-navy); border: 0; border-radius: 6px 6px 0 0; padding: 10px 16px; font-weight: 600; cursor: pointer; font-size: .95rem; }
.wgm-tabnav button[aria-selected="true"] { background: var(--wgm-navy); color: #fff; }
.wgm-tabnav button:hover, .wgm-tabnav button:focus-visible { background: var(--wgm-orange); color: #1a1a1a; }
.wgm-tabs.is-tabbed .wgm-tab { padding: 20px 4px; }
/* the theme gives lists no bottom margin: keep the same gap as after a paragraph */
.wgm-tab ul, .wgm-tab ol { margin: 0 0 30px; }
.wgm-tabs.is-tabbed .wgm-tab[hidden] { display: none; }
.wgm-tabs.is-tabbed .wgm-tab-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wgm-own-text { margin-bottom: 1em; }

/* Lists under the tabs */
.wgm-contents ul { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-left: 1.2em; }

/* Tiles */
.wgm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.wgm-tile-country { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--wgm-navy); color: #fff; text-decoration: none; transition: box-shadow .15s; }
.wgm-tile-country:hover, .wgm-tile-country:focus-visible { box-shadow: 0 4px 14px rgba(44, 48, 102, .3); color: #fff; }
.wgm-tile-photo { position: absolute; inset: 0; }
.wgm-tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.wgm-tile-country:hover .wgm-tile-photo img { transform: scale(1.04); }
.wgm-tile-country::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .65)); }
.wgm-tile-labeled { aspect-ratio: 1 / 1; }
.wgm-tile-labeled::after { content: none; }
/* Labelled tile as a card like the old shop's category page: image, then name (light), price (bold), round buy button - centred */
.wgm-card { text-align: center; }
.wgm-card-name { display: block; margin: 14px 0 2px; font-size: 1.05rem; font-weight: 300; color: #3a3a3a; text-decoration: none; line-height: 1.35; }
.wgm-card-name:hover, .wgm-card-name:focus-visible { color: var(--wgm-navy); text-decoration: underline; }
.wgm-card-price { margin: 0 0 12px; font-weight: 700; font-size: .95rem; color: #3a3a3a; }
.wgm-buy.wgm-card-buy { display: inline-block; width: auto; padding: 9px 22px; border-radius: 30px; font-size: 1rem; font-weight: 700; color: #565656; line-height: 1.5; }
.wgm-buy.wgm-card-buy:hover, .wgm-buy.wgm-card-buy:focus-visible { color: #1a1a1a; }
.wgm-tile-country .wgm-flag { position: absolute; top: 12px; right: 12px; width: 56px; height: auto; z-index: 1; border: 1px solid #fff; border-radius: 2px; box-shadow: none; }
.wgm-tile-text { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; }
.wgm-tile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wgm-tile-price { font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.wgm-tile-name { display: block; font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgm-tile-sub { display: block; font-size: .85rem; font-weight: 600; opacity: .9; }

.wgm-tile-continent { position: relative; display: block; height: 220px; border-radius: 10px; overflow: hidden; background: var(--wgm-navy); color: #fff; text-decoration: none; }
.wgm-tile-continent img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wgm-tile-continent:hover img { transform: scale(1.04); }
.wgm-tile-continent::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 60%); }
.wgm-tile-continent-text { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.wgm-tile-continent-title { display: block; font-size: 1.4rem; font-weight: 700; }
.wgm-tile-continent-count { display: block; font-size: .9rem; opacity: .9; }
.wgm-continent-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Continent page */
.wgm-continent-hero { position: relative; border-radius: 10px; overflow: hidden; min-height: 220px; background: var(--wgm-navy); color: #fff; display: flex; align-items: flex-end; }
.wgm-continent-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wgm-continent-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 70%); }
.wgm-continent-hero h1 { position: relative; z-index: 1; margin: 0; padding: 20px; color: #fff; }
.wgm-continent-intro { margin: 20px 0; font-size: 1.05rem; }
.wgm-continent-usage { margin: 0 0 8px; color: #444; }
.wgm-continent-map { margin: 24px 0; }

/* Blocks */
.wgm-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: var(--wgm-navy); color: #fff; padding: 14px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.wgm-banner:hover { color: #fff; filter: brightness(1.1); }
.wgm-banner-version { background: var(--wgm-orange); color: #1a1a1a; border-radius: 4px; padding: 2px 8px; font-weight: 800; }
.wgm-carousel { position: relative; }
.wgm-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; scrollbar-width: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.wgm-carousel-track > * { scroll-snap-align: start; }
.wgm-carousel-track::-webkit-scrollbar { display: none; }
.wgm-carousel .wgm-tile-name { font-size: 1.1rem; }
.wgm-carousel .wgm-tile-price { font-size: 1.05rem; }
.wgm-carousel .wgm-tile-country .wgm-flag { width: 48px; }
.wgm-carousel-nav button { position: absolute; top: calc(50% - 32px); z-index: 2; width: 40px; height: 64px; border: 0; border-radius: 6px; background: rgba(44, 48, 102, .85); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background .15s; }
.wgm-carousel-nav button:hover, .wgm-carousel-nav button:focus-visible { background: var(--wgm-orange); color: #1a1a1a; }
.wgm-carousel-nav button[data-wgm-dir="-1"] { left: 6px; }
.wgm-carousel-nav button[data-wgm-dir="1"] { right: 6px; }
.wgm-carousel-nav button[hidden] { display: none; }
.wgm-news-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .wgm-news-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wgm-news-list { grid-template-columns: 1fr; } }
.wgm-news-item { border: 1px solid var(--wgm-line); border-radius: 8px; overflow: hidden; background: #fff; }
.wgm-news-thumb { display: block; aspect-ratio: 16 / 9; background: var(--wgm-soft); }
.wgm-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wgm-news-body { padding: 14px 16px 16px; }
.wgm-news-item h3 { font-size: 1.1rem; line-height: 1.3; margin: 4px 0 8px; }
.wgm-news-item h3 a { color: var(--wgm-navy); text-decoration: none; }
.wgm-news-item h3 a:hover { text-decoration: underline; }
.wgm-news-item p { font-size: .9rem; margin: 0; color: #444; }
.wgm-news-item time { font-size: .85rem; color: #666; }
.wgm-credits { font-size: .9rem; }
.wgm.wgm-block { padding: 0; max-width: none; margin-top: 2rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .wgm-carousel-track { grid-auto-columns: calc((100% - 16px) / 2); } }
/* News archive (Neve): same image format for every post */
.category-news .nv-post-thumbnail-wrap img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
/* "TOPO" highlighted like in the title images: bright orange on dark, darker orange on white */
.wgm-topo { color: #ffb23d; }
.wgm-buybox .wgm-topo, .wgm-breadcrumb .wgm-topo, .wgm-contents .wgm-topo { color: #b86e00; }

/* Startseite: Logoreihe (Garmin, Apple, Android, Windows, QuoVadis) mittig */
.wp-block-columns.wgm-logos { justify-content: center; }

/* Service & Support: the three installation guides as cards */
.wp-block-columns.wgm-guides { gap: 20px; }
.wgm-guides .wp-block-column { display: flex; }
.wgm-guide { flex: 1; display: flex; flex-direction: column; padding: 20px 22px; border: 1px solid #dde1ea; border-top: 4px solid var(--wgm-navy); border-radius: 10px; background: #fff; }
.wgm-guide h3 { margin-top: 0; font-size: 1.2rem; }
.wgm-guide-file { font-size: .9em; color: #555; }
.wgm-guide-link { margin-top: auto; margin-bottom: 0; font-weight: 600; }
.wgm-guide-link a { text-decoration: none; }

/* Installation guides: numbered steps overview and screenshot placeholders (until the screenshots arrive) */
.wgm-guide-steps { display: grid; grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 40px; }
.wgm-shot-todo { margin: 16px 0 24px; padding: 40px 20px; border: 2px dashed #b8bccb; border-radius: 10px; background: var(--wgm-soft); color: #555; text-align: center; font-size: .95em; }
.wgm-shot-todo p { margin: 0; }
/* Screenshots in the installation guides */
.wp-block-image.wgm-shot { margin: 16px 0 28px; }
.wgm-shot img { max-width: 100%; height: auto; border: 1px solid var(--wgm-line); border-radius: 6px; box-shadow: 0 2px 10px rgba(44, 48, 102, .10); }
.wgm-shot figcaption { margin-top: 8px; color: #555; font-size: .9em; text-align: left; }
@media (max-width: 700px) { .wgm-guide-steps { grid-template-rows: none; grid-auto-flow: row; } }
.wgm-guide-note { margin: 0 0 24px; padding: 16px 20px; border-left: 5px solid var(--wgm-orange); border-radius: 6px; background: #fff7e8; }
.wgm-guide-note p { margin: 0; }
