﻿/**
 * CGM Newsroom Theme Styles
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --radius-sm: 0.2rem;
    --radius-md: 0.4rem;
    --radius-lg: 0.6rem;
    --cgm-admin-bar-offset: 0px;
    --cgm-header-height: 88px;
    --cgm-fixed-header-offset: calc(var(--cgm-admin-bar-offset) + var(--cgm-header-height));
    --cgm-loader-top: 50vh;
    
    --color-background: hsl(0, 0%, 100%);
    --color-foreground: hsl(222, 47%, 11%);
    
    --color-card: hsl(0, 0%, 100%);
    --color-card-foreground: hsl(0, 0%, 10%);
    
    --color-primary: hsl(0, 0%, 15%);
    --color-primary-foreground: hsl(0, 0%, 98%);
    
    --color-secondary: hsl(0, 0%, 96%);
    --color-secondary-foreground: hsl(0, 0%, 20%);
    
    --color-muted: hsl(0, 0%, 96%);
    --color-muted-foreground: hsl(0, 0%, 45%);

    --color-accent: hsl(179, 69%, 41%);
    --color-accent-foreground: hsl(0, 0%, 10%);
    
    --color-border: hsl(0, 0%, 90%);
    
    --font-sans: 'Pretendard', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --gradient-primary: linear-gradient(to right, #2e1065, #0e7490, #2dd4bf);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-foreground);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#page {
    opacity: 1;
    transform: none;
}

#swup {
    position: relative;
    opacity: 1;
    transform: none;
    transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

#swup::before,
body::after {
    content: "";
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#swup::before {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    z-index: 15;
}

body::after {
    position: fixed;
    top: var(--cgm-loader-top);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    border: 4px solid rgba(32, 176, 174, 0.16);
    border-top-color: #20b0ae;
    border-right-color: rgba(32, 176, 174, 0.55);
    box-shadow: 0 0 0 10px rgba(32, 176, 174, 0.08), 0 12px 32px rgba(32, 176, 174, 0.22);
    animation: cgm-page-loader-spin 0.78s linear infinite, cgm-page-loader-pulse 1.25s ease-in-out infinite;
    z-index: 16;
}

html.is-changing #swup {
    transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

html.is-leaving #swup {
    opacity: 0;
    transform: translateY(18px);
}

html.is-rendering #swup {
    opacity: 0;
    transform: translateY(18px);
}

body.page-is-loading #swup {
    opacity: 0.35;
    transform: translateY(24px);
    pointer-events: none;
}

body.single.page-is-loading #swup,
body.single.page-is-ready #swup {
    opacity: 1;
    transform: none;
}

body.page-is-loading #swup::before,
body.page-is-loading::after {
    opacity: 1;
}

body.page-is-ready #swup {
    opacity: 1;
    transform: none;
}

body.single #page,
body.single.page-is-loading #page,
body.single.page-is-ready #page {
    opacity: 1;
    transform: none;
}

body.single.page-is-loading .site-header,
body.single.page-is-loading .floating-header,
body.single.page-is-loading .article-sidebar-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.home.page-is-loading #page,
body.home.page-is-ready #page,
body.category.page-is-loading #page,
body.category.page-is-ready #page,
body.search.page-is-loading #page,
body.search.page-is-ready #page {
    opacity: 1;
    transform: none;
}

@keyframes cgm-page-loader-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes cgm-page-loader-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 8px rgba(32, 176, 174, 0.06), 0 10px 24px rgba(32, 176, 174, 0.16);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(32, 176, 174, 0.12), 0 14px 36px rgba(32, 176, 174, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-is-loading::after {
        animation: none;
    }

    #page,
    body.page-is-loading #page,
    body.page-is-ready #page {
        transform: none;
    }

    #swup,
    body.page-is-loading #swup,
    body.page-is-ready #swup {
        transition: none;
        transform: none;
    }

}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.1em
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.34s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s ease;
    will-change: background-color, border-color, box-shadow, transform;
    transform: translateZ(0);
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: var(--cgm-reading-progress, 0%);
    height: 0;
    opacity: 0;
    background: var(--gradient-primary);
    transition: width 0.15s ease-out, opacity 0.2s ease;
    pointer-events: none;
}

.site-header {
    --cgm-header-height: 88px;
    --cgm-logo-size: 1.875rem;
    --cgm-logo-padding-y: 1rem;
    --cgm-logo-padding-x: 1rem;
}

body.home .site-header,
body.category .site-header,
body.search .site-header {
    position: fixed;
}

@media (min-width: 783px) {
    body.admin-bar .site-header {
        top: var(--cgm-admin-bar-offset, 0px);
    }
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--color-border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    transition: height 0.34s cubic-bezier(0.22, 1, 0.36, 1), padding 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: height;
    transform: translateZ(0);
}

.site-header .header-content {
    height: 88px;
}

.site-header.is-shrunk .header-content {
    height: 65px;
}

.site-header.is-shrunk {
    --cgm-header-height: 65px;
    --cgm-logo-size: 1.675rem;
    --cgm-logo-padding-y: 0.8rem;
    --cgm-logo-padding-x: 1rem;
}

.site-branding .site-logo {
    font-family: var(--font-serif);
    font-size: var(--cgm-logo-size);
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--color-foreground);
    transition: color 0.22s ease, font-size 0.34s cubic-bezier(0.22, 1, 0.36, 1), padding 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    padding: var(--cgm-logo-padding-y) var(--cgm-logo-padding-x);
}

.site-branding .site-logo:hover {
    color: var(--color-primary);
}

.main-navigation {
    display: none;
}

@media (min-width: 1024px) {
    .main-navigation {
        display: block;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.25rem 0 0.6rem;
    transition: color 0.2s ease;
}

.nav-menu li a:hover {
    color: var(--color-primary);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #20b0ae; /* solid highlight color */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-menu li a:hover::after {
    transform: scaleX(1);
}

/* highlight current menu item (category/archive/post) */
.nav-menu li.current-menu-item > a,
.nav-menu li.current-menu-ancestor > a,
.nav-menu li.current_page_item > a {
    color: #20b0ae; /* custom highlight color */
}

