/* style.css - Styles for Alberta Accountability Project */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #003366;
    background-color: #ffffff;
}

/* Header Styles */
header {
    background-color: #003366;
    color: #FFD100;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    text-align: left;
    flex-grow: 1;
    font-family: Orbitron, Merriweather, Georgia, serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    gap: 10px;
}

nav a {
    color: #FFD100;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #FFFFFF;
}

/* Flash Messages */
.flashes {
    list-style: none;
    padding: 10px 20px;
    margin: 10px auto;
    max-width: 800px;
    background-color: #FFD100;
    color: #003366;
    font-weight: bold;
    border-radius: 5px;
}

/* Main Content Styles */
main {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Post Cards (Homepage) */
.post-card-link {
    text-decoration: none;
    color: inherit;
}

.post-card {
    display: flex;
    overflow: hidden;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #FFD100;
    border-radius: 8px;
    background-color: #F5F5F5;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.post-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #003366;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover overlay showing post date */
@media (hover: hover) {
    .post-thumbnail::after {
        content: attr(data-date);
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 5px 0;
        background: rgba(0, 51, 102, 0.75);
        color: #FFD100;
        font-size: 0.9em;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .post-card:hover .post-thumbnail img {
        transform: scale(1.1);
    }

    .post-card:hover .post-thumbnail::after {
        opacity: 1;
    }
}

.post-content h3 {
    color: #003366;
    margin-bottom: 10px;
    font-family: Merriweather, Georgia, serif;
}

.post-content p {
    margin: 0;
    color: #003366;
}

/* Full Post Page */
.full-post {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    text-align: center;
}

.post-content-full {
    line-height: 1.8;
    color: #003366;
    font-size: 1.1em;
    text-align: left;
}

.post-content-full h1 {
    color: #FFD100;
    margin-bottom: 20px;
    font-family: Merriweather, Georgia, serif;
    text-align: center;
}

.post-content-full p, .post-content-full ul, .post-content-full ol {
    margin: 10px 0;
}

.post-content-full ul, .post-content-full ol {
    margin-left: 20px;
}

.post-thumbnail-full {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #003366;
}

.post-thumbnail-full img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover overlay for thumbnail on post page */
@media (hover: hover) {
    .post-thumbnail-full::after {
        content: attr(data-date);
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 5px 0;
        background: rgba(0, 51, 102, 0.75);
        color: #FFD100;
        font-size: 0.9em;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .post-thumbnail-full:hover img {
        transform: scale(1.1);
    }

    .post-thumbnail-full:hover::after {
        opacity: 1;
    }
}

.post-video-full, .post-audio-full {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    border-radius: 8px;
    border: 2px solid #003366;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin: 20px;
    font-weight: bold;
    color: #FFD100;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* New Post Page */
.new-post-page {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.new-post-page h2 {
    color: #003366;
    border-bottom: 2px solid #FFD100;
    padding-bottom: 5px;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: Merriweather, Georgia, serif;
}

/* Login Page */
.login-page {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 15px;
}

.login-page h2 {
    color: #003366;
    border-bottom: 2px solid #FFD100;
    padding-bottom: 5px;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: Merriweather, Georgia, serif;
}

/* Project Page */
.project-page {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.project-page h2 {
    color: #003366;
    border-bottom: 2px solid #FFD100;
    padding-bottom: 5px;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: Merriweather, Georgia, serif;
}

.project-page h3 {
    color: #003366;
    margin: 1rem 0;
    font-family: Merriweather, Georgia, serif;
}

.project-page p, .project-page ul {
    margin: 10px 0;
}

.project-page ul {
    margin-left: 20px;
}

/* Form Styles (shared for new post, login) */
form {
    background: #F5F5F5;
    padding: 2rem;
    border: 1px solid #FFD100;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

label {
    font-weight: bold;
    color: #003366;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #003366;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
textarea:focus {
    outline: none;
    border-color: #FFD100;
    box-shadow: 0 0 5px rgba(255, 209, 0, 0.3);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Quill Editor */
.ql-container {
    font-family: Roboto, Arial, sans-serif;
    color: #003366;
}

.ql-toolbar {
    border: 1px solid #003366 !important;
    border-radius: 4px 4px 0 0;
}

.ql-container {
    border: 1px solid #003366 !important;
    border-radius: 0 0 4px 4px;
}

/* Custom File Input Styling */
input[type="file"] {
    padding: 0.5rem;
    background-color: #ffffff;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: #003366;
    color: #FFD100;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #002244;
    color: #FFFFFF;
}

/* Submit Button */
form button[type="submit"] {
    background-color: #003366;
    color: #FFD100;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.2s;
}

form button[type="submit"]:hover {
    background-color: #002244;
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo {
        margin: 0 auto 10px;
    }

    header h1 {
        text-align: center;
    }

    main {
        margin: 1rem;
        padding: 0 1rem;
    }

    .new-post-page, .login-page, .project-page {
        margin: 1rem;
        padding: 0 1rem;
    }

    form {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5em;
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .post-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .post-thumbnail {
        width: 80%;
        height: auto;
        margin: 0 0 10px 0;
    }

    form button[type="submit"] {
        font-size: 1rem;
        padding: 0.75rem;
    }
}