/* ========================================
    Grundlæggende styling & CSS Variabler
    ========================================
*/
:root {
    --navy: #15385A;
    --navy-2: #0f2742;
    --gold: #EAA828;
    --ink: #1b2330;
    --muted: #67748a;
    --bg: #f8fafc;
    --card: #ffffff;
    --radius: 20px;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --trustpilot-green: #00b67a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1100px; margin: auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ========================================
    Typografi & Knapper
    ========================================
*/
h1, h2, h3 { font-weight: 900; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(38px, 5vw, 62px); }
h2 { font-size: clamp(32px, 4vw, 42px); }
h3 { font-size: 20px; }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 48px auto; font-size: 18px; }

.button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: var(--shadow-lg);
}
.button--gold { background: var(--gold); color: #1a1a1a; }
.button--gold:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 20px -5px rgba(234, 168, 40, 0.3); }
.button--ghost { border: 2px solid #fff; color: #fff; background: transparent; }
.button--ghost:hover { background: #ffffff15; transform: translateY(-3px); }

/* ========================================
    Header & Navigation
    ========================================
*/
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #e7eef6;
    padding: 12px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 20px; }
.nav__brand img { height: 40px; width: auto; }

/* Denne forælder-regel strækker det hele ud */
.nav__links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0;
    margin-left: 15px; /* Reduceret afstand til logo (var 30px) */
}
.nav__links a { color: var(--navy); text-decoration: none; font-weight: 600; position: relative; padding: 4px 0; }
.nav__links a:not(.button)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s ease-in-out;
}
.nav__links a:hover:not(.button)::after { transform: scaleX(1); transform-origin: left; }
#menu-btn { display: none; }

/* ========================================
    Hero Sektion
    ========================================
*/
.hero {
    color: #fff;
    padding: 120px 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(to top, rgba(15, 56, 90, 0.85), rgba(15, 56, 90, 0.2)), url('https://images.unsplash.com/photo-1596238237078-75094d45145c?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600') center/cover no-repeat;
    overflow: hidden;
}
.hero .container { z-index: 2; }
.hero h1 { color: #fff; margin: 0 0 16px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { color: #e9f1ff; font-size: 20px; margin: 0 auto 32px auto; max-width: 650px; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }
.badges { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.badge { background: #ffffff15; border: 1px solid #ffffff30; border-radius: 999px; padding: 10px 18px; font-weight: 600; backdrop-filter: blur(5px); }

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    animation: bounce 2s infinite;
}
.scroll-down::after{ content: '↓'; display: block; margin-top: 4px; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -10px); } 60% { transform: translate(-50%, -5px); } }

/* ========================================
    KPI / Statistik Sektion
    ========================================
*/
.kpi-section { padding: 60px 0; background: var(--bg); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.kpi .n { font-size: 48px; font-weight: 900; color: var(--navy); }
.kpi .t { color: var(--muted); font-weight: 600; }

/* ========================================
    Kort & Grid Systemer
    ========================================
*/
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.card h3 { margin: 16px 0 8px; }
.card p { margin: 0; color: var(--muted); }
.card__img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }

/* ========================================
    "Hvorfor Vælge Os" Sektion
    ========================================
*/
#why { background: #fff; }
.features .item { display: flex; gap: 20px; align-items: flex-start; text-align: left; padding: 20px; }
.features .icon {
    flex-shrink: 0;
    height: 50px; width: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(21, 56, 90, 0.2);
}
.features h3 { margin: 0 0 8px; }

/* ========================================
    Galleri Sektion
    ========================================
*/
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 250px;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: contain; /* <--- ÆNDRET */
    transition: transform .4s ease-in-out;
    background-color: var(--bg); /* <--- TILFØJET */
}
.gallery-item:hover img { transform: scale(1.1); }

/* ========================================
    Anmeldelser Sektion
    ========================================
*/
#testimonials { background: var(--bg); }
.testimonial-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.testimonial-card::before {
    content: '“';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 100px;
    color: var(--gold);
    opacity: 0.1;
    line-height: 1;
}
.testimonial-card p { font-style: italic; color: var(--ink); margin: 0 0 16px; }
.testimonial-author { font-weight: 700; color: var(--navy); }
.stars { color: var(--gold); }

