/* ============================================================
   Munkehøj Grundejerforening – Shared Stylesheet
   Step 1: Static Site Foundation
   Colours and behaviour matched exactly to approved prototype
   ============================================================ */

:root {
    --primary-color:   #2c6c8e;
    --secondary-color: #f0a04b;
    --text-color:      #333;
    --light-bg:        #f9f9f9;
    --dark-bg:         #1d4259;
    --border-radius:   8px;
    --box-shadow:      0 4px 12px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    background-image: linear-gradient(to bottom, #f9f9f9, #f0f0f0);
    background-attachment: fixed;
}

/* ── HEADER ──────────────────────────────────────────────── */
header {
    background-color: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 600;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
    background-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

nav ul {
    display: flex;
    list-style-type: none;
    margin: 0 auto;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    position: relative;
}

.nav-right { margin-left: auto; }

nav li {
    padding: 0;
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 1.2rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

nav a.active {
    background-color: var(--secondary-color);
    color: white;
}

/* Dropdown */
nav li.has-dropdown > a::after {
    content: ' \25BE';
    font-size: 0.75rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    min-width: 210px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    list-style: none;
}

.dropdown-menu li a {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

nav li.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* ── HERO IMAGE (Hjem) ───────────────────────────────────── */
.header-image {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

/* ── CONTENT CONTAINER ───────────────────────────────────── */
.container {
    width: 80%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    min-height: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
}

/* Kontakt page uses wider container matching original */
.container-wide {
    width: 90%;
    max-width: 1200px;
    margin: 3rem auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.container h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 1.4rem;
    margin-bottom: 0.4rem;
}

.container h2:first-child { margin-top: 0; }

.container p { margin-bottom: 0.6rem; }

.container ul {
    padding-left: 30px;
    margin-bottom: 0.8rem;
}

.container ul li { margin-bottom: 3px; }

/* ── DOCUMENT ENTRY ──────────────────────────────────────── */
.item {
    margin-bottom: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.item .item-header {
    font-size: 16px;
    color: #3498db !important;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
}

.item p { font-size: 12px; }

.pdf-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* ── PDF / DOCUMENT BUTTON ───────────────────────────────── */
.pdf-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

.pdf-link:hover { background-color: #c0392b; }

.pdf-icon { margin-right: 6px; }

/* ── BOARD MEMBERS ───────────────────────────────────────── */
.team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 0.8rem;
}

.team-member {
    flex: 1;
    padding: 1rem;
    margin: 1rem;
    background: #f4f4f4;
    text-align: center;
    min-width: 90px;
    max-width: 100px;
    font-size: 12px;
    border-radius: 4px;
}

.team-member h3 {
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
}

/* ── NEWS ARTICLE ────────────────────────────────────────── */
.news-article {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.news-article:last-child { border-bottom: none; }

.article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-article h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* ── CONTACT PAGE ────────────────────────────────────────── */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1rem;
}

.contact-form {
    flex: 3;
    min-width: 300px;
    padding-right: 2rem;
}

.contact-info {
    flex: 2;
    min-width: 250px;
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 1rem; }

form { margin-bottom: 2rem; }

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

::placeholder { color: #aaa; font-style: italic; }

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 108, 142, 0.2);
}

input[type="email"] { border-color: #ddd; }
input[type="email"]:not(:placeholder-shown):invalid { border-color: #e74c3c; }
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 108, 142, 0.2);
}
input[type="email"]:not(:placeholder-shown):invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

textarea { height: 150px; resize: vertical; }

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
    display: inline-block;
}

.submit-btn:hover { background-color: #1d5476; }

.required { color: #e74c3c; margin-left: 3px; }

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    display: none;
    border-left: 4px solid #155724;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    display: none;
    border-left: 4px solid #721c24;
}

.contact-method {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.contact-method i {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 2rem;
    text-align: center;
    padding-top: 0.2rem;
}

.contact-method-content { flex: 1; }

.contact-method h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-method p { margin-bottom: 0.5rem; line-height: 1.5; }

.contact-info h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.6rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
}

/* ── PLACEHOLDER ─────────────────────────────────────────── */
.placeholder-notice {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-style: italic;
}

/* ============================================================
   ADMIN – SLET-BEKRÆFTELSESSIDER (Trin 17B)
   Fælles visuelt udtryk for alle 11 slet-bekræftelsessider i
   admin/-mappen. Se Arbejdsdokumentet, Trin 17B, for baggrund
   og designbeslutning.
   ============================================================ */

/* Selve kortet med den røde kant */
.confirm-card {
    background: white;
    border: 2px solid #c0392b;
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    max-width: 600px;
}

.confirm-card h3 {
    color: #c0392b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Advarselstekst – almindelig tekst, ingen boks */
.warning-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.warning-text strong { color: #c0392b; }

/* Grå detalje-boks: bruges til BÅDE navngivne felter (dl/dt/dd)
   OG fillister (ul.file-list) – indholdet varierer, boksen er ens */
.detail-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.4rem;
    font-size: 0.9rem;
}

.detail-box dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.8rem;
}

.detail-box dt { font-weight: 600; color: #555; white-space: nowrap; }
.detail-box dd { margin: 0; color: #333; }

.detail-box .file-list {
    list-style: none;
    margin: 0;
}

.detail-box .file-list li {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.3rem;
}

/* Layout-variant: bruges når en detalje-boks skal vise et
   rundt foto-ikon (fx .avatar-circle) ved siden af dl/dt/dd */
.detail-box.with-avatar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* "Blokeret"-variant: bruges når en handling ikke kan udføres
   (fx en kategori indeholder stadig indlæg og kan ikke slettes) */
.detail-box.blocked {
    background: #f8d7da;
}

/* Knapper til slet-bekræftelsessider */
.form-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-delete-confirm {
    background: #c0392b;
    color: white;
    border: none;
    padding: 0.6rem 1.3rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-delete-confirm:hover { background: #962d22; color: white; }

.btn-cancel {
    background: #e0e0e0;
    color: var(--text-color);
    padding: 0.6rem 1.3rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-cancel:hover { background: #c8c8c8; color: var(--text-color); }

/* Bruges til "primære" handlinger på slet-bekræftelsessider,
   fx "Åbn rediger" – adskiller sig fra slet (rød) og annuller (grå) */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.3rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-primary:hover { background: #1d5476; color: white; }

/* ── AVATAR / PROFILFOTO (genanvendelig) ─────────────────────
   Rund foto-ramme med automatisk fallback-ikon (silhuet), hvis
   intet foto findes. Bruges i dag på board_member_delete.php,
   men navngivet generisk så den kan genbruges andre steder
   fremadrettet (fx medlemsliste, profilvisning). */
.avatar-circle {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-circle svg {
    width: 60%;
    height: 60%;
    fill: #aaa;
}

/* Størrelses-variant: bruges på bestyrelsen_om.php (offentlig side) */
.avatar-circle.large {
    width: 80px;
    height: 80px;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    background-color: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

footer a { color: rgba(255,255,255,0.8); text-decoration: underline; }
footer a:hover { color: white; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .container,
    .container-wide { width: 95%; margin: 1rem auto; padding: 1.2rem; }

    nav ul { flex-direction: column; text-align: center; }
    nav li.has-dropdown > a::after { display: none; }
    .dropdown-menu { position: static; box-shadow: none; display: block; }

    .contact-container { flex-direction: column; }
    .contact-form { padding-right: 0; margin-bottom: 2rem; }

    header h1 { font-size: 1.4rem; padding: 0 1rem; }
}
