/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Basic styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f8ff;
    background-image: url('/static/webpage_images/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #333;
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Hide the default scrollbar */
}

.container {
    display: flex;
    flex-direction: column;
    width: 70%;
    max-width: 1600px;
    height: calc(100vh - 20px); /* Full viewport height minus the gap */
    margin: 10px auto 0 auto; /* Add 20px gap above the container */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Hide overflowing content */
    /*background-color: rgba(255, 255, 255, 0.9);*/
}

header {
    margin: 5px 5px;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 10px 20px;
    border-bottom: 2px solid #ccc;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a.active, nav a:hover {
    background-color: #4682B4;
    color: #fff;
}

#username-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    background-color: #5F9EA0;
    color: white;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#username-link:hover {
    background-color: #10b9fb;
}

main {
    margin: 5px 5px;
    flex: 1;
    background-color: #fff;
    padding: 1px;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Enable vertical scrolling */
}

main h1 {
    margin: 0;
    color: #333;
}

.center {
    margin-left: auto;
    margin-right: auto;
  }

/* Footer styles */
footer {
    margin: 5px 5px;
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

footer h2 {
    margin-top: 0;
    text-align: center;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #ccc;
}

.news-item:first-child {
    border-top: none;
}

.news-date {
    width: 150px;
    font-size: 14px;
    color: hsl(0, 0%, 0%);
    display: flex;
    align-items: center;
}

.news-date .icon {
    margin-right: 5px;
}

.news-tag {
    background-color: #4682B4;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 12px;
}

.news-title {
    color: rgb(12, 12, 12);
    text-decoration: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        width: 100%;
        justify-content: space-around;
        padding: 10px 0;
    }

    main {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header img {
        height: 40px;
    }
    
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav a {
        padding: 5px 0;
    }

    main {
        padding: 10px;
    }
}


/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px; /* Limit maximum width */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modala {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modala-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px; /* Limit maximum width */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #ff6347;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 5px;
}

.modal-content button:hover {
    background-color: #e5533c;
}

.modala-content h2 {
    margin-top: 0;
}

.modala-content button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #ff6347;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 5px;
}

.modala-content button:hover {
    background-color: #e5533c;
}