/* --- Adobe Express Inspirerad Design --- */
:root {
    --primary-color: #0265DC;
    --bg-color: #f8f9fa; /* Ljusgrå bakgrund för hela sidan */
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

#wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- Header --- */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}

/* --- Sök & Kategorier (Återställd stil) --- */
#filters {
    margin-bottom: 40px;
}

#filters form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 50px; /* Runda hörn */
    padding: 12px 25px;
    font-size: 1rem;
    outline: none;
}

.category-filters h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.filter-actions {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Knappar */
.button {
    display: inline-block;
    padding: 10px 22px;
    background: #eee;
    color: var(--text-main);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button.primary {
    background: var(--primary-color);
    color: #fff !important;
}

.button.alt {
    background: #fff;
    border: 1px solid #ddd;
}

/* --- Galleriet --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.photo-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.photo-card:hover { transform: translateY(-8px); }

.image-container img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.photo-card .content {
    padding: 25px;
}

.photo-card .content h3 { margin: 0; font-size: 1.2rem; }

/* --- MODAL (Fönstret) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 249, 250, 0.96); /* Samma färg som sidan */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #fff;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    border-radius: var(--radius);
    position: relative;
    display: flex;
    flex-direction: column; /* Mobil */
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

@media (min-width: 800px) {
    .modal-content { flex-direction: row; }
}

.modal-image-container {
    flex: 1.8;
    background: #fff; /* NU SAMMA VITA FÄRG SOM TEXTEN */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-text-container {
    flex: 1;
    padding: 40px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #eee; /* En tunn linje för att separera på desktop */
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    color: #333;
}

.nav-controls {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
}
