:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--primary);
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* Container & Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.hidden-section {
    display: none;
}

.active-section {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Hero & Search */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.search-box form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #0079BF; /* Trello Blue */
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    opacity: 0.9;
}

/* Loader */
.loader {
    text-align: center;
    margin: 3rem 0;
}

.loader.hidden {
    display: none;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-tag {
    background: #EEF2FF;
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card p.agency {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.card-actions a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-actions button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.card-actions button:hover {
    background: var(--primary-light);
}

.card-actions button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    background: var(--bg-color);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.pagination-controls select:hover {
    border-color: var(--primary);
}

.pagination-controls select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.pagination-numbers {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.pagination-numbers button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pagination-numbers button:hover {
    background: var(--bg-color);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.pagination-numbers button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 4rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Kanban Board */
.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    background: #EBECF0;
    border-radius: 10px;
    width: 350px;
    min-width: 350px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.column-header {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.column-cards {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kanban-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: grab;
    transition: transform 0.2s;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.kanban-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}
