/* ==========================================================================
   ART.SPACE.TUM Ghost Theme - Main Stylesheet
   ========================================================================== */

/* CSS Reset & Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Asta Sans", "Gothic A1", "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 2rem 0;
    font-weight: 600;
    line-height: 1.2;
    color: #000000;
}

h1 {
    font-size: 4.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 3.6rem;
    font-weight: 600;
}

h3 {
    font-size: 2.8rem;
    font-weight: 600;
}

h4 {
    font-size: 2.4rem;
    font-weight: 500;
}

h5 {
    font-size: 2rem;
    font-weight: 500;
}

h6 {
    font-size: 1.8rem;
    font-weight: 500;
}

p {
    margin: 0 0 2rem 0;
    font-size: 1.6rem;
    line-height: 1.6;
}

a {
    color: #000000;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Layout
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.site-main hr {
    border: none;
    height: 1px;
    background: #000;
}

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

.site-header {
    background-color: #000000;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.site-title-text {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
}

.site-header-content .site-title a {
    display: flex;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
}

.site-logo {
    max-height: 4rem;
    width: auto;
    filter: invert(1);
}

/* Navigation
   ========================================================================== */

.site-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 3rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
    color: #ffffff;
}

.nav-link:hover {
    border-bottom-color: #ffffff;
    opacity: 1;
}

/* Dropdown Menu */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    min-width: 15rem;
    z-index: 100;
}



.nav-item-dropdown:hover .nav-dropdown {
    display: block;
}

.nav-dropdown li {
    padding: 0;
    margin: 0;
}

.nav-dropdown a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-decoration: none;
}



.nav-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}



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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.3rem;
}

.hamburger-line {
    width: 3rem;
    height: 0.3rem;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Posts Grid
   ========================================================================== */

.posts-grid {
    display: grid;
    gap: 2rem;
    margin: 4rem 0;
}

/* Homepage specific grid */
.home-page .posts-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Homepage title */
.home-page h1 {
    font-size: clamp(4rem, 8vw, 20rem);
    width: 80vw;
    margin: 2rem auto;
    line-height: 0.8;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-top: auto;
}

/* Homepage layout */
.home-page {
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}

.home-page .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-page .posts-grid {
    flex: 0 0 auto;
    margin-top: auto;
}

.program-grid {
    max-width: 120rem;
    /* Matches the left-aligned spacing with white space on the right */
}

.posts-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

/* Program page specific grid */
.posts-grid[data-columns="2"] .tag-program {
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
}

.posts-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.posts-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.posts-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.posts-grid[data-columns="6"] {
    grid-template-columns: repeat(5, 1fr);
}

/* Post Cards
   ========================================================================== */

.post-card {
    transition: transform 0.2s ease;
}

.post-card-link {
    display: block;
    color: inherit;
}

.post-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 1rem;
}

.poster-card-image {
    aspect-ratio: 297 / 420;
    /* A3 ratio */
}

.poster-card-image .card-image {
    object-fit: contain;
}

.post-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}

.placeholder-content {
    text-align: center;
    padding: 2rem;
}

