/* Fase 8 — Trayectoria, marcas y DJ soporte oficial */

.container.phase8-trajectory-grid,
.container.phase8-recognition-grid {
    width: min(calc(100% - 96px), 1120px);
}

.phase8-trajectory-grid {
    grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(48px, 5.5vw, 72px);
}

.phase8-trajectory-grid > * {
    min-width: 0;
}

.phase8-trajectory-points {
    width: 100%;
    min-width: 0;
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
}

.phase8-trajectory-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 320px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
}

.phase8-trajectory-number {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1;
}

.phase8-trajectory-card-image {
    width: calc(100% + 48px);
    height: 122px;
    margin: 18px -24px 0;
    flex: 0 0 auto;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.phase8-trajectory-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.phase8-trajectory-card-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phase8-trajectory-card h3,
.phase8-trajectory-card p {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.phase8-trajectory-card h3 {
    margin: 18px 0 0;
    font-size: clamp(18px, 1.45vw, 21px);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.phase8-trajectory-card p {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.phase8-trajectory-grid .trajectory-copy {
    min-width: 0;
    max-width: 440px;
}

.phase8-trajectory-grid .trajectory-copy h2 {
    max-width: 430px;
    text-wrap: balance;
}

.phase8-trajectory-grid .trajectory-copy p {
    max-width: 430px;
}

.phase8-recognition-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.phase8-recognition-card {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    display: block;
    overflow: hidden;
}

.phase8-recognition-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.phase8-recognition-heading h3 {
    margin-top: 12px;
    overflow-wrap: anywhere;
}

.phase8-carousel {
    min-width: 0;
    margin-top: 22px;
}

.phase8-carousel-viewport {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 18px;
}

.phase8-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.phase8-carousel-track {
    display: flex;
    gap: 12px;
    width: max-content;
    min-width: 100%;
}

.phase8-carousel-slide {
    width: clamp(150px, 16vw, 168px);
    min-height: 176px;
    padding: 15px;
    flex: 0 0 auto;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
    text-align: center;
}

.phase8-carousel-slide strong {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.phase8-brand-logo-wrap,
.phase8-artist-image-wrap {
    width: 100%;
    height: 100px;
    padding: 12px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
}

.phase8-brand-logo-wrap img,
.phase8-artist-image-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.phase8-artist-image-wrap {
    background: rgba(255, 255, 255, 0.08);
}

.phase8-recognition-image-fallback {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    font-size: 30px;
    font-weight: 950;
    line-height: 1;
}

.phase8-recognition-image-fallback[hidden] {
    display: none !important;
}

.phase8-brand-fallback {
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
}

.phase8-artist-initial {
    color: var(--color-yellow-text);
    background: var(--color-yellow);
}

.phase8-carousel-controls {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.phase8-carousel-controls button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition:
        background var(--transition),
        transform var(--transition),
        border-color var(--transition);
}

.phase8-carousel-controls button:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.phase8-carousel-controls svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.editor-phase8-section {
    display: grid;
    gap: 18px;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
}

.editor-phase8-section-title,
.editor-phase8-list-head,
.editor-phase8-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.editor-phase8-section-title > div,
.editor-phase8-list-head > div,
.editor-phase8-item-head > div:first-child {
    display: grid;
    gap: 3px;
}

.editor-phase8-section-title small,
.editor-phase8-list-head small,
.editor-phase8-item-head small {
    color: var(--color-muted);
}

.editor-phase8-section-title h4 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.12rem;
}

.editor-phase8-section-title > span {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--color-primary-strong);
    background: var(--color-primary-soft);
    font-size: 0.76rem;
    font-weight: 800;
}

.editor-phase8-list {
    display: grid;
    gap: 14px;
}

.editor-phase8-item {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: var(--color-surface);
}

.editor-phase8-item-head strong {
    color: var(--color-text);
}

.editor-phase8-media-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: start;
}

.editor-phase8-image-box {
    min-height: 180px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px dashed var(--color-line);
    border-radius: 18px;
    background: var(--color-surface-2);
}

.editor-phase8-image-box img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 280px;
    object-fit: cover;
}

.editor-phase8-image-placeholder {
    padding: 22px;
    color: var(--color-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
}

.editor-phase8-fields {
    display: grid;
    gap: 14px;
}

.editor-phase8-remove-photo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 0.86rem;
    cursor: pointer;
}

.editor-phase8-remove-photo input {
    width: 18px;
    height: 18px;
}

.editor-phase8-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 24px;
    padding: 16px 0 4px;
    background: linear-gradient(
        to top,
        var(--color-surface) 72%,
        transparent
    );
}

@media (max-width: 1080px) {
    .container.phase8-trajectory-grid,
    .container.phase8-recognition-grid {
        width: min(calc(100% - 64px), 1040px);
    }

    .phase8-trajectory-grid {
        grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.24fr);
        gap: 40px;
    }
}

@media (max-width: 980px) {
    .container.phase8-trajectory-grid,
    .container.phase8-recognition-grid {
        width: min(calc(100% - 40px), var(--container));
    }

    .phase8-trajectory-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .phase8-trajectory-grid .trajectory-copy,
    .phase8-trajectory-grid .trajectory-copy h2,
    .phase8-trajectory-grid .trajectory-copy p {
        max-width: 760px;
    }

    .phase8-recognition-grid {
        grid-template-columns: 1fr;
    }

    .editor-phase8-media-grid {
        grid-template-columns: 1fr;
    }

    .editor-phase8-image-box {
        min-height: 210px;
    }
}

@media (max-width: 720px) {
    .container.phase8-trajectory-grid,
    .container.phase8-recognition-grid {
        width: min(calc(100% - 32px), var(--container));
    }

    .phase8-trajectory-grid {
        gap: 38px;
    }

    .phase8-trajectory-points {
        gap: 16px;
    }

    .phase8-recognition-heading {
        grid-template-columns: 1fr;
    }

    .phase8-carousel-slide {
        width: min(72vw, 220px);
    }

    .phase8-brand-logo-wrap,
    .phase8-artist-image-wrap {
        height: 96px;
    }

    .editor-phase8-section {
        padding: 15px;
    }

    .editor-phase8-section-title,
    .editor-phase8-list-head,
    .editor-phase8-item-head {
        align-items: stretch;
        flex-direction: column;
    }

    .editor-phase8-item-head .editor-stat-order {
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    .container.phase8-trajectory-grid,
    .container.phase8-recognition-grid {
        width: min(calc(100% - 28px), var(--container));
    }

    .phase8-trajectory-points {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .phase8-trajectory-card {
        min-height: 0;
        padding: 22px;
    }

    .phase8-trajectory-card-image {
        width: calc(100% + 44px);
        height: 150px;
        margin-inline: -22px;
    }

    .phase8-trajectory-card h3 {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .phase8-carousel-viewport {
        scroll-behavior: auto;
    }
}
