/* ========================================
   Guides page — tabbed topic layout
   ======================================== */

.guides-page {
    min-height: calc(100vh - 160px);
    padding: 6.75rem 0 4.5rem;
    text-align: left;
    background:
        linear-gradient(135deg, rgba(0, 123, 74, 0.07) 0%, transparent 42%),
        linear-gradient(225deg, rgba(255, 122, 33, 0.08) 0%, transparent 38%),
        linear-gradient(180deg, #edf7f2 0%, #ffffff 38%, #f7fbf9 100%);
}

.guides-page .container {
    text-align: left;
}

.guides-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(12rem, 0.85fr);
    align-items: center;
    gap: 1rem 1.5rem;
    margin: 0 0 2.5rem;
    padding: 1.35rem 1.35rem 1.45rem 1.85rem;
    border-radius: 1.25rem;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(0, 90, 53, 0.94) 0%, rgba(0, 123, 74, 0.9) 48%, rgba(0, 150, 90, 0.88) 100%);
    color: #fff;
    box-shadow: 0 14px 36px rgba(0, 90, 53, 0.22);
    text-align: left;
}

.guides-hero::before {
    content: '';
    position: absolute;
    inset: auto -8% -50% 45%;
    width: min(460px, 70vw);
    height: min(460px, 70vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 33, 0.32) 0%, transparent 68%);
    pointer-events: none;
}

.guides-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff7a21 0%, #ffb84d 45%, #00b46a 100%);
    z-index: 2;
}

.guides-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 0.4rem 0;
}

.guides-hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 12rem;
    align-self: stretch;
}

.guides-hero-image {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    max-height: 265px;
    object-fit: contain;
    object-position: center bottom;
    background: transparent;
    filter: drop-shadow(0 12px 20px rgba(0, 40, 24, 0.35));
    transform: translateY(0.2rem);
}

.guides-eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.guides-eyebrow i {
    color: #ffb84d;
}

.guides-title {
    position: relative;
    z-index: 1;
    font-size: clamp(2.1rem, 4.2vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.65rem;
    color: #fff;
    text-align: left;
}

.guides-subtitle {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 36rem;
    font-size: 1.08rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.guides-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
    gap: 1.5rem 1.75rem;
    align-items: start;
    text-align: left;
}

.guides-nav-card {
    background: #fff;
    border: 1px solid rgba(0, 123, 74, 0.12);
    border-radius: 1rem;
    padding: 0.85rem;
    box-shadow: 0 8px 24px rgba(18, 48, 38, 0.07);
    position: sticky;
    top: 5.25rem;
}

.guides-nav-label {
    margin: 0 0 0.65rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--puku-orange);
    text-align: left;
}

.guides-tablist {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    text-align: left;
}

.guides-tab {
    appearance: none;
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    text-align: left !important;
    justify-content: flex-start;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    padding: 0.7rem 0.75rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--puku-text-main);
    background: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.guides-tab-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--puku-green);
    background: rgba(0, 123, 74, 0.1);
    flex-shrink: 0;
}

.guides-tab-label {
    text-align: left;
    min-width: 0;
}

.guides-tab:hover {
    background: rgba(0, 123, 74, 0.07);
    border-color: rgba(0, 123, 74, 0.14);
}

.guides-tab.is-active,
.guides-tab[aria-selected="true"] {
    color: var(--puku-green-dark);
    background: linear-gradient(90deg, rgba(255, 122, 33, 0.12) 0%, rgba(0, 123, 74, 0.08) 100%);
    border-color: rgba(255, 122, 33, 0.55);
    box-shadow: inset 3px 0 0 #ff7a21;
}

.guides-tab.is-active .guides-tab-index,
.guides-tab[aria-selected="true"] .guides-tab-index {
    color: #fff;
    background: var(--puku-orange);
}

.guides-tab:focus-visible {
    outline: 2px solid var(--puku-orange);
    outline-offset: 2px;
}

.guides-panels {
    min-width: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 123, 74, 0.12);
    border-radius: 1.1rem;
    padding: 0;
    box-shadow: 0 10px 30px rgba(18, 48, 38, 0.08);
    min-height: 22rem;
    max-height: min(78vh, 920px);
    overflow: auto;
    text-align: left;
    -webkit-overflow-scrolling: touch;
}