/* ========================================
    CTA Sektion
    ========================================
*/
.cta {
    background: linear-gradient(135deg, var(--navy-2), var(--navy));
    color: #fff; text-align: center;
    border-radius: 24px;
    padding: 60px 30px;
    box-shadow: var(--shadow-lg);
    transform: scale(1);
}
.cta h2 { color: #fff; margin: 0 0 16px; }
.cta p { margin: 0 auto 24px auto; color: #dbe9ff; max-width: 500px; }

/* ========================================
    Footer
    ========================================
*/
.footer { padding: 40px 0; color: var(--muted); text-align: center; background: #fff; margin-top: 80px; }
.footer a { color: var(--navy); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ========================================
    Animationer & Responsivitet
    ========================================
*/
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .grid--3 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* === OPDATERET RESPONSIVITET === */
@media (max-width: 760px) {
    .nav__links { 
        display: none; 
        flex-direction: column; 
        gap: 24px;
        background: #fff; 
        position: absolute; 
        left: 0; right: 0; top: 67px; 
        padding: 24px; 
        box-shadow: var(--shadow-lg); 
        border-bottom-left-radius: var(--radius); 
        border-bottom-right-radius: var(--radius);
        align-items: stretch;
    }
    .nav__links.open { display: flex; }
    #menu-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; width: 40px; border-radius: 8px; border: 1px solid #e1e8f0; background: #fff; color: var(--navy); font-size: 24px; cursor: pointer; }
}


/* ========================================
    NYT: Opdateret Navigation & Trustpilot
   ========================================
*/

/* Denne forælder-regel strækker det hele ud */
.nav__links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0;
    margin-left: 15px; /* Reduceret afstand til logo (var 30px) */
}

/* Gruppe 1: Hovedlinks (Ydelser, Hvorfor os, Galleri, ...) */
.nav__links--main {
    display: flex;
    align-items: center;
    gap: 26px;
    min-width: 0;
    flex-wrap: nowrap;            /* må ikke wrappe */
    flex-grow: 1;
    justify-content: flex-start;
}
/* Hold hvert link på én linje – FIX til "Hvorfor os" */
.nav__links--main a {
    white-space: nowrap;
}

/* Gruppe 2: Knapper (Login, Få tilbud, TrustScore) */
.nav__links--secondary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;               /* forbyd at denne bliver klemt */
    flex-wrap: nowrap;            /* må ikke wrappe */
}
/* Undgå linjeskift i knapperne */
.nav__links--secondary .button {
    white-space: nowrap;
}

/* Styling af "Login" linket */
.nav__admin-login-link {
    font-weight: 500;
    font-size: 0.9em;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;          /* må ikke wrappe */
}
.nav__admin-login-link:hover { text-decoration: underline; }
.nav__admin-login-link::after { display: none !important; }

/* --- Trustpilot Widget (overflow-fix) --- */
.nav__trustpilot-widget-placeholder {
    display: inline-flex;         /* så størrelsen følger indholdet */
    flex-direction: column;
    align-items: center;
    background: #f0fdf8;
    border: 1px solid var(--trustpilot-green);
    border-radius: var(--radius);
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;          /* forhindrer at teksten stikker ud */
    line-height: 1;               /* strammere linjehøjde så den holder sig inde i rammen */
    width: auto;                  /* voks med indholdet */
}
.nav__trustpilot-widget-placeholder:hover {
    background: #e6fcf2;
    transform: translateY(-2px);
}
.nav__trustpilot-widget-placeholder .tp-stars {
    font-size: 24px;
    line-height: 1;
    color: var(--trustpilot-green);
}
.nav__trustpilot-widget-placeholder .tp-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--trustpilot-green);
    margin-top: 6px;
}

