/* Tool Sorted Homepage — v1.0 */

/* ===== RESET & BASE ===== */
.ts-home-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
}

/* ===== HERO ===== */
.ts-hero {
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.ts-hero-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.ts-hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 400px;
}
.ts-hero-image {
    position: relative;
    overflow: hidden;
}
.ts-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.ts-hero-link:hover .ts-hero-image img {
    transform: scale(1.04);
}
.ts-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.75rem;
    color: #fff;
}
.ts-hero-badge {
    display: inline-block;
    background: #2563EB;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 5px;
    margin-bottom: 1rem;
    width: fit-content;
}
.ts-hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.22;
    margin: 0 0 0.9rem;
    color: #fff;
}
.ts-hero-excerpt {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0 0 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ts-hero-meta {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ts-dot {
    color: #475569;
}
.ts-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563EB;
    font-weight: 600;
    font-size: 0.88rem;
    margin-top: 1.5rem;
    transition: gap 0.2s ease;
}
.ts-hero-link:hover .ts-hero-cta {
    gap: 10px;
}

/* ===== NEWS FEED ===== */
.ts-news {
    margin-bottom: 2.75rem;
}
.ts-news-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.ts-news-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #0f172a;
}
.ts-pulse {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: ts-pulse-anim 2s infinite;
}
@keyframes ts-pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.ts-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.ts-news-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ts-news-card:hover {
    border-color: #2563EB;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.1);
}
.ts-news-source {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563EB;
}
.ts-news-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ts-news-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: auto;
}

/* ===== SECTION HEADER ===== */
.ts-section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.ts-section-head h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
}
.ts-section-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ===== ARTICLE GRID ===== */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
    margin-bottom: 2.5rem;
}
.ts-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.ts-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.09);
    transform: translateY(-3px);
}
.ts-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.ts-card-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.ts-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.ts-card:hover .ts-card-img img {
    transform: scale(1.06);
}
.ts-card-body {
    padding: 1.15rem 1.25rem 1.25rem;
}
.ts-card-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #2563EB;
    margin-bottom: 0.5rem;
}
.ts-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.55rem;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ts-card-excerpt {
    font-size: 0.83rem;
    line-height: 1.55;
    color: #64748b;
    margin: 0 0 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ts-card-meta {
    font-size: 0.73rem;
    color: #94a3b8;
}

/* ===== PAGINATION ===== */
.ts-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.ts-page-btn {
    display: inline-block;
    padding: 0.55rem 1.3rem;
    background: #2563EB;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.ts-page-btn:hover {
    background: #1d4ed8;
    color: #fff;
}
.ts-page-num {
    font-size: 0.82rem;
    color: #64748b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .ts-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ts-hero-image {
        max-height: 300px;
    }
    .ts-hero-content {
        padding: 2rem;
    }
    .ts-hero-title {
        font-size: 1.4rem;
    }
    .ts-news-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ts-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .ts-home-wrap {
        padding: 1rem 1rem 2rem;
    }
    .ts-hero {
        border-radius: 10px;
    }
    .ts-hero-content {
        padding: 1.5rem;
    }
    .ts-hero-title {
        font-size: 1.2rem;
    }
    .ts-hero-excerpt {
        -webkit-line-clamp: 2;
    }
    .ts-news-grid {
        grid-template-columns: 1fr;
    }
    .ts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .ts-card {
        border-radius: 10px;
    }
}

/* ===== KADENCE OVERRIDES ===== */
body.home .site-main > .entry-content-wrap,
body.home .site-main > .content-wrap,
body.home .site-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}
body.home .site-container .site-inner-wrap {
    max-width: 100%;
}
body.home .content-wrap {
    max-width: 100% !important;
    padding: 0 !important;
}
body.home #inner-wrap {
    max-width: 100%;
}
body.home .site-main .entry-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Remove Kadence archive title on homepage */
body.home .entry-hero-layout-default,
body.home .wp-site-blocks > .entry-hero,
body.home .archive-title-wrap {
    display: none !important;
}
