/* =========================
   Guides Page
========================= */

.guides-page {
    width: min(100% - 32px, 1000px);

    margin: 0 auto;

    padding: 40px 0 60px;
}


/* =========================
   Page Header
========================= */

.guides-page .page-header {
    margin-bottom: 32px;
}


/* =========================
   Shared Section Heading
========================= */

.section-heading {
    margin-bottom: 18px;
}

.section-kicker {
    display: block;

    margin-bottom: 5px;

    color: #ddb86d;

    font-size: 9px;
    letter-spacing: 0.12em;
}

.section-heading h2 {
    margin: 0;

    color: white;

    font-size: 20px;
}


/* =========================
   Search Panel
========================= */

.guide-search-panel {
    margin-bottom: 40px;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(106, 80, 39, 0.30),
            rgba(35, 33, 29, 0.94) 48%
        );

    border: 2px solid #78603b;
    border-radius: 12px;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.25),
        0 0 14px rgba(209, 168, 92, 0.05);
}


/* =========================
   Search Header
========================= */

.search-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.search-kicker {
    display: block;

    margin-bottom: 5px;

    color: #ddb86d;

    font-size: 9px;
    letter-spacing: 0.12em;
}

.search-header h2 {
    margin: 0;

    color: white;

    font-size: 19px;
}


/* =========================
   Guide Count
========================= */

.guide-count {
    flex-shrink: 0;

    padding: 7px 9px;

    background-color: rgba(106, 80, 39, 0.28);

    color: #d8bd83;

    border: 1px solid #78603b;
    border-radius: 6px;

    font-size: 8px;
    letter-spacing: 0.08em;
}


/* =========================
   Search
========================= */

.guide-search {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;

    overflow: hidden;

    width: 100%;

    background:
        linear-gradient(
            90deg,
            rgba(106, 80, 39, 0.22),
            #191817 18%
        );

    border: 1px solid #78603b;
    border-radius: 9px;

    box-shadow:
        inset 0 2px 7px rgba(0, 0, 0, 0.24);

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.guide-search:focus-within {
    border-color: #d1a85c;

    box-shadow:
        inset 0 2px 7px rgba(0, 0, 0, 0.24),
        0 0 0 2px rgba(209, 168, 92, 0.07),
        0 0 10px rgba(209, 168, 92, 0.10);
}


/* =========================
   Search Icon
========================= */

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    border-right: 1px solid rgba(120, 96, 59, 0.65);
}

.search-icon span {
    position: relative;

    box-sizing: border-box;

    width: 14px;
    height: 14px;

    border: 2px solid #ddb86d;
    border-radius: 50%;

    opacity: 0.9;
}

.search-icon span::after {
    content: "";

    position: absolute;

    right: -6px;
    bottom: -4px;

    width: 7px;
    height: 2px;

    background-color: #ddb86d;

    border-radius: 2px;

    transform: rotate(45deg);
    transform-origin: left center;
}


/* =========================
   Search Input
========================= */

.search-input {
    box-sizing: border-box;

    width: 100%;
    height: 46px;

    padding: 0 14px;

    background: transparent;

    color: white;

    border: none;
    outline: none;

    font-family: inherit;
    font-size: 12px;
}

.search-input::placeholder {
    color: #77736d;
}

.search-input::-webkit-search-cancel-button {
    cursor: pointer;
}


/* =========================
   Search Results
========================= */

.guide-search-results {
    overflow-x: hidden;
    overflow-y: auto;

    max-height: 420px;

    margin-top: 14px;

    background-color: #211f1b;

    border: 1px solid #5e513c;
    border-radius: 9px;

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.22);
}

.guide-search-results:empty {
    display: none;
}


/* =========================
   Search Sections
========================= */

.search-section + .search-section {
    margin-top: 4px;
}

.search-section-title {
    margin: 0;

    padding: 10px 14px;

    background-color: rgba(209, 168, 92, 0.14);

    color: #e4c784;

    border-top: 1px solid rgba(209, 168, 92, 0.30);
    border-bottom: 1px solid rgba(209, 168, 92, 0.30);

    font-size: 10px;
    font-weight: normal;

    text-align: left;
    text-transform: uppercase;

    letter-spacing: 0.09em;

    text-shadow:
        0 0 5px rgba(209, 168, 92, 0.18);
}


/* =========================
   Search Result
========================= */

