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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f2f2f2;
    color: #333;
    min-height: 101vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* RESPONSIVE HEADER */

header {
    background-color: #333;
    color: #fff;
    padding: 10px 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.header-container {
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

nav button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s;
}

nav button:hover {
    background-color: #d9544f9b;
}



@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    nav.active {
        display: flex;
    }

    nav a {
        width: 100%;
        padding: 10px 0;
        text-align: left;
        border-top: 1px solid #555;
    }
}


.error-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffdddd;
    color: #a10000;
    padding: 12px 20px;
    border: 1px solid #a10000;
    border-radius: 6px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    max-width: 300px;
}



@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

    .header-right nav a,
    .header-right nav button {
        width: 100%;
        text-align: left;
    }
}

/* NON-FUNCTIONAL POST CONTROLS */

.post-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

#searchInput {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #eee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-btn:hover {
    background-color: #ddd;
}

#sortSelect {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
    min-width: 180px;
}

/* POSTS LISTING */

#postContainer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    #postContainer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #postContainer {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
}

.post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.post-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.post-body {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

/* SKELETON PLACEHOLDER */

#skeletonContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skeleton-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.skeleton-img {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
}

.skeleton-text {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite;
}

.skeleton-text.title {
    width: 80%;
    height: 20px;
}

.skeleton-text.line {
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}



/* ABOUT PAGE */

.about-section {
    padding: 40px 20px;
}

.about-container {
    display: flex;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    align-items: center;
}

.about-img {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
    min-width: 250px;
}

.about-text h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.about-text p {
    margin-bottom: 15px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    margin-right: 15px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #0077b5;

}


.social-links i {
    vertical-align: middle;
}