/* Reset & General Styles for Home Page */
.home-template-wrapper {
    font-family: 'Source Serif 4', serif !important;
    line-height: 1.7;
    font-size: 17px;
    color: #333;
    background: #f9f9f9;
    padding: 20px 0;
}

.home-template-wrapper .font-serif {
    font-family: 'Playfair Display', serif !important;
}

.home-template-wrapper a {
    text-decoration: none;
    color: #004a99;
    transition: 0.2s;
}

.home-template-wrapper a:hover {
    color: #002d5c;
    text-decoration: underline;
}

.home-template-wrapper .w-100 {
    width: 100%;
    display: block;
}

.home-template-wrapper .mb-15 {
    margin-bottom: 10px;
}

.home-template-wrapper .mt-20 {
    margin-top: 20px;
}

/* Header định danh thực thể (Entity Summary & H1) */
.home-template-wrapper .home-entity-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.home-template-wrapper .home-entity-header h1 {
    font-family: 'Playfair Display', serif !important;
    font-size: 32px !important;
    font-weight: 700;
    color: #003366;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.3 !important;
}

.home-template-wrapper .home-entity-header p {
    font-size: 17px;
    color: #4a5568;
    margin: 0;
    line-height: 1.7;
}

/* Container cố định 1200px */
.home-template-wrapper .container.banner-links {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
}

/* Header Grid: 2 Cột bài viết, 1 Cột Sidebar */
.home-template-wrapper .kic-grid-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Bài viết tiêu điểm */
.home-template-wrapper .display-3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 25px !important;
    line-height: 1.35 !important;
    font-weight: 700;
    margin-top: 0;
}

.home-template-wrapper .summary-text {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}

.home-template-wrapper .card-hero .card {
    margin-bottom: 25px;
    border: none;
}

.home-template-wrapper .card-hero .card-body {
    padding: 15px 0;
}

.home-template-wrapper .card-hero .card-media img {
    border-radius: 8px;
    object-fit: cover;
    height: 400px;
}

.home-template-wrapper .card-hero .h5 {
    font-size: 1.15rem;
    display: block;
}

.home-template-wrapper .credit {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
    font-family: sans-serif;
}

/* Sub Grid bên dưới bài chính */
.home-template-wrapper .read-more-section {
    border-top: 2px solid #333;
    padding-top: 15px;
}

.home-template-wrapper .sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.home-template-wrapper .sub-item {
    border-left: none;
    padding-left: 0;
}

/* Sidebar Tra cứu (Right Rail) */
.home-template-wrapper .kic-right-rail {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.home-template-wrapper .oyr-title {
    border-bottom: 2px solid #004a99;
    padding-bottom: 10px;
    margin-bottom: 18px;
    color: #003366;
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    font-weight: 700;
}

.home-template-wrapper .search-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.home-template-wrapper .search-card {
    background: #ffffff;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    box-sizing: border-box;
    font-family: sans-serif;
}

.home-template-wrapper .search-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    text-decoration: none;
    border-color: #004a99;
    color: #004a99;
    box-shadow: 0 4px 12px rgba(0, 74, 153, 0.12);
}

.home-template-wrapper .card-icon {
    font-size: 1.1rem;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-template-wrapper .sidebar-info {
    padding: 15px;
    border-left: 2px solid #c8a84b;
    background: rgba(200, 168, 75, 0.05);
    font-style: italic;
    color: #666;
}

/* Phần chuyên mục bên dưới */
.home-template-wrapper .section-divider {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.home-template-wrapper .section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    border-bottom: 3px solid #004a99;
    padding-bottom: 5px;
}

.home-template-wrapper .section-title {
    margin-bottom: 0;
    border-bottom: none;
    display: inline-block;
    padding-bottom: 0;
}

.home-template-wrapper .section-title h3 {
    margin: 0;
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    color: #003366;
}

.home-template-wrapper .section-links {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: sans-serif;
}

.home-template-wrapper .section-links a {
    color: #666;
    text-decoration: none;
}

.home-template-wrapper .section-links a:hover {
    color: #004a99;
}

.home-template-wrapper .grid-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.home-template-wrapper .card-base {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    transition: transform 0.2s ease;
}

.home-template-wrapper .card-base:hover {
    transform: translateY(-5px);
}

.home-template-wrapper .card-base .card-media img {
    border-radius: 6px;
    height: 180px;
    object-fit: cover;
}

.home-template-wrapper .card-base .title {
    display: block;
    margin-top: 12px;
    font-family: 'Playfair Display', serif !important;
    font-size: 18px !important;
    font-weight: 700;
    color: #003366;
    line-height: 1.4;
}

.home-template-wrapper .card-base .description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
}

