/**
 * Story CSS - Estilos da página nossa história
 */

/* ==================== TIMELINE VERTICAL ==================== */

.story-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Linha vertical */
.story-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        transparent,
        var(--gold) 5%,
        var(--gold) 95%,
        transparent);
    box-shadow: 0 0 10px rgba(212, 175, 90, 0.3);
}

/* ==================== ITEM DA HISTÓRIA ==================== */

.story-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

/* Bolinha na timeline */
.story-item::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--gold);
}

.story-year {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.story-card {
    background: linear-gradient(135deg,
        rgba(80, 115, 160, 0.75) 0%,
        rgba(60, 95, 140, 0.85) 50%,
        rgba(80, 115, 160, 0.75) 100%);
    border: 1px solid rgba(212, 175, 90, 0.4);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.story-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(212, 175, 90, 0.1) 45%,
        rgba(212, 175, 90, 0.2) 50%,
        rgba(212, 175, 90, 0.1) 55%,
        transparent 60%
    );
    animation: holographic-scan 3s linear infinite;
    pointer-events: none;
}

.story-card:hover {
    transform: translateX(10px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.story-title {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.story-text {
    font-size: 0.95rem;
    color: rgba(245, 240, 232, 0.8);
    line-height: 1.7;
}

/* ==================== ICON IMAGE / EMOJI ==================== */

.story-icon-image,
.story-icon-emoji {
    position: absolute;
    left: 8px;
    top: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    box-shadow: 0 0 15px var(--gold);
    z-index: 1;
    background: var(--navy);
}

.story-icon-image {
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover para ampliar imagem */
.story-icon-image:hover {
    transform: scale(2.5);
    box-shadow: 0 0 25px var(--gold), 0 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.story-icon-emoji {
    font-size: 0.9rem;
    line-height: 1;
}

/* Ocultar bolinha padrao quando tem icone customizado */
.story-item:has(.story-icon-image)::after,
.story-item:has(.story-icon-emoji)::after {
    display: none;
}

/* ==================== TIPO HORIZONTAL ==================== */

.story-timeline.display-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 100%;
    scroll-snap-type: x mandatory;
}

.story-timeline.display-horizontal::before {
    display: none;
}

.story-timeline.display-horizontal .story-item {
    flex: 0 0 280px;
    padding-left: 0;
    margin-bottom: 0;
    scroll-snap-align: center;
}

.story-timeline.display-horizontal .story-item::after {
    display: none;
}

.story-timeline.display-horizontal .story-icon-image,
.story-timeline.display-horizontal .story-icon-emoji {
    position: relative;
    left: auto;
    top: auto;
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.story-timeline.display-horizontal .story-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story-timeline.display-horizontal .story-year {
    text-align: center;
}

/* ==================== TIPO 3D (CARROSSEL) ==================== */

.story-timeline.display-3d {
    perspective: 1200px;
    position: relative;
    height: 400px;
    max-width: 100%;
    overflow: hidden;
}

.story-timeline.display-3d::before {
    display: none;
}

.story-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.story-timeline.display-3d .story-item {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    transform: translate(-50%, -50%);
    padding-left: 0;
    margin-bottom: 0;
    opacity: 0;
    transition: all 0.6s ease;
    pointer-events: none;
}

.story-timeline.display-3d .story-item::after {
    display: none;
}

.story-timeline.display-3d .story-item.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 10;
    pointer-events: auto;
}

.story-timeline.display-3d .story-item.prev {
    opacity: 0.5;
    transform: translate(-150%, -50%) scale(0.7) rotateY(30deg);
}

.story-timeline.display-3d .story-item.next {
    opacity: 0.5;
    transform: translate(50%, -50%) scale(0.7) rotateY(-30deg);
}

.story-timeline.display-3d .story-icon-image,
.story-timeline.display-3d .story-icon-emoji {
    position: relative;
    left: auto;
    top: auto;
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
}

.story-carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.story-carousel-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(80, 115, 160, 0.8);
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.story-carousel-controls button:hover {
    background: var(--gold);
    color: var(--navy);
}

/* Indicadores do carrossel */
.story-carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.story-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(212, 175, 90, 0.3);
    border: 1px solid var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-carousel-dots .dot.active {
    background: var(--gold);
    transform: scale(1.2);
}

/* ==================== TIPO TEXTO (IMAGEM + TEXTO) ==================== */

.story-timeline.display-text {
    max-width: 900px;
}

.story-timeline.display-text::before {
    display: none;
}

.story-timeline.display-text .story-item {
    padding-left: 0;
    margin-bottom: 4rem;
}

.story-timeline.display-text .story-item::after {
    display: none;
}

.story-timeline.display-text .story-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

.story-content-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid rgba(212, 175, 90, 0.4);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.story-content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.story-content-image:hover img {
    transform: scale(1.1);
}

.story-timeline.display-text .story-content {
    display: flex;
    flex-direction: column;
}

.story-timeline.display-text .story-icon-image,
.story-timeline.display-text .story-icon-emoji {
    position: relative;
    left: auto;
    top: auto;
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* ==================== MODO TEXTO (CONTEUDO UNICO) ==================== */

.story-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg,
        rgba(80, 115, 160, 0.75) 0%,
        rgba(60, 95, 140, 0.85) 50%,
        rgba(80, 115, 160, 0.75) 100%);
    border: 1px solid rgba(212, 175, 90, 0.4);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px);
}

.story-text-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
    box-shadow: 0 0 25px rgba(212, 175, 90, 0.4), 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.story-text-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.story-text-image:hover img {
    transform: scale(1.1);
}

.story-text-emoji {
    font-size: 4rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 25px rgba(212, 175, 90, 0.4);
}

.story-text-content {
    max-width: 700px;
}

.story-text-content p {
    font-size: 1.05rem;
    color: rgba(245, 240, 232, 0.9);
    line-height: 1.9;
    margin-bottom: 1.2rem;
}

.story-text-content p:last-child {
    margin-bottom: 0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .story-timeline::before {
        left: 10px;
    }

    .story-item {
        padding-left: 40px;
    }

    .story-item::after {
        left: 4px;
        width: 14px;
        height: 14px;
    }

    /* Horizontal responsivo */
    .story-timeline.display-horizontal .story-item {
        flex: 0 0 250px;
    }

    /* 3D responsivo */
    .story-timeline.display-3d {
        height: 350px;
    }

    .story-timeline.display-3d .story-item {
        width: 260px;
    }

    /* Texto responsivo (eventos) */
    .story-timeline.display-text .story-card {
        grid-template-columns: 1fr;
    }

    .story-content-image {
        max-width: 200px;
        margin: 0 auto 1rem;
    }

    /* Modo texto conteudo unico responsivo */
    .story-text-container {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .story-text-image {
        width: 150px;
        height: 150px;
    }

    .story-text-emoji {
        font-size: 3rem;
        width: 100px;
        height: 100px;
    }

    .story-text-content p {
        font-size: 1rem;
    }
}
