/* CSS Variables & Reset */
:root {
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #38bdf8;
    --pin-color: #ef4444;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Design */
.bg-leather-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.bg-leather-image {
    width: 120%;
    height: 120%;
    position: absolute;
    top: -10%;
    left: -10%;
    background-image: url('./assets/korean_sewing_bg.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    animation: panBg 40s linear infinite alternate;
    opacity: 0.5;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.75) 100%);
    z-index: -1;
}

@keyframes panBg {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.05); }
}

/* Layout */
.board-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

@keyframes fadeUp {
    to { transform: translateY(0); opacity: 1; }
}

/* Graphic Highlight Banner */
.title-highlight-wrapper {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.highlight-image-box {
    position: relative;
    display: inline-block;
    padding: 1rem 3rem;
    perspective: 1000px;
    margin-bottom: 1rem;
}

/* Sewing Title Image */
.sewing-title-img {
    max-width: 700px;
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0px 10px 25px rgba(0, 0, 0, 0.6));
    animation: floatingTitle 4s ease-in-out infinite alternate;
    border-radius: 12px;
}

.highlight-glow {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.4), transparent 70%);
    z-index: -1;
    filter: blur(30px);
    animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.3; transform: scale(0.95); }
    100% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes floatingTitle {
    from { transform: translateY(0px); }
    to { transform: translateY(-6px); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    background: rgba(15, 23, 42, 0.6);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

/* Posters Grid */
.posters-grid {
    display: flex;
    gap: 4rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    z-index: 20;
}

.poster-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 30;
}

.poster-wrapper:nth-child(2) {
    animation-delay: 0.2s;
}

.pin {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ff8a8a, var(--pin-color));
    border-radius: 50%;
    position: absolute;
    top: -10px;
    z-index: 10;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.5), inset -2px -2px 4px rgba(0,0,0,0.3);
    transform: translateZ(30px);
}

.pin::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 8px;
    width: 2px;
    height: 10px;
    background: #ccc;
    z-index: -1;
    transform: rotate(20deg);
}

.poster-card {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 5px solid white;
    background: white;
}

.poster-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.poster-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.poster-card:hover .poster-overlay {
    opacity: 1;
}

.view-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border: 2px solid white;
    border-radius: 30px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.poster-card:hover .view-text {
    transform: translateY(0);
}

.poster-info {
    margin-top: 1.5rem;
    text-align: center;
    transform: translateZ(20px);
}

.poster-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #e2e8f0;
}

.poster-info span {
    font-size: 0.9rem;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 5vh;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent);
    text-decoration: none;
}

/* Audio Button */
.audio-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
}

.audio-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.audio-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.2s;
}

.audio-btn:active svg {
    transform: scale(0.9);
}

/* Screen Reader Only (SEO 시맨틱 숨김 텍스트) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Site Footer */
.site-footer {
    margin-top: 3rem;
    padding: 1.2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 900px;
    text-align: center;
}

.footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-style: normal;
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.7);
    letter-spacing: 0.3px;
}

/* Poster info h2 reset (SEO용 h2 적용) */
.poster-info h2 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #e2e8f0;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .board-header h1 { font-size: 1.8rem; }
    .posters-grid { flex-direction: column; align-items: center; gap: 3rem; }
    .board-header { padding: 1.5rem 2rem; }
    .audio-btn { bottom: 20px; right: 20px; width: 50px; height: 50px; }
    .audio-btn svg { width: 24px; height: 24px; }
    .footer-address { font-size: 0.8rem; }
}
