/* public/css/main.css */

/* --- 1. Generelle Resets og Typografi --- */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    margin-bottom: 20px;
}

h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }

p {
    color: #555;
    margin-bottom: 15px;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- 2. Fælles Containere og Layout --- */
.container,
.login-container,
.dashboard-container,
.page-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto;
}

.container { 
    max-width: 1200px;
}
.page-container { max-width: 960px; }
.dashboard-container { max-width: 800px; }
.login-container { max-width: 300px; text-align: center; }

/* Specifik styling for Kontakt os side (flexbox layout) */
.contact-page-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}


/* --- 3. Header & Navigation (Frontend & Admin) --- */

.top-header-bar {
    background-color: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.top-left, .top-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.site-slogan {
    font-size: 1.1em;
    color: #666;
    white-space: nowrap;
}
.social-icons a {
    color: #000;
    font-size: 1.5em;
    margin-left: 10px;
    transition: transform 0.2s ease-in-out;
}
.social-icons a:hover {
    transform: scale(1.1);
}
.header-logo {
    max-height: 70px;
    width: auto;
    display: block;
}
.main-header {
    background-color: #ededed;
    padding: 0 20px;
    border-bottom: 1px solid #d0d0d0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 60px;
    position: relative;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1200px;
    width: 100%;
    justify-content: center;
}
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    justify-content: center;
}
.site-nav li {
    position: relative;
}
.site-nav a {
    padding: 15px 20px;
    text-decoration: none;
    color: #000;
    border: none;
    white-space: nowrap;
    display: block;
    position: relative;
    transition: background-color 0.3s ease;
    border-radius: 8px;
}
.site-nav a::before {
    display: none;
}
.site-nav a:hover {
    text-decoration: none;
    background-color: #e0e0e0;
}
.site-nav a.active {
    font-weight: bold;
    background-color: #e0e0e0;
}
.site-nav ul.sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    border-radius: 8px;
    min-width: 220px;
    z-index: 100;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    border-top: 3px solid #4CAF50;
}
.site-nav li:hover > ul.sub-menu {
    display: flex;
}
.site-nav .sub-menu li {
    width: 100%;
}
.site-nav .sub-menu a {
    padding: 12px 20px;
    color: #333;
    border-radius: 0;
}
.site-nav .sub-menu a:hover {
    background-color: #e0e0e0;
    color: #000;
}


/* Admin: Fælles Header for Admin Sider */
.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.admin-logo {
    max-height: 50px;
    width: auto;
}
.admin-header-row h1 {
    margin-bottom: 0;
}

/* --- 4. Knapper og Formularer --- */

.btn {
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
.btn:hover {
    background-color: #333;
    text-decoration: none;
    color: #fff;
}
.btn.btn-sm {
    padding: 5px 10px;
    font-size: 0.85em;
}
.btn-success { background-color: #28a428; }
.btn-success:hover { background-color: #218c21; }
.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }
.btn-black {
    background-color: #000;
    color: #fff;
}
.btn-black:hover {
    background-color: #333;
}

/* Formularfelter */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
.contact-form .form-group {
    display: block;
}
.contact-form .form-group > div {
    margin-bottom: 15px;
}
.contact-form .form-group label,
.contact-form .form-group input,
.contact-form .form-group textarea {
    margin-bottom: 0;
}
.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
}
.form-actions {
    text-align: right;
}
.form-group.honeypot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* --- 5. Beskeder og Tabeller --- */

.error-message { color: red; }
.success-message { color: green; }
.info-message { color: #007bff; }
.action-links a {
    text-decoration: none;
    color: #007bff;
}
.action-links a.btn {
    margin-right: 5px;
    color: #fff;
}
.action-links a.btn:hover {
    color: #fff;
}

/* Specifik styling for Henvendelser-tabellen */
.submissions-table th, 
.submissions-table td {
    padding: 12px 15px;
    vertical-align: middle;
}
.filter-buttons a.btn {
    color: #fff;
}
.filter-buttons a.btn:hover {
    color: #fff;
}
.message-details {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}
.message-details p {
    margin: 5px 0;
    color: #333;
}
tr.unread {
    font-weight: bold;
    background-color: #fff9e6;
}
.filter-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-buttons a.btn.active {
    background-color: #333;
}

/* --- 6. Hero Sektion --- */
.hero-section {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.hero-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* --- 7. Indhold & Billeder --- */

/* TILFØJET: Gør billeder i sideindholdet responsive */
.page-container img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* Afrundede hjørner der matcher containeren */
}


/* --- 8. Fokus Sektion (Vores Fokus) --- */
.focus-section {
    background-color: #f8f8f8;
    padding: 40px 20px;
}
.focus-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: #333;
}
.focus-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.focus-box {
    flex: 1 1 280px;
    max-width: 320px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.focus-box:hover {
    transform: translateY(-5px);
}
.focus-box h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.focus-title-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.focus-box p {
    font-size: 0.95em;
    line-height: 1.5;
    color: #666;
}

/* --- 9. Footer --- */
.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #f4f4f4;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 0.9em;
}

/* --- 10. Responsivitet og Burgermenu --- */
.burger-menu-toggle {
    display: none;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.burger-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}
.burger-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.burger-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}
.burger-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .main-header {
        justify-content: center;
    }
    .burger-menu-toggle {
        display: block;
    }
    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #f8f8f8;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        padding-top: 80px;
    }
    .site-nav.is-open {
        display: block;
        left: 0;
    }
    .site-nav ul {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }
    .site-nav li {
        width: 100%;
    }
    .site-nav a {
        padding: 15px 25px;
        border-radius: 0;
        border-bottom: 1px solid #ddd;
        width: 100%;
    }
    .site-nav ul.sub-menu {
        position: static;
        display: block;
        background-color: #fff;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        padding: 0;
        min-width: unset;
        width: 100%;
    }
    .site-nav .sub-menu a {
        padding-left: 40px;
        font-size: 0.9em;
        color: #555;
        border-color: #eee;
    }
}

/* --- 11. Admin-specifikke Styles --- */
.interactive-tree ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.interactive-tree ul::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 1px;
    background: #e0e0e0;
}
.interactive-tree li {
    position: relative;
    padding-left: 30px;
}
.interactive-tree li::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10px;
    width: 15px;
    height: 1px;
    background: #e0e0e0;
}
.interactive-tree .page-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.interactive-tree .page-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.interactive-tree .page-title {
    font-weight: bold;
}
.interactive-tree .page-order {
    color: #666;
    font-size: 0.9em;
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.interactive-tree .action-links {
    flex-shrink: 0;
}
.toggle-children, .toggle-children-placeholder {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 0.8em;
}
.toggle-children:hover {
    color: #000;
}
.toggle-children .fa-chevron-right {
    transition: transform 0.2s ease-in-out;
}
.has-children > .page-tree-level {
    display: none;
}
.has-children.open > .page-tree-level {
    display: block;
}
.has-children.open > .page-row .toggle-children .fa-chevron-right {
    transform: rotate(90deg);
}

/* --- 12. Admin Dashboard og Actions Styles --- */

.dashboard-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.dashboard-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}
.dashboard-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #fff;
    text-decoration: none;
    color: #000;
}
.dashboard-btn i {
    font-size: 4em;
    margin-bottom: 20px;
    color: #4CAF50;
}
.dashboard-btn span {
    font-size: 1.5em;
    font-weight: bold;
}
.page-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.page-actions-header .btn i {
    margin-right: 5px;
}