/* Moderniseret layout for familiearkivet.dk */

/* Grundlæggende container setup */
#container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 10px;
    text-align: left;
    box-sizing: border-box;
}

/* Grid layoutet */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
    width: 100%;
}

/* Tabel layout til forsiden for maksimal kontrol */
.archive-table {
    width: 100%;
    max-width: 1180px;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0 auto;
}

.archive-table td {
    vertical-align: top;
    padding: 15px;
    text-align: center;
}

.grid-full {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrerer alt indhold i de brede sektioner */
    text-align: center; 
    margin-bottom: 20px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0; 
    width: 100%; /* Låser kolonnens bredde */
    overflow: hidden; /* Sikrer at intet stikker ud af kolonnen */
}

.grid-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.archive-table img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.title-label {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

.intro-text {
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    width: 100%; 
    box-sizing: border-box;
    overflow-wrap: break-word; /* Tvinger teksten til at knække indeni kolonnen */
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto; /* Tilføjer orddeling hvis ordene er for lange til kolonnen */
}

.intro-text p {
    margin-bottom: 15px; /* Skaber et pænt mellemrum efter hvert afsnit */
}

.contact-box-td {
    vertical-align: bottom !important;
}

.intro-text p:last-child {
    margin-bottom: 0; /* Fjerner mellemrummet efter det allersidste afsnit */
}

.contact-box {
    align-self: end;
    padding-bottom: 20px;
}

.top-spacer {
    height: 30px;
}

/* Responsiv tilpasning til mobil */
@media (max-width: 900px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .empty-mobile {
        display: none;
    }
}

/* Søgeresultater styling */
.results-list {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    max-width: 800px;
    text-align: left;
}

.results-list li {
    color: #FFFFFF;
    padding: 15px;
    border-bottom: 1px solid #333;
    line-height: 1.4;
}

.results-list li strong {
    color: #95C88D; /* Lysegrøn farve til ID og fremhævning */
}

.no-results {
    background-color: #1a1a1a;
    color: #FFFFFF;
    padding: 30px;
    border: 1px solid #333;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 8px;
    text-align: center;
}

/* Specifik styring til brede tekstblokke på søgesider */
.grid-full .intro-text, 
.grid-full .results-list,
.grid-full .search-form {
    max-width: 800px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Foto-grid styling */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px auto;
}

.photo-item {
    background-color: #111;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #000;
}

.photo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Sikrer at hele billedet er synligt og den længste side nedskaleres */
}

.photo-info {
    color: #ccc;
    font-size: 0.85em;
    line-height: 1.3;
}

.photo-box img {
    cursor: pointer;
    transition: opacity 0.3s;
}

.photo-box img:hover {
    opacity: 0.8;
}

/* Modal (Popup) styling */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 60px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


/* Søgeformular styling */
.search-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.form-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.form-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    border-radius: 6px;
    font-family: inherit;
}

/* Paginering styling */
.pagination-footer {
    max-width: 800px;
    margin: 30px auto 0 auto;
    padding: 15px 0;
    border-top: 1px solid #444;
    text-align: left;
}

/* Fjern pile (spinners) fra tal-input felter */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.input-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

.input-container label {
    color: #95C88D;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: bold;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: #014B34;
    color: white;
    border: 2px solid #95C88D;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background-color: #95C88D;
    color: #000;
}

/* Gamle styles bevares herunder */
.newStyleBlack {
	background-color: #000000;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_frontpage/img_frontpage_background.jpg')*/
}

.newStyleWhite {
	background-color: #FFFFFF;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_frontpage/img_frontpage_background.jpg')*/
}

.newStyleGreen {
	background-color: #014B34;
	background-attachment: scroll;
	background-position: center;
	color: #000000;
	border-color:black;
}

.newStyleWhiteOnGreen {
	background-color: #014B34;
	background-attachment: scroll;
	background-position: center;
	color: #FFFFFF;
}

