/* ==========================================================================
   Component & Class Styles (class.css)
   Pure CSS Classes : No Framework Dependencies
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
/* Override hardcoded WYSIWYG inline colors in dark mode (excluding interactive elements) */
[data-theme="dark"] .page-content *:not(button):not(input):not(select):not(textarea):not([role="button"]):not([role="button"] *):not(a) {
    color: var(--text) !important;
    background-color: transparent !important;
    border-color: var(--border) !important;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.container-sm {
    max-width: var(--container-sm);
}

.container-md {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-lg);
}

.container-full {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

main.container {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

main.container.container-full {
    padding-top: 0;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    /* Note: .mega-menu visibility is controlled by Alpine.js x-show */
}

/* --------------------------------------------------------------------------
   Page Content Styling (WYSIWYG & TinyMCE)
   -------------------------------------------------------------------------- */
.page-content {
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 0.75rem;
}

.page-content p:last-child {
    margin-bottom: 0;
}

.page-content img {
    margin: 0.75rem 0;
    border-radius: var(--radius);
}

.page-content ul,
.page-content ol {
    margin: 0.5rem 0 0.75rem 1.25rem;
}

.page-content ul li {
    margin-bottom: 0.5rem;
}

.page-content table {
    margin: 1rem 0;
    display: block;
    overflow-x: auto;
}

.page-content a:not([role="button"]) {
    text-decoration: underline;
    color: var(--primary);
    overflow-wrap: anywhere;
}

.page-content a:not([role="button"]):hover {
    color: var(--primary-hover);
}

/* --------------------------------------------------------------------------
   Top Block (Header Banner Area)
   -------------------------------------------------------------------------- */
.top-block {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.top-block .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Banners */
.banner {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Utility Links */
.utility-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.utility-desktop {
    gap: 0.5rem;
}

.utility-desktop a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    transition: color var(--transition);
}

.utility-desktop a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Hamburger Button */
.hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.hamburger-btn:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

.hamburger-btn.active {
    background-color: var(--primary);
    color: #ffffff;
}

.hamburger-btn.active:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Main Navigation Bar
   -------------------------------------------------------------------------- */
.nav-area {
    position: relative;
    display: block;
    width: 100%;
}

.main-nav {
    background-color: var(--primary);
    box-shadow: var(--shadow);
}

.main-nav .container {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    width: 100%;
    justify-content: space-around;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition);
}

.nav-link:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* --------------------------------------------------------------------------
   Mega Menu (Shows ALL categories)
   -------------------------------------------------------------------------- */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
    border-top: 3px solid var(--primary);
}

.mega-menu-grid {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    padding: 2rem 0;
}

.mega-menu-column {
    padding: 0 1rem;
}

.mega-menu-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.mega-menu-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-list a {
    display: block;
    color: var(--text);
    padding: 0.375rem 0;
    font-size: 1rem;
    transition: color var(--transition), padding-left var(--transition);
}

.mega-menu-list a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
    text-decoration: none;
}

/* Mega Menu User Links (Mobile only) */
.mega-menu-user-links {
    flex-direction: column;
    padding: 1rem 0;
}

.mega-menu-user-links .menu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text);
    font-size: 0.9rem;
}

.mega-menu-user-links .menu-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Mobile Mega Menu - Right Side Drawer */
@media (max-width: 768px) {
    .mega-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 80%;
        max-width: 320px;
        overflow-y: auto;
        padding-top: 4rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .mega-menu.open {
        transform: translateX(0);
    }

    .mega-menu-grid {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .mega-menu-column {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border);
    }

    .mega-menu-column:last-child {
        border-bottom: none;
    }

    /* Close button */
    .mega-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: #999;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;
        padding: 0.5rem;
        line-height: 1;
        transition: color var(--transition);
    }

    .mega-menu-close:hover {
        color: var(--primary);
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 2.5rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(107, 33, 168, 0.3);
}

.site-footer .container {
    text-align: center;
}

.footer-links {
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: #f3e8f8;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent, #E5A93B);
    text-decoration: none;
}

.footer-links .divider {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 0.75rem;
}

.footer-info {
    margin-bottom: 1rem;
}

.footer-info p {
    margin: 0.35rem 0;
    font-size: 0.85rem;
    color: #c7b4cc;
}

