﻿/* Grundinställningar */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
}

/* Meny (Navigering) */
.main-nav {
    background-color: #1e293b; /* Mörkblå/skiffer */
    color: #fff;
    padding: 10px 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    padding: 10px 0;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
    float: right; /* Lägger menyn till höger på PC */
}

    .nav-links li {
        display: inline-block;
        margin-left: 20px;
    }

    .nav-links a {
        color: #cbd5e1;
        text-decoration: none;
        padding: 10px 5px;
        display: block;
    }

        .nav-links a:hover {
            color: #fff;
        }

/* Innehållsbehållare */
.content-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 400px;
}

/* Sidfot */
.main-footer {
    text-align: center;
    padding: 20px;
    background-color: #0f172a;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 40px;
}

/* Clearfix för float-elementen */
.nav-container::after {
    content: "";
    clear: both;
    display: table;
}

/* =======================================================
   MOBILANPASSNING (Media Queries)
   När skärmen är mindre än 768px (t.ex. en mobiltelefon)
   ======================================================= */
@media screen and (max-width: 768px) {
    .nav-links {
        float: none;
        display: block;
        text-align: center;
        margin-top: 10px;
    }

        .nav-links li {
            display: block;
            margin: 5px 0;
        }

    .brand {
        display: block;
        text-align: center;
        width: 100%;
    }

    .content-wrapper {
        margin: 10px;
        padding: 15px;
    }
}


/* Fasebook-flödet */
.fasebook-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

    .fasebook-header h2 {
        color: #1e293b;
        margin: 0;
    }

/* En enskild post/panel */
.post-panel {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Ger en mjuk skugga */
    transition: transform 0.2s;
}

    .post-panel:hover {
        transform: translateY(-2px); /* Liten lyfteffekt när man håller musen över */
    }

/* Header inuti panelen (Ort och Datum) */
.post-header {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between; /* Lägger ort till vänster och datum till höger */
}

.post-city {
    font-weight: bold;
    color: #3b82f6; /* Fasebook-blå */
}

/* Rubrik på posten */
.post-subject {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #0f172a;
}

/* Brödtexten */
.post-body p {
    margin: 0;
    line-height: 1.5;
    color: #334155;
    font-size: 15px;
}

/* Skapa inlägg-rutan */
.create-post-panel {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

    .create-post-panel h3 {
        margin-top: 0;
        color: #1e293b;
        font-size: 16px;
        margin-bottom: 15px;
    }

.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: table;
    width: 100%;
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    outline: none;
}

    .form-input:focus {
        border-color: #3b82f6;
    }

.half {
    display: table-cell;
    width: 50%;
    vertical-align: middle;
}

.file-upload-wrapper {
    padding-left: 15px;
    font-size: 13px;
    color: #475569;
}

    .file-upload-wrapper label {
        display: block;
        margin-bottom: 4px;
        font-weight: bold;
    }

/* Layout för att dela upp panelen om bild finns */
.post-content-layout {
    display: table;
    width: 100%;
}

.post-text-side {
    display: table-cell;
    vertical-align: top;
}

.post-image-side {
    display: table-cell;
    width: 210px;
    padding-left: 20px;
    vertical-align: top;
}

.resized-post-img {
    width: 200px;
    height: 200px;
    object-fit: cover; /* Ser till att bilden klipps snyggt till en kvadrat utan att bli utsträckt */
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.btn-submit {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-bold: true;
    border-radius: 6px;
    cursor: pointer;
}

    .btn-submit:hover {
        background-color: #2563eb;
    }

/* Responsivt för mobilen */
@media screen and (max-width: 768px) {
    .half, .post-text-side, .post-image-side {
        display: block;
        width: 100%;
        padding-left: 0;
    }

    .file-upload-wrapper {
        margin-top: 10px;
        padding-left: 0;
    }

    .post-image-side {
        margin-top: 15px;
        text-align: center;
    }
}


