/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0A0A0F;
    --bg-elevated: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(0,167,138,0.4);
    --accent: #00a78a;
    --accent-dark: #0c7762;
    --accent-light: #0fcea9;
    --text: #F8F8F8;
    --text-secondary: #94A3B8;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w: 1200px;
    --glow: 0 0 20px rgba(0,167,138,0.15), 0 0 60px rgba(15,206,169,0.06);
}

[data-theme="light"] {
    --bg: #F5F5F7;
    --bg-elevated: rgba(0,0,0,0.04);
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,167,138,0.35);
    --text: #1A1A2E;
    --text-secondary: #64748B;
    --glow: 0 0 20px rgba(0,167,138,0.12), 0 0 60px rgba(15,206,169,0.04);
}

[data-theme="light"] .glass {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.glass {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== TOPBAR (matches component) ===== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    height: 56px;
    display: flex; align-items: center;
    padding: 0 32px;
    background: var(--theme-nav-bg, rgba(10,10,15,0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
}
.topbar-inner {
    width: 100%; max-width: var(--max-w);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar-logo img { height: 30px; width: auto; }
.topbar-back {
    font-size: 13px; font-weight: 500;
    color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
    text-decoration: none;
    transition: color 0.2s;
}
.topbar-back:hover { color: var(--text); }
.topbar-back svg { width: 16px; height: 16px; }
.topbar-actions {
    display: flex; align-items: center; gap: 12px;
}
.topbar-cta {
    padding: 7px 18px; font-size: 13px; font-weight: 600;
    color: #fff; background: var(--accent);
    border-radius: 7px; text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}
.topbar-cta:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 24px rgba(0,167,138,0.25);
}

/* ===== PAGE HEADER ===== */
.clients-header {
    padding: 140px 0 40px;
    text-align: center;
}

.clients-header .section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.clients-header h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.clients-header .section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== FILTERS ===== */
.filters-section {
    padding: 24px 0 8px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.filter-btn.active {
    background: rgba(0,167,138,0.15);
    border-color: var(--accent);
    color: var(--accent-light);
}

.filter-btn-all {
    font-weight: 600;
}

.filter-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,167,138,0.2);
    color: var(--accent-light);
    padding: 1px 7px;
    border-radius: 100px;
    opacity: 0;
    transition: opacity 0.2s;
}

.filter-count.visible {
    opacity: 1;
}

/* ===== CLIENTS GRID ===== */
.clients-grid-section {
    padding: 16px 0 80px;
}

.clients-results-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.clients-results-count strong {
    color: var(--text);
}

.clients-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .clients-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== CLIENT CARD ===== */
.client-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s, opacity 0.4s;
}

.client-card.hidden {
    display: none;
}

.client-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

[data-theme="light"] .client-logo-img {
    background: rgba(0,0,0,0.04);
}

.client-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.client-logo-text {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(0,167,138,0.1);
    border: 1px solid rgba(0,167,138,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.client-country {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.client-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== TAGS ===== */
.client-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.client-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.client-tag-product {
    background: rgba(0,167,138,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,167,138,0.15);
}

.client-tag-country {
    background: rgba(148,163,184,0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148,163,184,0.12);
}

/* ===== CASE LINK ===== */
.client-case-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: gap 0.2s;
}

.client-case-link:hover {
    gap: 10px;
}

a.client-card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

a.client-card-link:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 24px rgba(0,167,138,0.15);
    transform: translateY(-4px);
}

/* ===== EMPTY STATE ===== */
.clients-empty {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.clients-empty.visible {
    display: block;
}

.clients-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.clients-empty p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ===== MINI FOOTER ===== */
.mini-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

.mini-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

.mini-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

@media (max-width: 767px) {
    .topbar { padding: 0 16px; }
}
