@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ============================= */
/*     GRUNDINSTÄLLNINGAR        */
/* ============================= */

:root {
    color-scheme: dark;
    --bg: #05070b;
    --bg-alt: #0b1020;
    --bg-soft: #0e1628;
    --card: rgba(12, 18, 32, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #f5f7ff;
    --text-muted: #c1c8d8;
    --accent: #5eead4;
    --accent-strong: #38bdf8;
    --accent-warm: #fbbf24;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.12), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(94, 234, 212, 0.12), transparent 40%),
        linear-gradient(180deg, #05070b 0%, #060b16 40%, #05070b 100%);
    color: var(--text);
    line-height: 1.65;
    min-height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

p {
    color: var(--text-muted);
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3 {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

main {
    display: block;
}

.page-main {
    padding: 3.5rem 0 4.5rem;
    position: relative;
}

/* About page submenu list */
.about-submenu {
    margin-top: 2.5rem;
}

.about-submenu-grid {
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.about-submenu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.3rem 1.2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(15, 23, 40, 0.95), rgba(6, 9, 16, 0.98));
    border: 1px solid var(--card-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    overflow: hidden;
}

.about-submenu-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(94, 234, 212, 0.18), transparent 55%);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.about-submenu-card::after {
    content: ">";
    position: absolute;
    right: 1.2rem;
    top: 1.1rem;
    color: var(--accent-strong);
    font-size: 1.2rem;
    transition: transform 0.18s ease;
}

.about-submenu-card > * {
    position: relative;
    z-index: 1;
}

.about-submenu-card:hover,
.about-submenu-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(94, 234, 212, 0.35);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
}

.about-submenu-card:hover::before,
.about-submenu-card:focus-visible::before {
    opacity: 1;
}

.about-submenu-card:hover::after,
.about-submenu-card:focus-visible::after {
    transform: translateX(4px);
}

.about-submenu-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.about-submenu-cta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
}

/* Improvements categories */
.improvements-page .improvements-intro {
    margin-top: 0.6rem;
    max-width: 720px;
}

.improvements-page .improvements-categories .about-submenu-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.improvements-page .improvements-categories .about-submenu-card {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    box-shadow: none;
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.9), rgba(6, 9, 16, 0.95));
}

.improvements-page .improvements-categories .about-submenu-card::after {
    content: "";
    top: 0.7rem;
    right: 0.75rem;
    font-size: 0.9rem;
}

.improvements-page .improvements-categories .improvements-count {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    min-width: 18px;
    height: 18px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(94, 234, 212, 0.18);
    border: 1px solid rgba(94, 234, 212, 0.4);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.improvements-page .improvements-categories .about-submenu-title {
    font-size: 0.88rem;
}

.improvements-page .improvements-categories .about-submenu-cta {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
}

.improvements-page .improvements-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.improvements-page .improvements-section:first-of-type {
    margin-top: 2rem;
    padding-top: 0;
    border-top: none;
}

.improvements-page .improvements-section p {
    margin-top: 0.6rem;
    max-width: 760px;
}

.improvements-page .improvements-empty {
    margin-top: 0.6rem;
    color: var(--text-muted);
}

.improvements-page .improvements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.improvements-page .improvement-card {
    background: linear-gradient(160deg, rgba(15, 23, 40, 0.95), rgba(6, 9, 16, 0.98));
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.improvements-page .improvement-body {
    padding: 1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.improvements-page .improvement-body h3 {
    font-size: 1.1rem;
}

.improvements-page .improvement-body p,
.improvements-page .improvement-body a,
.improvement-lightbox-text a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.improvements-page .improvement-body a,
.improvement-lightbox-text a {
    color: var(--accent);
    text-decoration: underline;
}

.improvements-page .improvement-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    padding: 0 1.2rem 1.2rem;
}

.improvements-page .improvement-purchase {
    padding: 0 1.2rem 1.2rem;
}

.improvement-purchase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.improvement-purchase-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin: 0;
}

.purchase-toggle {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 12, 22, 0.7);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.purchase-toggle::after {
    content: ">";
    display: inline-block;
    font-size: 0.8rem;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
}

.purchase-toggle[aria-expanded="false"]::after {
    transform: rotate(0deg);
}

.purchase-toggle:hover,
.purchase-toggle:focus-visible {
    color: var(--text);
    border-color: rgba(94, 234, 212, 0.35);
    transform: translateY(-1px);
}

.improvement-purchase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.purchase-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 11, 20, 0.72);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    color: inherit;
}

.purchase-card:hover,
.purchase-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.35);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.purchase-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(9, 14, 24, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.purchase-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.purchase-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, rgba(94, 234, 212, 0.18), rgba(56, 189, 248, 0.12));
    border-radius: 10px;
}

.purchase-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.purchase-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.purchase-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.purchase-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-warm);
}