.footer-info a {
    color: #e5d5ec;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-copyright {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copyright p {
    margin: 0;
    font-size: 0.8rem;
    color: #a491a7;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .top-block .container {
        padding: 0.5rem 1rem;
    }

    .site-footer {
        padding: 1.5rem 0;
    }

    .footer-links a {
        display: inline-block;
        margin: 0.25rem 0;
    }

    .footer-links .divider {
        display: none;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* --------------------------------------------------------------------------
   Grid System (Simple responsive grid)
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card-grid > article {
    margin-bottom: 0;
    min-width: 0;
}

@media (max-width: 768px) {
    .grid {
        gap: 0.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.85rem;
    }
}

/* ==========================================================================
   Hero Section & Carousel
   ========================================================================== */

/* Hero Section Container */
.hero {
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: 64vh;
    min-height: 360px;
    max-height: 560px;
    overflow: hidden;
}

/* Slideshow Container */
.slideshow {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Individual Slides (with Ken Burns Zoom Effect) */
.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease-in-out, transform 0s linear 1.5s;
    will-change: opacity, transform;
}

.slide.initial-visible {
    opacity: 1;
}

.slide.active {
    opacity: 1;
    transform: scale(1.08);
    transition: opacity 1.5s ease-in-out, transform 6.5s ease-out;
}

/* Dark Overlay (Deprecated: Only caption now has dark overlay) */
.hero-overlay {
    display: none;
}

/* Slide Caption (Fade-up Animation) */
.slide-caption {
    position: absolute;
    bottom: 4.5rem;
    left: 0;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    pointer-events: none;
}

.slide-caption.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Slide Caption Box (Dark overlay applied specifically to caption) */
.slide-caption-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

.slide-caption-title,
.slide-caption h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0;
    line-height: 1.35;
}

.slide-caption-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.slide-caption-link:hover .badge[data-type="glass"] {
    background: rgba(var(--primary-rgb), 0.75);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 4;
}

.indicator {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    border: 2px solid rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: width 0.35s ease, background 0.3s ease;
    padding: 0;
    overflow: hidden;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.indicator.active {
    width: 36px;
    background: rgba(255, 255, 255, 0.35);
    border-color: white;
    transform: none;
}

.indicator.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 999px;
    transform-origin: left center;
    animation: slideProgressFill 5s linear forwards;
}

@keyframes slideProgressFill {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Slide Navigation Arrows */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.7;
}

.slide-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.slide-arrow-prev {
    left: 2rem;
}

.slide-arrow-next {
    right: 2rem;
}

/* Mobile Adjustments for Hero */
@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .slide-caption {
        bottom: 3.5rem;
    }

    .slide-caption-title,
    .slide-caption h2 {
        font-size: 1.25rem;
    }

    .slide-arrow {
        width: 40px;
        height: 40px;
    }

    .slide-arrow-prev {
        left: 1rem;
    }

    .slide-arrow-next {
        right: 1rem;
    }

    .slide-indicators {
        bottom: 1.5rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* --------------------------------------------------------------------------
   Information & Post Detail Components
   -------------------------------------------------------------------------- */
.information-page {
    margin: 0 auto;
    padding: 0.5rem 0;
}

.info-section {
    scroll-margin-top: 140px;
}

@media (max-width: 768px) {
    .info-section {
        scroll-margin-top: 80px;
    }
}

.post-attachments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-attachments h4 {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-attachments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-attachments li {
    padding: 0.25rem 0;
}

.post-attachments a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.post-attachments a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.post-attachments a i {
    font-size: 1.1rem;
}

.comment {
    background: var(--card-bg);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-comment-action {
    background: none;
    border: none;
    padding: 0.2rem 0.4rem;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: color 0.15s ease;
}

.btn-comment-action:hover {
    color: var(--primary);
}

.btn-comment-action.delete:hover {
    color: var(--danger);
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.comment-author {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.comment-content {
    line-height: 1.6;
    color: var(--text);
    word-break: break-all;
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    transition: all var(--transition);
    border: none;
    outline: none;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.back-to-top i {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
}

/* Badge for Notice */

.badge[data-type="client"],
.badge[data-type="secret"],
.badge[data-type="light"] {
    background-color: var(--contrast);
    color: var(--text);
    border-color: var(--border);
}

.badge[data-type="outline"] {
    background-color: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.25);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
}

[data-theme="dark"] .badge[data-type="outline"] {
    color: var(--primary-light);
    background-color: rgba(var(--primary-rgb), 0.2);
    border-color: rgba(var(--primary-rgb), 0.4);
}

.badge[data-type="glass"] {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Toast Notification
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex !important;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    position: relative;
    background-color: #333;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 90vw;
    pointer-events: auto;
    font-size: 0.95rem;
    min-width: min(300px, 90vw);
    justify-content: space-between;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.toast span {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.toast-close:hover {
    color: white;
}

/* =========================================
   연혁 (History Table) 스타일
   ========================================= */
#history table {
    border-collapse: collapse;
    width: 100%;
    border: none !important;
}

#history table th,
#history table td,
#history table tr {
    border: none !important;
    background-color: transparent !important;
}

/* 첫 번째 열: 연도 */
#history table td:nth-child(1) {
    font-weight: bold;
    font-size: 24px;
    color: var(--primary) !important;
    text-align: right;
    padding: 15px 15px 15px 0;
    width: 120px;
}

/* 두 번째 열: 날짜 (연도와 날짜 사이 세로선) */
#history table td:nth-child(2) {
    border-left: 2px solid var(--border) !important;
    padding: 15px 0 15px 20px;
    width: 130px;
    white-space: nowrap;
}

/* 세 번째 열: 내용 */
#history table td:nth-child(3) {
    padding: 15px 0 15px 0;
}

@media (max-width: 768px) {
    #history table td:nth-child(1) {
        width: 80px;
        font-size: 1.1rem;
        padding: 10px 10px 10px 0;
    }

    #history table td:nth-child(2) {
        width: 90px;
        padding: 10px 0 10px 10px;
    }

    #history table td:nth-child(3) {
        padding: 10px 0 10px 0;
    }
}

