/**
 * Presentation Page Components — Elemental Runes v8
 * Sidebar is fixed/floating, detached from content.
 * Content uses ue-style feature card layout with interleaved text/image blocks.
 * Sidebar item styles reuse ranking accordion classes from rankings.css.
 */

/* Korean decorative font */
@font-face {
    font-family: 'korean';
    src: url('/assets/fonts/1HoonGomusin.woff') format('woff');
    font-display: swap;
}

/* ===========================================
   FLOATING SIDEBAR - fixed to left edge
   =========================================== */
.pres-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 280px;
    height: calc(100vh - 56px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: var(--stone);
    border-right: 1px solid var(--edge);
    transition: transform 0.3s ease;
}

.pres-sidebar.collapsed {
    transform: translateX(-100%);
}

/* Content area shifts when sidebar is open */
.pres-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.pres-content.sidebar-collapsed {
    margin-left: 0;
}

/* Collapse handle — fixed strip, always accessible */
.pres-collapse-handle {
    position: fixed;
    left: 280px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 60px;
    background: var(--edge);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    z-index: 200;
    opacity: 0.7;
    transition: left 0.3s ease, opacity 0.2s ease, width 0.2s ease, background 0.2s ease;
    border-radius: 0 2px 2px 0;
}

.pres-collapse-handle:hover {
    opacity: 1;
    background: var(--edge-light);
    color: var(--text-mid);
    width: 14px;
}

.pres-collapse-handle i {
    transition: transform 0.3s ease;
}

/* When collapsed, slides to left:0 */
.pres-collapse-handle.collapsed {
    left: 0;
}

.pres-collapse-handle.collapsed i {
    transform: rotate(180deg);
}

/* Scrollable inner area */
.pres-sidebar-inner {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--edge-light) transparent;
}

.pres-sidebar-inner::-webkit-scrollbar {
    width: 4px;
}

.pres-sidebar-inner::-webkit-scrollbar-track {
    background: transparent;
}

.pres-sidebar-inner::-webkit-scrollbar-thumb {
    background: var(--edge-light);
    border-radius: 2px;
}

/* Active item highlight — now uses acc-link.active from modern.css */
.pres-sidebar .acc-link.active {
    background: rgba(64,144,224,0.10);
    color: var(--water) !important;
}

/* Quick jump buttons — now use btn btn-sec from modern.css, no custom classes needed */

/* ===========================================
   CONTENT SECTIONS
   =========================================== */
.pres-section {
    border: 1px solid var(--pres-section-border, var(--edge));
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    padding: 0 0 var(--spacing-xl) 0;
    background-color: var(--pres-section-bg, var(--panel));
}

.pres-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(64,144,224,0.03) 0, transparent 70%);
    pointer-events: none;
}

/* Section title */
.pres-section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.3em;
    font-weight: 700;
    color: var(--pres-section-title-color, var(--water));
    text-align: center;
    text-transform: uppercase;
    margin: 0;
    padding: 1rem 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-image: url('/assets/images/presentation/title-big.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 125px;
    margin-bottom: var(--spacing-lg);
}

/* Bottom decoration ornament */
.pres-section-title::before {
    content: '';
    position: absolute;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 344px;
    height: 17px;
    background-image: var(--pres-section-title-decoration, none);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    pointer-events: none;
}

/* Lead text */
.pres-lead-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-mid);
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
    text-align: center;
    font-weight: 400;
    padding: 1rem var(--spacing-lg) 0;
}

/* ===========================================
   FEATURE CARDS (Elveron "tome" pattern)
   =========================================== */
.pres-feature-card {
    display: grid;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    padding: var(--spacing-lg);
    grid-template-columns: 1fr 1fr;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Full-width block (spans both columns in the grid) */
.pres-feature-text.full-width,
.pres-feature-image.full-width {
    grid-column: 1 / -1;
}

/* Feature title - big (standalone header) */
.pres-feature-title.big {
    font-family: 'Onest', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pres-title-big-color, var(--text-bright));
    margin: 1rem 0 var(--spacing-sm);
    margin-left: 30px;
}

/* Feature title - regular (inside a text block) */
.pres-feature-title {
    font-family: 'Onest', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pres-title-color, var(--text-bright));
    margin: 0 0 1rem 0;
}

/* Accent text (Korean characters or similar) */
.pres-accent {
    font-family: 'korean';
    font-size: 1.8rem;
    color: var(--pres-accent-color, var(--water));
    margin-right: 15px;
}

/* Text block */
.pres-feature-text {
    background: var(--pres-card-bg, var(--panel));
    border-radius: 2px;
    padding: var(--spacing-lg);
    border: 1px solid var(--pres-card-border, var(--edge));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Description text */
.pres-feature-description {
    color: var(--pres-text-color, var(--text-mid));
    line-height: 1.7;
    font-size: 1.1rem;
}

.pres-feature-description strong,
.pres-feature-description b {
    color: var(--pres-bold-color, var(--water));
}

.pres-feature-description ul,
.pres-feature-description .feature-list {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.pres-feature-description li {
    margin-bottom: var(--spacing-xs);
}

.pres-feature-description li strong {
    color: var(--pres-title-color, var(--text-bright));
    font-weight: 600;
}

/* Image block */
.pres-feature-image {
    position: relative;
}

.pres-feature-img {
    margin: auto;
    /* width: 100%; */
    height: auto;
    border-radius: 2px;
    display: block;
}

.pres-feature-image video {
    margin: auto;
    /* width: 100%; */
    height: auto;
    border-radius: 2px;
    display: block;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 992px) {
    .pres-sidebar {
        transform: translateX(-100%);
    }

    .pres-sidebar.open {
        transform: translateX(0);
    }

    .pres-content {
        margin-left: 0;
    }
}

@media (max-width: 880px) {
    .pres-feature-card {
        display: block;
    }

    .pres-feature-card > * + * {
        margin-top: var(--spacing-lg);
    }

    .pres-section {
        padding: 0 0 var(--spacing-lg) 0;
    }

    .pres-section-title {
        font-size: 1.7rem;
        height: auto;
        width: auto;
        margin-left: 0;
        background-image: none;
        border-bottom: 1px solid var(--pres-section-border, var(--edge));
    }

    .pres-section-title::before,
    .pres-section-title::after {
        display: none;
    }

    .pres-feature-title.big {
        font-size: 1.5rem;
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .pres-feature-card {
        padding: var(--spacing-md);
    }

    .pres-lead-text {
        font-size: 1rem;
        padding: 0 var(--spacing-md);
    }

    .pres-feature-title {
        font-size: 1.5rem;
    }

    .pres-accent {
        font-size: 1.5rem;
    }
}