.purchase-meta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.purchase-total {
    margin-top: 0.8rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 11, 20, 0.55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.purchase-total-value {
    font-weight: 600;
    color: var(--text);
}

.has-js .improvement-purchase.is-collapsed .improvement-purchase-grid {
    display: none;
}

@media (max-width: 640px) {
    .has-js .purchase-toggle {
        display: inline-flex;
    }

    .improvements-page .improvement-purchase {
        padding: 0 1rem 1rem;
    }

    .improvement-purchase-title {
        font-size: 0.82rem;
        letter-spacing: 0.12em;
    }

    .improvement-purchase-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .purchase-card {
        grid-template-columns: 52px 1fr;
        gap: 0.6rem;
        padding: 0.6rem 0.7rem;
        border-radius: 12px;
    }

    .purchase-thumb {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    .purchase-title {
        font-size: 0.92rem;
    }

    .purchase-note {
        font-size: 0.78rem;
    }

    .purchase-price {
        font-size: 0.72rem;
    }

    .purchase-meta {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    .purchase-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        font-size: 0.78rem;
    }

    .purchase-total-value {
        font-size: 0.95rem;
    }
}

.improvements-page .improvement-thumb {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(8, 12, 22, 0.6);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.improvements-page .improvement-thumb:hover,
.improvements-page .improvement-thumb:focus-visible {
    border-color: rgba(94, 234, 212, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.improvements-page .improvement-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #0b0f18;
    border-radius: 8px;
}

.improvements-page .improvement-thumb-caption {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.improvement-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.improvement-lightbox.open {
    display: flex;
}

.improvement-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 8, 0.8);
    backdrop-filter: blur(6px);
}

.improvement-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(920px, 92vw);
    max-height: 92vh;
    background: linear-gradient(160deg, rgba(10, 16, 28, 0.98), rgba(5, 7, 14, 0.98));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.improvement-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 12, 22, 0.8);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.improvement-lightbox-image {
    width: 100%;
    max-height: 60vh;
    background: #0b0f18;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
}

.improvement-lightbox-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.improvement-lightbox-text {
    padding: 1.2rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.improvement-lightbox-text p {
    color: var(--text-muted);
    white-space: pre-line;
}


/* ============================= */
/*          HEADER MENY          */
/* ============================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(6, 10, 20, 0.82);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    overflow: visible;
}

.header-inner {
    min-height: 76px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logga */
.logo-img {
    height: 48px;
    width: auto;
}

/* Hamburgermeny-knapp – göms i desktopläge */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
}

.nav-toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

/* Meny (desktop) */
.menu {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    align-items: center;
}

.menu li {
    position: relative;
}

.submenu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.submenu-toggle::after {
    content: "v";
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.menu > li > a {
    position: relative;
    padding: 10px 14px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    opacity: 0.95;
    transition: all 0.25s ease;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
}

/* Hover-effekt */
.menu > li > a:hover {
    color: var(--text);
    opacity: 1;
    text-shadow: 0 0 12px rgba(94, 234, 212, 0.55), 0 0 26px rgba(56, 189, 248, 0.4);
}

/* Underline-animation */
.menu > li > a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
    transition: width 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
    border-radius: 2px;
}

.menu > li > a:hover::after {
    width: 80%;
    opacity: 1;
    box-shadow: 0 0 14px rgba(94, 234, 212, 0.8), 0 0 26px rgba(56, 189, 248, 0.6);
}

/* Aktiv flik – om du lägger class="active" på någon länk */
.menu > li > a.active {
    color: var(--text);
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* Undermeny (desktop) */
.sub-menu {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 200px;
    background: rgba(8, 12, 22, 0.96);
    backdrop-filter: blur(10px);
    padding: 8px 0;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    list-style: none;
    border: 1px solid var(--card-border);
    z-index: 5000;
    animation: dropIn 0.18s ease-out;
}

.menu li:hover > .sub-menu {
    display: block;
}

.sub-menu li a {
    display: block;
    padding: 12px 18px;
    font-size: 0.92rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding-left: 22px;
}

/* Liten animering */
@keyframes dropIn {
    0%   {opacity: 0; transform: translateY(-8px);}
    100% {opacity: 1; transform: translateY(0);}
}


/* ============================= */
/*           HERO VIDEO          */
/* ============================= */

.hero {
    position: relative;
    min-height: 70vh;
    height: 88vh;
    display: flex;
    align-items: center;
    padding: clamp(5rem, 12vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
    overflow: hidden;
}

/* Videon i bakgrunden */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Överglans för att texten syns */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(3, 6, 14, 0.68) 0%, rgba(3, 6, 14, 0.35) 55%, rgba(3, 6, 14, 0.75) 100%);
    z-index: 2;
}

/* Fade som mörknar när man scrollar (styrd via JavaScript) */
.hero-fade {
    position: absolute;
    inset: 0;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.15s linear;
}

/* Texten i hjälten */
.hero-content {
    position: relative;
    z-index: 4;
    max-width: 720px;
    margin: 0 auto 0 clamp(1.5rem, 6vw, 6rem);
    padding: clamp(1.5rem, 4vw, 3rem);
    background: rgba(5, 9, 18, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-lg);
}

.hero-content h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 0.8rem;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
}


/* ============================= */
/*           KNAPPAR             */
/* ============================= */

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #50c7b4, #30a1d3);
    color: #041018;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    filter: saturate(1.05);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}


/* ============================= */
/*         SEKTIONSLAYOUT        */
/* ============================= */

.section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    position: relative;
}

.section-dark {
    background: linear-gradient(180deg, rgba(11, 16, 32, 0.95) 0%, rgba(7, 10, 18, 0.98) 100%);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

/* Rubriker */
h2 {
    margin-bottom: 1rem;
    color: var(--text);
}


/* ============================= */
/*       YOUTUBE VIDEO GRID      */
/* ============================= */

.video-grid {
    display: grid;
    gap: 1.8rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #05070b;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* --- SUBSCRIBE BUTTON MED RIKTIG YOUTUBE-IKON --- */

.subscribe-container {
    text-align: center;
    margin: 40px 0 30px 0;
    width: 100%;
}

.subscribe-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ff0000;
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: 0.2s ease;
}

.subscribe-button:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.3);
}

.subscribe-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
/* --- youtube logga överst på youtubesidan --- */
.yt-icon {
    width: 26px;
    height: 26px;
    fill: white;
}

.yt-full-logo {
    display: flex;
    align-items: center;
    justify-content: center; /* centrerad rubrik */
    margin: 20px 0;
}

.yt-logo-full {
    fill: #ffffff; /* gör YouTube-texten vit */
    width: 200px;   /* justera storlek här */
    height: auto;
}
/* ---- Google Maps karta---- */

.map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
    background: rgba(5, 7, 11, 0.6);
    aspect-ratio: 16 / 9;
    min-height: 240px;
}

.map-container::before {
    content: none;
}

