/* Community Page Styles */

/* Hero Section */
.community-hero {
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.community-hero h1 {
    font-size: 48px;
    color: white;
    margin-bottom: 16px;
}

.community-hero > .container > p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

/* Search and Filters */
.search-filters {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-bar {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 16px;
    border-radius: 12px;
    background: #f8f9fa;
}

.search-bar input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

/* Sort Dropdown */
.sort-dropdown {
    display: flex;
    justify-content: center;
}

.sort-dropdown select {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.sort-dropdown select option {
    color: #2d3748;
}

/* Projects Section */
.projects-section {
    padding: 60px 20px;
    background: #f8f9fa;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-btn {
    padding: 12px 28px;
    background: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Project Info */
.project-info {
    padding: 24px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 20px;
    color: #2d3748;
    flex: 1;
    margin-right: 12px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background: #f8f9fa;
}

.like-btn.liked .heart {
    filter: grayscale(0);
}

.heart {
    font-size: 20px;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.like-btn:hover .heart {
    transform: scale(1.2);
    filter: grayscale(0);
}

.like-count {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.project-description {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-details {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.detail {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.project-date {
    font-size: 13px;
    color: #a0aec0;
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    padding: 14px 32px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Share Button in Nav */
.share-btn {
    padding: 10px 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.share-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Share Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content.large {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 24px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.modal-header {
    padding: 40px 40px 20px;
    text-align: center;
}

.modal-header h2 {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 15px;
    color: #718096;
}

/* Share Form */
.share-form {
    padding: 20px 40px 40px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 16px;
}

.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-zone p {
    color: #718096;
    font-size: 15px;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.share-form select {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fa;
    cursor: pointer;
}

.share-form textarea {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fa;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.secondary-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    border-color: #cbd5e0;
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .community-hero h1 {
        font-size: 36px;
    }

    .search-filters {
        gap: 16px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        margin: 20px;
    }

    .modal-header,
    .share-form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .share-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .community-hero {
        padding: 80px 16px 40px;
    }

    .community-hero h1 {
        font-size: 28px;
    }

    .search-bar {
        flex-direction: column;
    }

    .project-image {
        height: 200px;
    }

    .project-info {
        padding: 20px;
    }

    .project-details {
        flex-direction: column;
        gap: 8px;
    }
}