/* ═══════════════════════════════════════════
   v1.17 — Blog Layout
   3-column on /tips/, 2-column on single posts
   ═══════════════════════════════════════════ */


/* ─── LAYOUT: /tips/ — 3 columns ─── */

.act-tips-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 32px;
    align-items: start;
}

.act-tips-sidebar-left,
.act-tips-sidebar-right {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc( 100vh - 48px );
    overflow-y: auto;
    scrollbar-width: thin;
}

.act-tips-sidebar-left::-webkit-scrollbar,
.act-tips-sidebar-right::-webkit-scrollbar {
    width: 6px;
}
.act-tips-sidebar-left::-webkit-scrollbar-thumb,
.act-tips-sidebar-right::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.act-tips-main {
    min-width: 0;  /* prevents grid blowout */
}

/* Tablet: collapse to 2 cols (Browse by Topic + Main, ads at bottom) */
@media ( max-width: 1100px ) {
    .act-tips-layout {
        grid-template-columns: 200px 1fr;
        gap: 24px;
    }
    .act-tips-sidebar-right {
        grid-column: 1 / -1;
        position: static;
        max-height: none;
        overflow-y: visible;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 32px;
    }
    .act-tips-sidebar-right .act-widget {
        margin: 0;
    }
}

/* Mobile: all stack */
@media ( max-width: 700px ) {
    .act-tips-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .act-tips-sidebar-left,
    .act-tips-sidebar-right {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .act-tips-sidebar-right {
        grid-template-columns: 1fr;
    }
}


/* ─── WIDGETS — shared styling ─── */

.act-widget {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.act-widget__title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.act-widget--ad {
    background: #F8FAFC;
    border-style: dashed;
    border-color: #CBD5E1;
    text-align: center;
    min-height: 100px;
}


/* ─── BROWSE BY TOPIC — left sidebar ─── */

.act-widget--topics {
    padding: 0;
    overflow: hidden;
}

.act-widget--topics .act-widget__title {
    padding: 16px 18px 12px;
    margin: 0;
    border-bottom: 1px solid #E5E7EB;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #fff;
}

.act-topic-list {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.act-topic-list li {
    list-style: none;
    margin: 0;
}

.act-topic-list li::marker {
    content: none;
}

.act-topic-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #1E293B;
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.3;
    transition: background 0.15s;
}

.act-topic-list a:hover {
    background: #F1F5F9;
    color: #0077B6;
}

.act-topic-list__icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.act-topic-list__name {
    flex: 1;
    font-weight: 500;
}

.act-topic-list__count {
    background: #E5E7EB;
    color: #6B7280;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.act-topic-list a:hover .act-topic-list__count {
    background: #FCD34D;
    color: #78350F;
}


/* ─── POPULAR TAGS — right sidebar (last) ─── */

.act-widget--tags {
    background: linear-gradient(135deg, #FEF3C7 0%, #FCD34D 100%);
    border: 1px solid #F59E0B;
}

.act-widget--tags .act-widget__title {
    color: #78350F;
}

.act-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.act-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    color: #1E293B;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.act-tag:hover {
    background: #0F172A;
    color: #FCD34D;
    border-color: #0F172A;
    transform: translateY(-1px);
}

.act-tag--sm { font-size: 11px; padding: 3px 9px; }
.act-tag--md { font-size: 12.5px; }
.act-tag--lg { font-size: 13.5px; font-weight: 600; }
.act-tag--xl { font-size: 15px; font-weight: 700; }


/* ─── ROTATING FEATURED GRID — center ─── */

.act-tips-featured {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.act-tips-featured__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F1F5F9;
}

.act-tips-featured__header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1E293B;
}

.act-tips-featured__nav {
    display: flex;
    gap: 6px;
}

.act-tips-featured__btn {
    width: 36px;
    height: 36px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 50%;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.act-tips-featured__btn:hover {
    background: #0F172A;
    color: #FCD34D;
    border-color: #0F172A;
    transform: translateY(-1px);
}

.act-tips-featured__viewport {
    position: relative;
    min-height: 400px;
}

.act-tips-featured__slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(8px);
}

.act-tips-featured__slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.act-tips-featured__slide-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    color: #64748B;
    font-size: 13px;
}