.map-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-fallback {
    display: none;
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-fallback a {
    color: var(--accent);
    text-decoration: underline;
}

@supports not (aspect-ratio: 16 / 9) {
    .map-container::before {
        content: "";
        display: block;
        padding-bottom: 56.25%;
    }
}

@media (max-width: 768px) {
    .map-container {
        aspect-ratio: 4 / 3;
        min-height: 220px;
    }
}

.map-container--leaflet {
    aspect-ratio: auto;
    min-height: 0;
    padding: 0;
}

.leaflet-map {
    width: 100%;
    height: clamp(320px, 55vw, 520px);
}

.route-animator-map {
    aspect-ratio: var(--route-map-aspect, 16 / 9);
    width: var(--route-map-width, 100%);
    height: var(--route-map-height, auto);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.route-animator-map .leaflet-map {
    height: 100%;
    min-height: 300px;
}

.leaflet-control-attribution {
    display: none;
}

.voyage-map-block {
    margin-top: 1.5rem;
}

.map-status {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-status.is-hidden {
    display: none;
}

.map-fallback-inline {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-fallback-inline a {
    color: var(--accent);
    text-decoration: underline;
}

.map-distance-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10, 15, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

.map-anim-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.map-anim-controls[hidden] {
    display: none !important;
}

.map-anim-btn {
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 15, 25, 0.6);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, background 0.12s ease;
    pointer-events: auto;
    opacity: 0.65;
}

@media (max-width: 640px) {
    .map-anim-btn {
        width: 60px;
        height: 60px;
        opacity: 0.75;
    }
    .map-anim-btn svg {
        width: 24px;
        height: 24px;
    }
}

.map-anim-btn svg {
    width: 28px;
    height: 28px;
}

.map-anim-btn[hidden] {
    display: none !important;
}

.map-anim-btn:hover {
    transform: translateY(-1px);
    background: rgba(15, 20, 32, 0.78);
    opacity: 0.9;
}

.map-anim-btn:active {
    transform: translateY(0);
}

.map-anim-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.map-anim-btn--replay {
    opacity: 0.75;
}

.map-anim-icon {
    width: 28px;
    height: 28px;
    display: block;
    color: #f8fafc;
}

.map-country-strip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10, 15, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    pointer-events: none;
    backdrop-filter: blur(6px);
    max-width: calc(100% - 24px);
}

.map-country-flags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.map-country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 600;
}

.map-country-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-country-flag.map-country-flag-text {
    width: auto;
    height: auto;
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}

.map-country-count {
    font-size: 0.72rem;
    opacity: 0.85;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .map-distance-overlay {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

@media (max-width: 768px) {
    .map-country-strip {
        bottom: 10px;
        left: 10px;
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

@media (max-width: 768px) {
    .leaflet-map {
        height: 360px;
    }
}


/* ============================= */
/*            SHOP               */
/* ============================= */

.shop-page .shop-header {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.shop-page .shop-title {
    margin-bottom: 0.4rem;
}

.shop-page .shop-intro {
    opacity: 0.9;
    font-size: 0.98rem;
}

.shop-page .shop-note {
    font-size: 0.85rem;
    opacity: 0.8;
    text-align: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    max-width: 620px;
    margin: 0.5rem auto 0;
}

/* Produktgrid */

.shop-page .shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.shop-page .shop-card {
    background: linear-gradient(160deg, rgba(15, 23, 40, 0.95), rgba(6, 9, 16, 0.98));
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shop-page .shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.25);
}

/* Bild och badge */

.shop-page .shop-image-wrap {
    position: relative;
    width: 100%;
    max-height: 230px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0b0f18;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    box-sizing: border-box;
}

.shop-page .shop-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}

.shop-page .shop-card:hover .shop-image-wrap img {
    transform: none;
}

.shop-page .shop-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(220, 40, 40, 0.9);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.shop-page .shop-badge.shop-badge-muted {
    background: rgba(180, 180, 180, 0.85);
}

/* Innehåll i kortet */

.shop-page .shop-content {
    padding: 1.3rem 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.shop-page .shop-content h2 {
    font-size: 1.12rem;
    margin: 0;
}

.shop-page .shop-meta {
    font-size: 0.82rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.shop-page .shop-description {
    font-size: 0.92rem;
    opacity: 0.95;
    margin-top: 0.15rem;
}

.shop-page .shop-price {
    font-weight: 600;
    font-size: 1.02rem;
    margin-top: 0.7rem;
}

.shop-page .shop-price-note {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 0.35rem;
}

/* Köpknapp */

.shop-page .shop-btn {
    margin-top: 0.9rem;
    align-self: flex-start;
    padding: 0.65rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #a7f3d0);
    color: #041018;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.65);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.shop-page .shop-btn-icon {
    font-size: 1.1rem;
}

.shop-page .shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.85);
    background: linear-gradient(135deg, #99f6e4, #7dd3fc);
}

.shop-page .shop-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.7);
}

/* Responsiv shop-header */

@media (min-width: 768px) {
    .shop-page .shop-header {
        margin-top: 3rem;
    }

    .shop-page .shop-title {
        font-size: 2.2rem;
    }
}

/* ============================= */
/*        SHOP – ORDERMODAL      */
/* ============================= */

.order-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.order-modal.open {
    display: flex;
}

.order-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.order-modal-dialog {
    position: relative;
    z-index: 10001;
    max-width: 480px;
    width: 90%;
    background: rgba(8, 12, 22, 0.98);
    border-radius: 18px;
    padding: 1.8rem 1.6rem 1.6rem;
    box-shadow: 0 24px 60px rgba(0,0,0,0.9);
    border: 1px solid var(--card-border);
}

.order-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.order-modal h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.order-modal-text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1.1rem;
}

.order-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.9rem;
}

.order-form-row label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.order-form-row input,
.order-form-row textarea {
    background: rgba(8, 12, 22, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 0.7rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}

.order-form-row input:focus,
.order-form-row textarea:focus {
    outline: none;
    border-color: rgba(94, 234, 212, 0.5);
    box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2);
}

.order-form-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: flex-end;
    margin-top: 0.6rem;
}

.order-submit-btn {
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041018;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.7);
}

.order-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.85);
}

.order-cancel-btn {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.order-cancel-btn:hover {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 600px) {
    .order-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .order-submit-btn,
    .order-cancel-btn {
        width: 100%;
        text-align: center;
    }
}


/* ============================= */
/*             BLOGG             */
/* ============================= */

.blog-main {
    background: transparent;
}

.blog-filters {
    margin-bottom: 2rem;
    padding: 1.6rem 1.8rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(10, 16, 30, 0.92), rgba(7, 10, 18, 0.98));
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}

.blog-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}

.blog-filters-header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.4rem;
}

.blog-filters-header p {
    margin: 0;
    color: var(--text-muted);
}

.blog-filters-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.filter-toggle {
    display: none;
    border: 1px solid var(--card-border);
    background: rgba(6, 10, 20, 0.7);
    color: var(--text);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-toggle:hover {
    border-color: rgba(94, 234, 212, 0.4);
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.18);
}

.filter-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-filter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(6, 10, 20, 0.85);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 0.95rem;
}

.filter-input::placeholder {
    color: rgba(193, 200, 216, 0.65);
}

.filter-input:focus,
.filter-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.blog-filter-tags {
    margin-top: 1.3rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.filter-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.filter-tag {
    border: 1px solid var(--card-border);
    background: rgba(6, 10, 20, 0.7);
    color: var(--text);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-tag:hover {
    border-color: rgba(94, 234, 212, 0.4);
}

.filter-tag.is-active {
    background: rgba(94, 234, 212, 0.12);
    border-color: rgba(94, 234, 212, 0.45);
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.25);
}

.filter-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-post {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
}

.blog-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.blog-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0;
}

.blog-media-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: rgba(6, 10, 20, 0.75);
    color: var(--accent);
}

