/* Root Variables */
:root {
    --primary-color: #207dba;
    --secondary-color: #35a9e1;
    --white-color: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --text-color: #222222;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--medium-gray);
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Header */
.header {
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo img {
    height: 40px;
}

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

.nav-list a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 3px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

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

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb .current {
    color: var(--white-color);
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.blog-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* Featured Post */
.featured-post {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

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

.featured-post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-meta .category {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-meta .date,
.post-meta .read-time {
    color: var(--medium-gray);
}

.featured-post h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.featured-post h2 a {
    color: var(--text-color);
}

.featured-post h2 a:hover {
    color: var(--primary-color);
}

.featured-post p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--text-color);
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-form input:focus {
    border-color: var(--primary-color);
}

.search-form button {
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-color);
    transition: var(--transition);
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.category-list .count {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.recent-post-image {
    flex-shrink: 0;
}

.recent-post-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.recent-post-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: var(--text-color);
}

.recent-post-content h4 a:hover {
    color: var(--primary-color);
}

.recent-post-content .date {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
}

.newsletter-widget h3 {
    color: var(--white-color);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.newsletter-widget p {
    color: rgba(255, 255, 255, 0.9);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    outline: none;
}

.newsletter-form button {
    background-color: var(--white-color);
    color: var(--primary-color);
    border: none;
}

.newsletter-form button:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-column h3 {
    color: var(--white-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: var(--white-color);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

#back-to-top.show {
    display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav {
        position: relative;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white-color);
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 1rem 0;
        border-radius: 0 0 10px 10px;
        z-index: 1000;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        margin: 0;
    }

    .nav-list a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list li:last-child a {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .blog-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post-image img {
        height: 200px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .blog-section {
        padding: 2rem 0;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }

    .featured-post-content {
        padding: 1.5rem;
    }

    .blog-card-content {
        padding: 1rem;
    }
}

/* No Posts Message */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.no-posts p {
    font-size: 1.1rem;
    color: var(--medium-gray);
}


/* Footer Tags Specific Styling */
.footer-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.footer-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #34495e;
}

.footer-tag:hover {
    background-color: #3498db;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    border-color: #3498db;
}

.no-tags-message {
    color: #95a5a6;
    font-style: italic;
    font-size: 14px;
}

/* Responsive design for footer tags */
@media (max-width: 768px) {
    .footer-tags-container {
        gap: 6px;
    }

    .footer-tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}


.footer-tags-wide {
    grid-column: span 2;
    /* If using CSS Grid */
    /* OR for flexbox: */
    flex: 2;
    width: 100%;
}

.footer-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.footer-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: #374151;
    text-decoration: none;
    border-radius: 16px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.footer-tag:hover {
    background-color: var(--secondary-color);
    color: #1f2937;
}
