@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

body {
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f0f8ff;
    /* width: 100vw;
    height: 100vh; */
}

header {
    font-family: 'Comfortaa', Arial, sans-serif;
    background-color: transparent;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;
}

.logo {
    color: #ff0000;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #ff0000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.auth-button:hover {
    background-color: #cc0000;
}

h1 {
    font-size: 36px;
    margin: 10px 0;
}

nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3498db;
    transition: all 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
    left: 0;
}
.social-icons {
    margin-top: 20px;
}

.social-icons .icon {
    margin: 0 10px;
    color: #999;
    text-decoration: none;
}

main {
    font-family: 'Raleway', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff; /* White background for main content */
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
}

#blog-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content:space-evenly;
}

.blog-post {
    width: calc(33.33% - 20px);
    margin-bottom: 40px;
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.blog-post:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 5px;
    position: relative;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.modal img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}
.modal-text {
    padding: 20px;
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post-content {
    padding: 20px;
}

.blog-post-category {
    color: #ff0000;
    font-size: 14px;
    margin-bottom: 10px;
}

.blog-post h3 {
    margin: 0 0 10px 0;
}

#add-blog-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

#new-blog-form input,
#new-blog-form textarea {
    width: 95%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#new-blog-form button {
    background-color: #ff0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
}

footer {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}
.social-icons {
    margin-top: 20px;
}
.social-icons .icon {
    margin: 0 10px;
    color: #999;
    text-decoration: none;
}

/* Responsive styles */
@media (max-width: 768px) {

    nav ul li {
        margin: 10px 0;
    }

    .auth-button{
        display: none;
    }

    .blog-post {
        width: 100%;
        margin-bottom: 20px;
    }

    #add-blog-form {
        width: 100%;
        padding: 10px;
    }

    #new-blog-form input,
    #new-blog-form textarea {
        width: 100%;
    }

    .modal-content {
        width: 90%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .blog-post img {
        height: 150px;
    }

    .blog-post-content {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        padding: 10px;
    }

    .modal img {
        height: auto;
    }

    .modal-text {
        padding: 10px;
    }

    footer {
        padding: 10px;
    }

    .social-icons .icon {
        margin: 0 5px;
    }
}