.blog-media-badge.is-video {
    color: var(--accent-strong);
}

.blog-media-badge svg {
    width: 18px;
    height: 18px;
    display: block;
}

.blog-media-badge svg rect,
.blog-media-badge svg circle,
.blog-media-badge svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.blog-media-badge svg polygon {
    fill: currentColor;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-intro {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.blog-image {
    margin: 1rem 0;
    text-align: center;
}

.blog-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.blog-content p {
    margin-bottom: 0.8rem;
    font-size: 0.98rem;
    color: var(--text-muted);
}

/* Video-inlägg integrerar med befintlig .video-wrapper-stil */
.blog-video {
    margin-top: 1rem;
}
/* ============================= */
/*   BLOGG EXTRA – TAGGAR & KNAPPAR  */
/* ============================= */

.blog-tags {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.post-details {
    margin-top: 1rem;
}

.blog-comments-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.blog-comments {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--card-border);
}

.blog-comments-title {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.blog-comments-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comment-actions {
    margin: 0.7rem 0 0.4rem;
}

.comment-toggle-btn {
    font-size: 0.78rem;
    padding: 0.4rem 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.comment-item {
    background: rgba(6, 10, 20, 0.55);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.comment-text {
    font-size: 0.95rem;
    color: var(--text);
}

.comment-replies {
    margin-top: 0.65rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.5rem;
}

.comment-reply {
    background: rgba(10, 14, 24, 0.6);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-reply-meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.comment-reply-text {
    font-size: 0.9rem;
    color: var(--text);
}

.comment-form {
    display: grid;
    gap: 0.65rem;
}

.comment-form-wrap {
    margin-top: 0.7rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px dashed var(--card-border);
    background: rgba(6, 10, 20, 0.4);
}

.comment-form-wrap[hidden] {
    display: none;
}

.comment-form-row label,
.newsletter-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.comment-textarea {
    min-height: 95px;
    resize: vertical;
}

.comment-alert {
    margin: 0.8rem 0;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid;
}

.comment-alert.is-success {
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.08);
}

.comment-alert.is-error {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
    background: rgba(248, 113, 113, 0.08);
}

@media (max-width: 720px) {
    .comment-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .comment-form-wrap {
        padding: 0.7rem;
    }

    .comment-textarea {
        min-height: 80px;
    }
}

.newsletter-card {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 1.2rem;
}

.newsletter-header h2 {
    margin: 0 0 0.4rem 0;
}

.newsletter-header p {
    margin: 0;
    color: var(--text-muted);
}

.newsletter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}

.newsletter-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
}

.newsletter-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.post-hide-wrapper {
    margin-top: 1rem;
    text-align: right;
}

.btn-secondary {
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.15s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
}

/* =========================================================
   BÅTSIDAN (boat.php)
   All styling är scoped via .boat-page och påverkar
   endast denna sida.
   ========================================================= */

/* Wrapper runt layouten */
.boat-page .boat-layout {
    display: flex;              /* Gör bild + text horisontell */
    align-items: flex-start;    /* Justerar topplinjen */
    gap: 2rem;                  /* Avstånd mellan bild och text */
    margin-top: 2rem;           /* Luft ovanför sektionen */
    flex-wrap: wrap;            /* Gör den responsiv */
}

/* Bild-kolumnen (vänster) */
.boat-page .boat-image {
    flex: 0 0 320px;            /* Fixerad bredd, kan justeras 280-400px */
}

.boat-page .boat-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Text-kolumnen (höger) */
.boat-page .boat-text {
    flex: 1 1 300px;            /* Tar återstående utrymme */
}

.boat-page .boat-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.boat-page .boat-text ul {
    padding-left: 1.2rem;       /* Gör listan snyggare */
    margin: 0;
}

.boat-page .boat-text li {
    margin-bottom: 0.4rem;
}

/* Responsiv layout (mobil): stapla vertikalt */
@media (max-width: 768px) {
    .boat-page .boat-layout {
        flex-direction: column; /* Bild överst, text under */
    }

    .boat-page .boat-image,
    .boat-page .boat-text {
        flex: 1 1 auto;
    }
}

/* =========================================================
   BÅTSIDAN (boat.php)
   Layout: bild vänster, text/punktlista höger
   + videosektion som fadar in vid scroll
   ========================================================= */

/* Layout runt bild + text */
.boat-page .boat-layout {
    display: flex;              /* Bild + text horisontellt */
    align-items: flex-start;
    gap: 2rem;                  /* Avstånd mellan bild och text */
    margin-top: 2rem;
    flex-wrap: wrap;            /* Responsivt, bryter på smala skärmar */
}

/* Bild-kolumnen (vänster) */
.boat-page .boat-image {
    flex: 0 0 320px;            /* Fast ungefärlig bredd, justera vid behov */
}

.boat-page .boat-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Text-kolumnen (höger) */
.boat-page .boat-text {
    flex: 1 1 300px;            /* Tar upp resterande utrymme */
}

.boat-page .boat-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.boat-page .boat-text ul {
    padding-left: 1.2rem;
    margin: 0;
}

.boat-page .boat-text li {
    margin-bottom: 0.4rem;
}

/* Mobil: stapla vertikalt */
@media (max-width: 768px) {
    .boat-page .boat-layout {
        flex-direction: column;
    }

    .boat-page .boat-image,
    .boat-page .boat-text {
        flex: 1 1 auto;
    }
}

/* =========================================================
   BÅTSIDAN – Videosektion med scroll-fade
   ========================================================= */

.boat-page .boat-video-section {
    position: relative;
    min-height: 60vh;
    overflow: hidden;
    background: #000;           /* Börjar svart */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;

    /* Start: helt dold */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.3s linear, transform 0.3s linear;
}

/* Videon som bakgrund */
.boat-page .boat-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    z-index: 0;
}

/* Mörk overlay som vi också kan fasa ut */
.boat-page .boat-video-overlay {
    position: absolute;
    inset: 0;
    background: #000;           /* Start helt svart */
    opacity: 1;
    z-index: 1;
    transition: opacity 0.3s linear;
}

/* Innehållet ovanpå videon */
.boat-page .boat-video-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    text-align: center;
}

.boat-page .boat-video-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.boat-page .boat-video-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .boat-page .boat-video-section {
        min-height: 50vh;
        padding: 2.5rem 1.5rem;
    }

    .boat-page .boat-video-content h2 {
        font-size: 1.6rem;
    }
}

