/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f7fa;
    color: #2d3748;
    padding-top: 80px; /* Adjust based on your header height */
}

/* Header and Navigation */
.header {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #edf2f7;
    color: #2b6cb0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.9;
}

.navbar-logo {
    height: 60px;  /* Increased from 40px to 60px */
    width: auto;
    display: block;
}

/* When header shrinks, make logo smaller but still readable */
.hero-section.shrink .navbar-logo {
    height: 45px;  /* Increased from 32px to 45px */
    transition: height 0.3s ease;
}

/* Hero Section */
.hero-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
}

.hero-section.shrink {
    padding: 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.hero-section.shrink h1 {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

button[type="submit"],
.button {
    background-color: #4299e1;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover,
.button:hover {
    background-color: #3182ce;
}

/* Project Cards */
.projects-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.author {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.description {
    color: #4a5568;
    margin-bottom: 1rem;
}

/* Project Stats and Actions */
.project-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.like-btn, .comment-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: #ffffff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-btn:hover, .comment-btn:hover {
    background-color: #edf2f7;
}

.like-btn.liked {
    background-color: #4299e1;
    color: white;
    border-color: #4299e1;
}

.comment-btn {
    text-decoration: none;
    display: inline-block;
}

/* Comment Section Styling */
.comments-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.comment-thread {
    margin-bottom: 2rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.comment:last-child {
    border-bottom: none;
}

.comment.main-comment {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.comment.reply {
    background-color: #f8fafc;
    padding-left: 2rem;
    position: relative;
}

.comment.reply::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2rem;
    width: 2px;
    height: 1rem;
    background-color: #4299e1;
    opacity: 0.5;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
}

.comment-date {
    color: #718096;
    font-size: 0.875rem;
}

.reply-to {
    color: #4299e1;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.comment-content {
    margin: 1rem 0;
    color: #4a5568;
    line-height: 1.5;
}

.reply-toggle {
    color: #4299e1;
    font-size: 0.875rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.reply-toggle:hover {
    text-decoration: underline;
}

.reply-form {
    margin: 1rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reply-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    resize: vertical;
}

.reply-form button {
    background-color: #4299e1;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reply-form button:hover {
    background-color: #2b6cb0;
}

/* Comment threading indicator */
.replies .reply {
    border-left: 3px solid #4299e1;
    position: relative;
}

.replies .reply::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #4299e1 0%, transparent 100%);
    opacity: 0.5;
}

/* Profile Section */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Error and Success Messages */
.error {
    background-color: #feb2b2;
    color: #c53030;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.success {
    background-color: #9ae6b4;
    color: #2f855a;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Landing Page Styles */

/* Join Section */
.join-section {
    min-height: 500px;
    background-color: #2b6cb0;
    background-image: url('images/community-bg.jpg');  /* You'll need to provide this image */
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 0;
    padding-top: 0;
}

.join-content {
    max-width: 600px;
    padding: 4rem 2rem;
    z-index: 1;
}

.join-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.join-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Discover Section */
.discover-section {
    padding: 6rem 2rem;
    background-color: #ffffff;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.discover-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.discover-text {
    flex: 1;
}

.discover-image {
    width: 45%;  /* Make it slightly bigger */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.discover-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;  /* Rounded corners */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);  /* Subtle shadow */
    transition: all 0.3s ease;  /* Smooth transition for hover effects */
}

.discover-image img:hover {
    transform: scale(1.03);  /* Slightly bigger on hover */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);  /* Enhanced shadow on hover */
}

/* Collaborate Section */
.collaborate-section {
    background-color: #f8fafc;
    padding: 6rem 2rem;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.collaborate-content {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* Projects Section */
.projects-section {
    padding: 6rem 2rem;
    background-color: white;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.projects-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Button Styles */
.btn-primary {
    background-color: #4299e1;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #3182ce;
}

.btn-secondary {
    background-color: white;
    color: #4299e1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ebf8ff;
}

.btn-large {
    background-color: white;
    color: #2b6cb0;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-large:hover {
    background-color: #2b6cb0;
    color: white;
    transform: translateY(-2px);
}

/* Project Detail Styles */
.project-header {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.project-main-content {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-image-container {
    flex: 0 0 45%;
    max-width: 500px;
}

.project-detail-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.project-info {
    flex: 1;
}

.project-title {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.project-info .author {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.project-info .description {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.project-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    color: #718096;
}

.project-actions {
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .profile-info {
        grid-template-columns: 1fr;
    }

    .discover-content {
        flex-direction: column;
    }

    .join-section h2 {
        font-size: 2rem;
    }

    .collaborate-content {
        grid-template-columns: 1fr;
    }

    .project-main-content {
        flex-direction: column;
        gap: 2rem;
    }

    .project-image-container {
        max-width: 100%;
    }

    .project-detail-image {
        max-height: 400px;
        width: 100%;
        object-fit: contain;
    }
}

/* Section Headers */
section h2 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

section p {
    color: #4a5568;
    line-height: 1.7;
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* No Content States */
.no-projects,
.no-comments,
.login-prompt {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

.comment-replies {
    background-color: #f8fafc;
}

.comment-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Delete Button Styles */
.delete-form {
    display: inline;
}

.delete-btn {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.delete-btn:hover {
    color: #c53030;
    text-decoration: underline;
}

/* Messages styling */
.messages {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.message {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
}

.message.success {
    background-color: #9ae6b4;
    color: #276749;
}

.message.error {
    background-color: #feb2b2;
    color: #c53030;
}
