/* style.css */
:root {
    --primary: #92c23b;
    --secondary: #3c5242;
    --background: #ffffff;
    --text-dark: #333333;
    --text-light: #777777;
    --border-color: #e5e5e5;
    --radius: 0.5rem;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: var(--text-dark);
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 60px;
}

/* Header Styles */
.header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    margin-left: 8px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    background: var(--secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-menu.active {
    max-height: 300px;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu ul li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.nav-menu ul li a:hover {
    background: rgba(0, 0, 0, 0.1);
}

.nav-menu ul li a i {
    width: 25px;
    text-align: center;
    margin-left: 10px;
}

/* Main Content Styles */
.container {
    margin-top: 70px;
    padding: 15px;
}

/* Search Bar */
.search-container {
    margin-bottom: 20px;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background: var(--background);
    box-shadow: var(--shadow);
}

.search-btn {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Category Navigation */
.categories {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    flex: 0 0 auto;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 15px;
    margin-left: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Breaking News */
.breaking-news {
    background: rgba(146, 194, 59, 0.1);
    border-left: 4px solid var(--primary);
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
}

.breaking-label {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
}

.breaking-text {
    font-weight: 500;
    font-size: 0.95rem;
    color: #3c5242;
}

/* Article Card Styles */
.article-card {
    background: var(--background);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 15px;
}
a {text-decoration: none;}
.category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.3;
    min-height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.85rem;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.author {
    display: flex;
    align-items: center;
}

.author img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-left: 8px;
}

.article-time {
    display: flex;
    align-items: center;
}

.article-time i {
    margin-left: 5px;
}

/* Featured Article */
.featured-article {
    margin-bottom: 25px;
}

.featured-article .article-image {
    height: 220px;
}

.featured-article .article-title {
    font-size: 1.5rem;
}

/* Article Detail Page */
.article-detail {
    background: var(--background);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.article-detail .article-image {
    height: 250px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.article-detail .article-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    -webkit-line-clamp: unset;
}

.article-detail .article-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.article-detail .article-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-detail .article-text p {
    margin-bottom: 15px;
}

/* Footer Styles */
.footer {
    background: linear-gradient(to right, var(--secondary), #2a3a30);
    color: white;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
}

.footer-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ddd;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer-nav a i {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.footer-nav a.active {
    color: var(--primary);
}

.footer-nav a:hover {
    color: white;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        max-width: 700px;
        margin: 70px auto 0;
    }
    
    .article-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .featured-article {
        grid-column: span 2;
    }
    
    .article-card {
        margin-bottom: 0;
    }
    
    .article-image {
        height: 160px;
    }
    
    .featured-article .article-image {
        height: 280px;
    }
    
    .article-detail {
        max-width: 700px;
        margin: 0 auto 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-card {
    animation: fadeIn 0.6s ease-out;
}