:root {
    /* Default theme (May Bio as example) */
    --primary: #b87a4d;
    --primary-hover: #9a6640;
    --bg-light: #fdfbfa;
    --bg-tab: #f3e9e1;
    --bg-details: #c09b83;
    --text-dark: #4a311f;
    --text-muted: #8b6852;
    --white: #ffffff;
    --border-color: #e5e5e5;
    
    --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    --font-serif: 'Gowun Batang', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; }

/* Transitions for Theme Variables */
.transition-bg {
    transition: background-color 0.5s ease;
}
.transition-color {
    transition: color 0.5s ease;
}

/* Background Texture */
.page-background {
    position: absolute;
    top: 0; left: 0; right: 0; height: 900px;
    background-color: var(--bg-light);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    z-index: -1;
    transition: background-color 0.5s ease;
}

.container {
    max-width: 600px; /* Mobile focused max width */
    margin: 0 auto;
    background: transparent;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.03);
}

/* Hero Section */
.hero-section {
    padding: 60px 20px 30px;
    text-align: center;
}

.top-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -1px;
    color: var(--text-dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.top-title::before, .top-title::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 1px;
    background: var(--text-muted);
    top: 50%;
}
.top-title::before { left: -30px; }
.top-title::after { right: -30px; }

.top-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Poster */
.poster-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.poster-subtitle {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Programs Grid */
.programs-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 50px;
    flex-wrap: wrap;
}

.program-card {
    flex: 1;
    min-width: 140px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    border-top: 4px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.program-card h3 {
    font-size: 13px;
    color: var(--white);
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    transition: background-color 0.5s ease;
}

.program-card p {
    font-size: 13px;
    color: var(--text-dark);
    word-break: keep-all;
    line-height: 1.5;
}

.logos { margin-top: 30px; }

/* Main Tabs */
.main-tabs-wrapper {
    background: var(--bg-tab);
    transition: background-color 0.5s ease;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.scroll-arrow {
    position: absolute;
    top: 0; bottom: 0;
    width: 32px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.5s ease;
}
.scroll-arrow:hover { opacity: 1; }
.left-arrow { left: 0; background: linear-gradient(to right, var(--bg-tab) 60%, transparent); }
.right-arrow { right: 0; background: linear-gradient(to left, var(--bg-tab) 60%, transparent); }

.main-tabs {
    flex: 1;
    display: flex;
    list-style: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 25px;
}
.main-tabs::-webkit-scrollbar { display: none; }

.main-tab {
    flex: 1 0 auto;
    min-width: 80px;
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    line-height: 1.4;
}

.main-tab.active {
    color: var(--white);
    font-weight: 700;
    border-bottom: 3px solid var(--primary);
    background: var(--primary);
}

/* Details Section */
.details-section {
    background: var(--bg-details);
    color: var(--text-details, var(--white));
    padding: 50px 20px;
    text-align: center;
}

.details-title {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
}
.details-title .highlight {
    font-weight: 700;
}

.details-desc {
    font-size: 15px;
    margin-bottom: 10px;
    opacity: 0.95;
    word-break: keep-all;
}

.details-meta {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 40px;
}

/* Sub tabs */
.sub-tabs-wrapper {
    margin-bottom: 30px;
}

.sub-tabs {
    display: flex;
    justify-content: center;
    list-style: none;
    font-size: 18px;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.sub-tab {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    font-weight: 500;
    padding: 5px;
}
.sub-tab:hover { opacity: 0.9; }
.sub-tab.active {
    opacity: 1;
    color: var(--sub-tab-active, var(--bg-light));
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.separator { opacity: 0.4; font-size: 16px; pointer-events: none; }

/* Sub Content */
.sub-content-area {
    background: var(--sub-content-bg, rgba(255,255,255,0.15));
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 25px 20px;
    min-height: 150px;
    margin-bottom: 40px;
    text-align: left;
    font-size: 14px;
    color: var(--text-details, var(--white));
    line-height: 1.6;
}

.program-item { margin-bottom: 20px; }
.program-item:last-child { margin-bottom: 0; }
.program-item h4 { 
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* QR */
.qr-container {
    padding: 25px;
    background: var(--white);
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.qr-box {
    width: 140px; height: 140px; 
    margin: 0 auto 12px;
    background: #f8f8f8;
}
.qr-label {
    background: var(--text-dark); color: var(--white);
    padding: 6px 15px; border-radius: 4px; font-size: 14px; font-weight: 700;
}

/* Gallery */
.gallery-section {
    padding: 50px 20px;
    background: var(--white);
}

.gallery-title {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 22px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* 모바일에서도 3칸을 원한다면 3으로 유지, 글씨가 작아질 수 있음 */
        gap: 8px; /* 간격을 좁혀 모바일에 맞춤 */
    }
}

.gallery-item {
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    background: var(--white);
    transition: transform 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-3px);
}
.gallery-item img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover;
    display: block;
}
.gallery-item-desc {
    padding: 12px; font-size: 12px;
}
.gallery-item-desc strong { display: block; margin-bottom: 4px; color: var(--text-dark); font-size: 13px; }
.gallery-item-desc span { color: var(--primary); transition: color 0.5s ease; font-weight: 500;}

/* Footer */
.footer-link {
    background: #f4f4f4;
    padding: 25px 20px; text-align: center;
}
.footer-link a {
    color: #666; text-decoration: none; font-size: 14px; font-weight: 500;
}
.footer-link a:hover {
    color: var(--primary);
}

/* Map Fix */
.root_daum_roughmap {
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.root_daum_roughmap .wrap_map {
    width: 100% !important;
    border: none !important;
}

/* Interactive Poster */
.interactive-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.interactive-img {
    width: 100%;
    display: block;
    transform: scale(1.02);
    transition: transform 3s ease;
}
.interactive-container:hover .interactive-img {
    transform: scale(1.06);
}

.particles-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 5;
    transform: translateZ(30px);
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 5s infinite ease-in-out;
}

@keyframes floatParticle {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    30% { opacity: 0.8; }
    70% { opacity: 0.8; }
    100% { transform: translateY(-60px) scale(1.3); opacity: 0; }
}