.nav-menu li.current-menu-item > a::after,
.nav-menu li.current-menu-ancestor > a::after,
.nav-menu li.current_page_item > a::after {
    transform: scaleX(1);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-toggle,
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    color: var(--color-foreground);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover,
.mobile-menu-toggle:hover {
    color: var(--color-primary);
}

.mobile-menu-toggle {
    display: block;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ============================================
   Search Modal
   ============================================ */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease;
}

.search-modal-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.search-modal-content {
    position: relative;
    width: 100%;
    max-width: 58rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.75rem;
    opacity: 0;
    transform: translateY(-28px);
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-modal.active .search-modal-overlay {
    opacity: 1;
}

.search-modal.active .search-modal-content {
    opacity: 1;
    transform: translateY(0);
}

.search-modal-close {
    position: absolute;
    top: calc(var(--cgm-admin-bar-offset, 0px) + 1rem);
    right: max(0.5rem, calc((100vw - 1320px) / 2 + 0.5rem));
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-foreground);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.25s ease, color 0.25s ease;
}

.search-modal-close::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.search-modal-close svg {
    width: 2rem;
    height: 2rem;
    stroke-width: 1.8;
    transition: transform 0.25s ease;
}

.search-modal-close:hover::before,
.search-modal-close:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

.search-modal-close:hover svg,
.search-modal-close:focus-visible svg {
    transform: scale(1.05);
}

.search-modal-close:focus-visible {
    outline: none;
}

@media (max-width: 767px) {
    .search-modal-close {
        top: calc(var(--cgm-admin-bar-offset, 0px) + 0.75rem);
        right: 1.25rem;
        width: 4rem;
        height: 4rem;
    }
}

.search-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(-24px);
    transition: opacity 0.45s ease 0.06s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.search-modal.active .search-form-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.search-form {
    position: relative;
    width: 100%;
    padding-bottom: 1.35rem;
    border-bottom: 2px solid #dde3ee;
}

.search-icon {
    position: absolute;
    left: 0;
    top: 50%;
    width: 2.2rem;
    height: 2.2rem;
    transform: translateY(-50%);
    color: #c7ced9;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.2rem 1rem 0.2rem 3.65rem;
    font-size: clamp(2.6rem, 5vw, 3.35rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.045em;
    color: var(--color-foreground);
    outline: none;
    transition: color 0.2s ease;
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}

@media (max-width: 767px) {
    .search-modal {
        padding: 1.35rem;
    }

    .search-modal-content {
        gap: 2rem;
    }

    .search-input {
        padding-left: 2.7rem;
        font-size: clamp(1.7rem, 8vw, 2.35rem);
    }

    .search-icon {
        width: 1.7rem;
        height: 1.7rem;
    }
}

.search-input:focus {
    color: var(--color-foreground);
}

.search-input::placeholder {
    font-size: 0.72em;
    color: #d7dde7;
    opacity: 1;
}

.search-suggestions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    width: 100%;
    padding-top: 0.2rem;
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
    .search-modal,
    .search-modal-overlay,
    .search-modal-content,
    .search-form-wrapper {
        transition: none;
    }

    .search-modal-content,
    .search-form-wrapper {
        transform: none;
    }
}

.suggestions-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #9ea9bd;
}

.suggestions-tags {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.98rem;
    font-weight: 500;
    color: #fff;
    background-color: #20b0ae;
    border-radius: 999px;
    transition: transform 0.24s ease, background-color 0.24s ease;
}