.home-template-wrapper .grid-categories-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.home-template-wrapper .kinh-thanh-grid {
    display: block;
    margin-bottom: 40px;
}

.kt-combined-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.kt-combined-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kt-combined-small .kt-small-post {
    flex-direction: column;
}

.kt-combined-small .kt-small-post .kt-media {
    flex: 0 0 auto;
    width: 100%;
}

.kt-combined-small .kt-small-post .kt-title {
    margin-top: 10px;
}

/* Nổi bật Ticker Styles */
.home-template-wrapper .noi-bat-ticker {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.home-template-wrapper .ticker-label {
    font-weight: 700;
    color: #004a99;
    margin-right: 15px;
    white-space: nowrap;
    font-size: 16px;
    text-transform: uppercase;
    font-family: sans-serif;
}

.home-template-wrapper .ticker-items {
    display: block;
    position: relative;
    height: 24px;
    overflow: hidden;
    width: 100%;
}

.home-template-wrapper .ticker-item {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    animation: fadeIn 0.5s ease-in-out;
}

.home-template-wrapper .ticker-item.active {
    display: block;
}

.home-template-wrapper .ticker-item:hover {
    color: #004a99;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kinh Thanh Style */
.home-template-wrapper .kinh-thanh-col-title {
    margin-bottom: 20px;
    color: #111;
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #004a99;
    display: inline-block;
    padding-bottom: 5px;
}

.kt-large-post {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: stretch;
}

.kt-large-post .kt-media {
    flex: 0 0 55%;
}

.kt-large-post .kt-media img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.kt-large-post .kt-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
}

.kt-small-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.kt-small-post {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.kt-small-post .kt-media {
    flex: 0 0 45%;
}

.kt-small-post .kt-media img {
    border-radius: 4px;
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16/9;
}

.kt-small-post .kt-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
}

/* TTK Grid Style */
.ttk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.ttk-col:not(:last-child) {
    border-right: 1px solid #eee;
    padding-right: 25px;
}

.ttk-col-title {
    text-transform: uppercase;
    font-weight: 700;
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    border-bottom: 2px solid #2e8b57;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #111;
}

.ttk-first-post {
    display: flex;
    gap: 15px;
    margin-bottom: 14px;
}

.ttk-first-post .media {
    flex: 0 0 40%;
}

.ttk-first-post .media img {
    width: 100%;
    border-radius: 4px;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.ttk-first-post .content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.ttk-first-post .title {
    font-family: 'Playfair Display', serif !important;
    font-weight: 700;
    font-size: 18px !important;
    color: #111;
    margin-bottom: 8px;
    display: block;
    line-height: 1.4;
}

.ttk-date {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: sans-serif;
}

.ttk-list-post {
    margin-bottom: 12px;
}

.ttk-list-post .title {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #222;
    margin-bottom: 0;
    display: block;
    font-weight: 500;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .home-template-wrapper .kic-grid-main {
        grid-template-columns: 1fr;
    }
    .home-template-wrapper .grid-categories {
        grid-template-columns: 1fr 1fr;
    }
    .kt-combined-large {
        grid-template-columns: 1fr;
    }
    .kt-combined-small {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .home-template-wrapper .home-entity-header h1 {
        font-size: 24px !important;
    }
    .home-template-wrapper .display-3 {
        font-size: 20px !important;
    }
    .home-template-wrapper .grid-categories,
    .home-template-wrapper .sub-grid,
    .home-template-wrapper .grid-categories-2,
    .home-template-wrapper .kinh-thanh-grid,
    .ttk-grid,
    .kt-combined-small {
        grid-template-columns: 1fr;
    }
    .ttk-col:not(:last-child) {
        border-right: none;
        padding-right: 0;
    }
    .home-template-wrapper .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .home-template-wrapper .section-links {
        flex-wrap: wrap;
        gap: 10px;
    }
    .home-template-wrapper .container.banner-links {
        padding: 15px;
    }
    .home-template-wrapper .card-hero .card-media img {
        height: 250px;
    }
    .kt-large-post {
        flex-direction: column;
    }
    .kt-small-grid {
        grid-template-columns: 1fr;
    }
}
