/* Home page hero */

.home-hero {
    background: #f8f9fa;
    text-align: center;
    padding: 56px 24px 0px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.home-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.home-hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.home-hero-title + .home-hero-title {
    margin-bottom: 16px;
}

.home-hero-title-green {
    color: #3FBB14;
}

.home-hero-description {
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 32px;
}

.home-hero-search {
    display: flex;
    align-items: stretch;
    max-width: 580px;
    margin: 0 auto 40px;
    height: 48px;
    gap: 0;
}

.home-hero-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 14px;
    background: #fff;
}

.home-hero-search-icon {
    flex-shrink: 0;
    margin-right: 10px;
}

.home-hero-search-input-wrap input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    outline: none;
    font-size: 14px;
    color: #24292f;
    background: transparent;
    height: 100%;
    padding: 0;
    margin: 0;
    line-height: normal;
}

.home-hero-search-input-wrap input::placeholder {
    color: #9ca3af;
}

.home-hero-search-input-wrap input:focus {
    border: none !important;
    box-shadow: none !important;
}

.home-hero-search-input-wrap input#search {
    padding: 0 20px 0 10px;
}

.home-hero-search-btn {
    background: #3FBB14;
    color: #fff;
    border: 1px solid #3FBB14;
    border-radius: 0 8px 8px 0;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
    line-height: 1;
}

.home-hero-search-btn:hover {
    background: #35a110;
    border-color: #35a110;
}

.home-hero-stats {
    display: flex;
    justify-content: center;
    gap: 56px;
}

.home-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-hero-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #3FBB14;
    line-height: 1.2;
}

.home-hero-stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

@media (max-width: 640px) {
    .home-hero {
        padding: 36px 16px 32px;
    }

    .home-hero-title {
        font-size: 28px;
    }

    .home-hero-description br {
        display: none;
    }

    .home-hero-stats {
        gap: 32px;
    }

    .home-hero-stat-number {
        font-size: 24px;
    }

    .home-hero-search {
        height: 44px;
    }
}

/* Filter sidebar */
.homepage #filter-by-container .card {
    border: 1px solid #d9dade;
    border-radius: 8px;
    box-shadow: none;
}

.homepage #filter-by-container .card-title {
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
}

.homepage #filter-by-container .filters-header {
    font-size: 16px;
    font-weight: 600;
}

/* Result cards */
.homepage .result-card {
    background: white;
    border: 1px solid #d9dade;
    border-radius: 6px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.homepage .result-card .card-content {
    flex: 1;
}

.homepage .result-card .language-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.homepage .result-card .ribbon-status-container.card-ribbons {
    position: absolute;
    top: 16px;
    right: 16px;
}

.homepage .result-card .status-ribbon {
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
}

.homepage .result-card .status-ribbon.green-ribbon {
    background: #ecfae8;
    border: 1px solid #3fbb14;
    color: #3fbb14;
}

.homepage .result-card .summary-text {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 12px;
    color: #0a0a0a;
}

.homepage .result-card .absolute.top-18.right-10 {
    top: 16px;
    right: 16px;
}

.homepage .breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Layout ──────────────────────────────────────── */

.homepage {
    background: #fff;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.hp-layout {
    display: flex;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (max-width: 900px) {
    .hp-layout { flex-direction: column; }
}

/* ── Filter sidebar ──────────────────────────────── */

.hp-filters {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
    padding-right: 32px;
}

@media (max-width: 900px) {
    .hp-filters { width: 100%; }
}

.hp-filters-head {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-right: -32px;
}

.hp-filters-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 32px;
}

.hp-filters-title {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
}

.hp-filters-clear {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}

.hp-filters-clear:hover {
    color: #3FBB14;
    text-decoration: none;
}

/* Chips */
.hp-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #3FBB14;
    background: #ecfae8;
    border: 1px solid #3FBB14;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 20px;
}

.hp-chip-remove {
    background: none;
    border: none;
    color: #3FBB14;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 2px;
}

/* Filter sections */
.hp-filter-section {
    border-top: none;
    padding: 16px 0 0;
    margin-bottom: 4px;
}

.hp-filter-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none !important;
    border: none;
    padding: 0 0 12px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    outline: none;
}

