@import 'tailwindcss';

@import 'swiper/css';
@import 'swiper/css/pagination';
@import 'swiper/css/navigation';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
        --font-sans: Noto Sans TC, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji", sans-serif;
        --font-serif: 'Songti TC', 'Noto Serif TC', ui-serif, 'Times New Roman', serif;
        --font-mono: Menlo, Monaco, 'Courier New', ui-monospace, SFMono-Regular, monospace;
}

/* Home-only styles (integrated from demo1.html) */
@layer base {
    html {
        -webkit-text-size-adjust: none;
        text-size-adjust: none;
    }

    [x-cloak] {
        display: none !important;
    }


    body.home-page {
        background-color: #000;
        color: #fff;
        overflow-x: hidden;
        scroll-behavior: smooth;
    }

    @supports (overflow: clip) {
        body.home-page {
            overflow-x: clip;
        }
    }

    body.home-page a {
        text-decoration: none;
        color: inherit;
    }
}

@layer components {
    /* Guard against horizontal overflow caused by painted effects (filters/transforms) inside Facilities */
    body.home-page #facilities {
        overflow-x: clip;
        contain: layout paint;
    }

    /* Guard against horizontal overflow from Trainers swiper/off-screen slides */
    body.home-page #trainers {
        overflow-x: clip;
        contain: layout paint;
    }

    /* News slider ratio: mobile 4:3, desktop 21:8 (Tailwind md breakpoint = 768px) */
    body.home-page #news [data-news-slider] {
        aspect-ratio: 4 / 3;
    }

    @media (min-width: 768px) {
        body.home-page #news [data-news-slider] {
            aspect-ratio: 21 / 8;
        }
    }

    /* Make Swiper always fill the ratio box (and ignore any JS-set inline height). */
    body.home-page #news [data-news-slider] .swiper {
        height: 100% !important;
    }

    body.home-page #news [data-news-slider] .swiper-wrapper,
    body.home-page #news [data-news-slider] .swiper-slide {
        height: 100%;
    }

    body.home-page #news [data-news-slider] .swiper-slide > picture,
    body.home-page #news [data-news-slider] .swiper-slide > img {
        width: 100%;
        height: 100%;
    }

    /* Fallback for very old browsers without aspect-ratio support */
    @supports not (aspect-ratio: 1) {
        body.home-page #news [data-news-slider]::before {
            content: "";
            display: block;
            padding-top: 75%; /* 4:3 */
        }

        @media (min-width: 768px) {
            body.home-page #news [data-news-slider]::before {
                padding-top: calc(8 / 21 * 100%); /* 21:8 */
            }
        }
    }

    /* Theme-style blob button (ported from dark/personal.html + style.css), scoped to Home only */
    body.home-page .dsn-btn {
        position: relative;
        text-align: center;
    }

    /* About page collage (ported from template dark/assets/css/style.css + global.css), scoped to About only */
    body.about-page .about-collage {
        display: grid;
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 5px;
        grid-row-gap: 20px;
    }

    body.about-page .about-collage .img-inner {
        min-width: 0;
        position: relative;
        overflow: hidden;
    }

    body.about-page .about-collage .img-inner:first-of-type {
        aspect-ratio: 2 / 3;
        grid-row: span 2 / span 2;
        align-self: center;
    }

    body.about-page .about-collage .img-inner:nth-of-type(2) {
        padding-right: 50px;
        aspect-ratio: 3 / 2;
        grid-column-start: 6;
    }

    @media only screen and (max-width: 575px) {
        body.about-page .about-collage .img-inner:nth-of-type(2) {
            display: none;
        }
    }

    body.about-page .about-collage .img-inner:last-of-type {
        aspect-ratio: 1 / 1;
        grid-column-start: 6;
    }

    @media only screen and (max-width: 575px) {
        body.about-page .about-collage .img-inner:last-of-type {
            display: none;
        }
    }

    body.about-page .cover-bg-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    body.about-page .has-border-radius {
        border-radius: 15px;
    }

    body.home-page .dsn-btn .title-btn {
        position: relative;
        z-index: 2;
        font-size: 12px;
        line-height: 1.2;
        letter-spacing: 2px;
        font-weight: 600;
        text-transform: uppercase;
        color: #111;
    }

    /* (Moved from Tailwind in markup) hover text effect */
    body.home-page .dsn-btn .title-btn > span {
        display: inline-block;
        transition: all 150ms;
    }

    body.home-page .dsn-btn-shape:hover .title-btn > span {
        color: #a3a3a3; /* tailwind neutral-400 */
        letter-spacing: 3px;
    }

    body.home-page .dsn-btn-shape {
        position: relative;
        width: max-content;
        display: inline-flex;
        align-items: center;
        filter: url(#buttonFilter);
        transition: 0.45s cubic-bezier(0.65, 0, 0.076, 1);
    }

    /* Allow Tailwind's w-full to make the button group full width */
    body.home-page .dsn-btn-shape.w-full {
        width: 100%;
        display: flex;
    }

    body.home-page .dsn-btn-shape.w-full .button {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* SPA hero grid background (ported from template dark/assets/css/style.css: header-photography .grid) */
    body.home-page .spa-hero {
        min-height: 90vh;
    }

    body.home-page .spa-hero .spa-hero__bg {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    body.home-page .spa-hero .spa-hero__overlay {
        position: absolute;
        inset: 0;
        background: rgba(55, 55, 55, 0.55);
    }

    body.home-page .spa-hero .spa-hero-grid {
        gap: 1rem;
        flex: none;
        position: relative;
        width: 200vw;
        height: 150vh;
        display: grid;
        grid-template-rows: repeat(5, 1fr);
        grid-template-columns: 100%;
        transform: rotate(-15deg);
        transform-origin: center center;
        will-change: transform;
    }

    body.home-page .spa-hero .spa-hero-grid .row {
        display: grid;
        gap: 1rem;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        will-change: transform, filter;
    }

    body.home-page .spa-hero.spa-hero--resetting .spa-hero-grid .row {
        transition: transform 320ms ease;
    }

    body.home-page .spa-hero .spa-hero-grid .row__item {
        position: relative;
    }

    body.home-page .spa-hero .spa-hero-grid .row__item-inner {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 10px;
    }

    body.home-page .spa-hero .spa-hero-grid .row__item-img {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: 50% 50%;
        position: absolute;
        top: 0;
        left: 0;
        filter: saturate(0.9) contrast(1.05);
    }

    body.home-page .dsn-btn-shape .button {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 34px;
        height: 44px;
        border-radius: 9999px;
        background: #fff;
        color: #111;
        text-decoration: none;
    }

    body.home-page .dsn-btn-shape .icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 9999px;
        background: #fff;
        margin-left: -10px;
        transition: 0.45s cubic-bezier(0.135, 0.9, 0.15, 1);
        transition-property: transform;
        transition-duration: 0.9s;
    }

    body.home-page .dsn-btn-shape .icon::after {
        content: "";
        position: absolute;
        inset: -4px;
        border-radius: 9999px;
        opacity: 0;
        transform: scale(0.92);
        transition: 0.35s ease;
    }

    body.home-page .dsn-btn-shape .icon svg {
        width: 13px;
        height: 13px;
        fill: #111;
    }

    body.home-page .dsn-btn-shape:hover .icon {
        transform: translateX(0.75rem) rotate(45deg);
    }

    body.home-page .dsn-btn-shape:hover .icon::after {
        opacity: 1;
        transform: scale(1);
    }

    /* Facilities swiper cards (work-3.html: article.dsn-item-post style), scoped to Home > Facilities */
    body.home-page #facilities .swiper,
    body.home-page #facilities .swiper-wrapper,
    body.home-page #facilities .swiper-slide,
    body.home-page #trainers .swiper,
    body.home-page #trainers .swiper-wrapper,
    body.home-page #trainers .swiper-slide {
        max-width: 100%;
    }

    body.home-page #facilities .swiper,
    body.home-page #trainers .swiper {
        overflow: hidden;
    }

    body.home-page #facilities .swiper-slide,
    body.home-page #trainers .swiper-slide {
        min-width: 0;
    }

    body.home-page #facilities .dsn-item-post,
    body.home-page #coaches .dsn-item-post {
        position: relative;
        width: 100%;
        overflow: hidden;
        background: #313131;
    }

    body.home-page #facilities .dsn-item-post__link,
    body.home-page #coaches .dsn-item-post__link {
        display: block;
        color: inherit;
        text-decoration: none;
    }

    body.home-page #facilities .dsn-item-post .box-content,
    body.home-page #coaches .dsn-item-post .box-content {
        position: relative;
    }

    body.home-page #facilities .dsn-item-post .img-cat,
    body.home-page #coaches .dsn-item-post .img-cat {
        position: relative;
    }

    body.home-page #facilities .dsn-item-post .box-image-bg,
    body.home-page #coaches .dsn-item-post .box-image-bg {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 3;
        border-radius: 28px;
        overflow: hidden;
        background: #313131;
    }

    body.home-page #facilities .dsn-item-post .cover-bg-img,
    body.home-page #coaches .dsn-item-post .cover-bg-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.001);
        transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
        display: block;
        border-radius: 28px;

    }

    body.home-page #facilities .dsn-item-post:hover .cover-bg-img,
    body.home-page #facilities .dsn-item-post:focus-within .cover-bg-img,
    body.home-page #coaches .dsn-item-post:hover .cover-bg-img,
    body.home-page #coaches .dsn-item-post:focus-within .cover-bg-img {
        transform: scale(1.06);
    }

    body.home-page #facilities .dsn-item-post .post-content,
    body.home-page #coaches .dsn-item-post .post-content {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 24px 36px;
        text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);

        /* border-bottom-left-radius: 27px;
        border-bottom-right-radius: 27px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0)); */
    }

    body.home-page #facilities .dsn-item-post .post-tag,
    body.home-page #coaches .dsn-item-post .post-tag {
        font-size: 12px;
        letter-spacing: 0.35em;
        text-transform: uppercase;
        color: #313131;
    }

    body.home-page #facilities .dsn-item-post .post-title,
    body.home-page #coaches .dsn-item-post .post-title {
        margin-top: 10px;
        font-size: 24px;
        line-height: 1.15;
        font-weight: 700;
        color: #fff;
    }

    body.home-page #facilities .dsn-item-post .cat,
    body.home-page #coaches .dsn-item-post .cat {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        padding: 0 15px 10px;
        border-bottom-left-radius: 15px;
        background: #313131;
    }

    body.home-page #facilities .dsn-item-post .cat svg,
    body.home-page #coaches .dsn-item-post .cat svg {
        position: absolute;
        width: 40px;
        height: 40px;
        fill: #313131;
        pointer-events: none;
    }

    body.home-page #facilities .dsn-item-post .cat svg.top-svg,
    body.home-page #coaches .dsn-item-post .cat svg.top-svg {
        top: -1px;
        left: 1px;
        transform: translateX(-100%);
    }

    body.home-page #facilities .dsn-item-post .cat svg.bottom-svg,
    body.home-page #coaches .dsn-item-post .cat svg.bottom-svg {
        bottom: 1px;
        right: -1px;
        transform: translateY(100%);
    }

    body.home-page #facilities .dsn-item-post .cat span,
    body.home-page #coaches .dsn-item-post .cat span {
        padding: 8px 16px;
        border-radius: 30px;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        background: rgba(0, 0, 0, 0.35);
        line-height: 1;
        white-space: nowrap;
    }

    body.home-page #facilities .dsn-item-post .cat span:not(:last-of-type),
    body.home-page #coaches .dsn-item-post .cat span:not(:last-of-type) {
        margin-right: 8px;
    }

    /* Courses week page: use the same .cat pattern for room labels */
    body.home-page [data-course-card] {
        --course-card-bg: #fff;
        --course-cat-bg: #313131;
        --course-cut-radius: 10px;
    }

    body.home-page [data-course-card] .cat {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        padding: 0 0 10px 12px;
        border-bottom-left-radius: var(--course-cut-radius);
        background-color: var(--course-cat-bg);
    }

    body.home-page [data-course-card] .cat svg {
        position: absolute;
        width: calc(var(--course-cut-radius) * 2);
        height: calc(var(--course-cut-radius) * 2);
        fill: var(--course-cat-bg);
        pointer-events: none;
    }

    body.home-page [data-course-card] .cat svg.top-svg {
        top: -1px;
        left: 1px;
        transform: translateX(-100%);
    }

    body.home-page [data-course-card] .cat svg.bottom-svg {
        bottom: 1px;
        right: -1px;
        transform: translateY(100%);
    }

    body.home-page [data-course-card] .cat span {
        padding: 6px 14px;
        border-radius: 30px;
        font-size: 12px;
        font-weight: 700;
        color: #fff;
        line-height: 1;
        white-space: nowrap;
    }

    body.home-page #trainers .dsn-item-post {
        position: relative;
        width: 100%;
        overflow: hidden;
        background: #131313;
    }

    body.home-page #trainers .dsn-item-post .box-image-bg {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 28px;
        overflow: hidden;
        background: #131313;
    }

    body.home-page #trainers .dsn-item-post .cover-bg-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.001);
        transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
        display: block;
        border-radius: 28px;
    }

    body.home-page #trainers .dsn-item-post:hover .cover-bg-img,
    body.home-page #trainers .dsn-item-post:focus-within .cover-bg-img {
        transform: scale(1.06);
    }

    body.home-page #trainers .dsn-item-post .post-content {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 24px 36px;
        text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
    }

    body.home-page #trainers .dsn-item-post .post-tag {
        font-size: 12px;
        letter-spacing: 0.35em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
    }

    body.home-page #trainers .dsn-item-post .post-title {
        margin-top: 10px;
        font-size: 28px;
        line-height: 1.05;
        font-weight: 800;
        color: #fff;
    }

    body.home-page #trainers .dsn-item-post .cat {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        padding: 0 15px 10px;
        border-bottom-left-radius: 15px;
        background: #131313;
    }

    body.home-page #trainers .dsn-item-post .cat svg {
        position: absolute;
        width: 40px;
        height: 40px;
        fill: #131313;
        pointer-events: none;
    }

    body.home-page #trainers .dsn-item-post .cat svg.top-svg {
        top: -1px;
        left: 1px;
        transform: translateX(-100%);
    }

    body.home-page #trainers .dsn-item-post .cat svg.bottom-svg {
        bottom: 1px;
        right: -1px;
        transform: translateY(100%);
    }

    body.home-page #trainers .dsn-item-post .cat span {
        padding: 8px 16px;
        border-radius: 30px;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        background: rgba(0, 0, 0, 0.35);
        line-height: 1;
        white-space: nowrap;
    }

    body.home-page #trainers .dsn-item-post .cat span:not(:last-of-type) {
        margin-right: 8px;
    }

}