/* ===== Layout för besättningskorten ===== */

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Själva korten */
.crew-card {
    background: #f8f9fb;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    overflow: hidden;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(12, 18, 32, 0.08);
}

.crew-card:hover,
.crew-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

/* Medialayout */
.crew-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.crew-media img,
.crew-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crew-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.crew-image {
    position: absolute;
    inset: 0;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.crew-card:hover .crew-video,
.crew-card:focus-visible .crew-video {
    opacity: 1;
}

.crew-card:hover .crew-image,
.crew-card:focus-visible .crew-image {
    opacity: 0;
}

@media (hover: none), (pointer: coarse) {
    .crew-video {
        opacity: 0;
    }

    .crew-image {
        opacity: 1;
    }

    .crew-card:hover .crew-video,
    .crew-card:focus-visible .crew-video {
        opacity: 0;
    }

    .crew-card:hover .crew-image,
    .crew-card:focus-visible .crew-image {
        opacity: 1;
    }
}

/* Texten */
.crew-info {
    padding: 1.2rem 1.3rem 1.4rem;
    text-align: left;
}

.crew-info h2 {
    margin: 0 0 0.4rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
}

.crew-info p {
    margin: 0 0 0.8rem;
    font-size: 1rem;
    color: #444;
}

.crew-info ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: #444;
}

.crew-info li + li {
    margin-top: 0.2rem;
}

.crew-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.9rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(12, 18, 32, 0.2);
    background: #fff;
    color: #0c1220;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.crew-card-cta:hover,
.crew-card-cta:focus-visible {
    background: #0c1220;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Responsivitet ===== */

/* Mobil: 1 kort per rad */
@media (max-width: 600px) {
    .crew-grid {
        grid-template-columns: 1fr;
    }

    .crew-card {
        max-width: 100%;
    }
}

/* Surfplatta: två större kort */
@media (min-width: 600px) and (max-width: 1000px) {
    .crew-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Full-screen crew card view ===== */

.crew-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.crew-modal.is-visible {
    display: block;
}

.crew-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.crew-modal-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    background: #f8f9fb;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.crew-modal-card {
    display: grid;
    grid-template-columns: minmax(320px, 45%) 1fr;
    height: 100%;
}

.crew-modal-media {
    position: relative;
    background: #0c1220;
    min-height: 300px;
}

.crew-modal-image,
.crew-modal-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crew-modal-media.is-playing .crew-modal-image {
    opacity: 0;
}

.crew-modal-info {
    padding: 2.5rem 3rem;
    overflow-y: auto;
}

.crew-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.crew-modal-close:hover {
    opacity: 0.8;
}

#crew-modal-title {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 2rem;
    color: #111;
}

.crew-modal-subtitle {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #555;
}

.crew-modal-text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}

.crew-modal-extra {
    margin-top: 1.4rem;
}

.crew-modal-extra-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

@media (max-width: 900px) {
    .crew-modal-card {
        grid-template-columns: 1fr;
        grid-template-rows: 45vh 1fr;
    }

    .crew-modal-info {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    #crew-modal-title {
        font-size: 1.6rem;
    }

    .crew-modal-info {
        padding: 1.6rem;
    }
}

/* === Celestial calculator === */

.celestial-calculator {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.celestial-calculator h2 {
  margin-bottom: 0.5rem;
}

.celestial-calculator form {
  background: var(--card);
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.celestial-calculator .field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.celestial-calculator label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.celestial-calculator input,
.celestial-calculator select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid var(--card-border);
  font-size: 0.9rem;
  background: rgba(6, 10, 20, 0.85);
  color: var(--text);
}

.celestial-calculator input:focus,
.celestial-calculator select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25);
}

.celestial-calculator .full {
  grid-column: 1 / -1;
}

.celestial-calculator button {
  grid-column: 1 / -1;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041018;
  cursor: pointer;
  margin-top: 0.25rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.celestial-calculator button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  filter: saturate(1.05);
}

.celestial-results {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 3rem;
}

.celestial-results pre {
  background: #0b1425;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  font-size: 0.85rem;
}

.celestial-calculator .note {
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* Lat/Lon inmatning (grader + minuter + N/S/E/W) */

.celestial-calculator .latlon-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.celestial-calculator .latlon-deg,
.celestial-calculator .latlon-min {
  width: 5rem;
}

.celestial-calculator .latlon-hemi {
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid var(--card-border);
  background: rgba(6, 10, 20, 0.85);
  color: var(--text);
  font-size: 0.9rem;
}

.celestial-calculator .latlon-suffix {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.celestial-results,
.celestial-results h3,
.celestial-results p,
.celestial-results ul,
.celestial-results li,
#output {
    color: var(--text-muted);
}
 
.celestial-results h3 {
    color: var(--text);
}

/* === Download button styling for celestial resultat === */
.download-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.6rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;

    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041018;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: all 0.25s ease;
}

.download-btn:hover {
    filter: saturate(1.05);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    transform: translateY(-2px);
}