/* =========================================
   Dark Mode Overrides
   ========================================= */
@media (prefers-color-scheme: dark) {

    :root:not([data-theme="light"]) .section-header h2,
    :root:not([data-theme="light"]) #history table td:nth-child(1) {
        color: var(--primary-light) !important;
    }
}

[data-theme="dark"] #history table td:nth-child(1) {
    color: var(--primary-light) !important;
}

/* =========================================
   Detail Pages
   ========================================= */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--primary);
}

.detail-meta-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.comment-form-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.alert-primary {
    padding: 1rem 1.25rem;
    background-color: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.icon-circle-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.message-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.message-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    word-break: keep-all;
}

.page-header {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.page-header>h1 {
    width: 100%;
    margin: 0;
}

.page-header h1 {
    margin: 0 0 0.5rem 0;
}

.page-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.search-input {
    width: 100%;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
}

.notice-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

.privacy-box {
    margin-bottom: 1rem;
    background-color: var(--bg);
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Social Login Buttons */
.social-btn {
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    text-align: center;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.social-btn:hover:not(.disabled) {
    background-color: var(--contrast);
    border-color: var(--text-light);
    color: var(--text);
    text-decoration: none;
}

.social-btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}

/* ==========================================================================
   Portfolio Styles (migrated from portfolio.html)
   ========================================================================== */

.highlight-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.browser-mockup {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: auto;
    align-self: start;
    display: flex;
    flex-direction: column;
}

.browser-mockup:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.browser-top-bar {
    background-color: var(--bg);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.browser-url {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-left: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.browser-screen {
    width: 100%;
    overflow: hidden;
    background-color: var(--bg);
    display: block;
}

.browser-screen a {
    display: block;
    width: 100%;
    height: auto;
}

.browser-screen img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.browser-screen img:hover {
    transform: scale(1.02);
}

.project-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}

.project-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tech-stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    word-break: keep-all;
}

.highlight-bullet {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Quote Form Layout (Responsive)
   ========================================================================== */
.quote-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.quote-summary-column {
    position: sticky;
    top: 90px;
}

@media (max-width: 900px) {
    .quote-layout {
        grid-template-columns: 1fr !important;
    }

    .quote-summary-column {
        position: static !important;
    }
}

.browser-dot.dot-red {
    background-color: #ef4444;
}

.browser-dot.dot-yellow {
    background-color: #f59e0b;
}

.browser-dot.dot-green {
    background-color: #10b981;
}

.portfolio-empty-preview {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1.5rem;
}

.portfolio-action-bar {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
}

/* ==========================================================================
   Board Components (게시판 특화 컴포넌트)
   ========================================================================== */
.board-subtoolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.board-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.board-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card-bg);
    color: var(--text-light);
    text-decoration: none;
}

.board-filter-btn.active {
    background-color: var(--contrast);
    color: var(--text);
    border-color: var(--text);
    font-weight: 700;
}

.board-search-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-width: 260px;
    max-width: 360px;
    flex: 1;
}

.board-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.board-search-btn:hover {
    color: var(--primary);
}

.board-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--transition);
    gap: 1rem;
}

.board-list-row:last-child {
    border-bottom: none;
}

.board-list-row:hover {
    background-color: var(--contrast);
}

.board-list-main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .board-list-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .board-list-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

.board-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    word-break: keep-all;
}

.board-list-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

