/* Admin-only project template preview. All rules are scoped to V2. */

#grid-content.hk-project-v2-shell {
    display: block;
    width: min(1200px, calc(100vw - 48px));
    max-width: 1200px;
    margin: 0 0 0 max(calc(50% - 600px), calc(50% - 50vw + 24px));
    padding: 24px 0 72px;
}

#grid-content article.hk-project-v2 {
    display: block;
    width: 100%;
    margin: 0;
    float: none;
    overflow: visible;
    color: #333333;
    font: 400 16px/1.5 "Source Sans Pro", Helvetica, Arial, sans-serif;
    text-overflow: clip;
}

.hk-project-v2 *,
.hk-project-v2 *::before,
.hk-project-v2 *::after {
    box-sizing: border-box;
}

.hk-project-v2 h1,
.hk-project-v2 h2,
.hk-project-v2 h3 {
    margin-top: 0;
    color: #333333;
    font-family: Lora, Georgia, "Times New Roman", serif;
    font-weight: 400;
    text-transform: none;
}

.hk-project-v2 h1 {
    margin-bottom: 24px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
}

.hk-project-v2 h2 {
    margin-bottom: 24px;
    font-size: 26px;
    line-height: 1.3;
}

.hk-project-v2 h3 {
    margin-bottom: 16px;
    font-size: 22px;
    line-height: 1.3;
}

.hk-project-v2 a {
    color: #333333;
}

.hk-project-v2 a:hover,
.hk-project-v2 a:focus {
    color: #e2001a;
}

.hk-project-v2__hero {
    --hk-media-bg: #f3f3f3;
    --hk-media-border: #dddddd;
    --hk-media-thumb-h: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    align-items: stretch;
    min-height: 560px;
    margin-bottom: 32px;
    border: 1px solid var(--hk-media-border);
    background: #ffffff;
}

/* Image frame: fills the hero column; RoyalSlider is absolutely inset. */
.hk-project-v2__media {
    position: relative;
    min-width: 0;
    min-height: 480px;
    overflow: hidden;
    border-right: 1px solid var(--hk-media-border);
    background: var(--hk-media-bg);
}

.hk-project-v2__media .hk-swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    background: var(--hk-media-bg);
}

.hk-project-v2__media .hk-swiper-main {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--hk-media-bg);
}

.hk-project-v2__media .hk-swiper-main .swiper-wrapper,
.hk-project-v2__media .hk-swiper-main .swiper-slide {
    height: 100%;
}

.hk-project-v2__media .hk-swiper-main .swiper-slide {
    background: var(--hk-media-bg);
}

.hk-project-v2__media .hk-swiper-main img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
}

.hk-project-v2__media .hk-swiper-thumbs {
    flex: 0 0 var(--hk-media-thumb-h);
    height: var(--hk-media-thumb-h);
    margin-top: 0;
    padding-top: 0;
    background: #ffffff;
    border-top: 1px solid var(--hk-media-border);
}

.hk-project-v2__media .hk-swiper-thumbs .swiper-slide {
    height: calc(var(--hk-media-thumb-h) - 8px);
    margin-top: 4px;
}

.hk-project-v2__media .swiper-button-prev,
.hk-project-v2__media .swiper-button-next {
    border-radius: 0;
    background-color: rgba(51, 51, 51, 0.55);
}

.hk-project-v2__media .swiper-button-prev:hover,
.hk-project-v2__media .swiper-button-next:hover {
    background-color: rgba(226, 0, 26, 0.85);
}

.hk-project-v2__media .hk-swiper-play {
    border-radius: 0;
    background: rgba(51, 51, 51, 0.72);
}

.hk-project-v2__media .hk-swiper-play:hover {
    background: rgba(226, 0, 26, 0.88);
}

.hk-project-v2__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(32px, 4vw, 56px);
}

.hk-project-v2__category {
    margin-bottom: 16px;
    color: #7a7a7a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hk-project-v2__quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin: 0 0 28px;
}

.hk-project-v2__quick-meta > div {
    min-width: 92px;
    padding: 10px 12px;
    border: 1px solid #dddddd;
    background: #ffffff;
}

