/* ============================================================
   HOW TO PAGE
============================================================ */

.how-to-hero {
    padding: 44px 0;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #07546f,
            #087897
        );
}

.how-to-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.how-to-hero .section-kicker {
    color: #c9edf5;
}

.how-to-hero h1 {
    margin: 5px 0 10px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
}

.how-to-hero p {
    max-width: 700px;
    margin: 0;
    color: #d8edf2;
    font-size: 1rem;
    line-height: 1.65;
}

.how-to-hero-icon {
    display: flex;
    flex: 0 0 110px;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 50%;
    color: #ffffff;
    background: rgb(255 255 255 / 12%);
    font-size: 2.7rem;
}

.how-to-content {
    padding-top: 32px;
    padding-bottom: 70px;
}

/* ============================================================
   TOOLBAR
============================================================ */

.how-to-toolbar {
    margin-bottom: 28px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}

.how-to-filter-form {
    display: grid;
    grid-template-columns:
        minmax(250px, 1fr)
        minmax(170px, 220px)
        minmax(170px, 220px)
        auto
        auto;
    gap: 10px;
}

.how-to-search-field,
.how-to-select-field {
    position: relative;
}

.how-to-search-field i {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    color: var(--text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.how-to-search-field input,
.how-to-select-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
    font-size: 0.9rem;
}

.how-to-search-field input {
    padding: 10px 13px 10px 40px;
}

.how-to-select-field select {
    padding: 10px 36px 10px 12px;
}

/* ============================================================
   FEATURED GUIDE
============================================================ */

.featured-guide {
    display: grid;
    grid-template-columns:
        105px
        minmax(0, 1fr)
        190px;
    align-items: center;
    gap: 24px;
    margin-bottom: 34px;
    padding: 28px;
    border: 1px solid #a9cdd7;
    border-radius: 4px;
    background:
        linear-gradient(
            135deg,
            var(--surface),
            var(--surface-muted)
        );
}

.featured-guide-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 105px;
    height: 105px;
    border-radius: 4px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #087897,
            #07546f
        );
    font-size: 2.5rem;
}

.featured-guide-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #836200;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.featured-guide-category {
    margin-bottom: 5px;
    color: #087897;
    font-size: 0.75rem;
    font-weight: 750;
}

.featured-guide h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1.65rem;
    line-height: 1.25;
}

.featured-guide p {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 0.91rem;
    line-height: 1.65;
}

.featured-guide-stats {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 100%;
    padding-left: 22px;
    border-left: 1px solid var(--border);
    color: var(--text-muted);
    flex-direction: column;
    gap: 13px;
    font-size: 0.78rem;
}

.featured-guide-stats span {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ============================================================
   RESULTS HEADING
============================================================ */

.how-to-results-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.how-to-results-heading h2 {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 1.65rem;
}

.how-to-results-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ============================================================
   GUIDE GRID
============================================================ */

.how-to-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 21px;
}

.how-to-card {
    display: flex;
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    flex-direction: column;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.how-to-card:hover {
    border-color: #8bbbc9;
    transform: translateY(-2px);
}

.how-to-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.how-to-card-icon {
    display: flex;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #087897,
            #07546f
        );
    font-size: 1.25rem;
}

.how-to-card-badges {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
}

.how-to-category,
.how-to-featured {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 3px;
    font-size: 0.66rem;
    font-weight: 800;
}

.how-to-category {
    color: var(--text-muted);
    background: var(--surface-muted);
}

.how-to-featured {
    color: #725400;
    background: #ffdf7d;
}

.how-to-card-content {
    flex: 1 1 auto;
}

.how-to-card h3 {
    margin: 0 0 11px;
    color: var(--text);
    font-size: 1.12rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.how-to-card h3 a {
    color: inherit;
    text-decoration: none;
}

.how-to-card h3 a:hover {
    color: #087897;
}

.how-to-card-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.62;
}

/* ============================================================
   GUIDE FOOTER
============================================================ */

.how-to-card-footer {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.how-to-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 13px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.how-to-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.how-to-card-meta a {
    color: #087897;
    font-weight: 700;
    text-decoration: none;
}

.how-to-read-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 39px;
    padding: 8px 11px;
    border: 1px solid #087897;
    border-radius: 3px;
    color: #ffffff;
    background: #087897;
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.how-to-read-link:hover {
    background: #07546f;
}

/* ============================================================
   EMPTY
============================================================ */

.how-to-empty {
    padding: 55px 25px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    background: var(--surface);
}

.how-to-empty > i {
    margin-bottom: 15px;
    color: #087897;
    font-size: 2.8rem;
}

.how-to-empty h2 {
    margin: 0 0 9px;
    color: var(--text);
}

.how-to-empty p {
    margin: 0 0 22px;
    color: var(--text-muted);
}

/* ============================================================
   PAGINATION
============================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 34px;
}

.pagination a,
.pagination .is-current,
.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 700;
}

.pagination a {
    border: 1px solid var(--border-dark);
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
}

.pagination a:hover {
    border-color: #087897;
    color: #087897;
}

.pagination .is-current {
    border: 1px solid #087897;
    color: #ffffff;
    background: #087897;
}

.pagination-dots {
    color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1100px) {
    .how-to-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .how-to-filter-form {
        grid-template-columns:
            minmax(200px, 1fr)
            minmax(160px, 210px)
            minmax(160px, 210px);
    }

    .how-to-filter-form .primary-button,
    .how-to-filter-form .secondary-button {
        width: 100%;
    }

    .featured-guide {
        grid-template-columns:
            90px
            minmax(0, 1fr);
    }

    .featured-guide-icon {
        width: 90px;
        height: 90px;
    }

    .featured-guide-stats {
        grid-column: 1 / -1;
        align-items: center;
        justify-content: flex-start;
        min-height: auto;
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid var(--border);
        border-left: 0;
        flex-direction: row;
    }
}

@media (max-width: 760px) {
    .how-to-hero-content {
        align-items: flex-start;
    }

    .how-to-hero-icon {
        display: none;
    }

    .how-to-filter-form {
        grid-template-columns: 1fr;
    }

    .how-to-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .how-to-grid {
        grid-template-columns: 1fr;
    }

    .featured-guide {
        grid-template-columns: 1fr;
    }

    .featured-guide-icon {
        width: 68px;
        height: 68px;
        font-size: 1.65rem;
    }

    .featured-guide-stats {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   DARK MODE
============================================================ */

[data-theme="dark"] .featured-guide {
    border-color: var(--border-dark);
}

[data-theme="dark"] .featured-guide-label {
    color: #d6b963;
}

[data-theme="dark"] .featured-guide-category,
[data-theme="dark"] .how-to-card-meta a {
    color: #72c8e3;
}

[data-theme="dark"] .how-to-featured {
    color: #2d2500;
    background: #d8bd61;
}

[data-theme="dark"] .how-to-card:hover {
    border-color: var(--header-light);
    background: var(--surface-muted);
}

[data-theme="dark"] .how-to-card h3 a:hover {
    color: #72c8e3;
}

[data-theme="dark"] .pagination a:hover {
    background: var(--surface-muted);
}