.newStyleBlue {
	background-color: #17375E;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_frontpage/img_frontpage_background.jpg')*/
}

.newStyleIndex {
	background-color: #000000;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_frontpage/img_frontpage_background.jpg')*/
}

.newStyleFamily {
	background-color: #000000;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_family/img_family_frontpage/img_family_frontpage_background.jpg')*/
}

.newStyleReunion {
	/*background-color: #FFFFFF;*/
	background-attachment: scroll;
	background-position: center;
	background-image:url('../images/img_reunion/img_reunion_frontpage_background.png')
}

.newStyleMe {
	background-color: #000000;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_family/img_family_frontpage/img_family_frontpage_background.jpg')*/
}

.newStyleMemories {
	background-color: #000000;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_family/img_family_frontpage/img_family_frontpage_background.jpg')*/
}

.newStyleMe {
	background-color: #FFFFFF;
	background-attachment: scroll;
	background-position: center;
	/*background-image:url('../images/img_family/img_family_frontpage/img_family_frontpage_background.jpg')*/
}

body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
	/*background-color: #FEA027;*/
	/*background-image: none;	/* background-image: url(../images/img_generelt/aabakken_baggrund.jpg); */
	background-attachment: scroll;
}

#lightgreen {
	color: #95C88D
}

#middlegreen {
	color: #00593D
}

#darkgreen {
	color: #014B34
}

#lightblue {
	color: #4F81BD
}

#lblue {
	color: #4F81BD
}

#middleblue {
	color: #004290
}

#darkblue {
	color: #17275E
}

#txt_hvid {
	color: #FFF;
}
a {
	font-family: Verdana, Geneva, sans-serif;
	color: #000;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000;
}
a:hover {
	text-decoration: none;
	color: #666;
}
a:active {
	text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
	font-family: Arial, Helvetica, sans-serif;
}
h1 {
	font-size: 20pt;
}
h2 {
	font-size: 18pt;
}
h3 {
	font-size: 16pt;
}
h4 {
	font-size: 14pt;
}
h5 {
	font-size: 12pt;
}
body,td,th {
	font-size: 10pt;
	font-family: Arial, Helvetica, sans-serif;
}
h6 {
	font-size: 10pt;
}

div.pkt8 {font-size: 8pt; line-height: 8pt;}

div.pkt8tab10 {font-size: 8pt; line-height: 8pt; margin-left: 10pt}

div.pkt8tab20 {font-size: 8pt; line-height: 8pt; margin-left: 20pt}

div.pkt9 {font-size: 9pt; line-height: 8pt;}

div.pkt9tab10 {font-size: 9pt; line-height: 8pt; margin-left: 10pt}

div.pkt9tab20 {font-size: 9pt; line-height: 8pt; margin-left: 20pt}

div.pkt9tab30 {font-size: 9pt; line-height: 8pt; margin-left: 30pt}

div.pkt9tab40 {font-size: 9pt; line-height: 8pt; margin-left: 40pt}

div.pkt9tab50 {font-size: 9pt; line-height: 8pt; margin-left: 50pt}

div.pkt9tab60 {font-size: 9pt; line-height: 8pt; margin-left: 60pt}

div.pkt10 {font-size: 10pt; line-height: 10pt;}

div.pkt10tab {font-size: 10pt; line-height: 10pt; margin-left: 10pt}

div.pkt11 {font-size: 11pt; line-height: 11pt;}

div.pkt12 {font-size: 12pt; line-height: 12pt;}

div.pkt14 {font-size: 14pt; line-height: 14pt;}

div.pkt16 {font-size: 16pt; line-height: 16pt;}

div.headline14 {font-size: 14pt; line-height: 16pt; font-weight: 800}

div.headline16 {font-size: 16pt; line-height: 18pt; font-weight: 800}