.board-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.board-post-title {
    font-size: 1.35rem;
    margin: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-edit-btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.board-close-btn {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
}

.board-tags {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.board-post-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Notice & FAQ Accordion Components (공지사항 및 FAQ 아코디언)
   -------------------------------------------------------------------------- */
.board-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.5rem;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    margin-bottom: 1.25rem;
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.board-section-header:hover {
    background-color: var(--contrast);
    box-shadow: var(--shadow-lg);
}

.board-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.notice-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card-bg);
    margin-bottom: 0.6rem;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.notice-item-header {
    padding: 0.95rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    transition: background-color var(--transition);
    background-color: var(--card-bg);
}

@media (max-width: 576px) {
    .notice-item-header {
        grid-template-columns: 1fr auto;
        gap: 0.25rem 1rem;
    }

    .notice-item-header .board-list-main {
        grid-column: 1 / 2;
    }

    .notice-item-header::after {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .notice-item-header .notice-meta {
        grid-column: 1 / 3;
        justify-content: flex-start;
        margin-top: 0.25rem;
    }
}

.notice-item-header:hover {
    background-color: var(--contrast);
}

.notice-item-header:hover .board-list-title {
    color: var(--primary);
}

.notice-item-body {
    padding: 1.25rem 1.5rem;
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notice-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   Vitality & Interactive UI Components (대문 및 서브 페이지 생동감 컴포넌트)
   ========================================================================== */

/* 1. 스크롤 리빌(Scroll Reveal) 애니메이션 */
.reveal-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* 2. 기술 키워드 무한 마키(Infinite Marquee Ticker) */
.tech-marquee {
    position: relative;
    overflow: hidden;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    margin-top: 1.5rem;
    user-select: none;
}

.tech-marquee-track {
    display: flex;
    width: max-content;
    gap: 2.25rem;
    animation: marqueeScroll 32s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
    animation-play-state: paused;
}

.tech-marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.tech-marquee-item i {
    color: var(--primary);
    font-size: 1.05rem;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 3. 데스크톱 호버 부양 vs 모바일 터치 피드백 분기 */
.interactive-card {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .interactive-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-hover, var(--shadow-lg));
        border-color: var(--primary);
    }
}

@media (hover: none) {
    .interactive-card:active {
        transform: scale(0.985);
    }
}

/* 5. 도서 및 포트폴리오 비주얼 쇼케이스 카드 + 모바일 가로 스냅 캐러셀 */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 1.25rem;
}

.book-showcase-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    margin-bottom: 0;
    height: 100%;
}

.book-cover-wrap {
    position: relative;
    height: 190px;
    background-color: var(--surface-subtle, var(--contrast));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.book-cover-wrap img {
    max-height: 100%;
    width: auto;
    border-radius: 3px;
    box-shadow: -4px 6px 14px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
    .book-showcase-card:hover .book-cover-wrap img {
        transform: perspective(600px) rotateY(-8deg) scale(1.04);
        box-shadow: -8px 10px 20px rgba(0, 0, 0, 0.24);
    }
}

.portfolio-showcase-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    margin-bottom: 0;
    height: 100%;
}

.mini-browser {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--bg);
    margin-bottom: 1rem;
}

.mini-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    background-color: var(--contrast);
    border-bottom: 1px solid var(--border);
}

.mini-browser-screen {
    height: 155px;
    overflow: hidden;
    background-color: var(--surface-subtle, var(--contrast));
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-browser-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

@media (hover: hover) and (pointer: fine) {
    .portfolio-showcase-card:hover .mini-browser-screen img,
    .browser-mockup:hover .browser-screen img {
        transform: scale(1.05);
    }
}

/* 스마트폰 전용 가로 스냅 캐러셀 (Horizontal Scroll Snap) */
@media (max-width: 768px) {
    .mobile-snap-scroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.9rem;
        padding-bottom: 0.6rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-snap-scroll > article {
        flex: 0 0 82%;
        max-width: 310px;
        scroll-snap-align: start;
    }
}

/* 6. 대문 10초 미니 견적 프리뷰 위젯 */
.mini-quote-widget {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04) 0%, rgba(var(--primary-light-rgb), 0.08) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 0;
}

.mini-quote-tabs {
    display: inline-flex;
    background-color: var(--contrast);
    padding: 0.25rem;
    border-radius: 999px;
    gap: 0.25rem;
}

.mini-quote-tab {
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s ease;
}

.mini-quote-tab:hover {
    color: var(--text);
    background: transparent;
}

.mini-quote-tab.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.mini-quote-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    min-height: 52px;
    transition: all 0.2s ease;
}

.mini-quote-chip.selected {
    border-color: var(--primary);
    background-color: var(--badge-primary-bg);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.14);
}

/* 7. 서브 페이지(견적 계산기·서점 버튼) 생동감 & 모바일 하단 고정 견적 바 */
.quote-summary-item {
    animation: quoteItemSlideIn 0.25s ease-out;
}

@keyframes quoteItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quote-mobile-bar {
    display: none;
}

@media (max-width: 768px) {
    .quote-mobile-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 950;
        background-color: var(--card-bg);
        border-top: 2px solid var(--primary);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
}

.btn-vendor-link {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .btn-vendor-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        filter: brightness(0.95);
    }
}