.hk-project-v2__quick-meta dt,
.hk-project-v2__summary dt {
    color: #7a7a7a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hk-project-v2__quick-meta dd,
.hk-project-v2__summary dd {
    margin: 3px 0 0;
    color: #333333;
    font-weight: 600;
}

.hk-project-v2__author {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    margin-bottom: 28px;
}

.hk-project-v2__avatar {
    display: block;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: #f3f3f3;
}

.hk-project-v2__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hk-project-v2__author small {
    display: block;
    color: #7a7a7a;
    font-size: 12px;
}

.hk-project-v2__author a {
    font-weight: 600;
}

.hk-project-v2__actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.hk-project-v2__button,
.hk-project-v2 a.hk-project-v2__button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: 1px solid #c90017;
    border-radius: 0;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.hk-project-v2__button--primary,
.hk-project-v2 a.hk-project-v2__button--primary {
    background: #e2001a;
    color: #ffffff;
}

.hk-project-v2 button,
.hk-project-v2 input[type="button"],
.hk-project-v2 input[type="submit"],
.hk-project-v2__bookmark,
.hk-project-v2 .hk-comment-pagination a {
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.hk-project-v2__button:hover,
.hk-project-v2__button:focus,
.hk-project-v2 a.hk-project-v2__button:hover,
.hk-project-v2 a.hk-project-v2__button:focus,
.hk-project-v2 button:hover,
.hk-project-v2 button:focus,
.hk-project-v2 input[type="button"]:hover,
.hk-project-v2 input[type="button"]:focus,
.hk-project-v2 input[type="submit"]:hover,
.hk-project-v2 input[type="submit"]:focus,
.hk-project-v2__bookmark:hover,
.hk-project-v2__bookmark:focus-within,
.hk-project-v2 .hk-comment-pagination a:hover,
.hk-project-v2 .hk-comment-pagination a:focus {
    border-color: var(--hk-red-hover);
    background-color: var(--hk-red-hover);
    color: #ffffff;
}

.hk-project-v2__bookmark:hover a,
.hk-project-v2__bookmark:focus-within a {
    color: #ffffff;
}

.hk-project-v2__button--primary:hover,
.hk-project-v2__button--primary:focus,
.hk-project-v2 a.hk-project-v2__button--primary:hover,
.hk-project-v2 a.hk-project-v2__button--primary:focus {
    border-color: var(--hk-red-hover);
    background: var(--hk-red-hover);
    color: #ffffff;
}

.hk-project-v2__bookmark {
    display: flex;
    min-width: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
}

.hk-project-v2__bookmark > * {
    margin: 0;
}

.hk-project-v2__admin-links {
    margin-top: 16px;
    font-size: 12px;
}

.hk-project-v2__anchor-nav {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    gap: 4px;
    margin-bottom: 48px;
    padding: 0 16px;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
    background: rgba(255, 255, 255, 0.96);
}

.admin-bar .hk-project-v2__anchor-nav {
    top: 32px;
}

.hk-project-v2__anchor-nav a {
    display: block;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.hk-project-v2__anchor-nav a:hover,
.hk-project-v2__anchor-nav a:focus {
    background: #f3f3f3;
}

.hk-project-v2__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
}

.hk-project-v2__main {
    min-width: 0;
}

@media (min-width: 768px) {
    .hk-project-v2__main {
        padding-right: 24px;
        padding-left: 24px;
    }
}

.hk-project-v2__content {
    margin-bottom: 56px;
    font-size: 18px;
    line-height: 1.65;
}

.hk-project-v2__content > :first-child {
    margin-top: 0;
}

.hk-project-v2__content img {
    max-width: 100%;
    height: auto;
}

.hk-project-v2__content a,
.hk-project-v2__step-copy a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hk-project-v2__section {
    scroll-margin-top: 100px;
    margin: 0 0 64px;
}

.hk-project-v2__supplies {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.hk-project-v2__card {
    padding: 24px;
    border: 1px solid #dddddd;
    background: #f3f3f3;
}

.hk-project-v2__card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hk-project-v2__card li {
    position: relative;
    padding-left: 18px;
}

.hk-project-v2__card li::before {
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 6px;
    height: 6px;
    background: #e2001a;
    content: "";
}

.hk-project-v2__step {
    padding: 32px 0;
    border-top: 1px solid #dddddd;
}

.hk-project-v2__step:last-child {
    border-bottom: 1px solid #dddddd;
}

.hk-project-v2__step > header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.hk-project-v2__step > header h3 {
    margin: 0;
}

.hk-project-v2__step-number {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    background: #e2001a;
    color: #ffffff;
    font-weight: 600;
}

.hk-project-v2__step-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.hk-project-v2__step-images a,
.hk-project-v2__step-images img {
    display: block;
    max-width: 100%;
}

.hk-project-v2__step-images img {
    width: 100%;
    height: auto;
}

.hk-project-v2__step-copy {
    font-size: 17px;
    line-height: 1.65;
}

.hk-project-v2__step-copy > :last-child {
    margin-bottom: 0;
}

.hk-project-v2__sidebar {
    min-width: 0;
}

.hk-project-v2__summary {
    position: sticky;
    top: 96px;
    padding: 28px;
    border: 1px solid #dddddd;
    background: #ffffff;
}

.admin-bar .hk-project-v2__summary {
    top: 128px;
}

.hk-project-v2__summary h2 {
    font-size: 22px;
}

.hk-project-v2__summary dl {
    margin: 0 0 24px;
}

.hk-project-v2__summary dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #eeeeee;
}

.hk-project-v2__summary dl > div:last-child {
    border-bottom: 1px solid #eeeeee;
}

.hk-project-v2__summary dd {
    text-align: right;
}

.hk-project-v2__summary .hk-project-v2__button {
    width: 100%;
}

.hk-project-v2__share,
.hk-project-v2__tags {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.hk-project-v2__tags strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.hk-project-v2__previous-next {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin: 64px 0 40px;
    padding: 24px;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}

.hk-project-v2__previous-next > div:last-child {
    margin-left: auto;
    text-align: right;
}

.hk-project-v2__community {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 5vw, 64px);
    scroll-margin-top: 100px;
    margin-top: 56px;
}

.hk-project-v2__community textarea,
.hk-project-v2__community input {
    max-width: 100%;
}

.hk-project-v2__comments #comments > .h3 {
    padding-right: 10px;
    padding-left: 10px;
}

.hk-project-v2__comments .comment-list {
    padding-right: 10px;
    padding-left: 10px;
}

.hk-project-v2 .comment-form-author > label,
.hk-project-v2 .comment-form-email > label,
.hk-project-v2 .comment-form-url > label,
.hk-project-v2 .comment-form-comment > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.hk-project-v2__related > h2 {
    padding-bottom: 16px;
    border-bottom: 1px solid #dddddd;
}

.hk-project-v2 .hk-comment-pagination {
    clear: both;
    margin: 24px 0;
}

.hk-project-v2 .hk-comment-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hk-project-v2 .hk-comment-pagination li {
    margin: 0;
    padding: 0;
}

.hk-project-v2 .hk-comment-pagination a,
.hk-project-v2 .hk-comment-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #dddddd;
    text-decoration: none;
}