.act-tips-featured__view-all {
    color: #0077B6;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.act-tips-featured__view-all:hover {
    color: #023E8A;
    text-decoration: underline;
}

.act-tips-featured__grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 16px;
}

@media ( max-width: 900px ) {
    .act-tips-featured__grid {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( max-width: 600px ) {
    .act-tips-featured__grid {
        grid-template-columns: 1fr;
    }
}

.act-tips-card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #E5E7EB;
    transition: all 0.2s;
}

.act-tips-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(15,23,42,0.08);
    border-color: #FCD34D;
}

.act-tips-card__link {
    display: block;
    text-decoration: none;
    color: #1E293B;
}

.act-tips-card__image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #E5E7EB;
}

.act-tips-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    color: #FCD34D;
}

.act-tips-card__body {
    padding: 14px;
}

.act-tips-card__body h4 {
    margin: 0 0 6px;
    font-size: 14.5px;
    line-height: 1.35;
    color: #1E293B;
    font-weight: 600;
}

.act-tips-card__meta {
    font-size: 11.5px;
    color: #94A3B8;
}

.act-tips-featured__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.act-tips-featured__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #CBD5E1;
    padding: 0;
    cursor: pointer;
    transition: all 0.15s;
}

.act-tips-featured__dot:hover {
    background: #94A3B8;
}

.act-tips-featured__dot.is-active {
    background: #0F172A;
    transform: scale(1.3);
}


/* ─── OTHER ARTICLES list ─── */

.act-tips-recent-list {
    display: grid;
    gap: 14px;
}

.act-tips-recent__item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.15s;
}

.act-tips-recent__item:hover {
    border-color: #FCD34D;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(15,23,42,0.05);
}

.act-tips-recent__link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    text-decoration: none;
    color: #1E293B;
}

.act-tips-recent__image {
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: #E5E7EB;
}

.act-tips-recent__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #475569, #1E293B);
    color: #FCD34D;
}

.act-tips-recent__body {
    padding: 12px 14px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.act-tips-recent__cat {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0077B6;
    font-weight: 700;
    margin-bottom: 4px;
}

.act-tips-recent__body h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
    color: #1E293B;
    font-weight: 600;
}

.act-tips-recent__meta {
    font-size: 11.5px;
    color: #94A3B8;
}

@media ( max-width: 480px ) {
    .act-tips-recent__link {
        grid-template-columns: 90px 1fr;
        gap: 10px;
    }
    .act-tips-recent__image {
        height: 80px;
    }
    .act-tips-recent__body h3 {
        font-size: 13.5px;
    }
}


/* ─── SINGLE POST: 2-column layout (main + right sidebar) ─── */

body.single-post .act-content-sidebar,
body.single .act-content-sidebar {
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

body.single-post .act-sidebar,
body.single .act-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

body.single-post .act-sidebar .act-widget,
body.single .act-sidebar .act-widget {
    margin-bottom: 20px;
}

@media ( max-width: 1024px ) {
    body.single-post .act-content-sidebar,
    body.single .act-content-sidebar {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    body.single-post .act-sidebar,
    body.single .act-sidebar {
        position: static;
    }
}


/* ─── v1.18: SECTION HEADERS shared across Latest + Other ─── */

.act-tips-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.act-tips-section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1E293B;
}

.act-tips-section-link {
    font-size: 13px;
    font-weight: 600;
    color: #0077B6;
    text-decoration: none;
}

.act-tips-section-link:hover {
    color: #023E8A;
    text-decoration: underline;
}


/* ─── v1.18: LATEST ARTICLES grid (between Featured and Other) ─── */

.act-tips-latest-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 16px;
}

@media ( max-width: 900px ) {
    .act-tips-latest-grid {
        grid-template-columns: repeat( 2, 1fr );
    }
}

@media ( max-width: 600px ) {
    .act-tips-latest-grid {
        grid-template-columns: 1fr;
    }
}

.act-tips-card__cat {
    display: inline-block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0077B6;
    font-weight: 700;
    margin-bottom: 4px;
}


/* ─── v1.19: Empty state for Latest / Other when posts are sparse ─── */

.act-tips-empty {
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #64748B;
    font-size: 14px;
}

.act-tips-empty p {
    margin: 0;
}

.act-tips-empty a {
    color: #0077B6;
    font-weight: 600;
}
