/* General styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1, h2 {
    color: #333;
}

p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    padding: 20px;
    min-height: calc(100vh - 100px); /* Adjust according to header/footer height */
    box-sizing: border-box;
}

main h2 {
    color: #333;
}

/* Form styling */
form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
input[type="file"] {
    width: calc(100% - 22px); /* Adjusting width to account for padding and border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    box-sizing: border-box;
}

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

button[type="submit"] {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

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

.invalid-feedback {
    color: red;
    display: none;
}

input:invalid + .invalid-feedback {
    display: block;
}

.comment {
    margin-top: 20px;
    text-align: center;
}

.comment p {
    font-size: 16px;
}

.comment a {
    color: #007bff;
    text-decoration: none;
}

.comment a:hover {
    text-decoration: underline;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 10px 0;
    text-align: center;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 10px;
    position: relative; /* Needed for the tooltip positioning */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    position: relative;
}

.nav-icon::after {
    content: attr(data-hover);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s;
    font-size: 14px;
}

.nav-icon:hover::after {
    opacity: 1;
}

.language-selector {
    display: inline;
    margin: 0 10px;
}

.language-selector img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Footer styling */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    width: 100%;
    bottom: 0;
    left: 0;
}

/* Admin card styling */
.admin-card {
    display: inline-block;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 200px;
    margin: 10px;
    text-align: center;
}

.admin-card a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.admin-card a:hover {
    color: #0056b3;
}
.posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.post-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.post-card h3 {
    margin-top: 0;
}

.post-card img {
    max-width: 100%;
    height: auto;
}

.post-card video {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    color: #fff;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Toast notification styling */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
}

.toast-success {
    background-color: green;
}

.toast-warning {
    background-color: orange;
}

.toast-error {
    background-color: red;
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;} 
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;} 
    to {bottom: 0; opacity: 0;}
}

/* Reply button container styling */
.reply-container {
    text-align: right;
    margin-top: 10px;
}

/* Button styling */
.btn-danger {
    background-color: #dc3545;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    margin-top: 10px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Reply icon styling */
.reply-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #007bff;
}

.reply-icon .tooltip {
    visibility: hidden;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Place the tooltip above the icon */
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.reply-icon:hover .tooltip {
    display: block;
    visibility: visible;
    opacity: 1;
}

.tooltip {
    display: none;
    position: absolute;
    top: -30px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.greeting {
    display: inline-block;
    margin-left: 10px;
    padding: 10px;
    font-size: 16px;
    color: white;
}

.message-group {
    margin-bottom: 20px;
}

.message-group h3 {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0;
}

.message {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.message img, .message video {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
}

#conversation {
    display: none;
}

.message-group {
    margin-bottom: 20px;
}

.message-group h3 {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0;
}

.message {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.message img, .message video {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
}

.timestamp {
    color: lightgrey;
    font-size: small;
    margin: 0;
}

.username {
    font-weight: bold;
    margin: 0;
}

.message-content {
    margin: 0;
}

#conversation {
    display: none;
}