.hp-filter-section-head:hover,
.hp-filter-section-head:focus,
.hp-filter-section-head:active,
.hp-filter-section-head:focus-visible {
    background: none !important;
    color: #0a0a0a !important;
    outline: none;
    box-shadow: none;
}

.hp-filter-chevron {
    transition: transform 0.2s ease;
}

.hp-filter-section.collapsed .hp-filter-chevron {
    transform: rotate(180deg);
}

.hp-filter-section.collapsed .hp-filter-section-body {
    display: none;
}

.hp-filter-section-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 8px;
}

.hp-filter-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.hp-filter-row label {
    flex: 1;
    min-width: 0;
}

.hp-filter-row [type="checkbox"] + span:not(.lever):before {
    border: 2px solid #c4c7cc !important;
    border-radius: 4px !important;
    width: 18px !important;
    height: 18px !important;
    top: 0 !important;
    left: 0 !important;
    background: #fff !important;
    transform: none !important;
    transition: background 0.15s, border-color 0.15s !important;
}

.hp-filter-row [type="checkbox"]:checked + span:not(.lever):before {
    border-color: #4277e0 !important;
    background: #4277e0 !important;
    transform: none !important;
}

.hp-filter-row [type="checkbox"] + span:not(.lever):after {
    display: none !important;
}

.hp-filter-row [type="checkbox"]:checked + span:not(.lever):after {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    top: 3px !important;
    left: 6px !important;
    width: 5px !important;
    height: 10px !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
    background: transparent !important;
}

.hp-filter-count {
    font-size: 13px;
    color: #9ca3af;
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Results bar ─────────────────────────────────── */

.hp-results-col {
    flex: 1;
    min-width: 0;
}

.hp-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
}

.hp-results-showing {
    font-size: 14px;
    color: #24292f;
    font-weight: 500;
    white-space: nowrap;
}

.hp-results-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.hp-view-toggles {
    display: inline-flex;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.hp-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 38px;
    background: #f3f4f6;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.hp-view-btn.active {
    background: #fff;
    color: #3FBB14;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hp-view-btn:hover:not(.active) {
    color: #6b7280;
}

.hp-view-btn:focus,
.hp-view-btn:active,
.hp-view-btn:focus-visible {
    background: #f3f4f6;
    color: #9ca3af;
    outline: none;
    box-shadow: none;
}

.hp-view-btn.active:focus,
.hp-view-btn.active:active,
.hp-view-btn.active:focus-visible {
    background: #fff;
    color: #3FBB14;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hp-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-sort-label {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.hp-sort-select {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 7px 28px 7px 12px;
    font-size: 14px;
    color: #24292f;
    background: #fff url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    height: 34px;
}

/* ── Results grid ────────────────────────────────── */

.hp-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .hp-results-grid { grid-template-columns: 1fr; }
}

/* ── Card ────────────────────────────────────────── */

.hp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hp-card-lang {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
}

.hp-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s;
}

.hp-card-action:hover {
    background: #f3f4f6;
    color: #24292f;
}

/* Tags */
.hp-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hp-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
    white-space: nowrap;
    line-height: 20px;
}

.hp-tag-type {
    color: #6b7280;
    border-color: #d1d5db;
    background: #fff;
}

.hp-tag-verified {
    color: #3FBB14;
    border-color: #3FBB14;
    background: #ecfae8;
}

.hp-tag-bounty {
    color: #3FBB14;
    border-color: #3FBB14;
    background: #fff;
}

/* Card body */
.hp-card-body {
    flex: 1;
}

.hp-card-field {
    font-size: 13px;
    color: #24292f;
    line-height: 1.6;
    margin: 0 0 6px;
    word-break: break-word;
}

.hp-card-field b {
    font-weight: 600;
    color: #0a0a0a;
}

/* Card footer */
.hp-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.hp-card-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Load more ───────────────────────────────────── */

.hp-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 32px 0 0;
}

.hp-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #3FBB14;
    background: #fff;
    border: 1px solid #3FBB14;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.hp-load-more-btn:hover {
    background: #ecfae8;
    color: #3FBB14;
    text-decoration: none;
}
