/**
 * HUSHIKO - Stories Pages Styles
 *
 * Styles for /stories gallery and /stories/[slug] pages
 */

/* ==========================================================================
   Stories Hero Section
   ========================================================================== */

.stories-hero {
    padding: 4rem 0 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-lavender-light) 100%);
}

.stories-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.stories-hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.stories-hero__characters {
    font-size: 1rem;
    color: var(--primary);
    max-width: 600px;
    margin: 1rem auto 0;
    font-weight: 500;
    background: rgba(155, 135, 217, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    display: inline-block;
}

/* ==========================================================================
   Stories Grid
   ========================================================================== */

.stories-grid-section {
    padding: 3rem 0;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.stories-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Story Card */
.story-card {
    display: block;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(155, 135, 217, 0.2);
}

.story-card__thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-lavender-light);
}

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

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

.story-card__duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.story-card__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(155, 135, 217, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover .story-card__play-icon {
    opacity: 1;
}

.story-card__content {
    padding: 1.25rem;
}

.story-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.story-card__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.story-card__tags {
    display: flex;
    gap: 0.25rem;
}

/* ==========================================================================
   Story Player (Single Story Page)
   ========================================================================== */

.story-player {
    padding: 2rem 0 3rem;
}

.story-player__back {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.story-player__back:hover {
    color: var(--primary-dark);
}

.story-player__video {
    margin-bottom: 2rem;
}

.story-player__embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.story-player__embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.story-player__info {
    max-width: 800px;
}

.story-player__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.story-player__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-dark);
    margin: 0;
}

.story-player__share {
    background: rgba(155, 135, 217, 0.1);
    border: 2px solid var(--color-purple, #9b87d9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-purple, #9b87d9);
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 600;
}

.story-player__share:hover {
    background: var(--color-purple, #9b87d9);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 135, 217, 0.3);
}

.story-player__description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.story-player__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.story-player__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.story-tag {
    background: var(--bg-lavender-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ==========================================================================
   Story CTA Box
   ========================================================================== */

.story-cta {
    padding: 3rem 0;
}

.story-cta__box {
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-dark, #6b5b9a) 100%);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(155, 135, 217, 0.3);
}

.story-cta__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 0.75rem;
}

.story-cta__subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.story-cta__benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    font-size: 1rem;
}

.story-cta__benefits li {
    opacity: 0.95;
}

.story-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.story-cta__buttons .btn-enchanted.btn-enchanted-large {
    background: white !important;
    color: var(--color-purple) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.story-cta__buttons .btn-enchanted.btn-enchanted-large:hover {
    background: var(--color-cream) !important;
    color: var(--color-purple-dark) !important;
    transform: translateY(-4px) scale(1.02);
}

.story-cta__buttons .btn-enchanted.btn-enchanted-secondary {
    background: transparent !important;
    border: 2px solid white !important;
    color: white !important;
    box-shadow: none;
}

.story-cta__buttons .btn-enchanted.btn-enchanted-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: white !important;
    color: white !important;
}

.story-cta__note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* ==========================================================================
   More Stories Section
   ========================================================================== */

.stories-more {
    padding: 3rem 0;
    background: var(--bg-cream);
}

.stories-more__title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.stories-more__cta {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================================================
   Gallery CTA Section
   ========================================================================== */

.stories-gallery-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-lavender-light) 0%, var(--bg-cream) 100%);
}

.stories-gallery-cta__content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.stories-gallery-cta__content h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.stories-gallery-cta__content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.stories-gallery-cta__note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .stories-hero {
        padding: 3rem 0 1.5rem;
    }

    .stories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .story-player__header {
        flex-direction: column;
    }

    .story-player__share {
        align-self: flex-start;
    }

    .story-cta__box {
        padding: 2rem 1.5rem;
    }

    .story-cta__benefits {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .stories-hero {
        background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-lighter) 100%);
    }

    .stories-hero h1,
    .story-player__title,
    .story-card__title,
    .stories-more__title,
    .stories-gallery-cta__content h2 {
        color: var(--text-light);
    }

    .story-card {
        background: var(--bg-dark-lighter);
    }

    .story-player__description {
        color: var(--text-light-muted);
    }

    .stories-more {
        background: var(--bg-dark);
    }

    .stories-gallery-cta {
        background: linear-gradient(135deg, var(--bg-dark-lighter) 0%, var(--bg-dark) 100%);
    }
}
