/* =============================================================
   Startups Archive — startups-archive.css
   Matches the card design from the screenshot exactly
   Compatible with Hello Elementor theme
   ============================================================= */

/* ---- Reset scoped to our wrapper ---- */
.sa-wrapper *,
.sa-wrapper *::before,
.sa-wrapper *::after {
    box-sizing: border-box;
}

/* ---- Wrapper ---- */
.sa-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding: 32px 0;
}

/* =============================================================
   FILTER BAR
   ============================================================= */
.sa-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    align-items: center;
}

.sa-filter-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1.5px solid #d1d5db;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    background: #ffffff;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
    cursor: pointer;
    line-height: 1.4;
}

.sa-filter-btn:hover {
    border-color: #111827;
    color: #111827;
    text-decoration: none;
}

.sa-filter-btn.sa-btn--active {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

/* =============================================================
   GRID
   ============================================================= */
.sa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .sa-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .sa-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   CARD
   ============================================================= */
.sa-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sa-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

/* ---- Card Header (logo + meta) ---- */
.sa-card__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sa-card__logo {
    width: 52px;
    height: 52px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.sa-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sa-card__logo-fallback {
    font-size: 22px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
}

.sa-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sa-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    padding: 0;
    line-height: 1.35;
    border: none;
    background: none;
}

.sa-card__year {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 100px;
    padding: 2px 10px;
    width: fit-content;
}

/* ---- Description ---- */
.sa-card__description {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    flex: 1;
}

/* ---- Footer (tags + arrow) ---- */
.sa-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 12px;
}

.sa-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Category tag pill — matches salmon/rose colour in screenshot */
.sa-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #e05b4b;
    background: #fef2f0;
    border: 1.5px solid #fbd0cb;
    border-radius: 100px;
    padding: 3px 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* Arrow button */
.sa-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sa-card__arrow:hover {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    text-decoration: none;
}

.sa-card__arrow svg {
    width: 16px;
    height: 16px;
}

/* =============================================================
   PAGINATION
   ============================================================= */
.sa-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    align-items: center;
}

.sa-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
    cursor: pointer;
}

.sa-page-btn:hover {
    border-color: #111827;
    color: #111827;
    text-decoration: none;
}

.sa-page-btn.sa-page-btn--active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.sa-page-btn.sa-page-btn--nav {
    font-size: 16px;
    padding: 0 12px;
}

/* =============================================================
   EMPTY STATE
   ============================================================= */
.sa-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 15px;
}

/* =============================================================
   Hello Elementor — override container padding conflicts
   ============================================================= */
.elementor-widget-shortcode .sa-wrapper {
    width: 100%;
}


/* Add to your existing CSS */

/* Loading State */
.sa-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.sa-loading span {
    display: inline-block;
    animation: sa-pulse 1.5s ease-in-out infinite;
}

@keyframes sa-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Error State */
.sa-error {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
    background: #ffebee;
    border-radius: 8px;
}

/* Tag empty state */
.sa-tag--empty {
    opacity: 0.6;
    font-style: italic;
}

/* Disable pointer events while loading */
.sa-loading ~ .sa-pagination {
    pointer-events: none;
    opacity: 0.5;
}
