/* news_feed.css */
:root {
    --news-primary: #1D4ED8; --news-dark: #1E3A8A;
    --news-bg: #F3F4F6; --news-white: #FFFFFF;
    --news-text: #1F2937; --news-muted: #6B7280;
    --news-border: #E5E7EB; --news-radius: 18px;
    --news-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

.news-hero {
    background: linear-gradient(135deg, var(--news-dark) 0%, var(--news-primary) 60%, #3B82F6 100%);
    border-radius: 28px; padding: 60px 40px; color: white;
    text-align: center; margin-bottom: 40px; position: relative;
    overflow: hidden; box-shadow: 0 20px 60px rgba(29,78,216,0.28);
}
.news-hero::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%; animation: float-orb 7s ease-in-out infinite;
}
.news-hero::after {
    content: ''; position: absolute; bottom: -60px; left: 5%;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    border-radius: 50%; animation: float-orb 9s ease-in-out infinite reverse;
}
.news-hero-content { position: relative; z-index: 2; }
.news-hero h1 { font-size: 38px; font-weight: 900; margin: 0 0 12px; line-height: 1.2; }
.news-hero p  { font-size: 17px; opacity: 0.85; margin: 0; font-weight: 500; }

.btn-add-post {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 25px;
    padding: 12px 30px; background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.35); border-radius: 14px;
    color: white !important; font-weight: 700; font-size: 15px;
    text-decoration: none; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-add-post:hover { background: rgba(255,255,255,0.3); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

.news-post {
    background: var(--news-white); border-radius: var(--news-radius);
    border: 1px solid var(--news-border); box-shadow: var(--news-shadow);
    margin-bottom: 24px; overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1); position: relative;
}
.news-post::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--news-dark), var(--news-primary), #60A5FA);
    transform: scaleX(0); transform-origin: right; transition: transform 0.4s ease;
}
.news-post:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(29,78,216,0.10); border-color: rgba(29,78,216,0.15); }
.news-post:hover::before { transform: scaleX(1); transform-origin: left; }

.post-header { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--news-border); }
.post-avatar {
    width: 50px; height: 50px; border-radius: 14px;
    background: linear-gradient(135deg, var(--news-dark), var(--news-primary));
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(29,78,216,0.2);
}
.post-meta { flex: 1; }
.post-author { font-weight: 700; font-size: 15px; color: var(--news-text); margin-bottom: 3px; }
.post-date   { font-size: 12px; color: var(--news-muted); display: flex; align-items: center; gap: 5px; }

.post-content-wrapper { padding: 22px 24px; }
.post-title   { font-size: 17px; font-weight: 800; color: var(--news-text); margin-bottom: 12px; line-height: 1.5; }
.post-content { font-size: 16px; line-height: 1.85; color: var(--news-muted); margin-bottom: 16px; white-space: pre-wrap; }

.image-container { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 8px; cursor: pointer; background: var(--news-bg); height: 360px; }
.post-image  { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.image-container:hover .post-image { transform: scale(1.04); }
.image-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.35s ease; pointer-events: none; }
.image-container:hover .image-overlay { background: rgba(30,58,138,0.45); opacity: 1; }
.image-actions { display: flex; gap: 12px; }
.image-action-btn {
    background: white; border: none; border-radius: 14px; width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    color: var(--news-primary); font-size: 20px; text-decoration: none;
}
.image-action-btn:hover { transform: scale(1.12); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }

.post-footer { padding: 14px 24px; border-top: 1px solid var(--news-border); background: #F9FAFB; display: flex; justify-content: space-between; align-items: center; }
.post-meta-info { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--news-muted); font-weight: 600; }
.post-meta-info span { display: flex; align-items: center; gap: 5px; }

.empty-feed { text-align: center; padding: 80px 30px; color: var(--news-muted); }
.empty-feed i.empty-icon { font-size: 4rem; opacity: 0.25; display: block; margin-bottom: 16px; }
.empty-feed-title { font-size: 22px; font-weight: 800; color: var(--news-text); margin-bottom: 8px; }
.empty-feed-text  { font-size: 15px; margin-bottom: 30px; }

.btn-back-home {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
    background: linear-gradient(135deg, var(--news-dark), var(--news-primary));
    color: white !important; border-radius: 12px; text-decoration: none;
    font-weight: 700; font-size: 14px; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(29,78,216,0.25);
}
.btn-back-home:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(29,78,216,0.35); }

.image-modal { display: none; position: fixed; z-index: 9999; inset: 0; background-color: rgba(0,0,0,0.92); animation: fadeIn 0.3s ease; }
.image-modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content-wrapper { position: relative; max-width: 95%; max-height: calc(100vh - 140px); animation: zoomIn 0.3s ease; }
.modal-image { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 16px; box-shadow: 0 15px 60px rgba(0,0,0,0.5); }
.modal-close {
    position: absolute; top: 10px; right: 10px; width: 46px; height: 46px;
    background: white; border: none; border-radius: 14px; font-size: 20px;
    cursor: pointer; transition: all 0.3s; color: var(--news-text);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.modal-close:hover { transform: rotate(90deg); }
.modal-download {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--news-dark), var(--news-primary));
    color: white; border: none; border-radius: 12px; padding: 13px 32px;
    cursor: pointer; font-weight: 700; font-size: 14px; transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(29,78,216,0.35);
    display: flex; align-items: center; gap: 8px;
}
.modal-download:hover { transform: translateX(-50%) translateY(-3px); box-shadow: 0 10px 30px rgba(29,78,216,0.45); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 768px) {
    .news-hero { padding: 40px 24px; }
    .news-hero h1 { font-size: 28px; }
    .image-container { height: 240px; }
    .post-title { font-size: 16px; }
}
