/* Reference Library
-------------------------------------------------- */

.reference-archive-content .entry-content,
.reference-single-content .entry-content {
    max-width: 1000px;
    margin: 0 auto;
}

.reference-archive {
    margin-top: 30px;
}

.reference-archive__intro {
    font-size: 17px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 30px;
}

.reference-archive__controls {
    margin-bottom: 30px;
}

.reference-archive__search {
    position: relative;
    margin-bottom: 18px;
}

.reference-archive__search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.reference-archive__search input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reference-archive__search input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.reference-archive__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-archive__filter {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.reference-archive__filter:hover,
.reference-archive__filter.is-active {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

.reference-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .reference-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .reference-archive__grid {
        grid-template-columns: 1fr;
    }
}

.reference-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reference-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.reference-card.is-hidden {
    display: none;
}

.reference-card__icon {
    font-size: 26px;
    color: #f97316;
    margin-bottom: 14px;
}

.reference-card__title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.3;
}

.reference-card__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.reference-card__category {
    display: inline-block;
    padding: 3px 10px;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.reference-card__desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.reference-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #f97316;
}

.reference-archive__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    padding: 40px 0;
}

/* Single reference entry */
.reference-single {
    margin-top: 30px;
}

.reference-single__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.reference-single__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-single__category {
    display: inline-block;
    padding: 6px 14px;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.reference-single__category:hover {
    background: #ffedd5;
}

.reference-single__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
}

.reference-single__back:hover {
    color: #f97316;
}

.reference-single__content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.reference-single__content h2,
.reference-single__content h3,
.reference-single__content h4 {
    color: #1e293b;
    margin-top: 28px;
    margin-bottom: 14px;
}

.reference-single__content p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
}

.reference-single__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.reference-single__content th,
.reference-single__content td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
}

.reference-single__content th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
}

.reference-single__content tr:nth-child(even) {
    background: #f8fafc;
}

.reference-single__content ul,
.reference-single__content ol {
    margin-bottom: 16px;
    padding-left: 22px;
    color: #475569;
    line-height: 1.7;
}

.reference-single__content li {
    margin-bottom: 6px;
}

.reference-single__footer {
    margin-top: 24px;
}

.reference-single__disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 16px;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.reference-single__disclaimer i {
    margin-top: 2px;
}

@media print {
    .site-header,
    .site-footer,
    .reference-single__meta,
    .inner-page-hero {
        display: none !important;
    }

    .reference-single__content {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }
}
