:root {
    --odas-grey-light: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    width: 100%;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ===== Main Page (Cards View) ===== */
.main-page {
    animation: fadeIn 0.5s ease-in;
    display: flex;
    flex: 1;
    gap: 0;
}

.main-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    color: #333333;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333333;
}

.header p {
    font-size: 16px;
    color: #666666;
}

.language-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.language-switcher label {
    font-size: 14px;
    color: #666666;
}

.language-switcher select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333333;
    cursor: pointer;
}

.detail-header .language-switcher {
    justify-content: flex-start;
    margin-bottom: 12px;
}

/* Search Bar */
.search-section {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #8EAEC9;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #D5841B;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 25px;
    border-radius: 0;
    border-right: 1px solid var(--odas-grey-light);
    box-shadow: none;
    width: 280px;
    min-height: 100vh;
    overflow-y: auto;
}

.filter-section h3 {
    color: #333333;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 0;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-weight: 600;
    color: #666666;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-item select {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background-color: white;
    transition: border-color 0.3s;
}

.filter-item select:hover,
.filter-item select:focus {
    border-color: #8EAEC9;
    outline: none;
}

.reset-filters-btn {
    background: #8EAEC9;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.reset-filters-btn:hover {
    background: #6d8fa8;
}

/* Cards Grid */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    flex: 1;
}

.pagination-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pagination-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #8EAEC9;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f0f6fc;
    border-color: #D5841B;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #8EAEC9;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-left-color: #D5841B;
    border-color: #d0d0d0;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
}

.card-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.tag {
    background: #f0f0f0;
    color: #666666;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.tag.domain {
    background: rgba(142, 174, 201, 0.15);
    color: #8EAEC9;
}

.tag.origin {
    background: #D5841B;
    color: white;
}

.no-results {
    text-align: center;
    color: #666666;
    font-size: 18px;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ===== Detail Page ===== */
.detail-page {
    animation: fadeIn 0.5s ease-in;
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

.detail-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #D5841B;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #b47314;
}

.detail-title {
    font-size: 28px;
    color: #333333;
    margin: 15px 0;
}

.detail-description {
    color: #666666;
    line-height: 1.8;
    font-size: 15px;
    margin: 20px 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-weight: 600;
    color: #666666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.meta-value {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}

/* Variables Table */
.variables-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.variables-section h2 {
    font-size: 22px;
    color: #333333;
    margin-bottom: 20px;
}

.variables-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.variables-table thead {
    background: #f8f9fa;
}

.variables-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #333333;
    border-bottom: 2px solid #8EAEC9;
    font-size: 14px;
    text-transform: uppercase;
}

.variables-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #555;
}

.variables-table tbody tr:hover {
    background: #f8f9fa;
}

.var-nom {
    font-weight: 600;
    color: #8EAEC9;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .main-page {
        flex-direction: column;
    }

    .filter-section {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
    }

    .main-page-content {
        padding: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-meta {
        flex-direction: column;
        gap: 15px;
    }

    .variables-table th,
    .variables-table td {
        padding: 10px;
        font-size: 12px;
    }
}