/* ============================================================
   TRIPLAN BLOG ARCHIVE — archive.css
   ============================================================ */

/* ─── ARCHIVE WRAPPER ─── */
.tba-archive {
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

/* ─── HERO ─── */
.tba-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.tba-hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: #0e2426;
    margin: 0 0 0.6rem;
    letter-spacing: -0.01em;
}

.tba-hero-subtitle {
    font-size: 0.92rem;
    font-weight: 300;
    color: #6b6b6b;
    margin: 0;
}

/* ─── CONTROLS ─── */
.tba-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

/* ─── SEARCH ─── */
.tba-search-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.tba-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.tba-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.8rem;
    border: 1.5px solid rgba(25, 60, 64, 0.18);
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: #2c2c2c;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.tba-search-input:focus {
    border-color: #193c40;
    box-shadow: 0 0 0 3px rgba(25, 60, 64, 0.08);
}

.tba-search-input::placeholder { color: #aaa; }

.tba-search-clear {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.tba-search-clear:hover { color: #193c40; }

/* Spinner inside search */
.tba-search-spinner {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(25, 60, 64, 0.15);
    border-top-color: #193c40;
    border-radius: 50%;
    animation: tba-spin 0.7s linear infinite;
}

/* ─── FILTER PILLS ─── */
.tba-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tba-filter-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    border: 1.5px solid rgba(25, 60, 64, 0.15);
    background: transparent;
    color: #6b6b6b;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tba-filter-btn:hover {
    border-color: #a6754b;
    color: #a6754b;
    background: rgba(166, 117, 75, 0.05);
}

.tba-filter-btn.active {
    background: #193c40;
    border-color: #193c40;
    color: #fff;
}

/* ─── RESULTS META ─── */
.tba-results-meta {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    min-height: 1.4rem;
}

.tba-results-count {
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
}

/* ─── GRID ─── */
.tba-grid {
    display: grid;
    gap: 1.6rem;
}

.tba-cols-1 { grid-template-columns: 1fr; }
.tba-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tba-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tba-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── CARD ─── */
.tba-card {
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgba(25, 60, 64, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 3px 12px;
    transition: all 0.4s ease;
}


/* fade-in for AJAX loaded cards */
.tba-card.tba-card-new {
    animation: tba-fadein 0.35s ease both;
}

/* ─── CARD IMAGE ─── */
.tba-card-img-wrap { display: block; }

.tba-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #ede4d6;
}

.tba-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.tba-card:hover .tba-card-img img { transform: scale(1.05); }

.tba-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ede4d6, #f5efe6);
}

.tba-card-cat-badge {
    position: absolute;
    bottom: 0.8rem;
    left: 0.8rem;
    background: #193c40;
    color: #D4A574;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.28rem 0.65rem;
    border-radius: 2px;
    pointer-events: none;
}

/* ─── CARD BODY ─── */
.tba-card-body {
    padding: 1.2rem 1.3rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tba-card-cat-label {
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a6754b;
    text-decoration: none;
    margin-bottom: 0.45rem;
    display: block;
    transition: color 0.2s;
}

.tba-card-cat-label:hover { color: #193c40; }

.tba-card-title {
    font-size: 18px;
    font-weight: 700;
    color:var(--wp--preset--color--primary, #193c40);
    line-height: 1.35;
    margin: 0 0 0.6rem;
}

.tba-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.tba-card-title a:hover { color: #193c40; }

.tba-card-excerpt {
    font-size: 0.83rem;
    font-weight: 300;
    color: #6b6b6b;
    line-height: 1.7;
    margin: 0 0 1rem;
    flex: 1;
}

/* ─── CARD FOOTER ─── */
.tba-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(25, 60, 64, 0.08);
    font-size: 0.72rem;
    color: #999;
    flex-wrap: wrap;
}

.tba-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}

.tba-card-read-more {
    margin-left: auto;
    text-decoration: none;
    white-space: nowrap;
}


/* ─── NO RESULTS ─── */
.tba-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    padding: 3rem 1rem;
}

/* ─── LOAD MORE ─── */
.tba-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.tba-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 2.5rem;
    background: transparent;
    border: 1.5px solid #193c40;
    border-radius: 2px;
    color: #193c40;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.tba-load-more-btn:hover {
    background: #193c40;
    color: #fff;
}

.tba-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner in load more */
.tba-load-more-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(25, 60, 64, 0.2);
    border-top-color: #193c40;
    border-radius: 50%;
    animation: tba-spin 0.7s linear infinite;
}

.tba-load-more-btn:hover .tba-load-more-spinner {
    border-color: rgba(255,255,255,0.3);
    border-top-color: #fff;
}

/* ─── SKELETON LOADING STATE ─── */
.tba-skeleton {
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(25, 60, 64, 0.08);
    overflow: hidden;
}

.tba-skeleton-img {
    height: 220px;
    background: linear-gradient(90deg, #f0ebe4 25%, #e8e1d8 50%, #f0ebe4 75%);
    background-size: 200% 100%;
    animation: tba-shimmer 1.4s infinite;
}

.tba-skeleton-body { padding: 1.2rem 1.3rem; }

.tba-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0ebe4 25%, #e8e1d8 50%, #f0ebe4 75%);
    background-size: 200% 100%;
    animation: tba-shimmer 1.4s infinite;
    margin-bottom: 0.8rem;
}

.tba-skeleton-line.tba-w-60 { width: 60%; }
.tba-skeleton-line.tba-w-80 { width: 80%; }
.tba-skeleton-line.tba-w-40 { width: 40%; }

/* ─── ANIMATIONS ─── */
@keyframes tba-spin {
    to { transform: rotate(360deg); }
}

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

@keyframes tba-shimmer {
    to { background-position: -200% 0; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .tba-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .tba-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .tba-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .tba-card-img { height: 190px; }
}

@media (max-width: 520px) {
    .tba-cols-2,
    .tba-cols-3,
    .tba-cols-4    { grid-template-columns: 1fr; }
    .tba-filters   { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: none; }
    .tba-filters::-webkit-scrollbar { display: none; }
    .tba-search-input { border-radius: 8px; }
}