.download-btn:active {
    transform: translateY(0px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
/* === Mobile-friendly tweaks for the celestial calculator === */

/* Grund: se till att kalkylatorn inte går kant-i-kant på små skärmar */
.page-main .container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Lite större klickytor generellt i kalkylatorn */
.celestial-calculator input,
.celestial-calculator select,
.celestial-calculator button {
  font-size: 1rem;
}

/* Resultat-rutan: lite luft på små skärmar */
.celestial-results {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

/* ===== BREAKPOINT: små mobiler ===== */
@media (max-width: 640px) {

  .celestial-calculator {
    margin-top: 1.5rem;
  }

  .celestial-calculator form {
    grid-template-columns: 1fr;   /* tvinga en kolumn på små skärmar */
    padding: 1rem 0.9rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  }

  .celestial-calculator .field {
    margin-bottom: 0.25rem;
  }

  .celestial-calculator h2 {
    font-size: 1.3rem;
  }

  .celestial-calculator label {
    font-size: 0.95rem;
  }

  .celestial-calculator .note {
    font-size: 0.8rem;
  }

  /* Gör knapparna fullbredd och lite större */
  .celestial-calculator button,
  .celestial-results .download-btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
  }

  /* Lat/Lon-raderna: snygg stapling på mobil */
  .celestial-calculator .latlon-row {
    flex-wrap: wrap;
    gap: 0.4rem 0.4rem;
  }

  .celestial-calculator .latlon-deg,
  .celestial-calculator .latlon-min {
    flex: 1 1 40%;
    max-width: none;
  }

  .celestial-calculator .latlon-hemi {
    flex: 0 0 auto;
  }

  .celestial-results pre {
    font-size: 0.8rem;
    padding: 0.8rem;
    white-space: pre-wrap; /* så man slipper vågrät scroll på mobil */
    word-break: break-word;
  }
}
@media (max-width: 640px) {
  .page-main .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .celestial-calculator h1,
  .celestial-calculator h2,
  .page-main h1 {
    font-size: 1.4rem;
  }

  .celestial-calculator form {
    grid-template-columns: 1fr;
    padding: 1.1rem 1rem;
    row-gap: 0.9rem;
  }

  .celestial-calculator label {
    font-size: 1rem;
  }

  .celestial-calculator input,
  .celestial-calculator select {
    font-size: 1rem;
    padding: 0.7rem 0.7rem;
  }

  .celestial-calculator .note {
    font-size: 0.85rem;
  }

  .celestial-calculator button,
  .celestial-results .download-btn {
    width: 100%;
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
  }

  .celestial-results {
    padding: 1.1rem 1rem;
  }

  .celestial-results pre {
    font-size: 0.9rem;
    padding: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
  }
}
/* ===== Celestial Header Styling ===== */
.celestial-header {
  margin: 2rem 0 2.5rem;
  padding: 2rem 1.8rem;
  background: linear-gradient(160deg, rgba(15, 23, 40, 0.95), rgba(6, 9, 16, 0.98));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.celestial-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.celestial-header p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 800px;
}

.celestial-info {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(8, 12, 22, 0.75);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.info-btn:hover,
.info-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

/* ===== Useful Resources Section ===== */
.celestial-links {
  margin-top: 2rem;
}

.celestial-links h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ===== Resource Dropdown ===== */
.resource-dropdown {
  margin-top: 1rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(7, 11, 20, 0.7);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 0.6rem 0.8rem;
}

.resource-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.4rem 0.2rem;
}

.resource-dropdown summary::-webkit-details-marker {
  display: none;
}

.resource-dropdown summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--accent-strong);
  transition: transform 0.2s ease;
}

.resource-dropdown[open] summary::after {
  content: "-";
}

.resource-dropdown__list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.resource-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.resource-link:hover,
.resource-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

/* ===== Route Animator ===== */
.route-animator .route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.route-builder-note {
  color: var(--text-muted);
}

.route-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(7, 11, 20, 0.75);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.6rem;
}

.route-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.route-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.route-advanced {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.route-toolbar .route-advanced {
  margin-top: 0;
}

.route-advanced__content {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.route-toolbar__group--advanced {
  width: 100%;
}

.route-waypoint-list {
  margin-top: 0.8rem;
}

.route-waypoint-list__item {
  font-size: 0.85rem;
  line-height: 1.4;
  align-items: flex-start;
  overflow-wrap: anywhere;
}

.route-waypoint-marker {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #38bdf8;
  border: 2px solid #38bdf8;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px rgba(5, 7, 11, 0.55);
  cursor: grab;
}

.route-waypoint-marker:active {
  cursor: grabbing;
}

.route-line-popup__text {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #0f172a;
}

.route-line-popup__btn {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  color: #041018;
  cursor: pointer;
}

.route-stop-popup {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 180px;
  font-size: 0.82rem;
  color: #0f172a;
}

.route-stop-popup__title {
  font-weight: 600;
  color: #0f172a;
}

.route-stop-popup__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.route-stop-popup__row input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
}

.route-stop-popup__section-title {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}

.route-stop-popup__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.route-stop-popup__icon-btn {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.route-stop-popup__icon-btn.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.6);
}

.route-stop-popup__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.route-stop-popup__icon svg {
  width: 13px;
  height: 13px;
}

.route-stop-popup__actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.route-stop-popup__btn {
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  color: #041018;
}

.route-stop-popup__btn--ghost {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.route-stop-popup__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.route-waypoint-label.leaflet-tooltip {
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid rgba(248, 250, 252, 0.2);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: #f8fafc;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.55);
  pointer-events: none;
  animation: routeWaypointLabelIn 0.32s ease-out both;
}

.route-waypoint-label.leaflet-tooltip::before {
  border-top-color: rgba(8, 12, 20, 0.86);
}

.route-waypoint-label__content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.route-waypoint-label__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.16);
  border: 1px solid rgba(248, 250, 252, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
}

.route-waypoint-label__icon svg {
  width: 18px;
  height: 18px;
}

.route-waypoint-label__text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-waypoint-center-label {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 520;
}

.route-waypoint-center-label.is-visible {
  opacity: 1;
}

.route-waypoint-center-label__inner {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(10px) scale(0.98);
  transition: transform 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  max-width: min(92vw, 560px);
  white-space: nowrap;
}

.route-waypoint-center-label.is-visible .route-waypoint-center-label__inner {
  transform: translate(-50%, -50%) translateY(0) scale(1);
}

.route-waypoint-center-label__icon {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 12px rgba(2, 6, 23, 0.6));
}

.route-waypoint-center-label__icon svg {
  width: 24px;
  height: 24px;
}

.route-waypoint-center-label__text {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 10px 20px rgba(2, 6, 23, 0.7);
}

@media (max-width: 640px) {
  .route-waypoint-center-label__inner {
    gap: 0.6rem;
  }

  .route-waypoint-center-label__icon {
    width: 32px;
    height: 32px;
  }

  .route-waypoint-center-label__icon svg {
    width: 18px;
    height: 18px;
  }

  .route-waypoint-center-label__text {
    font-size: 1.2rem;
  }
}

@keyframes routeWaypointLabelIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.route-boat-marker-bob {
  width: 100%;
  height: 100%;
  transform-origin: 50% 60%;
  animation: routeBoatBob var(--route-bob-duration, 3.2s) linear infinite;
  will-change: transform;
}

.route-boat-marker-pause {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--pause-bar-gap, 4px);
  pointer-events: none;
  z-index: 2;
}

