/* ===================================
   CATEGORY BLOCKS - 10 PREMIUM TEMPLATES
   =================================== */

/* Base Block Styles */
.category-block {
    --block-color: #dc3545;
}

.category-block__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-subtle);
}

.category-block__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.category-block__more {
    font-size: 0.875rem;
    color: var(--block-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.category-block__more:hover {
    gap: 0.5rem;
    color: var(--block-color);
    opacity: 0.8;
}

/* ========================
   0. CARDS TEMPLATE (Full-width - Same as Original News Feed)
   ======================== */
.template-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-cards__item {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-cards__item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-light, var(--block-color));
}

.template-cards__image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.template-cards__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.template-cards__item:hover .template-cards__image img {
    transform: scale(1.05);
}

.template-cards__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.template-cards__category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.template-cards__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.template-cards__excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.template-cards__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.template-cards__meta i {
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    .template-cards__item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .template-cards__image {
        width: 100%;
        height: 180px;
    }
}

/* ========================
   1. LIST TEMPLATE (Premium Center Block)
   ======================== */
.template-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.template-list__item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
    align-items: flex-start;
}

.template-list__item:hover {
    transform: translateY(-4px);
    border-color: var(--block-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.template-list__image {
    width: 260px;
    height: 175px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.template-list__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-list__item:hover .template-list__image img {
    transform: scale(1.08);
}

.template-list__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0.5rem;
}

.template-list__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.template-list__item:hover .template-list__title {
    color: var(--block-color);
}

.template-list__excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.template-list__meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: auto;
}

.template-list__meta i {
    margin-right: 0.4rem;
    color: var(--block-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .template-list__item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .template-list__image {
        width: 100%;
        height: 200px;
    }

    .template-list__title {
        font-size: 1.2rem;
    }
}

/* ========================
   2. GRID TEMPLATE
   ======================== */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.template-grid__item {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.template-grid__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--block-color);
}

.template-grid__image {
    height: 140px;
    overflow: hidden;
}

.template-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.template-grid__item:hover .template-grid__image img {
    transform: scale(1.05);
}

.template-grid__content {
    padding: 1rem;
}

.template-grid__content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.template-grid__meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================
   3. MAGAZINE TEMPLATE
   ======================== */
.template-magazine {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    height: 350px;
}

.template-magazine__main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
}

.template-magazine__main:hover .template-magazine__image img {
    transform: scale(1.03);
}

.template-magazine__image {
    height: 100%;
    overflow: hidden;
}

.template-magazine__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.template-magazine__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #fff;
}

.template-magazine__overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.template-magazine__overlay p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.85;
}

.template-magazine__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-magazine__side-item {
    flex: 1;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    transition: all 0.25s;
}

.template-magazine__side-item:hover {
    border-color: var(--block-color);
}

.template-magazine__side-image {
    height: 100px;
    overflow: hidden;
}

.template-magazine__side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-magazine__side-item h4 {
    padding: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

/* ========================
   4. SPOTLIGHT TEMPLATE
   ======================== */
.template-spotlight__hero {
    position: relative;
    display: block;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    text-decoration: none;
}

.template-spotlight__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-spotlight__hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}

.template-spotlight__hero-content .badge {
    background: var(--block-color);
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

.template-spotlight__hero-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.template-spotlight__hero-content p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9rem;
}

.template-spotlight__thumbs {
    display: flex;
    gap: 0.75rem;
}

.template-spotlight__thumb {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
}

.template-spotlight__thumb img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.template-spotlight__thumb span {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================
   5. CAROUSEL TEMPLATE
   ======================== */
.template-carousel {
    position: relative;
}

.template-carousel__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.5rem 0;
}

.template-carousel__track::-webkit-scrollbar {
    display: none;
}

.template-carousel__card {
    flex: 0 0 200px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    transition: all 0.25s;
}

.template-carousel__card:hover {
    transform: translateY(-4px);
    border-color: var(--block-color);
}

.template-carousel__image {
    height: 120px;
    overflow: hidden;
}

.template-carousel__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-carousel__card h4 {
    padding: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.template-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.template-carousel__btn:hover {
    background: var(--block-color);
    color: #fff;
    border-color: var(--block-color);
}

.template-carousel__btn--prev {
    left: -20px;
}

.template-carousel__btn--next {
    right: -20px;
}

/* ========================
   6. OVERLAY TEMPLATE
   ======================== */
.template-overlay {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.template-overlay__item {
    position: relative;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
}

.template-overlay__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.template-overlay__item:hover img {
    transform: scale(1.05);
}

.template-overlay__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}

.template-overlay__content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.template-overlay__content span {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* ========================
   7. SIDEBAR TEMPLATE
   ======================== */
.template-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-sidebar__item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: all 0.25s;
}

.template-sidebar__item:hover {
    border-color: var(--block-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.template-sidebar__image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.template-sidebar__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-sidebar__content {
    flex: 1;
}

.template-sidebar__content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.template-sidebar__content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.template-sidebar__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================
   8. MASONRY TEMPLATE
   ======================== */
.template-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 120px;
    gap: 1rem;
}

.template-masonry__item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
}

.template-masonry__item--1 {
    grid-row: span 2;
}

.template-masonry__item--2 {
    grid-row: span 1;
}

.template-masonry__item--3 {
    grid-row: span 2;
}

.template-masonry__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.template-masonry__item:hover img {
    transform: scale(1.05);
}

.template-masonry__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}

.template-masonry__content h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
}

/* ========================
   9. TIMELINE TEMPLATE
   ======================== */
.template-timeline {
    position: relative;
    padding-left: 1rem;
}

.template-timeline::before {
    content: '';
    position: absolute;
    left: 90px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.template-timeline__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.template-timeline__time {
    width: 70px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--block-color);
    text-align: right;
}

.template-timeline__time i {
    margin-right: 0.25rem;
}

.template-timeline__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--block-color);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--block-color);
    flex-shrink: 0;
    z-index: 1;
}

.template-timeline__content {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}

.template-timeline__content:hover {
    border-color: var(--block-color);
    padding-left: 1.25rem;
}

/* ========================
   10. COMPACT TEMPLATE
   ======================== */
.template-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
}

.template-compact__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s;
}

.template-compact__item:last-child {
    border-bottom: none;
}

.template-compact__item:hover {
    padding-left: 0.5rem;
}

.template-compact__item:hover .template-compact__title {
    color: var(--block-color);
}

.template-compact__bullet {
    color: var(--block-color);
    font-size: 1.25rem;
    font-weight: bold;
}

.template-compact__title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s;
}

.template-compact__time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .template-magazine {
        grid-template-columns: 1fr;
        height: auto;
    }

    .template-magazine__main {
        height: 200px;
    }

    .template-magazine__sidebar {
        flex-direction: row;
    }

    .template-overlay {
        grid-template-columns: 1fr;
    }

    .template-spotlight__thumbs {
        flex-wrap: wrap;
    }

    .template-spotlight__thumb {
        flex: 0 0 calc(50% - 0.375rem);
    }

    .template-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .template-carousel__btn {
        display: none;
    }
}

/* Carousel JS Helper */