/*
Theme Name: Flatsome Child xamhinhdep
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/* ----- THIẾT LẬP CSS THUẦN ----- */

/* 1. Reset và Cài đặt chung */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f7f7f7;
    color: #333;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

/* 2. Layout chung */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section {
    margin-bottom: 4rem;
}

/* 3. Header */
.header {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.header-logo {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
}

.header-links {
    display: none;
    gap: 1.5rem;
    font-weight: 600;
}

.header-links a:hover {
    color: #2563eb;
}

.mobile-menu-btn {
    color: #374151;
}

.mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* 4. Tiêu đề mục & Thẻ bài viết */
.section-title {
    position: relative;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #446084;
    margin: 10px auto 0;
}

.post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

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

.wallpaper-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.featured-girl-image-large {
    width: 100%;
    height: 412px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

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

/* 5. Layout Grid Cụ Thể */

/* Grid chung */
.grid {
    display: grid;
    gap: 1.5rem;
}

/* Mục Bài viết mới */
.new-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.post-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-title a:hover {
    color: #2563eb;
}

.post-excerpt {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.read-more-link {
    font-weight: 600;
    color: #3b82f6;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* ----- CSS MỚI CHO SLIDER JS THUẦN ----- */
.webstory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.webstory-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF5733;
    padding: 2px;
    transition: transform 0.2s ease-in-out;
}

.webstory-avatar:hover {
    transform: scale(1.05);
}

.webstory-title {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webstory-card a:hover .webstory-title {
    color: #446084;
}

/* 1. Container chính của Slider */
.webstory-slider-container {
    position: relative;
    padding: 0 40px;
    /* Không gian cho 2 nút */
}

/* 2. Vùng có thể cuộn (thay thế .swiper) */
.webstory-slider-scrollarea {
    display: flex;
    overflow-x: auto;
    /* Cho phép cuộn ngang */
    scroll-behavior: smooth;
    /* Tạo hiệu ứng cuộn mượt */
    /* Ẩn thanh cuộn */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.webstory-slider-scrollarea::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

/* 3. Wrapper (thay thế .swiper-wrapper) */
.webstory-slider-wrapper {
    display: flex;
    /* Bắt buộc */
    gap: 20px;
    /* Khoảng cách giữa các webstory */
    padding-bottom: 5px;
    /* Thêm chút đệm */
}

/* 4. Slide (thay thế .swiper-slide) */
.webstory-slide {
    flex-shrink: 0;
    /* Bắt buộc */
    width: 90px;
    /* Kích thước bằng avatar */
}

/* 5. Nút (thay thế .swiper-button-...) */
.slider-btn-next,
.slider-btn-prev {
    position: absolute;
    top: 45px;
    /* Căn giữa avatar */
    transform: translateY(-50%);
    /* Căn giữa avatar chính xác hơn */
    color: #446084;
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    cursor: pointer;
    display: flex;
    /* Dùng flex để căn giữa icon */
    align-items: center;
    justify-content: center;
    font-size: 18px;
    /* Kích thước icon */
    font-weight: 700;
    user-select: none;
    transition: background-color 0.2s;
}

.slider-btn-next:hover,
.slider-btn-prev:hover {
    background-color: #f0f0f0;
}

.slider-btn-prev {
    left: 0px;
    /* Nằm trong padding của container */
}

.slider-btn-next {
    right: 0px;
    /* Nằm trong padding của container */
}

/* -------------------------------------- */

/* Mục Thư viện Anime */
.anime-library-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.post-card-caption {
    padding: 1rem;
    text-align: center;
}

.post-card-caption h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.post-card:hover .post-card-caption h3 {
    color: #2563eb;
}

/* Mục Ảnh Gái Xinh */
.featured-girl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

.featured-girl-large .post-title {
    font-size: 1.5rem;
}

.featured-girl-large .post-excerpt {
    margin-top: 0.5rem;
    color: #4b5563;
    font-size: 1rem;
}

.featured-girl-small-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Mục Hình Nền */
.wallpaper-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Mục Hình Xăm */
.tattoo-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.tattoo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* 6. Footer */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

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

.footer-widget h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.footer-widget p,
.footer-widget ul {
    font-size: 0.875rem;
}

.footer-widget ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-widget a:hover {
    color: white;
}

.footer-widget .email {
    margin-top: 0.5rem;
    font-weight: 600;
}

.footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}


/* 7. Responsive */

/* Small (sm) - 640px */
@media (min-width: 640px) {

    .anime-library-grid,
    .wallpaper-grid,
    .tattoo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium (md) - 768px */
@media (min-width: 768px) {
    .header-links {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .new-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .anime-library-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .wallpaper-grid,
    .tattoo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.page-section section.section{
    display: block !important;
}

.page-section section.section .section-title{
    display: block !important;
    margin-bottom: 20px;
}

/* ===== CSS CHO SINGLE POST (Từ HTML mẫu) ===== */

/* CSS Variables */
:root {
    --primary-color: #222;
    --secondary-color: #444;
    --border-color: #ebebeb;
    --bg-light: #f9f9f9;
    --link-color: #0056b3;
}

/* Cấu trúc Layout chính (Article & Sidebar) */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

/* Chi tiết Bài viết */
.article-detail {
    width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    background-color: transparent;
    padding: 0;
}

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

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

/* Article Header */
.article-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 15px 0;
    color: #000;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}

.article-sapo {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    font-weight: 400;
    line-height: 1.5;
}

.article-meta {
    font-size: 0.9rem;
    color: #777;
}

.article-meta .author {
    font-weight: 600;
    color: var(--primary-color);
}

.article-meta .date {
    margin-left: 15px;
}

/* Article Body */
.article-body {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #222;
}

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

.article-body figure {
    margin: 30px 0;
    border: 0;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
}

.article-body figure img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-body figcaption {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    padding: 15px 5px 5px 5px;
    font-style: italic;
}

.article-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-body blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    background-color: var(--bg-light);
    border-left: 4px solid var(--link-color);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--secondary-color);
    border-radius: 0 8px 8px 0;
}

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

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

/* Article Footer */
.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tags a {
    display: inline-block;
    background-color: #eef2f6;
    color: #334155;
    padding: 6px 14px;
    margin: 5px 5px 5px 0;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.tags a:hover {
    background-color: #dbe4ef;
    text-decoration: none;
}

/* Author Profile */
.author-profile {
    margin-top: 40px;
    padding: 25px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.author-profile-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.author-profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

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

.author-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

.author-info .author-bio {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0;
}

@media (min-width: 576px) {
    .author-profile-content {
        flex-direction: row;
        align-items: flex-start;
    }
    .author-info {
        text-align: left;
    }
}

/* Social Icons trong Author Profile */
.author-profile .social-icons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.author-profile .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.author-profile .social-icons a:hover {
    border-color: var(--link-color);
    background-color: var(--link-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.author-profile .social-icons a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.author-profile .social-icons a i {
    font-size: 18px;
}

/* Sidebar */
.sidebar .widget {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.widget ul, .widget ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.widget li a {
    color: var(--primary-color);
    font-weight: 600;
}

.widget li a:hover {
    color: #007bff;
}

/* CSS cho tin liên quan có hình ảnh */
.widget .related-posts li {
    margin-bottom: 15px;
}

.widget .related-posts li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
}

.widget .related-posts li a:hover {
    color: var(--link-color);
    text-decoration: none;
}

.widget .related-posts img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.widget ol {
    counter-reset: popular-posts-counter;
}

.widget ol li {
    counter-increment: popular-posts-counter;
    display: flex;
    align-items: flex-start;
}

.widget ol li::before {
    content: counter(popular-posts-counter) ".";
    font-weight: 700;
    font-size: 1.1rem;
    color: #999;
    margin-right: 10px;
    min-width: 20px;
}