.search-result {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;

    gap: 14px;

    padding: 13px 15px;

    color: white;
    text-decoration: none;

    transition:
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.search-section .search-result + .search-result {
    border-top:
        1px solid rgba(255, 255, 255, 0.05);
}

.search-result:hover {
    background-color:
        rgba(209, 168, 92, 0.08);
}


/* =========================
   Search Result Icon
========================= */

.search-result-icon {
    width: 34px;
    height: 34px;

    object-fit: contain;

    flex-shrink: 0;
}


/* =========================
   Search Result Content
========================= */

.search-result-content {
    min-width: 0;
}

.search-result-content h3 {
    margin: 0 0 4px;

    color: #f2f2f2;

    font-size: 12px;
}

.search-result-content p {
    margin: 0;

    color: #96928b;

    font-size: 9px;
    line-height: 1.5;
}


/* =========================
   Keyboard Selection
========================= */

.search-result.selected {
    background-color:
        rgba(209, 168, 92, 0.13);

    box-shadow:
        inset 3px 0 0 #d1a85c;
}

.search-result.selected .search-result-content h3 {
    color: white;
}


/* =========================
   Search Highlight
========================= */

.search-highlight {
    color: #f2d37c;

    text-shadow:
        0 0 5px rgba(230, 189, 90, 0.25);
}


/* =========================
   No Search Results
========================= */

.search-no-results {
    padding: 24px 16px;

    color: #96918a;

    text-align: center;

    font-size: 10px;
}


/* =========================
   Search Scrollbar
========================= */

.guide-search-results::-webkit-scrollbar {
    width: 8px;
}

.guide-search-results::-webkit-scrollbar-track {
    background-color: #191817;
}

.guide-search-results::-webkit-scrollbar-thumb {
    background-color: #6d5734;

    border: 2px solid #191817;
    border-radius: 999px;
}

.guide-search-results::-webkit-scrollbar-thumb:hover {
    background-color: #8f7137;
}


/* =========================
   Guide Categories
========================= */

.guide-categories {
    margin-bottom: 42px;
}

.guide-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 22px;
}


/* =========================
   Stacked Cards
========================= */

.stacked-card {
    position: relative;

    min-height: 230px;
}

.stack-layer {
    position: absolute;

    border-radius: 12px;

    pointer-events: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.stack-layer-back {
    inset: 12px -8px -8px 12px;

    opacity: 0.58;
}

.stack-layer-middle {
    inset: 6px -4px -4px 6px;

    opacity: 0.82;
}

.stacked-card:hover .stack-layer-back {
    transform: translate(3px, 3px);
}

.stacked-card:hover .stack-layer-middle {
    transform: translate(2px, 2px);
}


/* =========================
   Tool Guides Stack
========================= */

.tool-guides-stack .stack-layer {
    border: 1px solid #78603b;
}

.tool-guides-stack .stack-layer-back {
    background:
        linear-gradient(
            135deg,
            rgba(106, 80, 39, 0.18),
            #202020
        );
}

.tool-guides-stack .stack-layer-middle {
    background:
        linear-gradient(
            135deg,
            rgba(106, 80, 39, 0.26),
            #232323
        );
}

.tool-guides-stack:hover .stack-layer {
    border-color: #9d7b45;
}


/* =========================
   Learn Minecraft Stack
========================= */

.minecraft-guides-stack .stack-layer {
    border: 1px solid #8f7137;
}

.minecraft-guides-stack .stack-layer-back {
    background:
        linear-gradient(
            135deg,
            rgba(143, 113, 55, 0.18),
            #211f1a
        );
}

.minecraft-guides-stack .stack-layer-middle {
    background:
        linear-gradient(
            135deg,
            rgba(143, 113, 55, 0.28),
            #24221d
        );
}

.minecraft-guides-stack:hover .stack-layer {
    border-color: #c89e49;
}


/* =========================
   Category Card
========================= */

.guide-category-card {
    --card-accent: #d1a85c;
    --card-accent-soft: rgba(209, 168, 92, 0.18);

    --card-border: #78603b;

    --card-background: rgba(106, 80, 39, 0.35);
    --card-hover: rgba(128, 96, 43, 0.50);

    --card-icon-background: rgba(106, 80, 39, 0.28);
    --card-icon-hover: rgba(128, 96, 43, 0.42);

    position: relative;
    z-index: 2;

    box-sizing: border-box;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    gap: 18px;

    min-height: 230px;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            var(--card-background),
            #252525 48%
        );

    color: white;
    text-decoration: none;

    border: 2px solid var(--card-border);
    border-radius: 12px;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.24);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.guide-category-card:hover {
    transform: translateY(-3px);

    background:
        linear-gradient(
            135deg,
            var(--card-hover),
            #292929 52%
        );

    border-color: var(--card-accent);

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.30),
        0 0 12px var(--card-accent-soft);
}


/* =========================
   Tool Guides Card
========================= */

.tool-guides-card {
    --card-accent: #d1a85c;
    --card-accent-soft: rgba(209, 168, 92, 0.18);

    --card-border: #78603b;

    --card-background: rgba(106, 80, 39, 0.35);
    --card-hover: rgba(128, 96, 43, 0.50);

    --card-icon-background: rgba(106, 80, 39, 0.28);
    --card-icon-hover: rgba(128, 96, 43, 0.42);
}


/* =========================
   Learn Minecraft Card
========================= */

.minecraft-guides-card {
    --card-accent: #e6bd5a;
    --card-accent-soft: rgba(230, 189, 90, 0.20);

    --card-border: #8f7137;

    --card-background: rgba(143, 113, 55, 0.32);
    --card-hover: rgba(165, 129, 54, 0.48);

    --card-icon-background: rgba(143, 113, 55, 0.28);
    --card-icon-hover: rgba(165, 129, 54, 0.42);
}

