/**
 * 싱클 스토리 페이지 스타일
 * 매거진 스타일 레이아웃
 */

/* ========================================
   Page Layout
   ======================================== */
.story-content-section {
    padding: 0 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .story-content-section {
        padding: 0 24px 40px;
    }
}

@media (max-width: 767px) {
    .story-content-section {
        padding: 0 16px 80px;
    }
}

/* ========================================
   Page Header
   ======================================== */
.story-page-header {
    padding: 40px 0 24px;
}

.story-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.story-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E03E3E 0%, #ff6b6b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-header-icon i {
    font-size: 20px;
    color: #fff;
}

.story-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.story-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #37352F;
    line-height: 1.2;
}

.story-page-subtitle {
    margin: 0;
    font-size: 15px;
    color: #787774;
    font-weight: 400;
}

@media (max-width: 767px) {
    .story-page-header {
        padding: 24px 0 16px;
    }

    .story-header-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .story-header-icon i {
        font-size: 16px;
    }

    .story-page-title {
        font-size: 22px;
    }

    .story-page-subtitle {
        font-size: 13px;
    }
}

/* ========================================
   Filter Section
   ======================================== */
.story-filter-section {
    margin-bottom: 32px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.story-filter-section::-webkit-scrollbar {
    display: none;
}

.story-filter-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

.story-filter-tab {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #787774;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-filter-tab:hover {
    background: #f7f6f3;
    border-color: #d3d3d0;
}

.story-filter-tab.active {
    background: #37352F;
    border-color: #37352F;
    color: #fff;
}

.story-filter-tab .tab-emoji {
    font-size: 14px;
}

@media (max-width: 767px) {
    .story-filter-section {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        margin-bottom: 24px;
    }

    .story-filter-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ========================================
   Hero Section (Featured Story)
   ======================================== */
.story-hero-section {
    margin-bottom: 48px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.hero-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.hero-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f7f6f3;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-card:hover .hero-image {
    transform: scale(1.03);
}

.hero-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: rgba(224, 62, 62, 0.95);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 32px 32px 0;
}

.hero-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f7f6f3;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #787774;
    margin-bottom: 16px;
    width: fit-content;
}

.hero-title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    color: #37352F;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-excerpt {
    margin: 0 0 20px;
    font-size: 15px;
    color: #787774;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-company {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-company-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #f7f6f3;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-company-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9e9e7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b9a97;
    font-size: 14px;
}

.hero-company-name {
    font-size: 14px;
    font-weight: 500;
    color: #37352F;
}

.hero-date {
    font-size: 13px;
    color: #9b9a97;
}

@media (max-width: 1024px) {
    .hero-card {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .hero-content {
        padding: 24px 24px 24px 0;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 767px) {
    .story-hero-section {
        margin-bottom: 32px;
    }

    .hero-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-image-wrapper {
        aspect-ratio: 16 / 9;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-category {
        margin-bottom: 12px;
    }

    .hero-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .hero-excerpt {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .hero-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Hero Skeleton */
.hero-skeleton {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hero-skeleton-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.hero-skeleton-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 32px 32px 0;
    gap: 16px;
}

.hero-skeleton-badge {
    width: 80px;
    height: 28px;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

.hero-skeleton-title {
    width: 90%;
    height: 32px;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.hero-skeleton-subtitle {
    width: 70%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.hero-skeleton-meta {
    width: 50%;
    height: 36px;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 18px;
}

@media (max-width: 767px) {
    .hero-skeleton {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-skeleton-image {
        aspect-ratio: 16 / 9;
    }

    .hero-skeleton-content {
        padding: 20px;
    }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Stories Grid Section
   ======================================== */
.story-grid-section {
    margin-top: 16px;
}

.story-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.story-grid-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #37352F;
}

.story-count {
    font-size: 14px;
    color: #9b9a97;
}

/* Grid Layout */
.story-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (min-width: 1920px) {
    .story-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .story-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Story Card */
.story-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.story-card-image-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f7f6f3;
    border-radius: 12px;
}

.story-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-card-image {
    transform: scale(1.05);
}

.story-card-company-logo {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.story-card-company-placeholder {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b9a97;
    font-size: 14px;
    z-index: 2;
}

.story-card-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.story-card-body {
    padding: 14px 4px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #37352F;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-company-name {
    margin: 0;
    font-size: 13px;
    color: #9b9a97;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .story-card-image-wrapper {
        border-radius: 10px;
    }

    .story-card-company-logo,
    .story-card-company-placeholder {
        width: 32px;
        height: 32px;
        bottom: 10px;
        left: 10px;
    }

    .story-card-body {
        padding: 10px 2px 4px;
    }

    .story-card-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .story-card-company-name {
        font-size: 12px;
    }
}

/* Card Skeleton */
.story-card-skeleton {
    display: flex;
    flex-direction: column;
}

.story-card-skeleton .skeleton-image {
    aspect-ratio: 3 / 4;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

.story-card-skeleton .skeleton-body {
    padding: 14px 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-card-skeleton .skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.story-card-skeleton .skeleton-text.title {
    height: 16px;
    width: 85%;
}

.story-card-skeleton .skeleton-text.subtitle {
    height: 14px;
    width: 60%;
}

/* ========================================
   Load More Button
   ======================================== */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.load-more-btn {
    padding: 14px 32px;
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #37352F;
    cursor: pointer;
    transition: all 0.15s ease;
}

.load-more-btn:hover {
    background: #f7f6f3;
    border-color: #d3d3d0;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Empty State
   ======================================== */
.story-empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.story-empty-state .empty-icon {
    font-size: 64px;
    color: #e9e9e7;
    margin-bottom: 20px;
}

.story-empty-state .empty-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #37352F;
}

.story-empty-state .empty-description {
    margin: 0;
    font-size: 15px;
    color: #9b9a97;
}

/* ========================================
   Category Colors
   ======================================== */
.category-notice { background: #e7f3f8 !important; color: #0b6e99 !important; }
.category-update { background: #f3e8ff !important; color: #6b21a8 !important; }
.category-event { background: #fff4e5 !important; color: #d9730d !important; }
.category-promotion { background: #dbeddb !important; color: #0f7b0f !important; }
.category-review { background: #fef3c7 !important; color: #b45309 !important; }
.category-general { background: #f7f6f3 !important; color: #9b9a97 !important; }
.category-facility { background: #dbeafe !important; color: #1d4ed8 !important; }
.category-partnership { background: #fce7f3 !important; color: #be185d !important; }
