/* Global reset and general styling */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #eef5ff;
}


section {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 4.5em;
    border: 1px solid #7690e6;
}

/* Main container styling */
.container {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.home-logo-text {
    display: flex;
    text-decoration: none;
    background-color: #fff;
    color: #003c8f;
    align-items: center;
    padding: 20px;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(to right, #e2f4fe, #c9d6ff);
}


/* Style the Home icon link */
.home-logo-text i {
background-color: #a4c7f8;
padding: 10px;
margin: 10px;
border-radius: 20px;

}

/* Icon size and margin */
.home-icon i {
    margin-right: 8px;
    font-size: 15px;

}

/* Hover effect for the Home icon */


/* Heading styles */
h1 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.8em;
}

h3 {
    color: #577dad;
    font-size: 1.1em;
    text-align: center;
    padding: 5px;
    margin: 10px 0;
}



/* Form input and textarea styling */
input,
textarea {
    width: 50%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #b8c2df;
    border-radius: 20px;
    transition: border-color 0.3s ease;
    font-family: poppins;
}

input:focus,
textarea:focus {
    border-color: #007bff;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button styling */
button {
    padding: 12px 25px;
    background-color: #007bff;
    color: #c4ebf1;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* List styling */
ul {
    list-style-type: none;
    padding: 0;
    margin-top: 15px;
}

li {
    background: linear-gradient(to right, #e2f4fe, #c9d6ff);
    border: 1px solid #cdd9fc;
    margin: 10px 0;
    padding: 10px;
    border-radius: 12px;
}

/* User info styling */
li .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-profile-pic {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid #ffffff;
}

.user-info span {
    color: #444;
    font-weight: 500;
    font-size: 0.9em;
    margin-right: 12px;
}

.question-content {
    color: #670202;
    font-size: 1em;
    border-radius: 12px;
    background: #fffeb6;
    padding: 12px;
    line-height: 1.5;
    font-weight: 500;
}

/* Reply button styling */
.reply-button {
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 8px;
    margin-left: 12px;
}

.reply-button:hover {
    background-color: #218838;
}

/* Bottom-fixed ask question bar styling */
.askquestiondiv {
    position: fixed;
    bottom: 0;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: #003c8f;
    padding: 10px 15px;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    border-top: 1px solid #ddd;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.askquestiondiv input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #1b4ebb;
    color: #505050;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.askquestiondiv input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
}

.askquestiondiv button {
    padding: 10px 20px;
    background-color: #2fd360;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.askquestiondiv button:hover {
    background-color: #00b351;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    main {
        margin: 0 auto;

    }

    h1,
    h2 {
        font-size: 1.5em;
    }

    .container {
        padding: 15px;
    }

    .user-info span {
        font-size: 0.85em;
    }

    li {
        padding: 8px;
        font-size: 0.9em;
    }

    .question-content {
        font-size: 0.95em;
    }

    .askquestiondiv {
        border: 0;
        border-radius: 0;
        padding: 8px 12px;
        left: 0;
    }

    .askquestiondiv input[type="text"] {
        padding: 10px;
        font-size: 14px;
    }

    .askquestiondiv button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Extra small screen adjustments */
@media (max-width: 480px) {

    h1,
    h2 {
        font-size: 1.2em;
    }

    .container {
        padding: 10px;
    }

    .askquestiondiv input[type="text"] {
        font-size: 13px;
    }

    .askquestiondiv button {
        font-size: 13px;
    }
}

.reply-username {
    margin-right: 10px;
    /* Adds space between the username and timestamp */
    font-weight: bold;
    /* Optional: Makes the username bold */
}

.reply-time {
    color: #888;
    /* Optional: Adds a gray color to the timestamp */
    font-size: 0.9em;
    /* Optional: Makes the timestamp slightly smaller */
}

/* General Styles for like/dislike buttons and reply buttons */
.like-button,
.dislike-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    margin-right: 8px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: 'Poppins', sans-serif;
    color: #f6f8ff;

    border-radius: 13px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.like-button {
    background: #4e9ef1;
}

.like-button:hover {
    background: #fc3aa4;
}


.dislike-button {
    background: #4e9ef1;
}

.dislike-button:hover {
    background: rgb(245, 51, 80);
}

/* Hover effects for like/dislike buttons */
.like-button:hover,
.dislike-button:hover {
    /* Darker shade on hover */
    color: #ffffff;
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

/* Active state for like/dislike buttons */
.like-button:active,
.dislike-button:active {
    background-color: #c26f60;
    transform: scale(1);
    /* Prevents scaling effect while button is being pressed */
}

/* Icon and count positioning for like/dislike buttons */
.like-button i,
.dislike-button i {
    margin-right: 6px;
    font-size: 14px;
    /* Make icons slightly larger */
}

/* Additional styles for like/dislike text */
.like-button span,
.dislike-button span {
    font-weight: bold;
    /* Make the count bold for better visibility */
    font-size: 14px;
    /* Increase font size slightly */
}

/* Style for reply buttons */
.reply-button {
    background: #4e9ef1;
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-family: poppins;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.reply-button:hover {
    background-color: #3c86da;
    /* Darker blue on hover */

}

.reply-button:active {
    background-color: #4b8ba0;
    transform: scale(1);
    /* Maintain size on click */
}


.view-all-replies {
    margin-top: 10px;
    background-color: #2d71bb;
    color: white;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
}

.view-all-replies:hover {
    background-color: #0056b3;
}