@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto:wght@500;700;900&display=swap');

/* Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --text-color: #333333;
    --text-light: #777777;
    --bg-color: #f4f7f6;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --radius: 5px;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Top Bar */
.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #cbd5e1;
    margin-left: 1rem;
}

.top-bar a:hover {
    color: var(--white);
}

/* Header and Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: -1px;
}

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

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

nav a {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

nav a:hover, nav a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Layout: Main + Sidebar */
.site-content {
    display: flex;
    gap: 2rem;
    padding: 3rem 0;
}

.main-content {
    flex: 0 0 70%;
    max-width: 70%;
}

.sidebar {
    flex: 0 0 calc(30% - 2rem);
    max-width: calc(30% - 2rem);
}


/* Featured Section */
.featured-post {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: var(--white);
}

.featured-content .category {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.featured-content h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.featured-content h2 a {
    color: var(--white);
}

.featured-content h2 a:hover {
    color: #f1f1f1;
    text-decoration: underline;
}

.featured-content .meta {
    color: #ccc;
    font-size: 0.9rem;
}

/* Article Grid */
.section-title {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--secondary-color);
}

.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.article-img {
    height: 200px;
    background-color: #e9ecef;
    position: relative;
    overflow: hidden;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-img img {
    transform: scale(1.05);
}

.article-img .category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.article-content h3 a {
    color: var(--primary-color);
}

.article-content h3 a:hover {
    color: var(--secondary-color);
}

.article-content .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.article-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more::after {
    content: ' →';
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 5px;
}

/* Sidebar Widgets */
.widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

/* About Widget */
.about-widget img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}
.about-widget p {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Categories Widget */
.categories-widget ul {
    list-style: none;
}

.categories-widget li {
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
}

.categories-widget li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.categories-widget a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    font-weight: 600;
}

.categories-widget a span {
    background: var(--bg-color);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.categories-widget a:hover {
    color: var(--secondary-color);
}

/* Popular Posts Widget */
.popular-posts-widget ul {
    list-style: none;
}

.popular-posts-widget li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.popular-posts-widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    background: #e9ecef;
    flex-shrink: 0;
    overflow: hidden;
}
.popular-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.popular-info h4 a {
    color: var(--text-color);
}

.popular-info h4 a:hover {
    color: var(--secondary-color);
}

.popular-info .meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Single Article */
.single-post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.single-post-header .category {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

.single-post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-post-header .meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.single-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
}

.post-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.post-content h2 {
    margin: 2.5rem 0 1rem;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

.author-box {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

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

.author-box h4 {
    margin-bottom: 0.5rem;
}

.author-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Static Pages */
.static-page {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.static-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.static-page p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-widget p {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--white);
    margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .site-content {
        flex-direction: column;
    }
    .main-content, .sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .article-list {
        grid-template-columns: 1fr;
    }
    .featured-content h2 {
        font-size: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Search Widget */
.search-widget form {
    display: flex;
}
.search-widget input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
    font-family: inherit;
}
.search-widget button {
    padding: 0.8rem 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.search-widget button:hover {
    background: var(--secondary-color);
}

/* Newsletter Widget */
.newsletter-widget p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.newsletter-widget input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    outline: none;
    font-family: inherit;
}
.newsletter-widget button {
    width: 100%;
    padding: 0.8rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: var(--transition);
}
.newsletter-widget button:hover {
    background: #c0392b;
}

/* Featured Categories */
.featured-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.category-box {
    background: var(--white);
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.category-box:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid var(--secondary-color);
}
.category-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.category-box p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Newsletter Banner */
.newsletter-banner {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    margin: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}
.newsletter-banner h2 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}
.newsletter-banner p {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}
.newsletter-banner form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.5rem;
}
.newsletter-banner input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
}
.newsletter-banner button {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.newsletter-banner button:hover {
    background: #c0392b;
}

/* Responsive updates for new sections */
@media (max-width: 768px) {
    .featured-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    .newsletter-banner form {
        flex-direction: column;
    }
}
@media (max-width: 480px) {
    .featured-categories {
        grid-template-columns: 1fr;
    }
}
