/* SuperCool Newspaper CMS - Modern Styles */

:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --radius: 12px;
    --font: 'Inter', 'Noto Sans', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
}

/* Top Bar */
.top-bar {
    font-size: 0.8rem;
}

/* Logo */
.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

.brand-name {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: -2px;
}

/* Navbar */
.main-header {
    z-index: 1030;
}

.navbar-nav .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark) !important;
    padding: 0.5rem 0.9rem !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(196, 30, 58, 0.06);
}

/* Breaking Ticker */
.breaking-ticker {
    overflow: hidden;
}

.breaking-label {
    background: rgba(0,0,0,0.2);
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.8rem;
}

.ticker-content {
    display: flex;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
}

.ticker-content a {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Main Content */
.main-content {
    min-height: 60vh;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* Cards */
.news-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
    background: #fff;
}

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

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s;
}

.news-card:hover .card-img-top {
    transform: scale(1.04);
}

.news-card .card-body {
    padding: 1.1rem;
}

.news-card .category-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
}

.news-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0.6rem 0 0.4rem;
}

.news-card .card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.news-card .card-title a:hover {
    color: var(--primary);
}

.news-card .card-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.news-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Featured / Hero */
.hero-section {
    margin-bottom: 2rem;
}

.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 420px;
    box-shadow: var(--shadow-lg);
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

.hero-overlay .category-badge {
    background: var(--primary);
    align-self: flex-start;
}

.hero-overlay h2 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0.6rem 0;
}

.hero-overlay h2 a {
    color: white;
    text-decoration: none;
}

.hero-overlay h2 a:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar-widget {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.sidebar-widget h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.sidebar-post {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-post h6 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
}

.sidebar-post h6 a {
    color: var(--text-dark);
    text-decoration: none;
}

.sidebar-post h6 a:hover {
    color: var(--primary);
}

/* ============ SINGLE POST PAGE (Ratopati inspired) ============ */
.post-article {
    max-width: 780px;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.post-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--secondary);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.post-meta .author-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.post-meta .author-link:hover {
    text-decoration: underline;
}

.post-featured-image {
    width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.post-summary {
    background: #fef2f2;
    border-left: 4px solid var(--primary);
    padding: 1.1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.post-summary h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-summary ul {
    margin: 0;
    padding-left: 1.2rem;
}

.post-summary li {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content h2, .post-content h3 {
    font-weight: 700;
    margin: 1.75rem 0 0.75rem;
    color: var(--secondary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

/* Reactions Section */
.reactions-section {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2.5rem 0;
    border: 1px solid var(--border);
    text-align: center;
}

.reactions-section h5 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.reaction-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.reaction-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.reaction-btn.active {
    border-color: var(--primary);
    background: #fef2f2;
}

.reaction-btn .emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.reaction-btn .count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.reaction-btn .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box h6 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Related Posts */
.related-posts h5 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Footer */
.site-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: white;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.15);
}

.btn-primary, .btn-danger {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-danger:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary);
    border-radius: 6px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Utilities */
.section-title {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 1.5rem;
    }
    
    .hero-card {
        height: 300px;
    }
    
    .hero-overlay h2 {
        font-size: 1.3rem;
    }
    
    .reaction-buttons {
        gap: 0.5rem;
    }
    
    .reaction-btn {
        min-width: 58px;
        padding: 8px 10px;
    }
}

/* Admin specific helpers used in frontend too */
.badge-featured {
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-breaking {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
}
/* ========== Ads System ========== */
.ad-slot {
    margin: 0.75rem 0;
    text-align: center;
    overflow: hidden;
}

.ad-slot img {
    max-width: 100%;
    height: auto;
}

.ad-header_top,
.ad-header_bottom,
.ad-footer_top,
.ad-homepage_top,
.ad-homepage_middle,
.ad-homepage_bottom,
.ad-category_top {
    max-width: 100%;
}

.ad-sidebar_top,
.ad-sidebar_middle,
.ad-sidebar_bottom {
    margin-bottom: 1.25rem;
}

.ad-post_middle {
    margin: 1.75rem 0;
    clear: both;
}

.ad-post_top,
.ad-post_bottom,
.ad-after_summary {
    margin: 1.25rem 0;
}

/* Placeholder style for empty/demo ads */
.ad-placeholder {
    font-family: var(--font);
}