.minecraft-guides-card .category-label {
    color: #e6bd5a;
}


/* =========================
   Category Icon
========================= */

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    background:
        linear-gradient(
            135deg,
            var(--card-icon-background),
            rgba(35, 35, 35, 0.95)
        );

    border: 1px solid var(--card-border);
    border-radius: 10px;

    box-shadow:
        inset 0 0 10px rgba(221, 184, 109, 0.03);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.category-image {
    width: 46px;
    height: 46px;

    object-fit: contain;

    transition:
        transform 0.18s ease;
}

.guide-category-card:hover .category-icon {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            var(--card-icon-hover),
            rgba(41, 41, 41, 0.98)
        );

    border-color: var(--card-accent);

    box-shadow:
        0 0 10px var(--card-accent-soft);
}

.guide-category-card:hover .category-image {
    transform: scale(1.08);
}


/* =========================
   Category Text
========================= */

.category-content {
    min-width: 0;
}

.category-label {
    display: block;

    margin-bottom: 6px;

    color: #ddb86d;

    font-size: 9px;
    letter-spacing: 0.11em;
}

.category-content h3 {
    margin: 0 0 8px;

    color: white;

    font-size: 18px;
}

.category-content p {
    margin: 0 0 12px;

    color: #b5b5b5;

    font-size: 11px;
    line-height: 1.6;
}

.category-meta {
    display: block;

    color: #80776b;

    font-size: 9px;
    line-height: 1.5;
}


/* =========================
   Arrow
========================= */

.arrow-img {
    box-sizing: border-box;

    width: 42px;
    height: 42px;

    padding: 10px;

    background-color: rgba(106, 80, 39, 0.28);

    border: 1px solid #78603b;
    border-radius: 8px;

    object-fit: contain;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.guide-category-card:hover .arrow-img {
    transform: translateX(3px);

    background-color: var(--card-hover);

    border-color: var(--card-accent);

    box-shadow:
        0 0 8px var(--card-accent-soft);
}


/* =========================
   Featured Guide
========================= */

.featured-guide {
    margin-top: 8px;
}

.featured-guide-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    gap: 18px;

    padding: 20px 22px;

    background:
        linear-gradient(
            90deg,
            rgba(143, 113, 55, 0.20),
            #242424 35%
        );

    color: white;
    text-decoration: none;

    border: 1px solid #6b5732;
    border-radius: 10px;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.20);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.featured-guide-row:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            90deg,
            rgba(165, 129, 54, 0.32),
            #292929 40%
        );

    border-color: #e6bd5a;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.26),
        0 0 10px rgba(230, 189, 90, 0.12);
}

.featured-guide-row:hover .arrow-img {
    transform: translateX(3px);

    background-color: rgba(165, 129, 54, 0.35);

    border-color: #e6bd5a;

    box-shadow:
        0 0 8px rgba(230, 189, 90, 0.12);
}


/* =========================
   Featured Icon
========================= */

.featured-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    background-color: #211f1a;

    border: 1px solid #6b5732;
    border-radius: 9px;
}

.featured-icon img {
    width: 40px;
    height: 40px;

    object-fit: contain;
}


/* =========================
   Featured Text
========================= */

.featured-label {
    display: block;

    margin-bottom: 4px;

    color: #e6bd5a;

    font-size: 8px;
    letter-spacing: 0.10em;
}

.featured-content h3 {
    margin: 0 0 6px;

    color: #f2f2f2;

    font-size: 14px;
}

.featured-content p {
    margin: 0;

    color: #a9a9a9;

    font-size: 10px;
    line-height: 1.5;
}


/* =========================
   Mobile
========================= */

@media (max-width: 750px) {

    .guides-page {
        width: min(100% - 20px, 1000px);

        padding-top: 28px;
    }

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

    .guide-category-card,
    .stacked-card {
        min-height: 190px;
    }

}


@media (max-width: 520px) {

    .guide-search-panel {
        padding: 20px;
    }

    .search-header {
        align-items: flex-start;
    }

    .guide-count {
        display: none;
    }

    .guide-search-results {
        max-height: 340px;
    }

    .guide-category-card,
    .featured-guide-row {
        grid-template-columns: auto 1fr;
    }

    .guide-category-card .arrow-img,
    .featured-guide-row .arrow-img {
        display: none;
    }

    .category-icon {
        width: 54px;
        height: 54px;
    }

    .category-image {
        width: 40px;
        height: 40px;
    }

    .category-content h3 {
        font-size: 16px;
    }

    .search-result {
        gap: 12px;

        padding: 12px 13px;
    }

    .search-result-icon {
        width: 30px;
        height: 30px;
    }

    .search-result-content h3 {
        font-size: 11px;
    }

    .search-result-content p {
        font-size: 8px;
    }

}