:root {
    --primary: #45b4ab;
    --primary-light: #57c6bd;
    --primary-dark: #5789C3;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --link-color: #5280c7;
    --link-hover: #5789C3;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-image: url(https://www.estbirding.ee/images/194.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

/* Header & Nav */
.site-header {
    background-color: #ffffff;
    border-top: 2px solid var(--primary);
    height: 54px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 54px;
}

/* Green logo block */
.logo-box {
    background-color: var(--primary);
    padding: 0;
    display: flex;
    align-items: flex-start;
    position: relative;
    /* Slanted right edge effect */
    height: 70px;
    float: left;
    position: relative;
}

.logo-box::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 0;
    height: 0;
    border-top: 70px solid var(--primary);
    /* match header height */
    border-right: 20px solid transparent;
}

.logo-box:before {
    background-color: #45b4ab;
    position: absolute;
    width: 2000px;
    content: "";
    right: 100%;
    top: 0;
    height: 70px;
}

.logo-box a {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1;
    /* keep link above the pseudo element */
}

.logo-box img {
    width: 100px;
    height: auto;
    padding: 10px 16px 13px 16px;
    display: block;
}

.top-menu {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-menu a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.top-menu a:hover {
    color: var(--primary);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h2 {
    color: black;
    margin-top: 0;
    margin-bottom: 20px;
    /* border-bottom: 2px solid var(--primary-light); */
    padding-bottom: 10px;
    display: inline-block;
    font-size: 35px;
    font-family: 'suez one', 'bree serif', 'ar berkley', lato, roboto, alegreya, 'open sans', arial;
}

h2:after {
    content: " ";
    border: solid 2px #5789C3;
    display: block;
    width: 50px;
    margin: 15px 0;
}

/* Controls (Filters/Pagination) */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    width: 300px;
    max-width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    text-align: left;
}

thead {
    background-color: var(--primary);
    color: white;
}

th {
    padding: 12px 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    user-select: none;
    white-space: nowrap;
}

th:hover {
    background-color: var(--primary-light);
}

th::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 12px;
    opacity: 0.5;
}

th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

th.sort-desc::after {
    content: '↓';
    opacity: 1;
}

/* Quick filters inside TH */
.header-filter {
    display: block;
    margin-top: 5px;
    width: 90%;
    padding: 4px;
    font-size: 0.85em;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #333;
    font-weight: normal;
}

td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: #f1f3f5;
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Credits Page */
.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.credit-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.credit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.06);
}

.credit-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.credit-logo img {
    max-height: 100%;
    max-width: 200px;
    object-fit: contain;
}

.credit-info h3 {
    color: var(--primary-dark);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.credit-info p {
    margin: 0 0 20px 0;
    color: var(--text-color);
    line-height: 1.5;
}

.credit-info a {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    font-weight: 500;
}

.credit-info a:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    text-decoration: none;
}