.placeholder-text {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card-content {
    padding: 0;
}

.post-card-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.post-card-excerpt {
    font-size: 1.4rem;
    color: #666666;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    color: #999999;
}

.post-card-date {
    font-weight: 500;
}

.post-card-tags {
    display: flex;
    gap: 0.5rem;
}

.post-card-tag {
    background-color: #f5f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Single Post/Page
   ========================================================================== */

.post-single,
.page-single {
    padding: 4rem 0;
}

.post-header,
.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.post-title,
.page-title {
    font-size: 4.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.4rem;
    color: #666666;
}

.post-tags {
    display: flex;
    gap: 1rem;
}

.post-tag {
    background-color: #f5f5f5;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
}

.post-feature-image,
.page-feature-image {
    margin: 0 0 4rem 0;
    text-align: center;
}

.feature-img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.feature-caption {
    margin-top: 1rem;
    font-size: 1.4rem;
    color: #666666;
    font-style: italic;
}

.post-content,
.page-content {
    margin: 0 auto;
    font-size: 1.8rem;
    line-height: 1.7;
}

.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

/* Post Footer
   ========================================================================== */

.post-footer {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #e5e5e5;
}

.post-authors {
    margin-bottom: 3rem;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.author-bio {
    font-size: 1.4rem;
    color: #666666;
    margin: 0;
}

.post-share {
    text-align: center;
}

.share-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-button {
    padding: 1rem 2rem;
    background-color: #000000;
    color: #ffffff;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
}

.share-button:hover {
    background-color: #333333;
    opacity: 1;
}

/* Related Posts
   ========================================================================== */

.related-posts {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid #e5e5e5;
}

.related-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Archive Pages
   ========================================================================== */

.tag-page,
.author-page {
    padding: 4rem 0;
}

.tag-header,
.author-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tag-title,
.author-name {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tag-description,
.author-bio {
    font-size: 1.8rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.tag-meta,
.author-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.4rem;
    color: #999999;
}

.author-avatar-large {
    margin-bottom: 2rem;
}

.author-image {
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    object-fit: cover;
}

.author-website {
    color: #000000;
    text-decoration: underline;
}

/* Site Description
   ========================================================================== */

.site-description {
    text-align: center;
    margin: 4rem 0;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.description-text {
    font-size: 1.8rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer
   ========================================================================== */

.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #000000;
    margin-top: 6rem;
    padding: 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    font-size: 1.2rem;
    color: #000000;
}

.footer-email {
    align-self: start;
}

.footer-email a {
    color: #000000;
    text-decoration: none;
}

.footer-copyright {
    text-align: center;
    align-self: end;
}

.footer-address {
    text-align: right;
    align-self: start;
    line-height: 1.5;
}

@media (max-width: 800px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-address {
        text-align: center;
    }

    .footer-copyright {
        order: 3;
    }
}

/* Pagination
   ========================================================================== */

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 4rem 0;
    gap: 1rem;
}

.pagination .newer-posts {
    grid-column: 1;
    justify-self: end;
}

.pagination .page-number {
    grid-column: 2;
    text-align: center;
}

.pagination .older-posts {
    grid-column: 3;
    justify-self: start;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    font-size: 1.4rem;
    font-weight: 500;
    border: none;
    /* Removed border */
    background: transparent;
    transition: all 0.2s ease;
    color: #000000;
}

.pagination a:hover {
    opacity: 0.6;
}

.pagination .current {
    font-weight: 700;
}

/* Utilities
   ========================================================================== */

.no-posts {
    text-align: center;
    padding: 6rem 0;
}

.no-posts-message {
    font-size: 1.8rem;
    color: #666666;
}

/* Page Specific Styles
   ========================================================================== */

/* Program Page */
.program-title {
    font-size: 10rem;
    text-align: left;
}

.program-card {
    display: block;
    width: 100%;
}

.program-card-link {
    display: block;
    width: 100%;
    color: #000000;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.program-card-link:hover {
    opacity: 0.7;
}

.program-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 1.5rem;
}

.program-card-image img.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-card-content {
    display: flex;
    flex-direction: column;
}

.program-card-title {
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0 0 0.4rem 0;
    line-height: 1.4;
}

.program-card-excerpt {
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

/* About Page */
body.page-space-about .site-wrapper {
    background-color: #FFFF99;
}

body.page-studio-about .site-wrapper {
    background-color: #BEFFFF;
}

body.page-space-about .site-header,
body.page-studio-about .site-header,
body.page-contact .site-header,
body.page-notes .site-header,
body.custom-notes .site-header {
    background-color: #000000;
    border-bottom: none;
}

body.page-space-about .nav-link,
body.page-space-about .site-title-text,
body.page-studio-about .nav-link,
body.page-studio-about .site-title-text,
body.page-contact .nav-link,
body.page-contact .site-title-text,
body.page-notes .nav-link,
body.page-notes .site-title-text,
body.custom-notes .nav-link,
body.custom-notes .site-title-text {
    color: #ffffff;
}

body.page-space-about .nav-link:hover,
body.page-studio-about .nav-link:hover,
body.page-contact .nav-link:hover,
body.page-notes .nav-link:hover,
body.custom-notes .nav-link:hover {
    border-bottom-color: #ffffff;
}

body.page-space-about .hamburger-line,
body.page-studio-about .hamburger-line,
body.page-contact .hamburger-line,
body.page-notes .hamburger-line,
body.custom-notes .hamburger-line {
    background-color: #ffffff;
}

body.page-space-about .site-logo,
body.page-studio-about .site-logo,
body.page-contact .site-logo,
body.page-notes .site-logo,
body.custom-notes .site-logo {
    filter: invert(1);
}



.about-page {
    padding: 8.4rem 0 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-copy {
    max-width: 65rem;
    min-width: 0;
    /* Prevents grid blowout */
}

.about-logo-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4.8rem;
    width: 100%;
}

.about-content-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.about-logo-image {
    max-width: 100%;
    height: auto;
    max-height: 8rem;
    display: block;
}

.about-heading {
    font-size: 10rem;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 0;
    text-transform: uppercase;
}

.about-text {
    flex: 1;
    min-width: 0;
    font-size: 1.8rem;
    line-height: 1.8;
    color: #111111;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text p {
    max-width: 56rem;
}

.about-social-link {
    display: inline-block;
    margin-top: 0;
    font-size: clamp(1rem, 1.5vw, 1.6rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #000000;
    text-decoration: none;
    border-bottom: 1px solid #000000;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-content-row {
        flex-direction: column-reverse;
        gap: 2rem;
    }

    .about-social-wrapper {
        align-self: flex-end;
    }
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.about-visual .kg-card,
.about-visual figure {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.about-visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.about-card {
    position: relative;
    overflow: hidden;
    background-color: #f5f1d9;
    min-height: 33rem;
    display: flex;
    align-items: stretch;
}

.about-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-card--top {
    aspect-ratio: 16 / 10;
}

.about-card--bottom {
    aspect-ratio: 16 / 10;
}

.about-card--empty {
    min-height: 28rem;
    background: linear-gradient(180deg, #f8f2d6 0%, #efebd0 100%);
}

/* Contact Page */
.page-contact .post-content {
    min-height: 60vh;
    margin: 0 auto;
    align-content: center;
    text-align: center;
}

/* Notes Items */
.notes-item {
    border-bottom: 1px solid #000;
}

.tag-notes h1 {
    margin-bottom: 0;
    margin-top: 2rem;
}

/* Exhibition Page */
.tag-exhibition .post-content {
    columns: 1;
    column-gap: 4rem;
}

.tag-exhibition .post-content:has(hr) {
    columns: 2;
}

.tag-exhibition .post-content hr {
    break-after: column;
    border: none;
    height: 2px;
    background: #000;
    margin: 2rem 0;
}

.tag-exhibition .kg-image-card {
    width: 100%;
    margin: 0 auto;
}


.notes-title {
    font-size: 10rem;
    position: fixed;
    right: 1%;
    top: 0;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.contact-title {
    font-size: 10rem;
}

/* Responsive Design
   ========================================================================== */

/* Tablet and Mobile (768px and below) */
@media (max-width: 768px) {

    /* Typography */
    html {
        font-size: 56%;
    }

    /* Layout */
    .container {
        padding: 0 1.5rem;
    }

    /* Header */
    .site-header-content {
        padding: 1.5rem 0;
    }

    /* Navigation */
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-top: 1px solid #e5e5e5;
        flex-direction: column;
        gap: 0;
        padding: 2rem;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-item-dropdown {
        position: static;
    }

    .nav-dropdown {
        display: block;
        position: static;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 1.5rem 0;
        margin: 0;
        min-width: 100%;
    }

    .nav-dropdown a {
        color: #666666 !important;
        padding: 1rem 0;
        font-size: 1.4rem;
        text-transform: none;
    }

    .nav-dropdown a:hover {
        background-color: transparent;
        color: #000000 !important;
    }

    .nav-link {
        display: block;
        padding: 1.5rem 0;
        border-bottom: none;
        color: #000000 !important;
    }

    .nav-item {
        border-bottom: 1px solid #e5e5e5;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Posts Grid */
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    /* Homepage mobile grid */
    .home-page .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .posts-grid[data-columns="2"] .tag-program {
        grid-template-columns: 1fr;
    }

    .posts-grid[data-columns="2"] .tag-program {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .posts-grid[data-columns="3"],
    .posts-grid[data-columns="4"],
    .posts-grid[data-columns="5"],
    .posts-grid[data-columns="6"] {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    /* Typography */
    .post-title,
    .page-title {
        font-size: 3.2rem;
    }

    /* Post Meta */
    .post-meta {
        flex-direction: column;
        gap: 1rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    /* Share Buttons */
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Related Grid */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* About Page */
    .about-page {
        padding: 4rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-heading {
        font-size: 5.2rem;
        text-align: left;
    }

    .about-text {
        font-size: 1.8rem;
    }

    .about-card {
        min-height: 24rem;
    }

    .about-card--top,
    .about-card--bottom {
        aspect-ratio: auto;
    }

    /* Exhibition Page */
    .tag-exhibition .post-content {
        columns: 1;
        column-gap: 0;
        padding: 1em;
    }

    .tag-exhibition .post-content hr {
        break-after: auto;
        margin: 2rem 0;
    }

    .notes-title {
        font-size: 6rem;
        text-align: center;
        display: block;
        margin: 0 auto;
        position: relative;
    }
}

/* Mobile Only (480px and below) */
@media (max-width: 480px) {

    /* Posts Grid */
    .posts-grid {
        grid-template-columns: 1fr;
    }

    /* Homepage mobile grid */
    .home-page .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid[data-columns="2"],
    .posts-grid[data-columns="3"],
    .posts-grid[data-columns="4"],
    .posts-grid[data-columns="5"],
    .posts-grid[data-columns="6"] {
        grid-template-columns: 1fr;
    }

    /* Post Card Meta */
    .post-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Notes Grid */
    .notes-grid {
        max-width: 100%;
    }

    .page-title,
    .contact-title,
    .program-title {
        font-size: 6rem;
        text-align: center;
    }

    /* Program Page Mobile */
    .program-card {
        aspect-ratio: 1;
    }

    .program-card-content {
        position: relative;
        background: none;
        color: #000000;
        padding: 1rem 0;
        transform: none;
    }

    .program-card-title {
        font-size: 1.8rem;
        color: #000000;
    }

    .program-card-excerpt {
        font-size: 1.4rem;
        color: #666666;
    }
}

/* Desktop Only (769px and above) */
@media (min-width: 769px) {

    /* Notes Grid */
    .notes-grid {
        max-width: 70vw;
    }
}

.kg-embed-card:has(iframe[src*="youtube"]),
.kg-embed-card:has(iframe[src*="vimeo"]) {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 */
    padding-bottom: calc(var(--aspect-ratio, .5625) * 100%);
    margin-top: 2rem;
    margin-left: 0;
    margin-right: 0;
}

.instagram-media-rendered,
.instagram-media-registered,
.instagram-media,
.twitter-tweet {
    margin: 0 auto !important;
}

.kg-embed-card iframe,
.kg-embed-card object,
.kg-embed-card embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.kg-width-full {
    width: 100%;
    margin: 0 auto;
}

.kg-width-full img {
    width: 100% !important;
}

/* Space Rent Page
   ========================================================================== */
body.page-space-rent .site-wrapper {
    background-color: #FFFF99;
}

body.page-studio-artist-join .site-wrapper {
    background-color: #B0FFFF;
}



.rent-page {
    padding: 6rem 0 10rem 0;
}

.page-header {
    text-align: right;
    margin-bottom: 8rem;
}

.page-title {
    font-size: clamp(4rem, 8vw, 10rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: 300;
}

.rent-content {
    max-width: 80rem;
    font-size: 1.6rem;
    line-height: 1.8;
    color: #000000;
}

.rent-content p {
    margin-bottom: 3rem;
}

/* Rent & Join Page Buttons */
body.page-space-rent .rent-content .kg-button-card,
body.page-studio-artist-join .rent-content .kg-button-card {
    display: inline-flex;
    width: auto !important;
    margin-right: 1.6rem;
    margin-top: 1rem;
}

body.page-space-rent .rent-content .kg-btn,
body.page-studio-artist-join .rent-content .kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    border-radius: 12px;
    padding: 1.2rem 1.6rem;
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 4.5rem;
}

/* First button: Transparent with light outline */
body.page-space-rent .rent-content .kg-button-card:nth-of-type(1) .kg-btn,
body.page-studio-artist-join .rent-content .kg-button-card:nth-of-type(1) .kg-btn {
    background-color: transparent;
    border: 2px solid rgba(0, 0, 0, 0.15);
}

body.page-space-rent .rent-content .kg-button-card:nth-of-type(1) .kg-btn:hover,
body.page-studio-artist-join .rent-content .kg-button-card:nth-of-type(1) .kg-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Second button: Solid white */
body.page-space-rent .rent-content .kg-button-card:nth-of-type(2) .kg-btn,
body.page-studio-artist-join .rent-content .kg-button-card:nth-of-type(2) .kg-btn {
    background-color: #ffffff;
    border: 2px solid #ffffff;
}

body.page-space-rent .rent-content .kg-button-card:nth-of-type(2) .kg-btn:hover,
body.page-studio-artist-join .rent-content .kg-button-card:nth-of-type(2) .kg-btn:hover {
    background-color: #f0f0f0;
}

/* Contact Page
   ========================================================================== */
body.page-contact .site-wrapper {
    background-color: #4AA8FF;
    color: #ffffff;
}

body.page-contact .site-main {
    display: flex;
    flex-direction: column;
}

.contact-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
}

.contact-container {
    text-align: center;
    width: 100%;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contact-content h1 {
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-top: 5rem;
    margin-bottom: 1.4rem;
    color: #ffffff;
    text-transform: uppercase;
}

.contact-content h1:first-child {
    margin-top: 0;
}

.contact-content p {
    font-size: 1.8rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1rem 0;
    font-weight: 400;
}

.contact-content a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.4rem;
    transition: opacity 0.2s ease;
}

.contact-content a:hover {
    opacity: 0.7;
}

/* Notes Pages
   ========================================================================== */

/* Notes List */
body.page-notes .site-wrapper {
    background-color: #3b2611;
}

body.page-notes .pagination a,
body.page-notes .pagination span {
    color: #ffffff;
}

body.page-notes .site-main {
    display: flex;
    flex-direction: column;
}

.notes-list-page {
    flex: 1;
    padding: 6rem 0;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-item-link {
    display: block;
    padding: 2.5rem 0 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 1);
    text-decoration: none;
    transition: opacity 0.2s;
}

.notes-item-link:hover {
    opacity: 0.7;
}

.notes-item-title {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 400;
    margin: 0;
}

/* Notes Detail (Custom Template) */
body.custom-notes .site-wrapper {
    background-color: #ffffff;
    /* Left side */
}

/* Footer is now visible on notes detail */

body.custom-notes .site-main {
    display: flex;
    flex-direction: column;
}

.notes-detail-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: -6rem;
    /* Negate .site-footer margin-top */
}

.notes-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
}

.notes-text-col {
    padding: 4rem 2rem 4rem 0;
    background-color: #ffffff;
}

.notes-text-inner {
    max-width: 60rem;
    margin-left: auto;
    /* Align to the right edge of left column */
    margin-right: 4rem;
}

.notes-detail-header {
    margin-bottom: 4rem;
}

.notes-detail-title {
    font-size: 3.2rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.notes-detail-date {
    font-size: 1.8rem;
    color: #666;
}

.notes-content {
    font-size: 1.6rem;
    line-height: 1.6;
}

.notes-visual-col {
    padding: 4rem 0 4rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 1px solid #000000;
}

.notes-visual-inner {
    width: 100%;
    max-width: 60rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.notes-visual-inner img,
.notes-visual-inner figure {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* Exhibition Detail
   ========================================================================== */
body.custom-exhibition-detail .site-wrapper {
    background-color: #ffffff;
}

body.custom-exhibition-detail .site-footer {
    display: none;
}

.exhibition-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.exhibition-text-col {
    padding: 4rem 0 4rem 0;
    background-color: #ffffff;
}

.exhibition-text-inner {
    max-width: 60rem;
    margin-left: auto;
    margin-right: 4rem;
}

.exhibition-detail-header {
    margin-bottom: 4rem;
}

.exhibition-detail-title {
    font-size: 3.2rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.exhibition-detail-artist {
    font-size: 2.4rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
}

.exhibition-content {
    font-size: 1.6rem;
    line-height: 1.6;
}

.exhibition-visual-col {
    padding: 4rem 0 4rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 1px solid #000000;
}

.exhibition-visual-inner {
    width: 100%;
    max-width: 60rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.exhibition-visual-inner img,
.exhibition-visual-inner figure {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}


/* Program Detail Page */
body.custom-program-detail .site-wrapper {
    background-color: #ffffff;
}

body.custom-program-detail .site-footer {
    display: none;
}

.program-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.program-text-col {
    padding: 4rem 2rem 4rem 0;
    background-color: #ffffff;
}

.program-text-inner {
    max-width: 60rem;
    margin-left: auto;
    margin-right: 4rem;
}

.program-detail-header {
    margin-bottom: 4rem;
}

.program-detail-title {
    font-size: 3.2rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.program-detail-artist {
    font-size: 2.4rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
}

.program-content {
    font-size: 1.6rem;
    line-height: 1.6;
}

.program-visual-col {
    padding: 4rem 0 4rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 1px solid #000000;
}

.program-visual-inner {
    width: 100%;
    max-width: 60rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.program-visual-inner img,
.program-visual-inner figure {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* Detail Pages Mobile Layout - Must be at the end to override base styles */
@media (max-width: 768px) {

    .exhibition-detail-grid,
    .program-detail-grid,
    .notes-detail-grid {
        grid-template-columns: 1fr;
    }

    .exhibition-text-col,
    .program-text-col,
    .notes-text-col {
        padding: 4rem 0;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .exhibition-text-inner,
    .program-text-inner,
    .notes-text-inner {
        margin-right: auto;
    }

    .exhibition-visual-col,
    .program-visual-col,
    .notes-visual-col {
        padding: 4rem 0;
        border-left: none;
        border-top: 1px solid #000000;
        overflow-x: hidden;
    }

    /* Force Ghost images to respect container width on mobile */
    .exhibition-visual-col figure,
    .program-visual-col figure,
    .notes-visual-col figure {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Studio Artist Grid
   ========================================================================== */

.artist-list-page {
    padding-top: 2rem;
    padding-bottom: 10rem;
}

.artist-list-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
}

.artist-top-block {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    color: inherit;
}

.artist-top-block.logo-block {
    grid-column: span 2;
    background-color: #3b260d;
    color: #ffffff;
    aspect-ratio: 2 / 1;
    justify-content: flex-start;
}

.logo-block .studio-logo {
    width: auto;
    max-width: 60%;
    margin-top: 1rem;
    filter: brightness(0) invert(1);
}

.logo-block .about-text {
    font-size: 2rem;
    font-weight: 500;
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #ffffff;
}

.logo-block .arrow-down-right {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    transform: rotate(90deg);
    filter: brightness(0) invert(1);
}

.artist-top-block.empty-block {
    grid-column: span 1;
    background-color: #d9d9d9;
}

.artist-top-block.join-block {
    grid-column: span 1;
    background-color: #ffffff;
    justify-content: space-between;
}

.join-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.join-title {
    font-size: 2rem;
    font-weight: 500;
    text-decoration: underline;
}

.join-desc {
    font-size: 1.6rem;
    line-height: 1.4;
}

.join-block .arrow-up-right {
    align-self: flex-end;
    width: 48px;
    height: 48px;
}

/* Dynamic Artist Cards */
.artist-card {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
    background-color: var(--bg-color, #ffffff);
}

.artist-card-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #000000;
}

a.artist-card-link:hover {
    opacity: 1;
    filter: grayscale(1);
}

.artist-card-text {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.artist-card-image {
    flex: 0 0 50%;
    max-width: 50%;
    overflow: hidden;
}

.artist-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-card-name {
    font-size: 2.8rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.artist-card-role {
    font-size: 1.8rem;
    font-weight: 400;
}

/* Alternate Patterns using nth-child on .artist-card */
.artist-card:nth-of-type(4n + 1) .artist-card-link {
    flex-direction: row;
}

.artist-card:nth-of-type(4n + 1) .artist-card-text {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.artist-card:nth-of-type(4n + 2) .artist-card-link {
    flex-direction: row;
}

.artist-card:nth-of-type(4n + 2) .artist-card-text {
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
}

.artist-card:nth-of-type(4n + 3) .artist-card-link {
    flex-direction: row-reverse;
}

.artist-card:nth-of-type(4n + 3) .artist-card-text {
    justify-content: flex-start;
    align-items: flex-end;
    text-align: right;
}

.artist-card:nth-of-type(4n + 4) .artist-card-link {
    flex-direction: row-reverse;
}

.artist-card:nth-of-type(4n + 4) .artist-card-text {
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
}

/* Detail page */
.artist-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 100vh;
    /* border-top: 1px solid #000; */
}

.artist-text-col {
    border-right: 1px solid #000;
    padding: 5rem 2rem 4rem 0;
    /* 좌측 패딩 0으로 설정하여 컨테이너 정렬 맞춤 */
}

.artist-visual-col {
    padding: 5rem 0 4rem 2rem;
    /* 우측 패딩 0으로 설정 */
}

.artist-visual-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.artist-visual-inner img {
    width: 100%;
    height: auto;
}

.artist-text-inner {
    display: grid;
    grid-template-columns: 6.5fr 0.5fr;
    gap: 4rem;
    align-items: start;
}

.artist-main-column {
    min-width: 0;
}

.artist-name-container {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 4rem;
}

.artist-name-container h1 {
    font-size: clamp(3rem, 4vw, 4.4rem);
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.artist-label-inline {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.artist-links-column {
    display: flex;
    flex-direction: column;
}

.artist-label {
    font-size: 1.6rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.artist-extracted-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.artist-extracted-links p {
    margin: 0 0 0.5rem 0;
}

.artist-extracted-links a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 1.6rem;
}

/* Mobile responsive for artist list */
@media (max-width: 800px) {
    .artist-list-grid {
        grid-template-columns: 1fr;
    }

    .artist-top-block.empty-block,
    .artist-top-block.join-block {
        grid-column: span 1;
        aspect-ratio: auto;
    }

    .artist-card {
        grid-column: span 1;
        /* aspect-ratio inherits 2/1 from desktop, making the 50% image a perfect square */
    }

    .artist-top-block.logo-block {
        grid-column: span 1;
        aspect-ratio: 3 / 1;
    }

    .artist-top-block.empty-block {
        display: none;
        /* Hide empty block on mobile */
    }

    /* Allow artist-card to behave like desktop (side-by-side text/image) 
       but taking the full width of the mobile viewport */

    .artist-detail-grid {
        grid-template-columns: 1fr;
    }

    .artist-text-col {
        border-right: none;
    }

    .artist-text-inner {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* main-column의 껍데기를 없애고 자식들을 flex-item으로 승격 */
    .artist-main-column {
        display: contents;
    }

    /* 자식들 순서 재조정 */
    .artist-name-container {
        order: 1;
        margin-bottom: 0;
        /* 간격 조정 */
    }

    .artist-links-column {
        order: 2;
    }

    .artist-content {
        order: 3;
    }
}

/* Studio Programs Finder Layout */
.studio-programs-page {
    margin-bottom: -6rem;
    /* Negate .site-footer margin-top */
}

.sp-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr 2.5fr;
    min-height: 100vh;
}

.sp-col-categories {
    border-right: 1px solid #000;
    padding: 10rem 2rem 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: flex-start;
}

.sp-category-btn {
    background: none;
    border: none;
    font-size: 3.2rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0 0 0.5rem 0;
    text-align: left;
    color: #000;
    border-bottom: 1px solid #000;
    line-height: 1;
    font-family: inherit;
    letter-spacing: -0.02em;
}

.sp-category-btn:hover,
.sp-category-btn.active {
    font-weight: 500;
}

.sp-col-posts {
    border-right: 1px solid #000;
    padding: 10rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

.sp-post-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0.5rem 0;
    /* Add slight vertical padding for larger hit area */
    width: 100%;
    /* Make clickable area span full column width */
    text-align: left;
    color: #000;
    line-height: 1.4;
    font-family: inherit;
}

.sp-post-btn:hover {
    font-weight: 500;
}

.sp-post-btn.active {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.sp-col-detail {
    padding: 10rem 0 4rem 2rem;
    display: flex;
    flex-direction: column;
}

.sp-detail-image {
    width: 100%;
    height: auto;
    margin-bottom: 3rem;
}

.sp-detail-title {
    font-size: clamp(2.4rem, 3vw, 3.2rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sp-detail-content {
    font-size: 1.6rem;
    line-height: 1.6;
}

.sp-no-posts {
    font-size: 1.6rem;
    color: #666;
}

@media (max-width: 900px) {
    .sp-layout {
        grid-template-columns: 1fr;
        border-top: none;
    }

    .sp-col-categories,
    .sp-col-posts {
        border-right: none;
        border-bottom: 1px solid #000;
        padding: 4rem 0;
    }

    .sp-col-detail {
        padding: 4rem 0;
    }
}

/* Index Layout Split Screen */
.home-template .site-main {
    display: flex;
    flex-direction: column;
}

.index-split-layout {
    display: flex;
    width: 100%;
    flex: 1;
    align-items: center;
}

.index-split-half {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* SVG Hover Effects trigger from the parent container */
.svg-default-group,
.studio-default-group {
    transition: opacity 0.3s ease;
}

.svg-hover-group,
.studio-hover-group {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.index-split-half:hover .svg-default-group,
.index-split-half:hover .studio-default-group {
    opacity: 0;
}

.index-split-half:hover .svg-hover-group,
.index-split-half:hover .studio-hover-group {
    opacity: 1;
}

.index-logo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.index-logo-wrapper svg {
    width: auto !important;
    height: clamp(40px, 5vw, 66px) !important;
}

@media (max-width: 768px) {
    .index-split-layout {
        flex-direction: column;
        min-height: auto;
    }

    .index-split-half {
        padding: 6rem 2rem;
    }
}

/* Koenig Editor Required Styles (Safe Mode) */
.kg-width-wide,
.kg-width-full {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Studio Programs Content Images (Prevent Oversize) */
.sp-detail-content img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Space / About - 100vh Independent Scroll (Desktop Only)
   ========================================================================== */
@media (min-width: 801px) {

    /* 1. Body 100vh 고정 및 전체 스크롤 차단 */
    body.page-space-about,
    body.page-studio-about {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* 2. 메인 영역이 남은 높이를 꽉 채우도록 설정 */
    body.page-space-about .site-main,
    body.page-studio-about .site-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body.page-space-about .about-page,
    body.page-studio-about .about-page {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding-top: 4rem;
        /* 위쪽 여백 줄임 */
        padding-bottom: 0;
        /* 기존 하단 여백 제거 (푸터와 밀착) */
        overflow: hidden;
    }

    body.page-space-about .site-footer,
    body.page-studio-about .site-footer {
        margin-top: 0;
        /* 푸터 상단 여백 제거 */
    }

    body.page-space-about .about-grid,
    body.page-studio-about .about-grid {
        flex: 1;
        height: 100%;
        overflow: hidden;
        align-items: stretch;
        /* 그리드 높이 꽉 채우기 */
    }

    /* 3. 양쪽 2-Column 개별 스크롤 적용 */
    body.page-space-about .about-copy,
    body.page-studio-about .about-copy,
    body.page-space-about .about-visual,
    body.page-studio-about .about-visual {
        height: 100%;
        overflow-y: auto;
        padding-bottom: 4rem;
        /* 스크롤 끝 여백 줄임 */
    }

    /* 4. 스크롤바 완전 숨김 (Invisible Scroll) */
    body.page-space-about .about-copy::-webkit-scrollbar,
    body.page-studio-about .about-copy::-webkit-scrollbar,
    body.page-space-about .about-visual::-webkit-scrollbar,
    body.page-studio-about .about-visual::-webkit-scrollbar {
        display: none;
    }

    /* ==========================================================================
       Detail Pages - 100vh Independent Scroll
       ========================================================================== */
    body.custom-notes,
    body.custom-exhibition-detail,
    body.custom-program-detail,
    body.custom-artist-detail {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body.custom-notes .site-wrapper,
    body.custom-exhibition-detail .site-wrapper,
    body.custom-program-detail .site-wrapper,
    body.custom-artist-detail .site-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }

    body.custom-notes .site-main,
    body.custom-exhibition-detail .site-main,
    body.custom-program-detail .site-main,
    body.custom-artist-detail .site-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }

    body.custom-notes .notes-detail-page,
    body.custom-exhibition-detail .exhibition-detail-page,
    body.custom-program-detail .program-detail-page,
    body.custom-artist-detail .artist-detail-page {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding-top: 0;
        margin-bottom: 0;
        overflow: hidden;
        min-height: 0;
    }

    /* 특이 케이스: detail 페이지들은 .container가 한 겹 더 있음 */
    body.custom-notes .notes-detail-page .container,
    body.custom-exhibition-detail .exhibition-detail-page .container,
    body.custom-program-detail .program-detail-page .container,
    body.custom-artist-detail .artist-detail-page .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        min-height: 0;
    }

    body.custom-notes .site-footer,
    body.custom-exhibition-detail .site-footer,
    body.custom-program-detail .site-footer,
    body.custom-artist-detail .site-footer {
        margin-top: 0;
    }

    body.custom-notes .notes-detail-grid,
    body.custom-exhibition-detail .exhibition-detail-grid,
    body.custom-program-detail .program-detail-grid,
    body.custom-artist-detail .artist-detail-grid {
        flex: 1;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
    }

    body.custom-notes .notes-text-col,
    body.custom-notes .notes-visual-col,
    body.custom-exhibition-detail .exhibition-text-col,
    body.custom-exhibition-detail .exhibition-visual-col,
    body.custom-program-detail .program-text-col,
    body.custom-program-detail .program-visual-col,
    body.custom-artist-detail .artist-text-col,
    body.custom-artist-detail .artist-visual-col {
        height: 100%;
        overflow-y: auto;
    }

    body.custom-notes .notes-text-col::-webkit-scrollbar,
    body.custom-notes .notes-visual-col::-webkit-scrollbar,
    body.custom-exhibition-detail .exhibition-text-col::-webkit-scrollbar,
    body.custom-exhibition-detail .exhibition-visual-col::-webkit-scrollbar,
    body.custom-program-detail .program-text-col::-webkit-scrollbar,
    body.custom-program-detail .program-visual-col::-webkit-scrollbar,
    body.custom-artist-detail .artist-text-col::-webkit-scrollbar,
    body.custom-artist-detail .artist-visual-col::-webkit-scrollbar {
        display: none;
    }

    /* ==========================================================================
       Studio Programs Layout - 100vh Independent Scroll
       ========================================================================== */
    body:has(.studio-programs-page) {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body:has(.studio-programs-page) .site-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }

    .studio-programs-page {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
        /* Remove negative footer margin */
        overflow: hidden;
        width: 100%;
        min-height: 0;
    }

    .studio-programs-page .sp-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        min-height: 0;
    }

    body:has(.studio-programs-page) .site-footer {
        margin-top: 0;
    }

    .sp-layout {
        flex: 1;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        width: 100%;
    }

    .sp-col-categories,
    .sp-col-posts,
    .sp-col-detail {
        height: 100%;
        overflow-y: auto;
        min-width: 0;
        /* Fixes grid column blowout on wide content */
    }

    .sp-col-categories::-webkit-scrollbar,
    .sp-col-posts::-webkit-scrollbar,
    .sp-col-detail::-webkit-scrollbar {
        display: none;
    }
}