.hk-project-v2 .hk-comment-pagination .current {
    border-color: #e2001a;
    background: #e2001a;
    color: #ffffff;
}

.hk-project-v2__mobile-actions {
    display: none;
}

@media (max-width: 1024px) {
    .hk-project-v2__hero {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
        min-height: 0;
    }

    .hk-project-v2__media {
        min-height: 400px;
    }

    .hk-project-v2__layout {
        grid-template-columns: minmax(0, 1.8fr) minmax(240px, 0.9fr);
        gap: 36px;
    }
}

@media (max-width: 767px) {
    #grid-content.hk-project-v2-shell {
        width: 100%;
        margin: 0;
        padding: 12px 0 92px;
        transform: none;
    }

    .hk-project-v2__layout,
    .hk-project-v2__previous-next,
    .hk-project-v2__community {
        margin-right: 20px;
        margin-left: 20px;
    }

    .hk-project-v2__hero {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        border-right: 0;
        border-left: 0;
    }

    .hk-project-v2__hero {
        --hk-media-thumb-h: 64px;
    }

    .hk-project-v2__media {
        min-height: 280px;
        aspect-ratio: 4 / 3;
        border-right: 0;
        border-bottom: 1px solid var(--hk-media-border, #dddddd);
    }

    .hk-project-v2__intro {
        padding: 28px 20px 32px;
    }

    .hk-project-v2 h1 {
        font-size: 32px;
    }

    .hk-project-v2__actions {
        align-items: center;
    }

    .hk-project-v2__anchor-nav {
        top: 0;
        margin-bottom: 36px;
        padding: 0 12px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .admin-bar .hk-project-v2__anchor-nav {
        top: 46px;
    }

    .hk-project-v2__anchor-nav a {
        padding: 13px 10px;
    }

    .hk-project-v2__layout {
        display: block;
    }

    .hk-project-v2__content {
        font-size: 17px;
    }

    .hk-project-v2__supplies,
    .hk-project-v2__step-images,
    .hk-project-v2__community {
        grid-template-columns: 1fr;
    }

    .hk-project-v2__sidebar {
        margin-top: 48px;
    }

    .hk-project-v2__summary {
        position: static;
    }

    .hk-project-v2__previous-next {
        flex-direction: column;
        margin-top: 48px;
        padding-right: 0;
        padding-left: 0;
    }

    .hk-project-v2__previous-next > div:last-child {
        margin-left: 0;
        text-align: left;
    }

    .hk-project-v2__community {
        display: grid;
    }

    .hk-project-v2__mobile-actions {
        position: fixed;
        z-index: 1000;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 8px;
        align-items: center;
        padding: 10px 12px;
        border-top: 1px solid #dddddd;
        background: #ffffff;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    }

    .hk-project-v2__mobile-actions > a:first-child {
        text-align: center;
        text-decoration: none;
    }
}
