/* ==============================================
   Blog Theme CSS - Language School Blog
   Extracted from blog.html and blogpost.html templates
   ============================================== */

/* --- VARIABLES --- */
:root {
    --primary: #3c1e6e;
    --primary-light: #562b99;
    --accent: #ff6b4a;
    --accent-hover: #e85a3a;
    --text-dark: #2d2d2d;
    --text-light: #666;
    --bg-light: #f8f9fc;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(60, 30, 110, 0.1);
    --shadow-lg: 0 20px 40px rgba(60, 30, 110, 0.15);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

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

/* --- COMPONENTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #ff8c73 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 74, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 74, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 107, 74, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}

.top-bar i {
    margin-right: 6px;
    color: var(--accent);
}

/* --- NAVBAR --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
    font-weight: 500;
    color: var(--primary);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a.active {
    color: var(--accent);
    font-weight: 700;
}

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* --- BLOG HERO --- */
.blog-hero {
    background: radial-gradient(circle at bottom left, #4c268f 0%, #3c1e6e 100%);
    color: white;
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f8f9fc' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* --- BLOG LAYOUT --- */
.blog-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
    margin-top: -40px;
    position: relative;
    z-index: 5;
    padding-bottom: 80px;
}

/* --- FEATURED POST --- */
.featured-post {
    grid-column: 1 / -1;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    margin-bottom: 40px;
    transition: var(--transition);
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.featured-img {
    flex: 1.2;
    min-height: 350px;
}

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

.featured-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-tag {
    color: var(--accent);
    font-weight: 700;
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary);
    line-height: 1.2;
}

.featured-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- GRID POSTS --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    margin: 10px 0;
    color: var(--primary);
    line-height: 1.3;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- SIDEBAR --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 15px;
}

.search-form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.categories-list li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 10px;
}

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

.categories-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-weight: 500;
    align-items: center;
}

.categories-list a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.cat-count {
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.newsletter-box {
    text-align: center;
}

.newsletter-box p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.newsletter-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.page-link.active {
    background: var(--primary);
    color: white;
}

.page-link:hover:not(.active) {
    background: #eee;
}

/* ==============================================
   ARTICLE / BLOGPOST STYLES
   ============================================== */

/* --- ARTICLE HEADER --- */
.article-header-section {
    background: white;
    padding: 60px 0 40px;
    border-bottom: 1px solid #eee;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs i {
    margin: 0 8px;
    font-size: 0.7rem;
    opacity: 0.6;
}

.article-title h1 {
    font-size: 2.5rem;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar-small {
    width: 30px;
    height: 30px;
    background: #eee;
    border-radius: 50%;
    object-fit: cover;
}

/* --- MAIN CONTENT LAYOUT --- */
.content-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 50px;
    padding: 60px 0;
}

/* --- ARTICLE CONTENT STYLES --- */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-body h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 40px 0 20px;
}

.article-body h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin: 30px 0 15px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body ul li {
    list-style: disc;
}

.article-body blockquote {
    border-left: 5px solid var(--accent);
    background: #fff5f2;
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    color: var(--primary);
    font-weight: 500;
    border-radius: 0 10px 10px 0;
}

.article-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.highlight-box {
    background: #f0f2f5;
    padding: 25px;
    border-radius: var(--radius-md);
    margin: 30px 0;
    border: 1px solid #e1e4e8;
}

.highlight-box h4 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- SHARE & TAGS --- */
.article-footer {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
    margin: 50px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.share-buttons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    color: var(--text-light);
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: var(--transition);
}

.share-buttons a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* --- AUTHOR BOX --- */
.author-box {
    background: white;
    padding: 35px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 25px;
    align-items: flex-start;
    border-left: 5px solid var(--primary);
}

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

.author-info h4 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--primary);
}

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

/* --- RELATED POSTS --- */
.related-section {
    margin-top: 60px;
}

.related-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    display: inline-block;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.related-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.related-card img {
    width: 120px;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-content h5 {
    font-size: 1.1rem;
    margin: 5px 0 10px;
    color: var(--primary);
}

.related-content a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- TABLE OF CONTENTS --- */
.toc-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.toc-list a {
    color: var(--text-light);
    display: block;
    padding-left: 10px;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    color: var(--accent);
    border-left-color: var(--accent);
}

/* --- FOOTER --- */
footer {
    background: #1a0b2e;
    color: #ccc;
    padding: 60px 0 40px;
    margin-top: auto;
    border-top: 5px solid var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

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

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

.text-center {
    text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .featured-post {
        flex-direction: column;
    }

    .featured-img {
        min-height: 250px;
    }

    .sidebar {
        order: 2;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .article-title h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }

    .top-bar {
        display: none;
    }

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

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}