.oneColFixCtr #container #mainContent table tr td strong a {
	color: #FFF;
}
div:small {
	font-size: 8pt;
}
.oneColFixCtr #container #mainContent table tr td p strong a {
	color: #000;
}
.oneColFixCtr #container #mainContent table tr td h5 strong a {
	color: #000;
}
.oneColFixCtr #container #mainContent table tr td h6 strong a {
	color: #000;
}
.blaa10 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #0000FF;
}
.blaa12 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	color: #0000FF;
}

.txt12 {font-size: 12pt; font-weight:normal; color: #000000}
.txt14 {font-size: 14pt; font-weight:normal; color: #000000}
.txt16 {font-size: 16pt; font-weight:normal; color: #000000}
.txt14fed {font-size: 14pt; font-weight:bold; color: #000000}

.txt16tab10fedhvid {font-size: 16pt; font-weight:bold; color: #FFFFFF; margin-left: 10pt}

.txt32tab10fedbrun {font-size: 32pt; font-weight:bold; color: #130711; margin-left: 10pt}

.blaah1 {font-size: 20pt; color: #03037B}
.blaah2 {font-size: 18pt; color: #03037B}
.blaah3 {font-size: 16pt; color: #03037B}
.blaah4 {font-size: 14pt; color: #03037B}
.blaah5 {font-size: 12pt; color: #03037B}
.blaah6 {font-size: 10pt; color: #03037B}

.blaah1fed {font-size: 20pt; font-weight:bold; color: #03037B}
.blaah2fed {font-size: 18pt; font-weight:bold; color: #03037B}
.blaah3fed {font-size: 16pt; font-weight:bold; color: #03037B}
.blaah4fed {font-size: 14pt; font-weight:bold; color: #03037B}
.blaah5fed {font-size: 12pt; font-weight:bold; color: #03037B}
.blaah6fed {font-size: 10pt; font-weight:bold; color: #03037B}

.redh2 {font-size: 18pt; color: #FF0000}
.redh3 {font-size: 16pt; color: #FF0000}
.redh2fed {font-size: 18pt; font-weight:bold; color: #FF0000}
.redh3fed {font-size: 16pt; font-weight:bold; color: #FF0000}

.blackh1 {font-size: 20pt; color: #000000}
.blackh2 {font-size: 18pt; color: #000000}
.blackh3 {font-size: 16pt; color: #000000}
.blackh4 {font-size: 14pt; color: #000000}
.blackh5 {font-size: 12pt; color: #000000}
.blackh6 {font-size: 10pt; color: #000000}

.blackh1fed {font-size: 20pt; font-weight:bold; color: #000000}
.blackh2fed {font-size: 18pt; font-weight:bold; color: #000000}
.blackh3fed {font-size: 16pt; font-weight:bold; color: #000000}
.blackh4fed {font-size: 14pt; font-weight:bold; color: #000000}
.blackh5fed {font-size: 12pt; font-weight:bold; color: #000000}
.blackh6fed {font-size: 10pt; font-weight:bold; color: #000000}

.whiteh1 {font-size: 20pt; color: #FFFFFF}
.whiteh2 {font-size: 18pt; color: #FFFFFF}
.whiteh3 {font-size: 16pt; color: #FFFFFF}
.whiteh4 {font-size: 14pt; color: #FFFFFF}
.whiteh5 {font-size: 12pt; color: #FFFFFF}
.whiteh6 {font-size: 10pt; color: #FFFFFF}

.whiteh1fed {font-size: 20pt; font-weight:bold; color: #FFFFFF}
.whiteh2fed {font-size: 18pt; font-weight:bold; color: #FFFFFF}
.whiteh3fed {font-size: 16pt; font-weight:bold; color: #FFFFFF}
.whiteh4fed {font-size: 14pt; font-weight:bold; color: #FFFFFF}
.whiteh5fed {font-size: 12pt; font-weight:bold; color: #FFFFFF}
.whiteh6fed {font-size: 10pt; font-weight:bold; color: #FFFFFF}

/* --- Administration Modul Styles --- */
.admin-table { width: 100%; max-width: 1200px; margin: 20px auto; border-collapse: collapse; color: white; background: #111; font-size: 0.85rem; }
.admin-table th, .admin-table td { padding: 10px; border: 1px solid #333; text-align: left; }
.admin-table th { background: #1a1a1a; color: #95C88D; }

.admin-form-box { width: 100%; max-width: 900px; background: #111; padding: 25px; border-radius: 12px; border: 1px solid #333; margin: 0 auto 30px auto; box-sizing: border-box; }
.admin-form-box h3 { color: #95C88D; margin-top: 0; margin-bottom: 20px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; color: #95C88D; margin-bottom: 5px; font-size: 0.8rem; font-weight: bold; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; background: #222; border: 1px solid #444; color: white; border-radius: 6px; box-sizing: border-box; }

.search-box { margin-bottom: 20px; display: flex; gap: 10px; justify-content: center; }
.search-box input { width: 300px; padding: 10px; background: #111; border: 1px solid #333; color: white; border-radius: 6px; }

.alert { padding: 15px; margin: 0 auto 20px auto; border-radius: 6px; text-align: center; max-width: 900px; font-weight: bold; }
.alert-success { background: rgba(149, 200, 141, 0.2); color: #95C88D; border: 1px solid #95C88D; }
.alert-error { background: rgba(255, 85, 85, 0.2); color: #ff5555; border: 1px solid #ff5555; }

.btn-action { text-decoration: none; padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; display: inline-block; }
.btn-edit { background: #014B34; color: white; }
.btn-delete { background: #441111; color: #ffaaaa; }

.img-preview { height: 50px; width: auto; border: 1px solid #333; }

/* Admin Oversigt Menu */
.admin-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 1000px; margin: 40px auto; width: 100%; }
.admin-card { background: #111; border: 2px solid #333; border-radius: 12px; padding: 30px; text-align: center; transition: all 0.3s ease; text-decoration: none; color: white; display: flex; flex-direction: column; justify-content: center; }
.admin-card:hover { transform: translateY(-5px); border-color: #95C88D; background: #1a1a1a; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.admin-card h3 { color: #95C88D; margin-bottom: 10px; font-size: 1.5rem; }
.admin-card p { font-size: 0.85rem; color: #aaa; line-height: 1.4; }
.status-indicator { font-size: 0.75rem; color: #666; margin-top: 20px; text-align: center; }

/* Specifikke tabelbredder for admin moduler */
/* Arkivalier */
.admin-table-arkiv th, .admin-table-arkiv td { padding: 8px 6px; }
.admin-table-arkiv th:nth-child(1), .admin-table-arkiv td:nth-child(1) { width: 85px; }
.admin-table-arkiv th:nth-child(2), .admin-table-arkiv td:nth-child(2) { width: 55px; text-align: center; }
.admin-table-arkiv th:nth-child(3), .admin-table-arkiv td:nth-child(3) { width: 45px; text-align: center; }
.admin-table-arkiv th:nth-child(5), .admin-table-arkiv td:nth-child(5) { width: 45px; text-align: center; }
.admin-table-arkiv th:nth-child(6), .admin-table-arkiv td:nth-child(6) { width: 45px; text-align: center; }
.admin-table-arkiv th:nth-child(7), .admin-table-arkiv td:nth-child(7) { width: 50px; text-align: center; }
.admin-table-arkiv th:nth-child(8), .admin-table-arkiv td:nth-child(8) { width: 140px; white-space: nowrap; text-align: center; }
.admin-table-arkiv td:nth-child(8) .btn-action { padding: 4px 7px; margin: 0 1px; }

/* Billeder */
.admin-table-billed th:nth-child(1), .admin-table-billed td:nth-child(1) { width: 60px; }
.admin-table-billed th:nth-child(2), .admin-table-billed td:nth-child(2) { width: 80px; }
.admin-table-billed th:nth-child(3), .admin-table-billed td:nth-child(3) { max-width: 60px; }
.admin-table-billed th:nth-child(5), .admin-table-billed td:nth-child(5) { width: 60px; }

/* ==========================================================================
   Visning af scannede arkivalier (vis_arkivalier.php)
   ========================================================================== */
.archive-viewer-wrapper {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

.archive-viewer-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    margin-bottom: 25px;
}

.archive-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080808;
    height: 70vh;
    min-height: 420px;
    max-height: 750px;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

.archive-scan-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
    cursor: zoom-in;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.archive-scan-img:hover {
    transform: scale(1.01);
}

/* Store < og > bladre-knapper */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.75);
    color: #95C88D;
    border: 1px solid #444;
    width: 52px;
    height: 64px;
    border-radius: 8px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    text-decoration: none;
}

.nav-arrow:hover:not(:disabled) {
    background: #95C88D;
    color: #111;
    border-color: #95C88D;
    box-shadow: 0 0 15px rgba(149, 200, 141, 0.4);
}

.nav-arrow:disabled, .nav-arrow.disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-prev {
    left: 15px;
}

.nav-next {
    right: 15px;
}

/* Værktøjslinje under scanningen */
.archive-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #161616;
    border-top: 1px solid #252525;
    flex-wrap: wrap;
    gap: 12px;
}

.archive-page-counter {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.archive-page-counter .badge-page {
    background: #252525;
    color: #95C88D;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #333;
}

.archive-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-btn {
    background: #222;
    color: #ddd;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.archive-btn:hover:not(:disabled) {
    background: #333;
    color: #95C88D;
    border-color: #95C88D;
}

.archive-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.archive-meta-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.archive-meta-card h2 {
    color: #95C88D;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.archive-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #252525;
}

.archive-meta-item strong {
    color: #888;
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .nav-arrow {
        width: 42px;
        height: 52px;
        font-size: 22px;
    }
    .nav-prev { left: 8px; }
    .nav-next { right: 8px; }
    .archive-controls {
        justify-content: center;
    }
    .archive-stage {
        height: 55vh;
        min-height: 320px;
        max-height: 480px;
        padding: 8px;
    }
}


/* ==========================================================================
   Forstørret visning / Nærlæsning af arkivalier (Modal Viewer)
   ========================================================================== */
.archive-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(6px);
    overflow: hidden;
    user-select: none;
    flex-direction: column;
}

.archive-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(18, 18, 18, 0.92);
    border-bottom: 1px solid #2a2a2a;
    box-sizing: border-box;
    gap: 12px;
}

.archive-modal-header-left,
.archive-modal-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-modal-zoom-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #161616;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #333;
}

.archive-modal-btn {
    background: #242424;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.archive-modal-btn:hover:not(:disabled) {
    background: #333;
    color: #95C88D;
    border-color: #95C88D;
}

.archive-modal-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.archive-modal-btn-close {
    background: #2a1515;
    color: #ffaaaa;
    border-color: #552222;
}

.archive-modal-btn-close:hover {
    background: #c9302c !important;
    color: #fff !important;
    border-color: #c9302c !important;
}

.archive-modal-badge {
    color: #95C88D;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.archive-modal-viewport {
    position: absolute;
    top: 60px;
    bottom: 32px;
    left: 0;
    right: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.archive-modal-viewport.is-dragging {
    cursor: grabbing;
}

.archive-modal-stage {
    position: absolute;
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
}

.archive-modal-stage img {
    display: block;
    max-width: none !important;
    max-height: none !important;
    width: auto;
    height: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95);
    border-radius: 4px;
    pointer-events: auto;
}

.archive-modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: rgba(12, 12, 12, 0.92);
    border-top: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #888;
    pointer-events: none;
    z-index: 3100;
}

@media (max-width: 768px) {
    .archive-modal-header {
        height: auto;
        padding: 8px 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .archive-modal-viewport {
        top: 96px;
        bottom: 28px;
    }
    .archive-modal-footer {
        font-size: 0.72rem;
        height: 28px;
    }
}
