/* css/style.css */
:root {
    --bg-color: #d1d5d6; /* Mørkere beton base */
    --text-color: #1a1a1a;
    --primary-color: #c04b36; /* Teglrød / brændt orange */
    --dark-color: #2b2b2b; /* Dark charcoal/concrete for structure */
    --accent-color: #2c4c3b; /* Dyb skovgrøn */
    --white: #ffffff;
    --secondary-bg: rgba(255, 255, 255, 0.5); /* Glassmorphism base */
    --border-color: rgba(255, 255, 255, 0.6); /* Glass border */
    --max-width: 1200px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 75px; /* Offset for fixed navbar globally */
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(209, 213, 214, 0.75); /* Beton farve med transparens */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
}

/* Hero Section */
#hero {
    position: relative;
    height: 48vh;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    border-bottom: 4px solid var(--dark-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Darken video */
    z-index: 1;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
    background-color: var(--dark-color); /* Fallback */
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 0;
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    border: 2px solid var(--white);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

/* Main Content */
#app-content {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 2rem;
    min-height: 50vh;
}

/* Markdown styling inside #app-content */
#app-content h1 {
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid rgba(43, 43, 43, 0.2);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--dark-color);
}

#app-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.3rem;
}

#app-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

#app-content ul, #app-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    font-size: 1.05rem;
}

#app-content li {
    margin-bottom: 0.5rem;
}

#app-content a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

#app-content a:hover {
    color: var(--primary-color);
}

#app-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
    border: 2px solid var(--dark-color);
}

#app-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

#app-content th, #app-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(43, 43, 43, 0.1);
}

#app-content th {
    background-color: rgba(43, 43, 43, 0.05);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
}

#app-content tr:last-child td {
    border-bottom: none;
}

#app-content tr:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-container p {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Auth Container */
.auth-container {
    background: var(--secondary-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.auth-container input {
    width: 100%;
    padding: 12px 15px;
    margin: 15px 0;
    border: 1px solid rgba(43, 43, 43, 0.2);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.auth-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 75, 54, 0.1);
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-container button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Info Box / Highlight */
.info-box {
    background-color: rgba(192, 75, 54, 0.05); /* Teglrød subtil */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(192, 75, 54, 0.15);
    border-left: 6px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}

.info-box h2 {
    margin-top: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-size: 1.5rem !important;
}

.info-box ul {
    margin-bottom: 0 !important;
}

.info-box li {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Removes bottom gap in wrapper */
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.gallery-title {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--dark-color);
    text-transform: capitalize;
}

/* Lightbox (Friis & Moltke) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 43, 43, 0.95);
    overflow: auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-wrapper {
    position: relative;
    display: inline-block;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    border: 8px solid var(--secondary-bg); /* Rå grå kant */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    background-color: var(--secondary-bg);
    color: var(--dark-color);
    width: 50px;
    height: 50px;
    font-size: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

#lightbox-caption {
    margin-top: 15px;
    color: var(--secondary-bg);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Error messages */
.error-message {
    color: red;
    font-weight: bold;
    margin-top: 10px;
}

/* Frontpage Dashboard Layout */
.frontpage-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.fp-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.fp-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Box Styling (Glassmorphism) */
.box {
    background: var(--secondary-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.box h2, .box h3 {
    margin-top: 0 !important;
    font-size: 1.4rem !important;
    border-bottom: 2px solid rgba(43, 43, 43, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem !important;
    color: var(--dark-color);
}

.ref-list {
    list-style: none;
    padding-left: 0 !important;
    margin-bottom: 1rem !important;
}

.ref-list li {
    margin-bottom: 0.5rem;
}

.ref-list a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.ref-list a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.ref-dropdown {
    width: auto;
    min-width: 50%;
    max-width: 100%;
    padding: 6px;
    border: 1px solid var(--dark-color);
    background: #e9eceb;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0;
}

.arbejdsplan-box {
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .frontpage-grid, .fp-right {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Kalender Section Layout */
.kalender-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.kalender-section .kalender-text {
    flex: 1;
    min-width: 0;
}

.kalender-section .kalender-text h2 {
    margin-top: 0 !important;
}

.kalender-section .kalender-img {
    width: 220px;
    height: 165px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    border: none;
    margin: 0;
}

@media (max-width: 600px) {
    .kalender-section {
        flex-direction: column;
    }

    .kalender-section .kalender-img {
        width: 100%;
        height: 180px;
    }
}
