/* ============================================================
   Presentation list page
   ============================================================ */

.presentation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.presentation-item {
    display: flex;
    gap: 1.8rem;
    padding: 1.8rem 0;
    border-bottom: 1px solid #eeeeee;
    align-items: flex-start;
}

.presentation-item:last-child {
    border-bottom: none;
}

.presentation-thumbnail {
    flex-shrink: 0;
    width: 220px;
}

.presentation-thumbnail img {
    width: 220px;
    height: 124px;
    object-fit: cover;
    border: 1px solid #dddddd;
    border-radius: 3px;
    display: block;
}

.presentation-thumbnail-placeholder {
    width: 220px;
    height: 124px;
    background: #f0f0f0;
    border: 1px solid #dddddd;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaaaaa;
    font-size: 0.8rem;
}

.presentation-info {
    flex: 1;
    min-width: 0;
}

/* post-preview の margin/padding をリセット（flex レイアウト内で使うため） */
.presentation-info.post-preview {
    margin-bottom: 0;
}

.presentation-tags {
    margin-top: 0.4rem;
}

.presentation-tags .tag {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px 2px 2px 0;
    font-size: 0.875rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    color: #666666;
    text-decoration: none;
}

.presentation-tags .tag:hover {
    background: #e8e8e8;
    color: #333333;
}

/* ============================================================
   Presentation single page (slide viewer)
   ============================================================ */

.slide-viewer {
    margin: 2rem 0;
    user-select: none;
}

.slide-container {
    position: relative;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}

.slide-img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

/* Prev/Next overlay buttons on the slide image */
.slide-nav-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    z-index: 10;
}

.slide-container:hover .slide-nav-overlay {
    opacity: 1;
}

.slide-nav-overlay.prev {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.35), transparent);
}

.slide-nav-overlay.next {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.35), transparent);
}

.slide-nav-overlay span {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Control bar below the slide */
.slide-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    gap: 0.5rem;
}

.slide-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid #cccccc;
    border-radius: 3px;
    background: #ffffff;
    color: #555555;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.slide-btn:hover {
    background: #f0f0f0;
    color: #333333;
    text-decoration: none;
}

.slide-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.slide-counter {
    font-size: 0.9rem;
    color: #666666;
    min-width: 6em;
    text-align: center;
}

.slide-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid #0085a1;
    border-radius: 3px;
    background: #ffffff;
    color: #0085a1;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.slide-pdf-link:hover {
    background: #0085a1;
    color: #ffffff;
    text-decoration: none;
}

.slide-hint {
    font-size: 0.75rem;
    color: #aaaaaa;
    text-align: right;
    margin-top: 0.25rem;
}

/* ============================================================
   Speaker Deck embed (iframe)
   ============================================================ */

.speakerdeck-embed-wrapper {
    width: 100%;
    /* デフォルト 16:9。speakerdeck_ratio front matter からインラインスタイルで上書き可 */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 2rem 0 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: #1a1a1a;
}

.speakerdeck-embed-wrapper .speakerdeck-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Event badge in single page header */
.presentation-event-badge {
    display: inline-block;
    font-size: 0.85rem;
    color: #888888;
    margin-top: 0.3rem;
}

/* Responsive: stack on small screens */
@media (max-width: 600px) {
    .presentation-item {
        flex-direction: column;
        gap: 0.8rem;
    }

    .presentation-thumbnail,
    .presentation-thumbnail img {
        width: 100%;
        height: auto;
    }

    .slide-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}
