/* ========================================
   Story Page Styles
   Loaded only on Story.cshtml
   ======================================== */

/* ─── Breadcrumbs ─── */
.story-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--hp-text-secondary);
    margin-bottom: 16px;
}

.story-breadcrumbs a {
    color: var(--hp-text-secondary);
    text-decoration: none;
}

.story-breadcrumbs a:hover {
    text-decoration: underline;
}

.story-breadcrumbs__current {
    color: var(--hp-text);
}

/* ─── Edit Button ─── */
.story-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #F2F2F2;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.story-edit-btn:hover {
    background: var(--hp-text-secondary);
}

.story-edit-btn:hover img {
    filter: brightness(0) invert(1);
}

.story-edit-btn img {
    width: 18px;
    height: 18px;
}

/* ─── Meta Bar ─── */
.story-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--hp-border);
    flex-wrap: wrap;
}

.story-meta__author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-meta__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--hp-text);
    flex-shrink: 0;
    overflow: hidden;
}

.story-meta__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-meta__info {
    display: flex;
    flex-direction: column;
}

.story-meta__label {
    font-size: 11px;
    color: var(--hp-text-secondary);
    line-height: 1.2;
}

.story-meta__value {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.story-meta__separator {
    width: 1px;
    height: 32px;
    background: var(--hp-border);
    flex-shrink: 0;
}

.story-meta__project a {
    color: var(--hp-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-meta__project a:hover {
    text-decoration: underline;
}

.story-meta__actions {
    display: flex;
    gap: 8px;
    margin-inline-start: auto;
}

.story-meta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--hp-radius-pill);
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.story-meta__btn:hover {
    opacity: 0.85;
}

.story-meta__btn--share {
    background: var(--hp-green);
    border: 1px solid var(--hp-green-border);
    color: var(--hp-text);
}

.story-meta__btn--like {
    background: #fff;
    border: 1px solid var(--hp-border);
    color: var(--hp-text);
}

.story-meta__btn--liked {
    background: var(--hp-green);
    border: 1px solid var(--hp-green-border);
    color: var(--hp-text);
}

/* ─── Share Popover ─── */
.share-popover-wrap {
    position: relative;
    display: inline-flex;
}

.share-popover {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--hp-border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    z-index: 50;
}

.share-popover--visible {
    display: block;
}

.share-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    border-top: 1px solid var(--hp-border);
    border-left: 1px solid var(--hp-border);
}

.share-popover__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--hp-text);
    font-size: 14px;
    font-family: 'Heebo', sans-serif;
}

.share-popover__item:hover {
    background: #f5f5f5;
}

.share-popover__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-popover__icon svg {
    width: 16px;
    height: 16px;
}

.share-popover__icon--copy {
    background: #f0f0f0;
}

.share-popover__icon--copy svg {
    stroke: var(--hp-text);
    fill: none;
}

.share-popover__icon--wa {
    background: #25D366;
}

.share-popover__icon--wa svg {
    fill: #fff;
}

.share-popover__icon--x {
    background: #000;
}

.share-popover__icon--x svg {
    fill: #fff;
}

.share-popover__icon--fb {
    background: #1877F2;
}

.share-popover__icon--fb svg {
    fill: #fff;
}

.share-popover__icon--mail {
    background: #f0f0f0;
}

.share-popover__icon--mail svg {
    stroke: var(--hp-text);
    fill: none;
}

.share-popover__sep {
    height: 1px;
    background: var(--hp-border);
    margin: 4px 8px;
}

/* ─── Two Column Layout ─── */
.story-layout {
    display: flex;
    gap: 32px;
    margin-top: 32px;
}

.story-article {
    flex: 1;
    min-width: 0;
}

.story-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* ─── Article ─── */
.story-article__hero {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
    background: #f0f0f0;
}

.story-article__hero img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.story-article__hero iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: none;
}

.story-article__subtitle {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.7;
    color: var(--hp-text);
    margin-bottom: 24px;
}

.story-article__body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.story-article__body p {
    margin-bottom: 16px;
}

/* ─── Videos Section ─── */
.story-videos {
    margin-top: 32px;
}

.story-videos__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.story-videos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.story-videos__item {
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.story-videos__item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Documents Section ─── */
.story-docs {
    margin-top: 32px;
}

.story-docs__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.story-docs__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-docs__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--hp-text);
    transition: background 0.2s;
}

.story-docs__item:hover {
    background: #f0f0f0;
}

.story-docs__item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ─── Sidebar: Principles ─── */
.principles-sidebar {
    background: #F8F8F8;
    border-radius: 16px;
    padding: 28px 24px;
    position: sticky;
    top: 113px;
}

.principles-sidebar__title {
    font-family: 'FbMetali', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
}

.principles-sidebar__desc {
    font-size: 13px;
    color: var(--hp-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.principles-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.principles-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--hp-text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.principles-sidebar__item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.principles-sidebar__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.principles-sidebar__link {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--hp-border);
}

.principles-sidebar__link a {
    font-size: 13px;
    color: var(--hp-text-secondary);
    text-decoration: none;
}

.principles-sidebar__link a:hover {
    text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .story-layout {
        flex-direction: column;
    }

    .story-sidebar {
        width: 100%;
    }

    .principles-sidebar {
        position: static;
    }

    .story-meta {
        gap: 16px;
    }

    .story-meta__actions {
        margin-inline-start: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .story-meta__separator {
        display: none;
    }

    .story-article__hero img {
        max-height: 240px;
    }
}
