/* STORIES FROM THE SCENE - Estilos del módulo de historias */

/* Sección */
.stories-section { padding: 80px 40px 100px; background: #080808; border-top: 1px solid #1a1a1a; }
.stories-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 50px; max-width: 1200px; margin-left: auto; margin-right: auto; margin-bottom: 50px; }
.stories-header-text { text-align: left; }
.stories-header h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: -0.5px; }
.stories-header p { font-family: 'Inter', sans-serif; color: #888; font-size: 0.95rem; font-weight: 300; font-style: italic; }
.stories-see-all { font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 500; color: var(--pink); text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 6px; transition: opacity 0.2s; flex-shrink: 0; }
.stories-see-all:hover { opacity: 0.8; }
.stories-see-all:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 3px; }
.stories-see-all i { font-size: 0.65rem; transition: transform 0.2s; }
.stories-see-all:hover i { transform: translateX(3px); }

/* Grid */
.stories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto 60px; }

/* Tarjeta */
.story-card { background: #111; border: 1px solid #1e1e1e; border-radius: 6px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.story-card:hover { transform: translateY(-4px); border-color: #333; box-shadow: 0 12px 32px rgba(0,0,0,0.6); }
.story-card:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* Imagen */
.story-card-image { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.story-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.85) contrast(1.05); transition: filter 0.4s ease, transform 0.4s ease; }
.story-card:hover .story-card-image img { filter: saturate(1) contrast(1); transform: scale(1.04); }
.story-card-category { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: #ccc; font-family: 'Inter', sans-serif; font-size: 0.6rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; padding: 4px 10px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.08); }

/* Cuerpo */
.story-card-body { padding: 20px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.story-card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.story-card-excerpt { font-family: 'Inter', sans-serif; font-size: 0.82rem; color: #999; line-height: 1.55; margin-bottom: 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer */
.story-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid #1a1a1a; background: #0d0d0d; }
.story-card-author { font-family: 'Inter', sans-serif; font-size: 0.72rem; color: #777; font-weight: 400; }
.story-card-author strong { color: #ccc; font-weight: 600; }
.story-card-actions { display: flex; align-items: center; gap: 14px; }

/* Botón like */
.story-like-btn { background: none; border: none; color: #666; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: color 0.2s ease; padding: 4px; font-family: 'Inter', sans-serif; }
.story-like-btn:hover { color: var(--pink); }
.story-like-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 3px; }
.story-like-btn.liked { color: var(--pink); }
.story-like-btn.liked i { animation: storyHeartBeat 0.4s ease; }
@keyframes storyHeartBeat { 0% { transform: scale(1); } 30% { transform: scale(1.3); } 60% { transform: scale(0.95); } 100% { transform: scale(1); } }
.story-like-count { font-size: 0.72rem; color: #666; font-variant-numeric: tabular-nums; }

/* Read Story */
.story-read-button { font-family: 'Inter', sans-serif; font-size: 0.7rem; color: var(--pink); text-decoration: none; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; transition: opacity 0.2s; background: none; border: none; padding: 0; cursor: pointer; }
.story-read-button:hover { opacity: 0.8; }
.story-read-button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 3px; }

/* CTA */
.stories-cta { text-align: center; margin-top: 10px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.stories-cta a { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid #333; color: #ccc; padding: 14px 36px; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; transition: border-color 0.3s, color 0.3s, background 0.3s; }
.stories-cta a:hover { border-color: var(--pink); color: var(--pink); background: rgba(231,114,167,0.05); }
.stories-cta a:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* ===================== SEE MORE LINK ===================== */
.stories-see-more { text-align: center; margin: 20px 0 0; }

/* ===================== FALLBACK BANNER ===================== */
.stories-fallback-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(241,196,15,0.08);
    border: 1px solid rgba(241,196,15,0.2);
    border-radius: 8px;
    padding: 12px 20px;
    margin: 20px auto;
    max-width: 520px;
    font-size: 0.82rem;
    color: #f1c40f;
    text-align: center;
}

.stories-fallback-banner i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ===================== MODAL ===================== */
.stories-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); z-index: 3000; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease; }
.stories-modal-overlay.active { display: flex; opacity: 1; }
.stories-modal { background: #111; border: 1px solid #222; border-radius: 8px; width: 100%; max-width: 680px; max-height: 85vh; overflow-y: auto; position: relative; transform: translateY(20px) scale(0.97); transition: transform 0.3s ease; }
.stories-modal-overlay.active .stories-modal { transform: translateY(0) scale(1); }
.stories-modal::-webkit-scrollbar { width: 6px; }
.stories-modal::-webkit-scrollbar-track { background: #111; }
.stories-modal::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Botón cerrar */
.stories-modal-close { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); border: 1px solid #333; color: #ccc; width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.2s, color 0.2s; }
.stories-modal-close:hover { background: #333; color: #fff; }
.stories-modal-close:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* Imagen modal */
.stories-modal-image { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px 8px 0 0; }
.stories-modal-image img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9); }

/* Contenido modal */
.stories-modal-content { padding: 32px 36px 28px; }
.stories-modal-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stories-modal-meta span { font-family: 'Inter', sans-serif; font-size: 0.72rem; color: #777; text-transform: uppercase; letter-spacing: 0.5px; }
.stories-modal-meta .modal-divider { width: 3px; height: 3px; background: #444; border-radius: 50%; }
.stories-modal-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 20px; line-height: 1.25; }
.stories-modal-author { font-family: 'Inter', sans-serif; font-size: 0.82rem; color: #999; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #1e1e1e; }
.stories-modal-author strong { color: #ddd; font-weight: 600; }
.stories-modal-story { font-family: 'Inter', sans-serif; font-size: 0.9rem; color: #bbb; line-height: 1.75; margin-bottom: 28px; }
.stories-modal-story-gap { margin-top: 16px; }
.stories-modal-song { display: flex; align-items: center; gap: 10px; background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 6px; padding: 14px 18px; margin-bottom: 28px; }
.stories-modal-song i { color: var(--pink); font-size: 0.9rem; }
.stories-modal-song span { font-family: 'Inter', sans-serif; font-size: 0.78rem; color: #999; }
.stories-modal-song strong { color: #ddd; font-weight: 600; }
.stories-modal-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid #1e1e1e; }
.stories-modal-like-btn { background: none; border: 1px solid #2a2a2a; color: #888; padding: 10px 20px; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.stories-modal-like-btn:hover { border-color: var(--pink); color: var(--pink); }
.stories-modal-like-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.stories-modal-like-btn.liked { border-color: var(--pink); color: var(--pink); background: rgba(231,114,167,0.08); }
.stories-modal-like-btn.liked i { animation: storyHeartBeat 0.4s ease; }
.stories-modal-date { font-family: 'Inter', sans-serif; font-size: 0.72rem; color: #555; }

/* ===================== UTILITIES ===================== */
.is-hidden { display: none !important; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .stories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .stories-section { padding: 50px 16px 70px; }
    .stories-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .stories-header h2 { font-size: 1.6rem; }
    .stories-grid { grid-template-columns: 1fr; gap: 16px; }
    .story-card-body { padding: 16px 16px 12px; }
    .story-card-footer { padding: 12px 16px; }
    .stories-modal { max-height: 90vh; border-radius: 6px; }
    .stories-modal-content { padding: 24px 20px 20px; }
    .stories-modal-title { font-size: 1.3rem; }
    .stories-modal-overlay { padding: 10px; }
}
