/* ============================================
   CHI TIẾT TIN - NÔNG SẢN TÂY BẮC
   ============================================ */

/* === PAGE BANNER === */
.ctt-page-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(74, 111, 40, 0.9), rgba(74, 111, 40, 0.7)), 
                url('../images/banner-gao-taybac.jpg') center/cover no-repeat;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.ctt-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.ctt-page-banner .container {
    position: relative;
    z-index: 1;
}

.ctt-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.ctt-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ctt-breadcrumb a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.ctt-breadcrumb a:hover {
    color: #fff;
}

.ctt-breadcrumb i {
    color: rgba(255,255,255,0.6);
    font-size: 10px;
}

.ctt-breadcrumb span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* === MAIN CONTENT SECTION === */
.ctt-main-content {
    padding: 20px 0 60px;
}

/* === SIDEBAR === */
.ctt-sidebar {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.ctt-sidebar::-webkit-scrollbar {
    width: 4px;
}

.ctt-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.ctt-sidebar::-webkit-scrollbar-thumb {
    background: #4a6f28;
    border-radius: 2px;
}

.ctt-sidebar-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.ctt-widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #4a6f28;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4a6f28;
}

/* Featured News List */
.ctt-featured-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ctt-featured-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.ctt-featured-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.ctt-featured-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.ctt-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ctt-featured-item:hover .ctt-featured-thumb img {
    transform: scale(1.1);
}

.ctt-featured-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.ctt-featured-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.ctt-featured-item:hover .ctt-featured-title {
    color: #4a6f28;
}

/* === ARTICLE SECTION === */
.ctt-article {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 25px;
}

.ctt-article-header {
    margin-bottom: 25px;
}

.ctt-article-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.ctt-article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.ctt-article-meta i {
    margin-right: 6px;
    color: #4a6f28;
}

/* === VIDEO SECTION === */
.ctt-video-section {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.ctt-video-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0,0,0,0.85);
}

.ctt-video-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctt-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.ctt-author-info {
    display: flex;
    flex-direction: column;
}

.ctt-author-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.ctt-author-channel {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.ctt-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.ctt-share-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Video Container */
.ctt-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.ctt-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

.ctt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.7);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ctt-play-btn i {
    color: #fff;
    font-size: 24px;
    margin-left: 5px;
}