/* === Halve stjerner (uændret) === */
.tp-star-half { position: relative; display: inline-block; color: var(--trustpilot-green); }
.tp-star-half::before { content: '★'; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: var(--trustpilot-green); }
.tp-star-half::after { content: '☆'; color: #dcdce6; }
.tp-stars--new .tp-star,
.tp-stars--new .tp-star-half,
.tp-stars--new .tp-star-empty { color: #dcdce6 !important; }
.tp-stars--new .tp-star-half::before { color: #dcdce6 !important; }

/* --- Responsivitet for de nye grupper --- */
@media (max-width: 760px) {
    .nav__links--main,
    .nav__links--secondary {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        width: 100%;
    }

    /* På mobil må badgen gerne bryde linje for læsbarhed */
    .nav__trustpilot-widget-placeholder {
        white-space: normal;
        line-height: 1.2;
    }

    .nav__links--secondary .button { text-align: center; justify-content: center; }
    .nav__admin-login-link {
        text-align: center;
        background: #f8fafc;
        padding: 10px;
        border-radius: 12px;
        font-size: 1em;
    }
}


/* ========================================
    KORREKT KODE: Tilbuds-stribe (Skråt "Klistermærke")
   ========================================
*/
.promo-banner {
    position: absolute;
    z-index: 10;
    
    /* === OPDATERET VÆRDI === */
    top: 12%; /* Flyttet helt op (var 15%) */
    
    left: -15%; 
    
    /* Størrelse og udseende */
    width: 130%; /* Bredere end skærmen for at gå på tværs */
    padding: 15px 30px;
    background: var(--gold);
    color: #1a1a1a;
    
    /* Tekst ("Fed") */
    text-align: center;
    font-size: 2.2vw; /* Skalerer med skærmbredden */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    
    /* Effekten */
    transform: rotate(-10deg); /* Den skrå vinkel fra din tegning */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    
    /* Sørg for at den ikke kan "fanges" af musen */
    pointer-events: none; 
}

/* Gør den pænere på mobil */
@media (max-width: 760px) {
    .promo-banner {
        font-size: 5vw; /* Større på mobil ift. skærmen */
        
        /* === OPDATERET VÆRDI === */
        top: 10%; /* Flyttet helt op (var 12%) */
        
        transform: rotate(-12deg);
        padding: 10px 20px;
    }
}

/* Mobil: menuen må ikke blive for lang, og TrustScore vises ikke inde i dropdown */
@media (max-width: 900px) {
  .nav__links.open { 
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .nav__links--secondary .nav__trustpilot-widget-placeholder {
    display: none !important;
  }
}
/* ========================================
    NYT: Kontakt Modal Styling
   ======================================== */
.modal {
    position: fixed;
    inset: 0; /* top: 0; right: 0; bottom: 0; left: 0; */
    z-index: 1000;
    display: flex; /* Bruges til at centrere indholdet */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto; /* Tillad scroll hvis indholdet er for højt */
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Mørk, semi-transparent baggrund */
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative; /* Nødvendig for at positionere luk-knap */
    z-index: 1001;
    width: 100%;
    max-width: 500px; /* Max bredde på modalen */
    padding: 2rem;
    /* Genbruger din .card styling fra tidligere */
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 5px;
}
.modal-close:hover {
    color: var(--ink);
}

/* Gør input-felter lidt pænere inde i modalen */
.modal-content .form-group {
    margin-bottom: 1rem;
}
.modal-content .form-group label {
    margin-bottom: 0.3rem;
    font-weight: 600;
}
.modal-content .form-group input,
.modal-content .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}
.modal-content .form-group textarea {
    resize: vertical;
}
.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus {
     outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(21, 56, 90, 0.2);
}

/* Styling til feedback beskeder */
#formFeedback.success {
    color: var(--trustpilot-green); /* Eller din success-color */
}
#formFeedback.error {
    color: var(--error-color);
}
/* === FIX: Nav-knap + TrustScore badge overflow === */

/* Knap: centrér tekst, lidt mere luft og stabil line-height */
.nav__links--secondary .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;      /* mere vandret luft */
  line-height: 1.15;       /* undgår at teksten “ringer” mod kanten */
  border-radius: 9999px;   /* pille-form for sikker kant */
  white-space: nowrap;
}

/* Badge: mere luft, centrering og spænd tekst ind så den ikke løber ud */
.nav__trustpilot-widget-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;                /* luft mellem stjerner og tekst */
  padding: 8px 14px;       /* mere vandret luft */
  border-radius: 9999px;
  line-height: 1.15;
  white-space: nowrap;     /* hold alt på én linje */
  box-sizing: border-box;  /* sikker padding-beregning */
}

.nav__trustpilot-widget-placeholder .tp-text {
  white-space: nowrap;
  max-width: 20ch;         /* begræns længden */
  overflow: hidden;
  text-overflow: ellipsis; /* … hvis pladsen bliver for lille */
}

/* Finjustér i smalle bredder */
@media (max-width: 1100px) {
  .nav__links--secondary .button {
    padding: 10px 14px;
    font-size: 14px;
  }
  .nav__trustpilot-widget-placeholder .tp-text {
    max-width: 16ch;
    font-size: 11px;
  }
}
/* === TrustScore badge: fix overflow + underline === */
.nav__trustpilot-widget-placeholder {
  display: inline-flex !important;
  flex-direction: row !important;     /* stjerner + tekst på én linje */
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  border-radius: 9999px !important;   /* “pille”-form */
  text-decoration: none !important;   /* fjern underline */
  box-sizing: border-box !important;
}

.nav__trustpilot-widget-placeholder:hover,
.nav__trustpilot-widget-placeholder:focus {
  text-decoration: none !important;
}

/* NØGLEN til at ellipsis virker i flex: */
.nav__trustpilot-widget-placeholder .tp-text {
  min-width: 0 !important;            /* <- critical */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: 600;
}

/* Stjernerne forbliver kompakte */
.nav__trustpilot-widget-placeholder .tp-stars { line-height: 1 !important; }

/* Sikr at globale link-regler ikke underliner inde i badgen */
.nav a.nav__trustpilot-widget-placeholder,
.nav__trustpilot-widget-placeholder * {
  text-decoration: none !important;
}

/* På smalle skærme: vis kun stjerner (ingen klip) */
@media (max-width: 1100px) {
  .nav__trustpilot-widget-placeholder .tp-text { display: none !important; }
}
