/* ========================================
   Shared Story Card Component
   Used by homepage and allStories page
   ======================================== */

.hp-story-card {
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius-section);
    background-color: #f8f9fa;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.hp-story-card__img {
    width: 100%;
    height: 260px;
    border-radius: var(--hp-radius-section);
    object-fit: cover;
}

.hp-story-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 16px 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex: 1;
}

.hp-story-card__title {
    font-family: 'FbMetali', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 24px;
    color: var(--hp-text);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
}


.hp-story-card__desc {
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    line-height: 24px;
    color: var(--hp-text);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-story-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    margin-top: auto;
}

.hp-story-card__author {
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    line-height: 24px;
    color: var(--hp-text-secondary);
}

/* Flip arrow for LTR languages */
[dir="ltr"] .hp-story-card__meta img {
    transform: scaleX(-1);
}

/* Image wrapper — needed for absolute-positioned overlays */
.hp-story-card__img-wrap {
    position: relative;
}

/* Heart icon — positioned top-left of image */
.hp-story-card__heart {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 1;
}
.hp-story-card__heart.hidden { opacity: 0; pointer-events: none; }
.hp-story-card:hover .hp-story-card__heart.hidden { opacity: 1; pointer-events: auto; }
.hp-story-card__heart svg { width: 32px; height: 32px; display: block; }

/* "New" badge — positioned top-right of image */
.hp-story-card__badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: var(--hp-green);
    color: var(--hp-text);
    font-family: 'Heebo', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: var(--hp-radius-pill);
    z-index: 1;
}

/* Principle dots — between image and content */
.hp-story-card__principles {
    display: flex;
    gap: 4px;
    padding: 8px 16px 0;
    min-height: 20px;
}

/* Edit icon — same position as heart (top-left), always visible */
.hp-story-card__edit {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    cursor: pointer;
    z-index: 1;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.hp-story-card__edit:hover {
    background: #f0f0f0;
}
.hp-story-card__edit img,
.hp-story-card__edit svg { width: 18px; height: 18px; }

/* Delete icon — top-left, below edit */
.hp-story-card__delete {
    position: absolute;
    top: 52px;
    inset-inline-start: 12px;
    cursor: pointer;
    z-index: 1;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.hp-story-card__delete:hover {
    background: #ffe0e0;
}
.hp-story-card__delete img,
.hp-story-card__delete svg { width: 18px; height: 18px; }

/* Hidden card — used for show-more pagination */
.hp-story-card--hidden {
    display: none !important;
}

/* Show more button container */
.all-cards__show-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.all-cards__show-more {
    background: #0066cc;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.all-cards__show-more:hover {
    background: #0052a3;
}