.ctt-play-btn:hover {
    background: rgba(74, 111, 40, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.ctt-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ctt-video-iframe iframe {
    width: 100%;
    height: 100%;
}

/* === ARTICLE CONTENT === */
.ctt-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

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

.ctt-article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 15px;
}

.ctt-article-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

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

/* === TAGS === */
.ctt-article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ctt-tags-label {
    font-weight: 600;
    color: #333;
}

.ctt-tag {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.ctt-tag:hover {
    background: #4a6f28;
    color: #fff;
}

/* === RELATED NEWS SECTION === */
.ctt-related-news {
    padding: 50px 0 60px;
    background: #f8f9fa;
}

.ctt-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ctt-related-title {
    font-size: 24px;
    font-weight: 700;
    color: #4a6f28;
    margin: 0;
}

.ctt-related-nav {
    display: flex;
    gap: 10px;
}

.ctt-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.ctt-nav-btn:hover {
    background: #4a6f28;
    border-color: #4a6f28;
    color: #fff;
}

/* Related News Slider */
.ctt-related-slider {
    overflow: hidden;
}

.ctt-related-list {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.ctt-related-card {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
}

.ctt-card-link {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.ctt-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

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

.ctt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.ctt-card-link:hover .ctt-card-image img {
    transform: scale(1.08);
}

.ctt-card-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(74, 111, 40, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.2;
}

.ctt-date-day {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.ctt-date-year {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.ctt-card-content {
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.ctt-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ctt-card-readmore {
    display: inline-block;
    padding: 6px 16px;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s;
}

.ctt-card-link:hover .ctt-card-readmore {
    background: #fff;
    color: #4a6f28;
}

/* Classic Editor - oEmbed video responsive */
.wp-video,
.mejs-container,
embed, 
object,
video,
iframe {
    max-width: 100%;
}

/* Wrapper cho oEmbed */
.oembed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.oembed-container iframe,
.oembed-container object,
.oembed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* === RESPONSIVE === */
@media (max-width: 1199px) {
    .ctt-related-card {
        flex: 0 0 calc(33.333% - 14px);
        min-width: calc(33.333% - 14px);
    }
}

@media (max-width: 991px) {
    /* === PAGE BANNER - Tablet === */
    .ctt-page-banner {
        padding: 50px 0;
        margin-bottom: 30px;
    }
    
    .ctt-page-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .ctt-breadcrumb {
        gap: 8px;
    }
    
    .ctt-breadcrumb a,
    .ctt-breadcrumb span {
        font-size: 13px;
    }
    
    /* === MAIN CONTENT LAYOUT - Tablet === */
    .ctt-main-content {
        padding: 15px 0 50px;
    }
    
    .ctt-main-content .row {
        flex-direction: column-reverse;
    }
    
    .ctt-main-content .col-lg-4,
    .ctt-main-content .col-lg-8,
    .ctt-main-content .col-md-5,
    .ctt-main-content .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* === SIDEBAR - Tablet === */
    .ctt-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
        margin-top: 30px;
    }
    
    .ctt-sidebar-widget {
        padding: 18px;
    }
    
    .ctt-widget-title {
        font-size: 17px;
        margin-bottom: 18px;
        padding-bottom: 10px;
    }
    
    /* Tin Tức Nổi Bật - Tablet: hiển thị 4 item trong 1 hàng */
    .ctt-featured-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    /* Ẩn các item từ thứ 5 trở đi */
    .ctt-featured-item:nth-child(n+5) {
        display: none;
    }
    
    .ctt-featured-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
        gap: 10px;
        background: #f9f9f9;
        border-radius: 8px;
    }
    
    .ctt-featured-thumb {
        width: 100%;
        height: 100px;
        border-radius: 6px;
    }
    
    .ctt-featured-info {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .ctt-featured-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
        text-align: center;
    }
    
    /* === ARTICLE - Tablet === */
    .ctt-article {
        padding: 20px;
        border-radius: 6px;
    }
    
    .ctt-article-header {
        margin-bottom: 20px;
    }
    
    .ctt-article-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .ctt-article-meta {
        gap: 15px;
        font-size: 13px;
    }
    
    /* === VIDEO SECTION - Tablet === */
    .ctt-video-section {
        margin-bottom: 25px;
        border-radius: 10px;
    }
    
    .ctt-video-info-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .ctt-video-author {
        gap: 10px;
    }
    
    .ctt-author-avatar {
        width: 36px;
        height: 36px;
    }
    
    .ctt-author-name {
        font-size: 13px;
    }
    
    .ctt-author-channel {
        font-size: 11px;
    }
    
    .ctt-share-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .ctt-play-btn {
        width: 60px;
        height: 60px;
    }
    
    .ctt-play-btn i {
        font-size: 20px;
    }
    
    /* === ARTICLE CONTENT - Tablet === */
    .ctt-article-content {
        font-size: 15px;
        line-height: 1.75;
    }
    
    .ctt-article-content p {
        margin-bottom: 18px;
    }
    
    .ctt-article-content h3 {
        font-size: 18px;
        margin: 22px 0 12px;
    }
    
    .ctt-article-content ul {
        padding-left: 22px;
    }
    
    .ctt-article-content li {
        margin-bottom: 8px;
    }
    
    /* === TAGS - Tablet === */
    .ctt-article-tags {
        margin-top: 25px;
        padding-top: 18px;
        gap: 8px;
    }
    
    .ctt-tags-label {
        font-size: 14px;
    }
    
    .ctt-tag {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    /* === RELATED NEWS - Tablet: Slider mode với 2 cards === */
    .ctt-related-news {
        padding: 40px 0 50px;
    }
    
    .ctt-related-header {
        margin-bottom: 20px;
    }
    
    .ctt-related-title {
        font-size: 20px;
    }
    
    .ctt-related-slider {
        overflow: hidden;
    }
    
    .ctt-related-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 15px;
        transition: transform 0.4s ease;
    }
    
    .ctt-related-card {
        flex: 0 0 calc(50% - 7.5px);
        min-width: calc(50% - 7.5px);
    }
    
    .ctt-card-image {
        height: 180px;
    }
    
    .ctt-card-title {
        font-size: 14px;
    }
    
    .ctt-card-readmore {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .ctt-nav-btn {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 767px) {
    .ctt-page-banner {
        padding: 40px 0;
    }
    
    .ctt-page-title {
        font-size: 22px;
    }
    
    .ctt-breadcrumb {
        font-size: 13px;
    }
    
    .ctt-article {
        padding: 15px;
    }
    
    .ctt-article-title {
        font-size: 20px;
    }
    
    .ctt-video-info-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .ctt-author-name {
        font-size: 13px;
    }
    
    .ctt-featured-list {
        grid-template-columns: 1fr;
    }
    
    .ctt-related-title {
        font-size: 20px;
    }
    
    .ctt-card-image {
        height: 180px;
    }
}

@media (max-width: 575px) {
    .ctt-related-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .ctt-play-btn {
        width: 55px;
        height: 55px;
    }
    
    .ctt-play-btn i {
        font-size: 18px;
    }
}