/* Generel styling for det mørke tema */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 2rem;
    background-color: #121212; /* Mørk baggrund */
    color: #e0e0e0; /* Lys tekst */
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

h1, h2 {
    color: #ffffff;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #5dade2;
}

/* Styling for projektlisten (index.php) */
.projekt-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.projekt-kort {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.projekt-kort:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.projekt-kort h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border: none;
}

/* Styling for detaljesiden (projekt.php) */
.tilbage-knap {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
}

.projekt-beskrivelse {
    line-height: 1.7;
    font-size: 1.1rem;
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.billedgalleri-stor {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Mellemrum mellem billeder */
}

.billedgalleri-stor a {
    display: block;
}

.billedgalleri-stor img {
    width: 100%; /* Fyld containeren */
    height: auto;
    border-radius: 5px;
    border: 2px solid #444;
    transition: opacity 0.2s;
}

.billedgalleri-stor img:hover {
    opacity: 0.8;
    cursor: pointer;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.modal-luk {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.modal-luk:hover {
    color: #3498db;
}

.modal-navigation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#modal-billede {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #3498db;
    color: #3498db;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Animationer */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive design for modal */
@media (max-width: 768px) {
    .modal-luk {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    #modal-billede {
        max-width: 95%;
        max-height: 85%;
    }
}