.route-boat-marker-pause span {
  width: var(--pause-bar-width, 3px);
  height: var(--pause-bar-height, 14px);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

@keyframes routeBoatBob {
  0% {
    transform: translateY(calc(var(--route-bob-translate, 4px) * -1)) rotate(calc(var(--route-bob-pitch, 6deg) * -1));
    animation-timing-function: ease-in-out;
  }
  50% {
    transform: translateY(var(--route-bob-translate, 4px)) rotate(var(--route-bob-pitch, 6deg));
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: translateY(calc(var(--route-bob-translate, 4px) * -1)) rotate(calc(var(--route-bob-pitch, 6deg) * -1));
  }
}

.route-tool {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 25, 0.75);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-tool svg {
  width: 18px;
  height: 18px;
}

.route-tool:hover,
.route-tool:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(94, 234, 212, 0.35);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.route-tool:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.route-tool--primary {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041018;
}

.route-tool--toggle {
    width: auto;
    padding: 0 0.6rem;
    gap: 0.25rem;
}

.route-tool--toggle .route-toggle-icon {
    width: 16px;
    height: 16px;
    opacity: 0.45;
    transition: opacity 0.15s ease;
}

.route-tool--toggle .route-toggle-icon--play {
    opacity: 1;
}

.route-tool--toggle.is-playing .route-toggle-icon--play {
    opacity: 0.45;
}

.route-tool--toggle.is-playing .route-toggle-icon--pause {
    opacity: 1;
}

.route-toggle-slash {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.6;
}

.route-tool--input {
    width: auto;
    padding: 0 0.5rem;
}

.route-tool--input input,
.route-tool--input select {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 70px;
}

.route-tool--input input:not([type="range"]) {
  width: 60px;
  text-align: center;
}

.route-tool--slider {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.route-tool--slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
}

.route-tool__value {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 72px;
  text-align: right;
}

.route-tool--input select {
  appearance: none;
  min-width: 110px;
  padding-right: 0.4rem;
}

.route-tool--select {
  gap: 0.45rem;
}

.route-slider {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.route-slider input[type="range"] {
  flex: 1;
  min-width: 0;
}

.route-slider__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.85;
  flex-shrink: 0;
}

.route-slider__icon svg {
  width: 18px;
  height: 18px;
}

.route-select {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.route-select summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.route-select summary::-webkit-details-marker {
  display: none;
}

.route-select summary::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.route-select[open] summary {
  color: var(--accent);
}

.route-select[open] summary::after {
  transform: rotate(180deg);
  color: var(--accent);
}

.route-select__text {
  white-space: nowrap;
}

.route-select__preview {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.route-select__preview--format {
  border-radius: 6px;
  background: rgba(15, 23, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.25);
}

.route-select__preview--format[data-preview="portrait"] {
  width: 16px;
  height: 22px;
}

.route-select__preview--format[data-preview="landscape"] {
  width: 24px;
  height: 16px;
}

.route-select__preview--icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background-color: rgba(10, 15, 26, 0.65);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.route-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  padding: 0.45rem;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 0.35rem;
  z-index: 1006;
}

.route-select__option {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  background: rgba(10, 15, 26, 0.85);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-select__option:hover,
.route-select__option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.route-select__option.is-selected {
  border-color: rgba(94, 234, 212, 0.65);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.25);
}

.route-select-native {
  display: none;
}

.route-tool--file {
  position: relative;
}

.route-tool--file input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.route-download {
  position: relative;
  display: inline-flex;
}

.route-download summary {
  list-style: none;
}

.route-download summary::-webkit-details-marker {
  display: none;
}

.route-download__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 0.45rem;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 0.35rem;
  z-index: 1005;
}

.route-download__item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  background: rgba(10, 15, 26, 0.85);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-download__item:hover,
.route-download__item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.route-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.route-btn {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 25, 0.7);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-btn:hover,
.route-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.route-btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041018;
}

.route-status-bar {
  display: grid;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.55);
  margin-bottom: 0.8rem;
}

.route-status-text {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.route-progress {
  display: grid;
  gap: 0.3rem;
}

.route-progress__track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.route-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.15s ease;
}

.route-progress__text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.route-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.route-share {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.6rem;
}

.route-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ===== Celestial math modal ===== */
.celestial-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.celestial-modal.open {
  display: flex;
}

.celestial-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(6px);
}

.celestial-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 92vw);
  max-height: 90vh;
  background: linear-gradient(160deg, rgba(10, 16, 28, 0.98), rgba(5, 7, 14, 0.98));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.celestial-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 12, 22, 0.8);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.celestial-modal-body {
  padding: 1.6rem 1.8rem 2rem;
  overflow: auto;
}

.celestial-modal-body h3 {
  margin-bottom: 0.8rem;
}

.celestial-modal-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  display: grid;
  gap: 0.7rem;
}

.celestial-modal-text pre {
  background: #0b1425;
  color: #e5e7eb;
  padding: 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

/* ===== Link Buttons ===== */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #041018;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  filter: saturate(1.05);
}

.link-btn:active {
  transform: translateY(0);
}

