/* === News CMS Styles — ORPC Champagne === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg: #0f1923;
    --bg-surface: rgba(30, 58, 95, 0.2);
    --bg-card: rgba(30, 58, 95, 0.3);
    --bg-input: rgba(255, 255, 255, 0.06);
    --text: #e4e8ec;
    --text-muted: #7a8da0;
    --text-heading: #f0f4f8;
    --primary: #4a9eff;
    --primary-hover: #6bb3ff;
    --danger: #ff4757;
    --danger-hover: #ff6b7a;
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(74, 158, 255, 0.5);
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

html, body {
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 100% 80% at 25% 15%, rgba(30, 80, 140, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 75% 80%, rgba(20, 50, 100, 0.3) 0%, transparent 50%),
        var(--bg);
}

/* === Top Bar === */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(15, 25, 35, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.back-link, .logout-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.back-link:hover, .logout-link:hover { opacity: 0.7; }
.spacer { width: 80px; }

/* === News List (Public) === */
.news-list {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: slideUp 0.4s ease-out both;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.news-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.news-card:hover .news-image img {
    transform: scale(1.03);
}

.news-content {
    padding: 1.25rem;
}

.news-date {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0.4rem 0;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Empty State === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === Login === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1.25rem;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

/* === Forms === */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.88rem;
    transition: border-color 0.2s;
    outline: none;
}

input:focus, textarea:focus {
    border-color: var(--border-focus);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-small:hover {
    background: rgba(255,255,255,0.1);
}

.btn-danger {
    color: var(--danger) !important;
    border-color: rgba(255, 71, 87, 0.3) !important;
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.15) !important;
}

/* === Admin === */
.admin-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.editor-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.editor-card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1.25rem;
}

.current-image {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.current-image img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.current-image span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.articles-admin {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.articles-admin h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.empty-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-article-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.admin-article-row:last-child {
    border-bottom: none;
}

.admin-article-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.admin-article-info strong {
    font-size: 0.88rem;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-article-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* === Footer === */
.bottom-bar {
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* === Animations === */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }

/* === Responsive === */
@media (max-width: 480px) {
    .top-bar { padding: 0.75rem 1rem; }
    .news-list { padding: 1rem; }
    .admin-main { padding: 1rem; }
    .editor-card { padding: 1.25rem; }
    .admin-article-row { flex-direction: column; align-items: flex-start; }
    .admin-article-actions { width: 100%; }
    .form-actions { flex-direction: column; }
}