.suggestion-tag:hover {
    background-color: #189998;
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    background: linear-gradient(to bottom right, #2e1065, #0e7490, #2dd4bf);
    color: white;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

body.admin-bar .mobile-menu {
    top: var(--cgm-admin-bar-offset, 0px);
    height: calc(100dvh - var(--cgm-admin-bar-offset, 0px));
}

@media (max-width: 782px) {
    body.admin-bar .mobile-menu {
        top: var(--cgm-admin-bar-offset, 0px);
        height: calc(100dvh - var(--cgm-admin-bar-offset, 0px));
    }
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.32s ease;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    opacity: 0;
    transform: translateY(-42px);
    transition: opacity 0.38s ease, transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu.active .mobile-menu-content {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1023px) {
    .mobile-menu {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .mobile-menu-content {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
        padding: 1.75rem 1rem 2rem;
    }
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.25s ease, color 0.25s ease;
}

.mobile-menu-close::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.mobile-menu-close svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 1.8;
    transition: transform 0.25s ease;
}

.mobile-menu-close:hover::before,
.mobile-menu-close:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

.mobile-menu-close:hover svg,
.mobile-menu-close:focus-visible svg {
    transform: scale(1.05);
}

.mobile-menu-close:focus-visible {
    outline: none;
}

@media (max-width: 768px) {
    .mobile-menu-close {
        top: 1.25rem;
        right: 1.25rem;
        width: 4rem;
        height: 4rem;
    }
}

.mobile-navigation {
    margin-top: 2rem;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-list > li {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.36s ease, transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.active .mobile-menu-list > li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu-list > li:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(2) { transition-delay: 0.13s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(4) { transition-delay: 0.23s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(5) { transition-delay: 0.28s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(6) { transition-delay: 0.33s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(7) { transition-delay: 0.38s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(8) { transition-delay: 0.43s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(9) { transition-delay: 0.48s; }
.mobile-menu.active .mobile-menu-list > li:nth-child(10) { transition-delay: 0.53s; }

.mobile-menu-list li a {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
    transition: opacity 0.2s ease;
}

.mobile-menu-list li a:hover {
    opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu-content,
    .mobile-menu-list > li {
        transition: none;
    }

    .mobile-menu-content,
    .mobile-menu-list > li {
        transform: none;
    }
}

/* ============================================
   Site Main
   ============================================ */




/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: calc(var(--cgm-fixed-header-offset, 88px) + 1rem) 0 2rem;
    transform: translateZ(0);
    isolation: isolate;
}

body.admin-bar.home .hero-section {
    padding-top: calc(var(--cgm-fixed-header-offset, 88px) + 1rem);
}

.scroll-reveal-ready {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.7s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.scroll-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal-ready,
    .scroll-reveal-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.hero-container {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
    contain: layout paint;
}

.hero-slider {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 2.15 / 1;
    background-color: black;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    backface-visibility: hidden;
    isolation: isolate;
    contain: layout paint;
}

@media (max-width: 1279px) {
    .hero-slider {
        aspect-ratio: 3 / 2;
    }
}

@media (max-width: 767px) {
    .hero-slider {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 1023px) {
    .site-header {
        --cgm-header-height: 80px;
        --cgm-logo-size: 1.78rem;
        --cgm-logo-padding-y: 0.9rem;
        --cgm-logo-padding-x: 0.85rem;
    }

    .site-header.is-compact {
        --cgm-header-height: 64px;
        --cgm-logo-size: 1.675rem;
        --cgm-logo-padding-y: 0.72rem;
        --cgm-logo-padding-x: 0.8rem;
    }

    body.home .site-header,
    body.category .site-header,
    body.search .site-header,
    body.single .site-header {
        background-color: rgba(255, 255, 255, 0.96);
        border-bottom-color: var(--color-border);
        box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    }

    body.home .header-content,
    body.category .header-content,
    body.search .header-content,
    body.single .header-content {
        height: 80px;
    }

    .site-header.is-compact .header-content {
        height: 64px;
    }

    .site-header.is-shrunk .header-content,
    .site-header .header-content {
        height: 80px;
    }

    body.single .site-header::after {
        height: 0;
        opacity: 0;
    }

}

@media (max-width: 767px) {
    .hero-slider {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 430px) and (max-height: 740px) {
    .site-header {
        --cgm-header-height: 74px;
        --cgm-logo-size: 1.45rem;
        --cgm-logo-padding-y: 0.75rem;
        --cgm-logo-padding-x: 0.5rem;
    }

    .site-header.is-compact {
        --cgm-header-height: 58px;
        --cgm-logo-size: 1.3rem;
        --cgm-logo-padding-y: 0.58rem;
        --cgm-logo-padding-x: 0.45rem;
    }

    .site-header .header-content,
    .header-content {
        height: 74px;
    }

    .site-header.is-shrunk .header-content {
        height: 58px;
    }

    .site-header.is-compact .header-content {
        height: 58px;
    }

    body.single .site-header::after {
        height: 0;
        opacity: 0;
    }

    body.single.has-floating-header .site-header {
        transform: translateY(-100%);
    }

    .site-header.is-shrunk {
        --cgm-header-height: 58px;
        --cgm-logo-size: 1.3rem;
        --cgm-logo-padding-y: 0.58rem;
        --cgm-logo-padding-x: 0.45rem;
    }

    .site-branding .site-logo {
        line-height: 1.05;
        letter-spacing: -0.04em;
    }

    .search-toggle,
    .mobile-menu-toggle {
        padding: 0.75rem;
    }

    .hero-content {
        padding: 1.25rem 1.6rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 0.6;
        letter-spacing: -0.03em;
        margin-bottom: 1rem;
        max-width: 12rem;
    }

    .hero-subtitle {
        font-size: 0.98rem;
        line-height: 1.45;
        margin-bottom: 1.1rem;
        max-width: 14rem;
    }

    .hero-button {
        padding: 0.52rem 0.72rem;
        font-size: 0.62rem;
        gap: 0.35rem;
    }

    .hero-controls {
        left: 1.5rem;
        bottom: 1.5rem;
        gap: 0.75rem;
        font-size: 0.68rem;
    }

    .hero-progress {
        width: 4rem;
    }

}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: var(--cgm-admin-bar-offset, 0px);
    }

    body.home .site-header,
    body.category .site-header,
    body.search .site-header {
        top: var(--cgm-admin-bar-offset, 0px);
    }

}

@media (max-width: 430px) and (max-height: 740px) {
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    position: absolute;
    inset: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    opacity: 0.92;
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 4rem;
    z-index: 10;
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.68s ease, transform 0.88s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-slide.active .hero-content {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.12s;
}

.hero-slide.active .hero-overlay {
    opacity: 1;
}

@media (max-width: 1279px) {
    .hero-content {
        padding: 2rem;
    }
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    line-height: 0.6;
    white-space: pre-line;
}

@media (max-width: 767px) {
    .hero-title {
        font-size: clamp(1.9rem, 7.4vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: 1rem;
        max-width: 12rem;
    }

    .hero-title br {
        display: none;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 1.56rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 2.56rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 36rem;
    font-weight: 300;
    white-space: pre-line;
}

@media (max-width: 767px) {
    .hero-subtitle {
        font-size: clamp(0.95rem, 3.9vw, 1.1rem);
        line-height: 1.45;
        margin-bottom: 1.25rem;
        max-width: 15rem;
    }

    .hero-subtitle br {
        display: none;
    }
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 0;
    font-size: 0.875rem;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.28s ease, border-color 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
    width: fit-content;
}

.hero-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

@media (min-width: 768px) {
    .hero-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

.hero-button:hover {
    color: black;
    border-color: rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.hero-button:hover::before,
.hero-button:focus-visible::before {
    transform: scaleX(1);
}

.hero-controls {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    z-index: 20;
}

@media (min-width: 1024px) {
    .hero-controls {
        left: 5rem;
    }
}

.hero-progress {
    width: 8rem;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

@keyframes progressBar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.hero-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: white;
    width: 0%;
    transition: width 0.05s linear;
}

.hero-play-pause {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.22s ease, transform 0.22s ease;
}

.hero-play-pause:hover {
    color: white;
    transform: translateY(-1px);
}

.hero-play-pause .icon-pause,
.hero-play-pause .icon-play {
    display: none;
}

.hero-play-pause.playing .icon-pause {
    display: block;
}

.hero-play-pause:not(.playing) .icon-play {
    display: block;
}

.hero-navigation {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: none;
    gap: 0.5rem;
    z-index: 20;
}

@media (min-width: 768px) {
    .hero-navigation {
        display: flex;
    }
}

.hero-prev,
.hero-next {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.24s ease, transform 0.24s ease;
}

.hero-prev:hover,
.hero-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* ============================================
   Section Styles
   ============================================ */
.section-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 4rem 1rem;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;    
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-foreground);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}

.section-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1rem;
    color: var(--color-muted-foreground);
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--color-primary);
}

.section-link svg {
    transition: transform 0.2s ease;
}

.section-link:hover svg {
    transform: translateX(2px);
}

/* ============================================
   News Cards
   ============================================ */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: var(--color-muted);
}

.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.news-card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.news-card:hover .news-card-overlay {
    background-color: transparent;
}

.news-card-content {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.news-card-category {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-card-date {
    font-size: 0.9rem;
    color: var(--color-muted-foreground);
}

.news-card-title {
    font-weight: 500;
    color: var(--color-foreground);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.title-hover-line {
    display: inline;
    padding-bottom: 0.08em;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size 0.3s ease;
}

.news-card:hover .news-card-title {
    color: rgba(0, 0, 0, 0.8);
}

.news-card-link:hover .news-card-title .title-hover-line,
.news-card-link:focus-visible .news-card-title .title-hover-line,
.people-card-link:hover .people-card-title .title-hover-line,
.people-card-link:focus-visible .people-card-title .title-hover-line,
.related-content-item:hover .related-item-title .title-hover-line,
.related-content-item:focus-within .related-item-title .title-hover-line {
    text-decoration-color: transparent;
}

.news-card-link:hover .news-card-title .title-hover-line,
.news-card-link:focus-visible .news-card-title .title-hover-line,
.people-card-link:hover .people-card-title .title-hover-line,
.people-card-link:focus-visible .people-card-title .title-hover-line,
.related-content-item:hover .related-item-title .title-hover-line,
.related-content-item:focus-within .related-item-title .title-hover-line {
    background-size: 100% 2px;
}

.news-card-excerpt {
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-section .news-card-excerpt,
.sketch-section .news-card-excerpt,
.factcheck-section .news-card-excerpt {
    display: none;
}

/* ============================================
   Carousel
   ============================================ */
/* 슬라이더 공통 설정 */
.swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 중요: 슬라이드 너비 제한 제거 (Swiper JS가 계산하도록 맡김) */
.swiper-slide {
    width: auto; 
    height: auto;
}

/* 상단 컨트롤 박스 위치 (더보기 왼쪽) */
.carousel-controls {
    display: flex;
    gap: 5px; /* 버튼 사이 간격 */
    justify-content: right;
}

/* 반응형 설정: 모바일에서는 버튼 위치나 간격을 조정 */
@media (max-width: 767px) {
    .section-header {
        margin-bottom: 1.5rem; /* 모바일에서는 간격을 조금 좁힘 */
    }
    
    .carousel-controls {
        gap: 5px; /* 모바일에서는 버튼 사이도 좁게 */
    }
}

/* 원형 버튼 공통 디자인 */
.swiper-button-prev, .swiper-button-next {
    position: relative !important; /* absolute 해제 */
    width: 34px !important;
    height: 34px !important;
    border-radius: 50%;
    border: 1px solid #e1e4e8;
    background: #fff;
    margin: 0;
    top: auto !important;
    right: 0 !important;
    left: 0 !important;
}

.swiper-button-prev:after, .swiper-button-next:after { display: none; }

/* 화살표 그리기 */
.swiper-button-prev:before, .swiper-button-next:before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 8px; height: 8px;
    border-top: 2px solid #aebac7;
    border-right: 2px solid #aebac7;
}
.swiper-button-prev:before { transform: translate(-30%, -50%) rotate(-135deg); }
.swiper-button-next:before { transform: translate(-70%, -50%) rotate(45deg); }

/* 게시물이 1개일 때 자동 숨김 */
.swiper-button-lock { display: none !important; }

/* ============================================
   Sketch Cards
   ============================================ */

.sketch-section {
    background-color: #fcfcfd;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}


/* ============================================
   People Cards
   ============================================ */

.people-section {
    padding: 2rem 0 2.5rem;
    background: #fcfcfd;
}

.people-section .section-container {
    max-width: 1320px;
}

.people-section-header {
    align-items: center;
    padding: 0 2px 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #d2d6db;
}

.people-section-title {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-foreground);
}

.people-section-link {
    font-size: 1rem;
    color: var(--color-muted-foreground);
}

.people-section-link:hover {
    color: var(--color-primary);
}

.people-swiper {
    overflow: visible;
    padding-bottom: 0.25rem;
    background: transparent;
}

.people-mobile-navigation {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.people-mobile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d8dde3;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #9aa4b2;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.people-mobile-button:hover {
    border-color: #bfc8d3;
    color: #475569;
    background: #fff;
}

.people-mobile-button:active {
    transform: translateY(1px);
}

.people-mobile-button.swiper-button-disabled {
    opacity: 0.45;
    cursor: default;
}

.people-slide {
    height: auto;
    border-radius: 16px;
}

.people-grid-mode {
    overflow: visible;
}

.people-grid-mode .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    transform: none !important;
}

.people-grid-mode .people-slide {
    width: 100% !important;
    margin: 0 !important;
}

.people-card {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(15, 23, 42, 0.08);
}

.people-card-link {
    position: relative;
    display: block;
    min-height: 540px;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    background: #111827;
    isolation: isolate;
}

.people-card-link:hover {
    color: #fff;
}

.people-card-media,
.people-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.people-card-image {
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.7s ease;
}

.people-card-image-fallback {
    background:
        radial-gradient(circle at top, rgba(255, 214, 102, 0.65), transparent 32%),
        linear-gradient(145deg, #7fb0aa 0%, #d5a25c 48%, #375b8f 100%);
}

.people-card-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.18) 30%, rgba(15, 23, 42, 0.82) 100%);
}

.people-card-link:hover .people-card-image {
    transform: scale(1.06);
}

.people-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 540px;
    padding: 22px 20px 18px;
}

.people-card-label {
    align-self: flex-start;
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.people-card-copy {
    margin-top: auto;
    transform: translateY(0);
    transition: transform 0.35s ease;
}

.people-card-title {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: clamp(1.55rem, 2vw, 1rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.people-card-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.45;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.people-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    transform: translateY(0);
    transition: transform 0.35s ease, border-color 0.25s ease;
}

.people-card-cta {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.people-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.people-card-arrow svg {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.people-card-link:hover .people-card-arrow {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

.people-card-link:hover .people-card-copy,
.people-card-link:hover .people-card-footer {
    transform: translateY(-10px);
}

.people-card-link:hover .people-card-arrow svg {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 1023px) {
    .people-card-link,
    .people-card-content {
        min-height: 500px;
    }
}

@media (max-width: 767px) {
    .people-section {
        padding: 1.5rem 0 2rem;
    }

    .people-section-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.85rem;
    }

    .people-section-title {
        font-size: 1.4rem;
    }

    .people-section-link {
        font-size: 0.88rem;
    }

    .people-mobile-navigation {
        display: flex;
    }

    .people-card-link,
    .people-card-content {
        min-height: 440px;
    }

    .people-card-content {
        padding: 18px 16px 16px;
    }

    .people-card-title {
        font-size: 1.75rem;
    }

    .people-card-subtitle {
        font-size: 0.92rem;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .people-mobile-navigation {
        display: none;
    }

    .people-card-link,
    .people-card-content {
        min-height: 520px;
    }

    .people-card-content {
        padding: 20px 18px 16px;
    }

    .people-card-title {
        font-size: 1.6rem;
    }

    .people-card-subtitle {
        font-size: 0.95rem;
    }
}


/* ============================================
   Single Post / Article
   ============================================ */
.single-post {
    margin: 0 auto;
    padding-top: calc(var(--cgm-fixed-header-offset, 88px) - 18px);
}

body.admin-bar .single-post {
    padding-top: calc(var(--cgm-fixed-header-offset, 88px) - 52px);
}

.article-header {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto 3rem;
    padding: 0.15rem 1rem 0
}

.article-featured-image {
    width: 100%;
    aspect-ratio: 21 / 9;
    background-color: var(--color-muted);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    word-break: keep-all;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .article-title {
        font-size: 2.36rem;
    }
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
}

.article-divider {
    width: 0.25rem;
    height: 0.25rem;
    background-color: var(--color-muted-foreground);
    border-radius: 50%;
    opacity: 0.3;
}

.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-ai-summary-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.article-ai-summary-trigger:hover,
.article-ai-summary-trigger.active {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-ai-summary-trigger:disabled {
    opacity: 0.7;
    cursor: wait;
}

.article-ai-summary-trigger-icon {
    font-size: 0.875rem;
}

.article-ai-summary-trigger {
    display: none;
}

.article-ai-summary-panel {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5.5rem 1rem 2rem;
}

.article-ai-summary-panel[hidden] {
    display: none;
}

.article-ai-summary-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.18);
    cursor: pointer;
}

.article-ai-summary-inner {
    position: relative;
    top: 4%;
    z-index: 1;
    width: min(100%, 700px);
    padding: 1.9rem 2rem 1.8rem;
    border: 1px solid rgba(17, 24, 39, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.article-ai-summary-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.article-ai-summary-status,
.article-ai-summary-text {
    margin: 0;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #2f2f2f;
    word-break: keep-all;
}

.article-ai-summary-status {
    color: var(--color-muted-foreground);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.article-ai-summary-status[hidden] {
    display: none;
}

.article-ai-summary-loading-dots {
    display: inline-flex;
    align-items: center;
    min-width: 1.2em;
}

.article-ai-summary-loading-dots[hidden] {
    display: none;
}

.article-ai-summary-loading-dots span {
    opacity: 0.15;
    animation: ai-summary-dot-pulse 1.2s infinite ease-in-out;
}

.article-ai-summary-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.article-ai-summary-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ai-summary-dot-pulse {
    0%, 80%, 100% {
        opacity: 0.15;
    }

    40% {
        opacity: 1;
    }
}

body.ai-summary-open {
    overflow: hidden;
}

.article-content {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-foreground);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.article-body figure {
    margin: 3rem 0;
}

.article-body figure img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
}

.article-body figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-muted-foreground);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 4rem 0 3rem;
}

.article-tag {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-muted-foreground);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.article-tag:hover {
    color: var(--color-primary);
}

.article-footer {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 5rem;
    border-top: 1px solid var(--color-border);
}

.back-to-list-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    color: var(--color-foreground);
    overflow: hidden;
    isolation: isolate;
    transition: color 0.28s ease, border-color 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.back-to-list-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: #222;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.back-to-list-btn:hover,
.back-to-list-btn:focus-visible {
    color: #fff;
    border-color: #222;
}

.back-to-list-btn:hover::before,
.back-to-list-btn:focus-visible::before {
    transform: scaleX(1);
}

/* Floating Header */
.floating-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

body.admin-bar .floating-header {
    top: 32px;
}

.floating-header.visible {
    transform: translateY(0);
}

html.is-changing .floating-header,
html.is-leaving .floating-header,
html.is-rendering .floating-header {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%) !important;
    transition: none !important;
}

@media (max-width: 782px) {
    body.admin-bar .floating-header {
        top: 46px;
    }
}

@media (max-width: 1023px) {
    .floating-header {
        top: var(--cgm-admin-bar-offset, 0px);
        z-index: 50;
        display: block;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .floating-header {
        display: none;
    }

    body.single.has-floating-header .site-header {
        transform: none !important;
    }
}

.floating-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.floating-title {
    font-size: 0.875rem;
    font-weight: 900;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding-right: 1rem;
    flex: 1;
    min-width: 0;
    margin: 0;
}

@media (min-width: 768px) {
    .floating-title {
        font-size: 1rem;
    }
}

.floating-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.floating-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    font-weight: 600;
}

.floating-meta .divider {
    width: 1px;
    height: 1.1rem;
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
}

.ai-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    padding: 0.58rem 1rem 0.58rem 0.85rem;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ai-summary-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
}

.ai-summary-badge:hover,
.ai-summary-badge.active {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ai-summary-badge.is-loading {
    opacity: 0.7;
}

@media (min-width: 768px) {
    .floating-meta {
        font-size: 0.875rem;
    }
}

@media (max-width: 767px) {
    .single-post {
        padding-top: calc(var(--cgm-fixed-header-offset, 74px) - 10px);
    }

    body.admin-bar .single-post {
        padding-top: calc(var(--cgm-fixed-header-offset, 74px) - 36px);
    }

    .article-meta {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .article-ai-summary-panel {
        padding: 5rem 0.9rem 1.5rem;
    }

    .article-ai-summary-inner {
        padding: 1.6rem 1rem;
        border-radius: 14px;
    }

    .article-ai-summary-status,
    .article-ai-summary-text {
        font-size: 1rem;
        line-height: 1.75;
    }

    .floating-meta .reading-time {
        display: flex;
        font-size: 0.9rem;
    }

    .floating-meta .divider,
    .floating-meta .ai-summary-badge {
        display: none;
    }
}

.floating-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-primary);
    transition: width 0.15s ease-out;
    width: 0%;
}

/* Article Sidebar Menu */
.article-sidebar-menu {
    position: fixed;
    right: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

body.search .archive-sidebar-menu,
body.tag .archive-sidebar-menu {
    display: none !important;
}

@media (min-width: 1280px) {
    body.home .archive-sidebar-menu,
    body.category .archive-sidebar-menu {
        position: fixed;
        top: 50%;
        right: 2.25rem;
        transform: translateY(-50%);
    }
}

.sidebar-menu-mobile-panel {
    display: contents;
}

.sidebar-menu-mobile-toggle {
    display: none;
}

@media (min-width: 1280px) {
    .sidebar-menu-mobile-toggle {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .article-sidebar-menu {
        display: flex;
    }
}

.sidebar-menu-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 0.45rem;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

.sidebar-menu-btn {
    background: none;
    border: none;
    color: var(--color-foreground);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-menu-btn svg {
    display: block;
    flex-shrink: 0;
}

.sidebar-menu-btn[data-tooltip] {
    position: relative;
}

.sidebar-menu-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.sidebar-menu-btn[data-tooltip]:hover::after,
.sidebar-menu-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

#copy-link-btn .icon-check {
    display: none;
}

#copy-link-btn.copied {
    color: #16a34a;
}

.sidebar-menu-btn:hover {
    background-color: var(--color-muted);
    color: var(--color-primary);
}

.sidebar-menu-ai-group {
    background: rgba(255, 255, 255, 0.8);
}

.sidebar-menu-btn-ai {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(46, 16, 101, 0.28);
}

.sidebar-menu-ai-label {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.sidebar-menu-btn-ai:hover,
.sidebar-menu-btn-ai.active,
.sidebar-menu-btn-ai.is-loading {
    background: var(--gradient-primary);
    color: #ffffff;
}

.sidebar-menu-btn-ai:hover,
.sidebar-menu-btn-ai.active {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(14, 116, 144, 0.24);
}

.sidebar-menu-btn-ai.is-loading {
    opacity: 0.82;
}

.sidebar-menu-mobile-toggle .icon-close {
    display: none;
}

.font-size-menu,
.share-menu {
    position: absolute;
    right: 3.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    background-color: #1a1a1a;
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    gap: 1.5rem;
    min-width: 14.25rem;
    justify-content: space-between;
    pointer-events: auto;
}

.font-size-menu.active,
.share-menu.active {
    display: flex;
}

.font-size-menu::after,
.share-menu::after {
    content: '';
    position: absolute;
    right: -0.375rem;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 0.75rem;
    height: 0.75rem;
    background-color: #1a1a1a;
}

@media (max-width: 1279px) {
    body.single .article-sidebar-menu {
        display: flex;
        right: 1rem;
        bottom: 1rem;
        top: auto;
        transform: none;
        align-items: flex-end;
        gap: 0.7rem;
        z-index: 60;
    }

    body.single .sidebar-menu-mobile-panel {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.45rem;
        border-radius: 9999px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--color-border);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(10px) scale(0.96);
        transform-origin: bottom center;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    body.single .sidebar-menu-mobile-panel .sidebar-menu-group {
        padding: 0;
        gap: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
    }

    body.single .sidebar-menu-mobile-panel .sidebar-menu-btn {
        opacity: 0;
        transform: translateY(8px) scale(0.94);
        transition: opacity 0.24s ease, transform 0.24s ease, background-color 0.2s ease, color 0.2s ease;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-btn {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-group:nth-child(1) .sidebar-menu-btn {
        transition-delay: 0.02s;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-group:nth-child(2) .sidebar-menu-btn {
        transition-delay: 0.06s;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-group:nth-child(3) .sidebar-menu-btn {
        transition-delay: 0.1s;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-group:nth-child(4) .sidebar-menu-btn {
        transition-delay: 0.14s;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-panel .sidebar-menu-group:nth-child(5) .sidebar-menu-btn {
        transition-delay: 0.18s;
    }

    body.single .sidebar-menu-mobile-toggle {
        display: flex;
        width: 3.5rem;
        height: 3.5rem;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid var(--color-border);
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
        pointer-events: auto;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-toggle .icon-kebab {
        display: none;
    }

    body.single .article-sidebar-menu.mobile-open .sidebar-menu-mobile-toggle .icon-close {
        display: block;
    }

    body.single .sidebar-menu-scroll-group {
        pointer-events: auto;
    }

    body.single .sidebar-menu-print-group {
        display: none;
    }

    body.single .font-size-menu,
    body.single .share-menu {
        right: 3.75rem;
    }

    .sidebar-menu-btn[data-tooltip]::after {
        display: none;
    }
}

@media (max-width: 767px) {
    body.single .article-sidebar-menu {
        right: 0.75rem;
        bottom: 0.75rem;
        gap: 0.55rem;
    }

    body.single .sidebar-menu-mobile-toggle {
        width: 2.6rem;
        height: 2.6rem;
    }

    body.single .sidebar-menu-mobile-panel {
        gap: 0.45rem;
        padding: 0.15rem;
    }

    body.single .sidebar-menu-scroll-group {
        padding: 0.15rem;
        gap: 0.45rem;
    }

    body.single .sidebar-menu-mobile-panel .sidebar-menu-btn,
    body.single .sidebar-menu-scroll-group .sidebar-menu-btn {
        width: 2.2rem;
        height: 2.2rem;
    }

    body.single .sidebar-menu-mobile-panel .sidebar-menu-btn svg,
    body.single .sidebar-menu-scroll-group .sidebar-menu-btn svg,
    body.single .sidebar-menu-mobile-toggle svg {
        width: 18px;
        height: 18px;
    }
}

.font-size-option,
.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

.share-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

.share-icon > svg {
    display: block;
    margin: 0 auto 5px;
    width: 30px;
    height: 30px;
}


.font-preview, 
.share-preview {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background-color: #2a2a2a;
    color: #9ca3af;
}

.share-icon:hover .share-preview {
    color: white;
}

.font-preview.normal {
    font-size: 0.875rem;
}

.font-preview.large {
    font-size: 1.125rem;
}

.font-preview.xlarge {
    font-size: 1.25rem;
}

.font-size-option.active .font-preview,
.font-size-option:hover .font-preview {
    background-color: white;
    color: black;
    border-color: white;
}

.font-label,
.share-label {
    font-size: 0.9rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.font-size-option.active .font-label,
.font-size-option:hover .font-label,
.share-icon:hover .share-label {
    color: white;
    font-weight: 500;
}

.article-body.font-normal {
    font-size: 1rem;
}

.article-body.font-large {
    font-size: 1.125rem;
}

.article-body.font-xlarge {
    font-size: 1.25rem;
}

/* Related Content Section */
.related-content-section {
    width: 100%;
    background: var(--gradient-primary);
    padding: 5rem 0;
}

.related-content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.related-content-tabs {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.related-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.125rem;
    font-weight: 700;
    padding-bottom: 1rem;
    margin-bottom: -1.125rem;
    cursor: pointer;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.related-tab.active,
.related-tab:hover {
    color: white;
    border-bottom-color: white;
}

.related-content-grid {
    --cgm-related-card-min-height: 6rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: calc((var(--cgm-related-card-min-height) * 4) + (1.5rem * 3));
}

.related-content-grid .no-posts {
    grid-column: 1 / -1;
}

.related-content-panels {
    position: relative;
}

.related-content-panel {
    opacity: 0;
    transform: translateY(18px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.38s;
}

.related-content-panel.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.related-content-panel.is-exiting {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    visibility: visible;
    pointer-events: none;
}

@media (min-width: 768px) {
    .related-content-grid {
        grid-template-columns: repeat(2, 1fr);
        min-height: calc((var(--cgm-related-card-min-height) * 2) + 1.5rem);
    }
}

.related-content-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.related-content-item:hover {
    border-color: rgba(32, 176, 174, 1);
}

.related-content-item > a {
    display: flex;
    gap: 20px;
    align-items: center;
}

.related-item-image {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    background-color: var(--color-muted);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.related-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-content-item:hover .related-item-image img {
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .related-content-panel,
    .related-content-panel.active,
    .related-content-panel.is-exiting {
        transition: none;
        transform: none;
    }
}

.related-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.related-item-category {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.related-item-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.related-content-item:hover .related-item-title {
    opacity: 0.8;
}

.related-item-excerpt {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-content-grid .crp_related {
    width: 100%;
    margin: 0;
}

.related-content-grid .crp_related > h2 {
    display: none;
}

.related-content-grid .crp_related ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: inherit;
}

@media (min-width: 768px) {
    .related-content-grid .crp_related ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-content-grid .crp_related li {
    list-style: none;
    margin: 0;
    padding: 0;
    transition: all 0.2s ease;
}

.related-content-grid .crp_related li:hover {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.related-content-grid .crp_related li > a,
.related-content-grid .crp_related li > a.crp_link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
    color: inherit;
    text-decoration: none !important;
    box-shadow: none !important;
    border-radius: 0;
    transform: none !important;
}

.related-content-grid .crp_related .crp_thumb,
.related-content-grid .crp_related figure {
    width: 6rem;
    height: 6rem;
    margin: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: var(--color-muted);
}

.related-content-grid .crp_related img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-content-grid .crp_related li:hover img {
    transform: scale(1.05);
}

.related-content-grid .crp_related .crp_title {
    display: block;
    margin: 0 0 0.5rem;
    color: white !important;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: opacity 0.2s ease;
}

.related-content-grid .crp_related li:hover .crp_title {
    opacity: 0.8;
}

.related-content-grid .crp_related .crp_author,
.related-content-grid .crp_related .crp_date,
.related-content-grid .crp_related .crp_excerpt {
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

.related-content-grid .crp_related .crp_excerpt {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.related-content-grid .crp_related .crp_author a {
    color: inherit;
}

/* ============================================
   Archive / Category Pages
   ============================================ */
.archive-page,
.category-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2.5rem 1rem 5rem;
}

.archive-header,
.category-header {
    text-align: center;
}

.archive-title,
.category-title {
    font-size: 2.56rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2.56rem;
}

.search-page .category-title {
    margin-bottom: 1rem;
}

.search-summary {
    margin: 0;
    font-size: 1rem;
    color: var(--color-muted-foreground);
}

.search-summary-keyword {
    color: #20b0ae;
    font-weight: 800;
}

.search-summary-count {
    color: #d9485f;
    font-weight: 800;
}

.subpage-topbar {
    padding-top: calc(var(--cgm-fixed-header-offset, 88px) + 1rem);
    background: var(--color-background);
}

.subpage-topbar[hidden] {
    display: none;
}

.subpage-topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2.5rem 1rem 1.75rem;
    text-align: center;
}

.subpage-topbar-title {
    font-size: 2.56rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.subpage-topbar-summary {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--color-muted-foreground);
}

.subpage-topbar-tabs {
    margin-top: 1.5rem;
}

.subpage-topbar-tabs:empty {
    display: none;
}

.subpage-topbar-tabs .category-tab-container {
    padding: 20px 0 10px;
    margin-bottom: 0;
}

.subpage-transition-meta {
    display: none;
}

/* 탭 컨테이너 레이아웃 */
.category-tab-container {
    text-align: center;
    margin-bottom: 50px;
}

.category-tabs {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 기본 버튼 스타일 (보도자료, 언론보도) */
.tab-item {
    display: inline-block;
    position: relative;
    padding: 10px 25px;
    border: none;
    border-radius: 50px;         /* 알약 모양 */
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    background-color: #f3f4f6;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.tab-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: #222;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

/* 활성화된 버튼 스타일 (ALL) */
.tab-item.active {
    background-color: #222;      /* 검정 배경 */
    color: #fff;                 /* 흰색 글자 */
}

/* 마우스 호버 효과 */
.tab-item:not(.active):hover,
.tab-item:not(.active):focus-visible {
    color: #fff;
}

.tab-item:not(.active):hover::before,
.tab-item:not(.active):focus-visible::before {
    transform: scaleX(1);
}

.tab-item.active:hover {
    background-color: #000;
}

.archive-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    background-color: var(--color-background);
    color: var(--color-foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 5rem;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
    border-color: var(--color-primary);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem 2rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.archive-pagination {
    margin-top: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
}

.archive-pagination-desktop,
.archive-pagination-compact {
    align-items: center;
    justify-content: center;
}

.archive-pagination-compact {
    display: none;
    gap: 1rem;
}

/* center message when no posts are found */
.no-posts {
    width: 100%;
    text-align: center;
    padding: 3rem 0;
}

/* optional helper class if additional centering of container is needed */
.no-posts.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    color:#d1d1d1;
}

.archive-pagination .page-numbers,
.archive-pagination .page-numbers span {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.4rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background-color: transparent;
    color: var(--color-muted-foreground);    
}

.archive-pagination .page-numbers:hover {
    color: var(--color-accent);
}

.archive-pagination .page-numbers.current {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.archive-pagination .prev,
.archive-pagination .next {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    color: #7a7f86;
    line-height: 1;
    margin: 0 10px;
}

.archive-pagination .prev:hover,
.archive-pagination .next:hover {
    background-color: #f8f8f8;
    color: var(--color-foreground);
}

.archive-pagination .prev.is-disabled,
.archive-pagination .next.is-disabled {
    background-color: var(--color-background);
    border-color: var(--color-border);
    color: #c3c7cd;
    cursor: default;
    pointer-events: none;
}

.archive-pagination .nav-links {
    display: flex;
}

.archive-pagination .archive-pagination-compact {
    display: none;
}

.archive-pagination-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-muted-foreground);
}

.archive-pagination-status .current-page {
    color: var(--color-accent);
}

.archive-pagination-status .status-divider,
.archive-pagination-status .total-pages {
    color: var(--color-muted-foreground);
}

@media (max-width: 1023px) {
    .archive-pagination {
        margin-top: 4rem;
    }

    .archive-pagination-desktop {
        display: none !important;
    }

    .archive-pagination .archive-pagination-compact {
        display: flex;
    }

    .archive-pagination .compact-nav-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: auto;
        width: auto;
        height: 2.5rem;
        margin: 0;
        padding: 0 0.75rem;
        border: 1px solid var(--color-border);
        border-radius: 9999px;
        background-color: var(--color-background);
        color: #7a7f86;
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1;
    }

    .archive-pagination .compact-nav-button:hover {
        background-color: #f8f8f8;
        color: var(--color-foreground);
    }

    .archive-pagination .compact-nav-button svg {
        display: block;
    }

    .archive-pagination .compact-nav-button.is-disabled {
        background-color: var(--color-background);
        border-color: var(--color-border);
        color: #c3c7cd;
        cursor: default;
        pointer-events: none;
    }

    .archive-pagination .page-numbers.current {
        width: auto;
        min-width: 0;
        height: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        color: var(--color-accent);
    }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: 0;
}

@media (max-width: 767px) {
    body.home .site-footer {
        position: relative;
        border-top-color: rgba(15, 23, 42, 0.12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        align-items: center;
    }
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #3f3f46;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: #52525b;
    color: white;
}

.footer-site-select {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    min-width: 12.5rem;
    color: var(--color-muted-foreground);
    outline: none;
    transition: border-color 0.2s ease;
}

.footer-site-select:focus {
    border-color: var(--color-primary);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-links-bottom {
    display: flex;
    gap: 1.5rem;
    font-size: 1rem;
}

.footer-links-bottom a {
    color: var(--color-muted-foreground);
    transition: color 0.2s ease;
}

.footer-links-bottom a:hover {
    color: var(--color-foreground);
}

.footer-links-bottom a:first-of-type {
    font-weight: 700;
}

.footer-copyright {
    font-size: 1rem;
    color: var(--color-muted-foreground);
}

/* ============================================
   Utilities
   ============================================ */
.no-posts {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-muted-foreground);
}

.text-balance {
    text-wrap: balance;
}

/* ============================================
   404 Error Page
   ============================================ */
.error-404-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}

.error-404-container {
    max-width: 600px;
    text-align: center;
}

.error-404-title {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.error-404-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-foreground);
}

.error-404-message {
    font-size: 1.125rem;
    color: var(--color-muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-404-button {
    padding: 0.75rem 2rem;
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.error-404-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
}

.error-404-button-outline {
    background-color: transparent;
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
}

.error-404-button-outline:hover {
    background-color: var(--color-muted);
    border-color: var(--color-border);
}

/* ============================================
   Print Styles
   .article-footer, .related-content-section 나오지 않게 처리
   ============================================ */
@media print {
    @page {
        margin: 12mm 14mm 16mm;
    }

    .site-header,
    .site-footer,
    .article-sidebar-menu,
    .floating-header,
    .hero-navigation,
    .hero-controls,
    .carousel-controls,
    .search-modal,
    .mobile-menu,
    .article-footer,
    .related-content-section,
    .article-tags,
    .wp-block-file {
        display: none !important;
    }
    
    .article-featured-image {
        page-break-inside: avoid;
    }

    .single-post {
        padding-top: 0 !important;
    }

    .article-header {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* ============================================
    wordpress 기본 스타일
============================================ */

.wp-block-file *+.wp-block-file__button { padding: 0.5rem 1.16rem; }
.wp-block-file *+.wp-block-file__button:hover { color:#fff; }
