/* assets/css/style.css */
:root {
    --primary-red: #dc2626;
    --secondary-red: #b91c1c;
    --black: #000000;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--black);
}

/* Header Styles */
.header {
    background-color: var(--black);
    color: white;
    padding: 1rem 0;
    border-bottom: 3px solid var(--primary-red);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo span {
    color: var(--primary-red);
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.categories-nav {
    background-color: white;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.categories-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.5rem 0;
}

.categories-list::-webkit-scrollbar {
    height: 4px;
}

.categories-list li {
    margin-right: 1.5rem;
}

.categories-list a {
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s;
    position: relative;
}

.categories-list a:hover {
    color: var(--primary-red);
}

.categories-list a.active {
    color: var(--primary-red);
}

.categories-list a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-red);
}

/* Hero Section */
.hero {
    background-color: var(--black);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    background-color: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.news-title a {
    color: inherit;
    text-decoration: none;
}

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

.news-excerpt {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.875rem;
}

/* Featured News */
.featured-news {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.featured-main {
    position: relative;
}

.featured-main .news-image {
    height: 400px;
}

.featured-main .news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.featured-side .news-card {
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: var(--black);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.footer-section a {
color: white; text-decoration: none; }

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-red);
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Single Article Page */
.single-article {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

.article-header {
    margin-bottom: 2rem;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

/* Admin Styles */
.admin-header {
    background-color: var(--black);
    color: white;
    padding: 1rem 0;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
}

.admin-nav a:hover {
    color: var(--primary-red);
}

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid var(--primary-red);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-red);
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--black);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-red);
    color: white;
}

.btn-black {
    background-color: var(--black);
}

.btn-black:hover {
    background-color: #333;
}

/* Tables */
.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.table th {
    background-color: var(--light-gray);
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--light-gray);
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--black);
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-news {
        grid-template-columns: 1fr;
    }
    
    .categories-list {
        padding: 0.5rem;
    }
    
    .categories-list li {
        margin-right: 1rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .admin-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
}

/* Add these styles to your existing style.css */

/* News image styles */
.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 1rem;
}

/* Featured news image adjustments */
.featured-main .news-image {
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.featured-side .news-image {
    height: 100px;
    width: 100px;
    object-fit: cover;
    border-radius: 4px;
    float: left;
    margin-right: 1rem;
}

/* Ensure proper clearing for floated images */
.news-card::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive image handling */
@media (max-width: 768px) {
    .news-image {
        height: 150px;
    }
    
    .featured-main .news-image {
        height: 250px;
    }
    
    .article-image {
        max-height: 300px;
    }
}