/* ===== Mobile Tweaks ===== */
@media (max-width: 640px) {
  .celestial-header h1 {
    font-size: 1.7rem;
  }

  .celestial-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-btn {
    width: 100%;
    text-align: center;
  }

  .route-animator .route-actions {
    flex-direction: column;
  }

  .route-btn {
    width: 100%;
    text-align: center;
  }

  .route-toolbar {
    padding: 0.5rem 0.6rem;
  }

  .route-toolbar__group {
    width: 100%;
    justify-content: flex-start;
  }

  .route-toolbar__group:first-child {
    justify-content: space-between;
  }

  .route-toolbar__group--advanced {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .route-tool {
    width: 38px;
    height: 38px;
  }

  .route-toolbar__group--playback {
    gap: 0.4rem;
  }

  .route-toolbar__group--playback .route-tool {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .route-toolbar__group--playback .route-tool--toggle {
    width: auto;
    min-width: 70px;
  }

  .route-toolbar__group--playback .route-tool svg {
    width: 15px;
    height: 15px;
  }

  .route-toolbar__group--playback .route-tool--toggle .route-toggle-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .route-toolbar__group--playback .route-toggle-slash {
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .route-tool--input {
    flex: 1 1 auto;
    width: 100%;
    justify-content: space-between;
    height: auto;
    padding: 0.45rem 0.65rem;
    gap: 0.6rem;
  }

  .route-tool--input input,
  .route-tool--input select {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .route-tool--slider {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.4rem 0.6rem;
  }

  .route-slider__icon {
    width: 16px;
    height: 16px;
  }

  .route-slider__icon svg {
    width: 16px;
    height: 16px;
  }

  .route-tool__value {
    min-width: 0;
    text-align: right;
  }

  .route-advanced {
    width: 100%;
  }

  .route-tool--advanced {
    width: 100%;
    justify-content: space-between;
  }

  .route-advanced__content {
    margin-top: 0.55rem;
  }

  .route-select {
    width: 100%;
  }

  .route-select summary {
    width: 100%;
    justify-content: space-between;
  }

  .route-select__text {
    flex: 1;
  }

  .route-select__menu {
    left: 0;
    right: 0;
    min-width: 100%;
  }

  .route-download__menu {
    left: 0;
    right: auto;
    min-width: 190px;
  }

  .route-status-bar {
    padding: 0.35rem 0.5rem;
  }

  .route-progress__text {
    font-size: 0.72rem;
  }

  .route-animator-map .leaflet-map {
    min-height: 240px;
  }

  .resource-dropdown {
    padding: 0.5rem 0.7rem;
  }

  .resource-dropdown summary {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
  }

  .resource-link {
    font-size: 0.92rem;
    padding: 0.75rem 0.85rem;
    line-height: 1.4;
    text-align: left;
    align-items: flex-start;
    word-break: break-word;
  }

  .resource-dropdown__list {
    gap: 0.75rem;
  }

  .link-buttons {
    flex-direction: column;
  }

  .link-btn {
    width: 100%;
    text-align: center;
    font-size: 1rem;
  }
}
.celestial-header {
    margin-top: 2rem; /* flyttar ner hela rutan */
}

/* ============================= */
/*            FOOTER             */
/* ============================= */

.site-footer {
    background: rgba(5, 9, 18, 0.95);
    border-top: 1px solid var(--card-border);
    padding: 1.6rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}
/* Sociala ikoner i footern */
.social-icons {
    margin-bottom: 0.7rem;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
}

.social-icons .icon {
    width: 26px;
    height: 26px;
    filter: invert(100%); /* Gör ikonerna vita */
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.social-icons .icon:hover {
    opacity: 0.55;
}

/* ============================= */
/*       CENTRERA TEXTBLOCK      */
/* ============================= */

.title-center {
    text-align: center;
}

.text-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}


/* ============================= */
/*        MOBILANPASSNING        */
/* ============================= */

@media (max-width: 800px) {

    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.6rem;
        padding: 8px 0;
        min-height: 68px;
    }

    /* Visa hamburgermeny och göm nav som standard */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin-top: 0;
        padding: 0.6rem 0 1rem;
        background: rgba(6, 10, 20, 0.98);
        border-bottom: 1px solid var(--card-border);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
        display: none;           /* dold tills nav-open */
        z-index: 9998;
    }

    .main-nav.nav-open {
        display: block;
    }

    .menu {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 0 1.2rem;
    }

    .menu > li {
        width: 100%;
    }

    .menu > li > a {
        display: block;
        width: 100%;
        font-size: 0.9rem;
        padding: 0.7rem 2.4rem 0.7rem 0;
        text-align: left;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    /* Ta bort underline-animationen på mobil */
    .menu > li > a::after {
        content: none;
    }

    .menu > li > a:hover {
        background: rgba(255,255,255,0.08);
        box-shadow: none;
        transform: none;
    }
    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 0;
        width: 2.2rem;
        height: 100%;
        border-radius: 999px;
    }

    .submenu-toggle:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .has-submenu.submenu-open > .submenu-toggle::after {
        transform: rotate(180deg);
        color: var(--accent);
    }

    /* Undermeny – visas som enkel lista under huvudlänken */
    .has-submenu .sub-menu {
        position: static;
        display: none;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0 0 0.4rem 0.8rem;
        margin: 0;
    }

    .has-submenu.submenu-open .sub-menu {
        display: block;
    }

    .has-submenu .sub-menu li a {
        padding: 4px 0;
        font-size: 0.85rem;
        opacity: 0.9;
    }

    .has-submenu .sub-menu li a:hover {
        background: rgba(255,255,255,0.06);
        padding-left: 0.2rem;
    }

    /* Lite snällare hero på mobil */
    .hero {
        height: auto;
        min-height: 60vh;
        padding: 5rem 0 2.5rem;
    }

    .hero-content {
        margin: 0 1rem;
        padding: 1.1rem 1.2rem;
        text-align: center;
        background: transparent;
        border: none;
        backdrop-filter: none;
        box-shadow: none;
    }

    .hero-content h1 {
        font-size: clamp(1.9rem, 7.5vw, 2.4rem);
        margin-bottom: 0.6rem;
    }

    .hero-content p {
        font-size: 0.98rem;
        margin-bottom: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        gap: 0.7rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 220px;
        padding: 0.65rem 1.1rem;
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }

    .section {
        padding: 2.8rem 0;
    }

    .page-main {
        padding: 2.8rem 0 3.6rem;
    }

    .title-center {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }

    .text-center {
        font-size: 0.98rem;
        padding: 0 0.5rem;
    }

    .container {
        padding: 0 1.1rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .blog-filters {
        padding: 1.2rem;
    }

    .blog-filters-header {
        gap: 0.8rem;
    }

    .filter-actions {
        align-items: flex-start;
    }

    .filter-toggle {
        display: inline-flex;
    }

    .blog-filters-body {
        display: none;
    }

    .blog-filters.is-open .blog-filters-body {
        display: flex;
    }

    .blog-title-row {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .blog-post {
        padding: 1.6rem;
    }
}


/* ============================= */
/*       Current Position Map    */
/* ============================= */

.map-section {
    text-align: center;
    margin: 2rem auto;
}

.map-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.map-info {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

/* Responsiv iframe */
.map-iframe-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
}

/* 16:9 ratio */
.map-iframe-wrapper::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.map-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== VIDEO – MOBILE IMPROVED COVER ===== */
@media (max-width: 768px) {

    .hero {
        height: 65vh;      /* lite högre gör att mindre av videon beskärs */
        overflow: hidden;
        position: relative;
    }

    .hero-video {
        object-fit: cover;   /* fyll ytan, men mindre aggressiv zoom */
        width: 100vw;
        height: 100vh;
        max-height: 65vh;

        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

        min-width: 100%;
        min-height: 100%;
    }

    /* Justera innehållet så det inte hamnar för långt ner */
    .hero-content {
        padding-top: 1rem;
    }
}



/* ==== Previous Voyages (bakgrund endast på denna sida) ==== */

main.page-main.previous-bg {
    background-image: url('images/previous-voyage-bg.jpg') !important;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    position: relative;
    z-index: 0;
}

/* Mjuk overlay (valfri – gör texten mer läsbar) */
main.page-main.previous-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
    pointer-events: none;
}

main.page-main.previous-bg > .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    main.page-main.previous-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 60vh;
    }

    .hero-video {
        inset: 0;
        width: 100%;
        height: 100%;
        object-position: center;
        max-height: none;
        min-width: 0;
        min-height: 0;
        transform: none;
    }

    .hero-content {
        margin: 0 1rem;
    }
}
