/* Stylesheet til Cases-siden — projekt-kort-gitteret, filter-knapperne
   og modal-vinduet der åbner når man klikker på et projekt. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --glass: #f2f5f5;
    --glass-border: #e6eaea;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: "Poppins", sans-serif;
    color: var(--ink);
}

.glow1, .glow2 { display: none; }

.page {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 5% 90px;
}

.header { text-align: center; margin-bottom: 48px; }

.label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.1; color: var(--ink); }
h1 span { font-weight: 400; color: var(--muted); }

.heading-rule { display: flex; align-items: center; gap: 10px; margin: 18px auto 0; max-width: 460px; }
.heading-rule::before, .heading-rule::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.heading-rule span { font-size: 12px; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px; }

.filter-btn {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 20px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--muted);
    cursor: pointer;
    transition: .2s;
}

.filter-btn:hover { background: #e9eeee; color: var(--ink); }
.filter-btn.active { background: var(--teal); color: #fff; border-color: transparent; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px -8px rgba(20,24,28,.08);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

.card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.card[data-hidden="true"] { display: none; }

.card-thumb { width: 100%; height: 200px; background: var(--bg-soft); position: relative; overflow: hidden; flex-shrink: 0; }
/* Prikkerne ligger oven på skærmbilledet, så de får en lille plade
   under sig for ikke at blive læst som en del af billedet */
