/* Updates Page Styling */

/* Main Container */
.updates-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.updates-intro {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.updates-intro p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Comments Section */
.comments-section {
    margin-top: 30px;
}

.comment-form-container {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.comment-form-container h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 18px;
}

/* Update Cards */
.update-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin: 20px 0;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.update-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.update-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.update-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.update-content {
    padding: 20px;
}

.update-text {
    color: white;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.update-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-comment {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    font-size: 14px;
}

.btn-comment:hover {
    background: #45a049;
}

.update-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Selected Post Styling */
.selected-post-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.post-header {
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.post-date {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.post-content {
    padding: 20px;
    font-size: 18px;
    line-height: 1.6;
}

.post-id {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Comment Cards */
.comment-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 15px 0;
    padding: 0;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.comment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-header {
    background: #e9ecef;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

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

.comment-date {
    color: #6c757d;
    font-size: 12px;
}

.comment-content {
    padding: 15px;
    color: #212529;
    line-height: 1.5;
}

.comment-number {
    position: absolute;
    top: -8px;
    right: 15px;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

/* Comment Form Styling */
#commentForm {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

#commentForm input, #commentForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 14px;
    box-sizing: border-box;
}

#commentForm button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

#commentForm button:hover {
    background: #0056b3;
}

/* No Updates Styling */
.no-updates {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Section Headers */
#updates-list h2, #selected-post h2, #selected-post h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

/* No Comments Styling */
.no-comments {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-comments p {
    margin: 0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .updates-container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .updates-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .update-card, .selected-post-card {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .update-header, .post-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .update-number {
        align-self: center;
    }
    
    .update-content, .post-content {
        padding: 15px;
        font-size: 15px;
    }
    
    .update-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .update-meta {
        text-align: center;
    }
    
    .btn-comment {
        width: 100%;
        padding: 12px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .comment-form-container {
        padding: 15px;
    }
    
    #commentForm input, #commentForm textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }
    
    #commentForm button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
    
    .comment-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .comment-number {
        top: -5px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .updates-container {
        padding: 5px;
    }
    
    .update-card, .selected-post-card {
        margin: 10px 0;
        border-radius: 6px;
    }
    
    .update-header, .post-header {
        padding: 12px;
    }
    
    .update-content, .post-content {
        padding: 12px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .update-footer {
        padding: 10px 12px;
    }
    
    .comment-form-container {
        padding: 12px;
    }
    
    .comment-card {
        margin: 10px 0;
    }
    
    .comment-header {
        padding: 10px 12px;
    }
    
    .comment-content {
        padding: 12px;
        font-size: 14px;
    }
    
    .updates-intro {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .updates-intro p {
        font-size: 14px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    h4 {
        font-size: 16px;
    }
}