html, body {
    height: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0d0d0d;
    color: #eee;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    padding: 15px;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

header h1 {
    color: #ff7a00;
    text-align: center;
}

/* NAV */
nav {
    text-align: center;
    margin-top: 10px;
}

nav a {
    color: #ccc;
    margin: 0 15px;
    text-decoration: none;
    transition: 0.3s;
}

nav a:hover {
    color: #ff7a00;
}

/* HERO */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
                url('https://images.unsplash.com/photo-1581091870627-3c1c8c8e7b5e');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero h2 {
    font-size: 3em;
}

.hero p {
    margin-top: 15px;
    color: #ccc;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #ff7a00;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.btn:hover {
    background: #ffa94d;
}

/* SECTIONS */
section {
    width: 100%;
    max-width: none;
    padding: 2% 5%;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #ff7a00;
}

h3 {
    text-align: center;
    margin-bottom: 5px;
    color: #ff7a00;
}

p {
    text-align: center;
    margin-bottom: 5px;
}

/* CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid #222;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #ff7a00;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 30px;
    background: #000;
    border-top: 1px solid #222;
    margin-top: auto;
}

/* ACCORDION */
.accordion {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.accordion-item {
    background: #1a1a1a;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #222;
}

.accordion-header {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
}

.accordion-header:hover {
    background: #222;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: 0.4s ease;
    padding: 0 15px;
    color: #ccc;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 15px;
}

/* PRISER */
.price-menu {
    width: 100%;
    max-width: 800px;
    margin: auto;
}

.price-item {
    border-bottom: 1px solid #222;
    padding: 15px 0;
    cursor: default;
}

.price-header {
    display: flex;
    align-items: center;
}

.price-header span:first-child {
    flex: 1;
    padding-right: 280px;
}

.price-header span:last-child {
    margin-left: auto;
    color: #ff7a00;
    white-space: nowrap;
}

.price-sub {
    margin-top: 10px;
    color: #ccc;
    padding-left: 10px;
}

.price-sub div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
}

.price-sub div span:last-child {
    white-space: nowrap;
}

/* HERO-BAGGRUNDSBILLEDE */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 98vh;
    background: url("images/bg.jpeg") center / cover no-repeat;
    opacity: 0.65;
    z-index: -1;
}

/* PLUS / MINUS IKON */
.accordion-header::after {
    content: "+";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #ff7a00;
    transition: 0.3s;
}

.accordion-item.active .accordion-header::after {
    content: "−";
}

/* FØR / EFTER-SLIDER */
.compare-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 15px auto 4px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.compare-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.after {
    z-index: 1;
}

.before-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #ff7a00;
    z-index: 3;
    cursor: ew-resize;
    touch-action: none;
}

.slider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ff7a00;
    border-radius: 50%;
    border: 3px solid #111;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider::after {
    content: "↔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: bold;
}

.compare-container,
.compare-container * {
    user-select: none;
    -webkit-user-select: none;
}

/* MOBILOPTIMERING
   Samlet i én regelblok, så mobilreglerne ikke overskriver hinanden. */
@media screen and (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.55;
    }

    header {
        padding: 12px 8px;
    }

    header h1 {
        font-size: 25px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 12px;
        margin-top: 8px;
    }

    nav a {
        margin: 0;
        font-size: 13px;
        padding: 3px 0;
    }

    section {
        width: 100%;
        padding: 21px 12px;
        margin: 0 auto;
    }

    h2 {
        font-size: 23px;
        line-height: 1.3;
        margin-bottom: 21px;
    }

    h3 {
        font-size: 18px;
        line-height: 1.35;
        margin-bottom: 5px;
    }

    p,
    li {
        font-size: 14px;
        line-height: 1.55;
    }

    /* Ydelser og FAQ */
    .accordion {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .accordion-item {
        margin-bottom: 10px;
        border-radius: 6px;
    }

    .accordion-header {
        padding: 15px 32px 15px 12px;
        font-size: 15px;
        line-height: 1.4;
    }

    .accordion-header::after {
        right: 10px;
        font-size: 20px;
    }

    .accordion-content {
        font-size: 14px;
        line-height: 1.55;
    }

    .accordion-item.active .accordion-content {
        max-height: 500px;
        padding: 14px 12px;
    }

    /* Forsiden */
    .hero {
        min-height: 75vh;
        height: auto;
        padding: 30px 12px;
    }

    .hero h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.55;
    }

    .btn {
        font-size: 15px;
        padding: 12px 19px;
    }

    /* Priser */
    .price-menu {
        width: 100%;
        max-width: none;
    }

    .price-item {
        padding: 15px 0;
    }

    .price-header {
        font-size: 15px;
        line-height: 1.5;
        gap: 8px;
    }

    .price-header span:first-child {
        padding-right: 0;
    }

    .price-header span:last-child {
        white-space: nowrap;
    }

    .price-sub {
        font-size: 14px;
        line-height: 1.6;
        padding-left: 8px;
        margin-top: 8px;
    }

    .price-sub div {
        gap: 8px;
        padding: 5px 0;
    }

    .price-item,
    .price-header,
    .price-sub {
        text-align: left;
    }

    /* Galleri: behold kvadratisk slider, men reducer størrelsen på mobil */
    .compare-container {
        width: 75%;
        max-width: 255px;
        margin: 12px auto 4px;
    }

    .slider::before {
        width: 32px;
        height: 32px;
    }

    .slider::after {
        font-size: 12px;
    }

    /* Footer */
    .footer {
        padding: 19px 10px;
        font-size: 13px;
    }
}