.guides-panel[hidden] {
    display: none !important;
}

.guides-panel {
    padding: 1.9rem 2rem 2.5rem;
    animation: guidesPanelIn 0.28s ease;
    text-align: left;
}

.guides-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--puku-orange);
}

.guides-panel h2 {
    margin: 0 0 1.1rem;
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--puku-text-main);
    letter-spacing: -0.02em;
    text-align: left;
}

.guide-article {
    max-width: 44rem;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--puku-text-main);
}

.guide-article > *:first-child {
    margin-top: 0;
}

.guide-article p {
    margin: 0 0 1rem;
}

.guide-article .guide-section-title,
.guide-article h3 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--puku-green-dark);
    letter-spacing: -0.01em;
}

.guide-article strong {
    font-weight: 700;
    color: var(--puku-text-main);
}

.guide-article a {
    color: var(--puku-green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.guide-article a:hover {
    color: var(--puku-orange-dark);
}

.guide-article ol,
.guide-article ul {
    margin: 0 0 1.1rem;
    padding-left: 1.35rem;
}

.guide-article li {
    margin: 0 0 0.45rem;
}

.guide-article li::marker {
    color: var(--puku-orange);
}

.guide-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guide-article thead,
.guide-article tbody,
.guide-article tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.guide-article th,
.guide-article td {
    border: 1px solid rgba(0, 123, 74, 0.15);
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.guide-article th {
    background: rgba(0, 123, 74, 0.08);
    color: var(--puku-green-dark);
    font-weight: 700;
}

.guide-article tr:nth-child(even) td {
    background: rgba(248, 253, 251, 0.9);
}

.guide-figure {
    margin: 1.35rem 0 1.6rem;
    padding: 0.85rem;
    border-radius: 0.9rem;
    background: rgba(0, 123, 74, 0.04);
    border: 1px solid rgba(0, 123, 74, 0.12);
    text-align: center;
}

.guide-screenshot {
    display: block;
    width: auto;
    max-width: min(100%, 420px);
    height: auto;
    margin: 0 auto;
    border-radius: 0.65rem;
    box-shadow: 0 8px 24px rgba(18, 48, 38, 0.12);
}

.guide-figure figcaption {
    margin: 0.7rem 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--puku-text-muted);
    text-align: center;
}

.guide-image-slot {
    margin: 1.25rem 0 1.5rem;
    padding: 0.95rem 1.05rem;
    border-radius: 0.85rem;
    border: 1.5px dashed rgba(255, 122, 33, 0.45);
    background: linear-gradient(135deg, rgba(255, 122, 33, 0.08), rgba(0, 123, 74, 0.05));
}

.guide-image-slot-label {
    display: inline-block;
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--puku-orange);
}

.guide-image-slot p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--puku-text-muted);
    font-style: italic;
}

.nav-links a.nav-link-active {
    color: var(--puku-green);
    font-weight: 700;
}

@keyframes guidesPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .guides-panel {
        animation: none;
    }
}

@media (max-width: 960px) {
    .guides-layout {
        grid-template-columns: 1fr;
        gap: 1.15rem;
    }

    .guides-nav-card {
        position: static;
    }

    .guides-tablist {
        flex-direction: column;
        align-items: stretch;
    }

    .guides-tab {
        width: 100%;
        text-align: left !important;
    }

    .guides-panels {
        max-height: none;
    }

    .guides-panel {
        padding: 1.4rem 1.25rem 1.85rem;
    }
}

@media (max-width: 820px) {
    .guides-hero {
        grid-template-columns: 1fr;
        padding: 1.35rem 1.2rem 0;
        gap: 0.75rem;
    }

    .guides-hero-visual {
        min-height: 0;
        justify-content: center;
        margin-bottom: 0;
    }

    .guides-hero-image {
        max-width: 260px;
        max-height: 200px;
    }
}

@media (max-width: 600px) {
    .guides-page {
        padding: 6rem 0 3rem;
    }

    .guides-hero {
        border-radius: 1rem;
    }

    .guides-subtitle {
        font-size: 0.98rem;
    }

    .guides-hero-image {
        max-width: 220px;
        max-height: 170px;
    }
}
