:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-bg-header: #1a1a2e;
    --color-text: #2d2d2d;
    --color-text-muted: #6c757d;
    --color-accent: #3d5a80;
    --color-accent-hover: #2c4460;
    --color-border: #dee2e6;
    --color-row-alt: #f8f9fb;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    margin: 0;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--color-bg-header) !important;
    border: none;
}
.navbar .navbar-brand {
    color: #fff !important;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}
.navbar .navbar-brand:hover {
    color: rgba(255,255,255,0.85) !important;
}
.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Search header */
.search-header {
    background: var(--color-bg-header);
    color: #fff;
    padding: 3rem 1rem 2.5rem;
    text-align: center;
}
.search-header h1 {
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}
.search-form {
    max-width: 640px;
    margin: 0 auto;
}
.search-form .input-group {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.search-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}
.search-form .form-control:focus {
    box-shadow: none;
}
.search-form .form-select {
    border: none;
    border-left: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0.75rem 2.2rem 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 200px;
}
.search-form .form-select:focus {
    box-shadow: none;
}
.search-form .btn-search {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: background 0.2s;
}
.search-form .btn-search:hover {
    background: var(--color-accent-hover);
}

/* Description */
.site-description {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: center;
}
.site-description strong {
    color: var(--color-text);
}

/* Results */
.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.results-header h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin: 0;
}
.results-header h2 strong {
    color: var(--color-text);
    font-weight: 600;
}
.results-actions .btn {
    font-size: 0.85rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.results-table thead th {
    background: var(--color-bg-alt);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    padding: 0.7rem 0.75rem;
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}
.results-table tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.results-table tbody tr:nth-child(even) {
    background: var(--color-row-alt);
}
.results-table tbody tr:hover {
    background: #eef2f7;
}
.td-resumen {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.td-resumen.expanded {
    white-space: normal;
    overflow: visible;
}
.btn-expand {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 0.8rem;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}
.no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.pagination-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.pagination .page-link {
    color: var(--color-accent);
    border-color: var(--color-border);
    font-size: 0.85rem;
}
.pagination .page-item.active .page-link {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.pagination .page-link:hover {
    background: var(--color-bg-alt);
    color: var(--color-accent-hover);
}

/* Footer */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 2rem 1rem;
    text-align: center;
}
.site-footer .logo-museo {
    display: inline-block;
    max-width: 140px;
    margin-bottom: 0.75rem;
}
.site-footer .logo-museo svg {
    width: 100%;
    height: auto;
}
.site-footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .search-header {
        padding: 2rem 1rem 1.5rem;
    }
    .search-header h1 {
        font-size: 1.3rem;
    }
    .search-form .input-group {
        flex-direction: column;
        border-radius: 0.5rem;
    }
    .search-form .form-select {
        max-width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    .search-form .btn-search {
        border-radius: 0 0 0.5rem 0.5rem;
    }
    .results-table {
        font-size: 0.82rem;
    }
    .results-table thead th {
        font-size: 0.72rem;
    }
    .td-resumen {
        max-width: 150px;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
