@import url('/fonts/nanum-square-round/nanum-square-round.css');

.slide-03 {
    --template-image-height-desktop: 810;
    --template-image-height-mobile: 560;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: var(--template-image-height, 810px);
    /* Native fallback for template-default mode; also declared in admin/schema.php. */
    background: #fdf3f0;
    color: #fff;
    font-family: var(--font-nanum-square-round);
    touch-action: pan-y;
}

.slide-03 *,
.slide-03 *::before,
.slide-03 *::after {
    box-sizing: border-box;
}

.slide-03-track {
    position: absolute;
    inset: 0;
    left: 50%;
    right: auto;
    width: max(100%, calc(1920 * var(--template-layout-unit)));
    max-width: none;
    transform: translateX(-50%);
}

.slide-03-item {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s;
}

.slide-03-item.is-active {
    opacity: 1;
    visibility: visible;
}

.slide-03-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.slide-03-content {
    position: absolute;
    z-index: 2;
    bottom: 60px;
    left: 14%;
    right: 14%;
    text-align: center;
}

.slide-03-content h1 {
    margin: 0 0 23px;
    font-size: clamp(26px, 2.083vw, 40px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -1.5px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.16);
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.slide-03-counter {
    display: flex;
    justify-content: space-between;
    width: 200px;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    font-family: var(--font-suit);
    font-size: 24px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.16);
}

.slide-03-counter > span {
    min-width: 32px;
    font-weight: 700;
    opacity: 0.5;
    line-height: 32px;
}

.slide-03-counter > span[data-slide-current] {
    opacity: 1;
}

.slide-03-counter button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.slide-03-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 12px;
    border: 1px solid #ffffffb3;
    border-radius: 50%;
    background: #00000008;
    color: #fff;
    transform: translateY(-50%);
    cursor: pointer;
}

.slide-03-arrow.prev {
    left: 2.5%;
}

.slide-03-arrow.next {
    right: 2.5%;
}

.slide-03-arrow svg {
    width: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.slide-03-arrow.next svg {
    transform: rotate(180deg);
}

.slide-03 button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.slide-03 [hidden] {
    display: none;
}

.slide-03 .slide-03-caption {
    margin: 0 0 53px;
    font-size: 24px;
    font-weight: 700;
    line-height: 2;
    letter-spacing: -1.15px;
    text-shadow: 0 1px 1px #00000029;
}

.slide-03--caption .slide-03-counter {
    font-family: var(--font-nanum-square-round);
}

section.slide-03[data-image-height-root]:not([data-image-height]) {
    --template-image-height: calc(1080 * var(--template-layout-unit));
}

@media (prefers-reduced-motion: reduce) {
    .slide-03-item {
        transition: none;
    }
}

@media (min-width: 601px) {
    .slide-03--caption {
        --slide-03-caption-unit: min(1px, calc(100vw / 1440));
    }

    .slide-03--caption .slide-03-content {
        bottom: calc(60 * var(--slide-03-caption-unit));
    }

    .slide-03--caption .slide-03-caption {
        margin-bottom: calc(53 * var(--slide-03-caption-unit));
        font-size: clamp(20px, calc(24 * var(--slide-03-caption-unit)), 24px);
    }

    .slide-03 .slide-03-content h1 {
        font-size: clamp(26px, calc(40 * var(--template-layout-unit)), 40px);
    }

    /* XD room_1920: compact text boxes preserve its 31px baseline spacing.
       The description-only layout keeps its separate caption styles. */
    .slide-03:not(.slide-03--caption) .slide-03-content h1 {
        font-size: clamp(20px, calc(24 * var(--template-layout-unit)), 24px);
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: -.048em;
        text-shadow: 0 1px 1px #00000029;
    }

    .slide-03-content h1:has(+ p.slide-03-caption) {
        margin-bottom: 0;
    }

    .slide-03 .slide-03-content p.slide-03-caption {
        margin: calc(6 * var(--template-layout-unit)) 0 calc(31 * var(--template-layout-unit));
        font-size: clamp(14px, calc(18 * var(--template-layout-unit)), 18px);
        font-weight: 400;
        line-height: 1.3333333333;
        letter-spacing: -.048em;
        text-shadow: 0 1px 1px #00000029;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .slide-03-content {
        bottom: calc(60 * var(--template-layout-unit));
    }
}

@media (max-width: 600px) {
    .slide-03-content {
        left: 32px;
        right: 32px;
        bottom: 8%;
        position: static;
        padding: 22px 24px 0;
        /* Use the shared template background for the mobile text area too. */
        background: transparent;
        color: #191919;
    }

    .slide-03 .slide-03-caption {
        margin-bottom: 24px;
        font-size: 20px;
        line-height: 1.5;
    }

    section.slide-03[data-image-height-root][data-image-height-frame] {
        /* A custom photo height applies to the track, not to the caption below it. */
        height: auto !important;
    }

    section.slide-03[data-image-height-root]:not([data-image-height]) {
        --template-image-height: calc(272 * var(--template-mobile-unit));
    }

    section.slide-03[data-image-height-root][data-mobile-image-height="default"] {
        --template-image-height: calc(272 * var(--template-mobile-unit));
    }

    .slide-03-track {
        position: relative;
        inset: auto;
        width: 100%;
        height: var(--image-height, var(--template-image-height));
        transform: none;
    }

    .slide-03 .slide-03-content h1 {
        margin: 0;
        font-size: 16px;
        line-height: 24px;
        letter-spacing: -.77px;
        text-shadow: none;
    }

    /* XD room_390: photo → 50px → title (18px) → 10px → description (16px).
       Keep the description-only layout and explicit typography settings independent. */
    .slide-03:not(.slide-03--caption):not([data-mobile-text-visibility="hide"]) .slide-03-content:has(> h1:not(:empty)) {
        padding-top: 50px;
    }

    .slide-03:not(.slide-03--caption):not([data-mobile-text-visibility="hide"]) .slide-03-content h1 {
        font-weight: 700;
        line-height: 1.125;
        letter-spacing: -.024em;
    }

    .slide-03:not([data-mobile-text-visibility="hide"]) .slide-03-content p.slide-03-caption {
        margin: 10px 0 0;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.1428571429;
        letter-spacing: -.024em;
        text-shadow: none;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .slide-03-counter {
        position: absolute;
        top: calc(var(--image-height, var(--template-image-height)) - 38px);
        left: 50%;
        width: 112px;
        transform: translateX(-50%);
        color: #fff;
        font-size: 16px;
    }

    .slide-03-counter > span {
        min-width: 20px;
        line-height: 22px;
    }

    .slide-03-counter button {
        font-size: 12px;
        line-height: 22px;
    }

    .slide-03-arrow {
        top: calc(var(--image-height, var(--template-image-height)) / 2);
        width: 32px;
        height: 32px;
        padding: 7px;
    }

    .slide-03-arrow::after {
        position: absolute;
        inset: -6px;
        content: '';
    }

    .slide-03-arrow.prev {
        left: 15px;
    }

    .slide-03-arrow.next {
        right: 15px;
    }

    .slide-03[data-mobile-text-visibility="hide"] .slide-03-content {
        padding: 0;
        background: transparent;
    }

    /* Keep the page heading accessible without adding a visible caption band. */
    .slide-03[data-mobile-text-visibility="hide"] .slide-03-content h1,
    .slide-03[data-mobile-text-visibility="hide"] .slide-03-caption {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }
}