.thumb-chrome {
    position: absolute;
    top: 10px; left: 10px;
    display: flex;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(4px);
    z-index: 2;
    pointer-events: none;
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-r { background: #e87a6a; } .dot-y { background: #e8c96a; } .dot-g { background: #4ec9a0; }

.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .4s; }
.card:hover .card-thumb img { transform: scale(1.04); }

.thumb-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.thumb-placeholder i { font-size: 28px; color: #c7d0d0; }
.thumb-placeholder p { font-size: 11px; color: #b5bfbf; }

/* pointer-events: none så labelen ikke blokerer klik på kortet */
.thumb-upload {
    position: absolute; inset: 0;
    background: rgba(20,24,28,.55);
    display: flex; align-items: center; justify-content: center;
    gap: 8px; opacity: 0; transition: opacity .2s;
    cursor: pointer; font-size: 13px; color: #fff; font-weight: 500;
    z-index: 3;
    pointer-events: none;
}
.img-input { display: none; }

.thumb-hint { position: absolute; bottom: 12px; right: 12px; background: rgba(20,24,28,.65); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 5px 10px; font-size: 10px; color: #fff; display: flex; align-items: center; gap: 5px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 2; }
.card:hover .thumb-hint { opacity: 1; transform: translateY(0); }

.card-info { padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.card-desc { font-size: .83rem; line-height: 1.65; color: var(--muted); flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag { font-size: 10px; font-weight: 500; background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); border-radius: 5px; padding: 3px 8px; }

.card-actions { padding: 10px 18px 16px; display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px 16px; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: none; font-family: "Poppins", sans-serif; transition: .2s; }
.btn-primary { background: var(--teal); color: #fff; border: 1px solid transparent; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.overlay { position: fixed; inset: 0; background: rgba(20,24,28,.5); backdrop-filter: blur(8px); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.active { opacity: 1; pointer-events: all; }

.modal { background: #fff; border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 820px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; transform: translateY(24px) scale(.97); transition: transform .35s cubic-bezier(.34,1.56,.64,1); color: var(--ink); box-shadow: 0 40px 80px -20px rgba(20,24,28,.35); }
.overlay.active .modal { transform: translateY(0) scale(1); }

.modal-bar { border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.modal-bar .dot { width: 12px; height: 12px; }
.modal-url { flex: 1; margin-left: 10px; font-size: 11px; color: var(--muted); }
.modal-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: .2s; }
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }

.tab-panels { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

.info-panel { padding: 26px; }
.info-hero { width: 100%; height: 200px; background: var(--bg-soft); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.info-hero img { width: 100%; height: 100%; object-fit: cover; }
.info-hero-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.info-hero-placeholder i { font-size: 32px; color: #c7d0d0; }
.info-hero-placeholder p { font-size: 11px; color: #b5bfbf; }

.info-cat { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.info-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.info-desc { font-size: .88rem; line-height: 1.8; color: var(--muted); margin-bottom: 18px; }

.info-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 18px; }
.meta-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.meta-label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.meta-val { font-size: .85rem; font-weight: 600; color: var(--ink); }

.info-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.info-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.info-actions .btn { padding: 10px 20px; font-size: .85rem; }

.btn-preview { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn-preview:hover:not(.btn-disabled) { background: var(--bg-soft); }
.btn-disabled { opacity: .35; cursor: not-allowed; }

.github-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; padding: 20px; text-align: center; }
.github-thumb > i { font-size: 32px; color: #c7d0d0; }
.github-thumb-name { font-size: 1rem; font-weight: 600; color: var(--ink); }
.github-thumb-desc { font-size: .78rem; color: var(--muted); max-width: 260px; line-height: 1.5; }
.github-thumb-meta { display: flex; gap: 12px; font-size: 10px; color: var(--muted); margin-top: 4px; }

.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: #a97a1c; background: rgba(232,201,106,.18); border: 1px solid rgba(232,201,106,.4); border-radius: 5px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.bx-spin { animation: spin .8s linear infinite; }

@media (max-width: 768px) {
    .page { padding: 40px 5% 60px; }
    .grid { grid-template-columns: 1fr; }
    .info-meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    h1 { font-size: 1.75rem; }
    .info-meta { grid-template-columns: 1fr; }
    .modal { border-radius: 14px; }
}

/* Billedfelt med ikon og projektnavn (bruges indtil der er rigtige screenshots) */
.project-thumb { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, #eaf6f6 0%, #f7fafa 60%); }
.project-thumb-icon { width: 56px; height: 56px; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px -10px rgba(4,148,155,.45); display: flex; align-items: center; justify-content: center; }
.project-thumb-icon i { font-size: 28px; color: var(--teal); }
.project-thumb-name { font-weight: 700; font-size: 20px; color: var(--ink); }

/* ── Billedgalleri i projektvinduet ──
   Viser skærmbilleder af projektet. Er der mere end ét, kommer der
   pile i siderne og prikker nederst, så man kan klikke sig igennem. */
.shot-gallery {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-soft);
}

.shot-img {
    display: block;
    width: 100%;
    height: auto;
    /* Billederne er høje skærmbilleder. Her beskæres de til et roligt
       format, så alle fire projekter fylder lige meget i vinduet. */
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top center;
    cursor: zoom-in;
}

.shot-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 10px rgba(20,24,28,.22);
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}
.shot-nav:hover { background: #fff; }
.shot-prev { left: 10px; }
.shot-next { right: 10px; }

.shot-dots {
    position: absolute;
    left: 0; right: 0; bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 7px;
}
.shot-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    box-shadow: 0 1px 3px rgba(20,24,28,.3);
    cursor: pointer;
    transition: background .2s;
}
.shot-dots span.active { background: #fff; }

@media (max-width: 480px) {
    .shot-nav { width: 30px; height: 30px; font-size: 19px; }
}

/* ── Lightbox ──
   Billedet i fuld størrelse oven på alt andet. Åbnes ved at trykke
   på et skærmbillede i galleriet. Lukkes med krydset, med Escape,
   eller ved at klikke udenfor billedet. */
.shot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    justify-content: center;
    background: rgba(12,15,18,.92);
    backdrop-filter: blur(3px);
}
.shot-lightbox.open { display: block; }

/* Billederne er hele sider og derfor meget høje. De vises i deres egen
   størrelse, og man scroller ned i stedet for at få dem presset sammen.
   Knapperne ligger udenfor dette område og følger derfor ikke med. */
.lb-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 70px 20px;
    text-align: center;
}

.lb-img {
    /* Vises i sin egen størrelse, aldrig forstørret og aldrig
       sammenpresset. Er skærmen smallere, skrumper det med. */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 30px 70px rgba(0,0,0,.5);
}

.lb-luk {
    position: fixed;
    z-index: 2;
    top: 16px; right: 20px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(20,24,28,.62);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}
.lb-luk:hover { background: rgba(20,24,28,.85); }

.lb-nav {
    position: fixed;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(20,24,28,.62);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}
.lb-nav:hover { background: rgba(20,24,28,.85); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-taeller {
    position: fixed;
    z-index: 2;
    bottom: 20px;
    left: 0; right: 0;
    text-align: center;
    font-size: 13px;
    color: #fff;
    font-family: "Poppins", sans-serif;
    pointer-events: none;
}
.lb-taeller::after {
    content: '';
    position: absolute;
    inset: -8px 0 -16px;
    background: linear-gradient(to top, rgba(12,15,18,.9), transparent);
    z-index: -1;
}

@media (max-width: 600px) {
    .shot-lightbox { padding: 60px 10px 60px; }
    .lb-nav { width: 40px; height: 40px; font-size: 24px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

/* Lille hint under billederne, så man ved at de kan klikkes */
.shot-hint {
    margin: 12px 0 18px;
    font-size: .78rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.shot-hint::before {
    content: '\2922';
    font-size: 13px;
    color: var(--teal);
}

/* Kortet "Flere projekter på vej" sidst i gitteret */
.next-card { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, #eef8f8 0%, #ffffff 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 40px 32px; }
.next-card-icon { width: 56px; height: 56px; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px -10px rgba(4,148,155,.45); display: flex; align-items: center; justify-content: center; }
.next-card-icon i { font-size: 28px; color: var(--teal); }
.next-card-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--teal-dark); background: rgba(4,148,155,.1); border: 1px solid rgba(4,148,155,.25); padding: 4px 12px; border-radius: 999px; }
.next-card-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: next-pulse 1.6s ease-in-out infinite; }
@keyframes next-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .next-card-badge .dot { animation: none; } }
.next-card h3 { font-size: 19px; font-weight: 700; color: var(--ink); }
.next-card p { font-size: 14px; color: var(--muted); max-width: 320px; line-height: 1.6; }
.next-card a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; transition: background .2s; }
.next-card a:hover { background: var(--teal-dark); }
