/* =====================================================
   Reset and Base Styles
   ===================================================== */

/* CSS Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px; /* Adjusted for fixed header */
}

/* =====================================================
   Header Styles
   ===================================================== */

.header {
    background-color: #0078d7;
    color: white;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.header:hover {
    background-color: #005f9e;
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.header nav {
    display: flex;
    align-items: center;
}

.header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.header nav a i {
    margin-right: 5px;
}

.header nav a:hover {
    color: #ffdd57;
}

.header .menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.header .menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.3s;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .header nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: #0078d7;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .header nav.active {
        max-height: 300px; /* Adjust as needed */
    }

    .header nav a {
        margin: 15px 0;
        text-align: center;
    }

    .header .menu-toggle {
        display: flex;
    }
}

/* =====================================================
   Main Content Styles
   ===================================================== */

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h2 {
    font-size: 28px;
    color: #0078d7;
}

/* Landing Section for Guests */
.landing-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
    background: url('assets/images/landing-bg.jpg') no-repeat center center/cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.landing-content {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}

.landing-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #0078d7;
}

.landing-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #555;
}

.landing-buttons .btn {
    margin: 0 10px;
}

/* Post Form Styles */
.post-form-section {
    margin-bottom: 40px;
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-form textarea {
    resize: vertical;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.post-form textarea:focus {
    border-color: #0078d7;
    outline: none;
}

.btn-primary {
    align-self: flex-end;
}

/* Posts Section */
.posts-section .post {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.posts-section .post:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.username {
    font-weight: bold;
    font-size: 18px;
}

.post-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    color: #0078d7;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.action-btn i {
    margin-right: 5px;
}

.action-btn:hover {
    color: #005f9e;
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-primary {
    background-color: #0078d7;
    color: white;
}

.btn-primary:hover {
    background-color: #005f9e;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #0078d7;
    color: #0078d7;
}

.btn-secondary:hover {
    background-color: #0078d7;
    color: white;
    transform: scale(1.05);
}

/* =====================================================
   Profile Styles
   ===================================================== */

.profile {
    text-align: center;
    padding: 20px;
}

.profile img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.profile h2 {
    margin: 10px 0;
}

.profile p {
    color: #555;
}

/* =====================================================
   Comment Styles
   ===================================================== */

.comment-section {
    margin-top: 20px;
}

.comment {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.comment img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
}

.comment .text {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 10px;
    flex-grow: 1;
}

/* =====================================================
   Notification Styles
   ===================================================== */

.notification {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

.notification .message {
    margin: 0;
}

/* =====================================================
   Footer Styles
   ===================================================== */

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #777;
    font-size: 14px;
}

.footer a {
    color: #0078d7;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   Responsive Design
   ===================================================== */

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header nav {
        margin-top: 10px;
    }

    .posts-section .post {
        padding: 15px;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-pic {
        margin-bottom: 10px;
    }

    .action-btn {
        font-size: 14px;
    }

    .landing-section {
        height: auto;
        padding: 40px 20px;
    }

    .landing-content h1 {
        font-size: 28px;
    }

    .landing-content p {
        font-size: 16px;
    }

    .landing-buttons .btn {
        margin: 10px 0;
        width: 100%;
    }
}

/* =====================================================
   Animations
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation: fadeIn 0.5s ease-in-out;
}

/* =====================================================
   Additional Styles
   ===================================================== */

/* Hover Effects for Header Links */
.header nav a:hover {
    color: #ffdd57; /* Changed to a contrasting color on hover */
}

/* Hamburger Menu Animation */
.header .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header .menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.header .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
