/**
 * ==============================================
 * HISTÓRIA SECTION CSS - STORYTELLING ÉPICO
 * ==============================================
 * 
 * Responsabilidade: Timeline visual cinematográfico
 * Efeitos: Timeline, Scroll Reveal, Glowing Elements
 * Objetivo: CONTAR A HISTÓRIA COM IMPACTO
 * 
 * @package Nuntius Theme - EPIC EDITION
 * @version 1.0.0
 * @author Nuntius Team
 */

/* ===== HISTÓRIA SECTION - BACKGROUND ÉPICO ===== */
.about-historia-section {
    position: relative;
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 50%, #0f1419 100%);
    overflow: hidden;
    padding: 80px 0 100px 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* ===== CANVAS ===== */
.historia-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== LAYERS DE PROFUNDIDADE ===== */
.historia-depth-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.historia-depth-layer.layer-1 {
    background: radial-gradient(circle at 30% 40%, rgba(88, 101, 242, 0.08) 0%, transparent 60%);
    animation: historiaDepthFloat1 20s ease-in-out infinite;
    z-index: 2;
}

.historia-depth-layer.layer-2 {
    background: radial-gradient(circle at 70% 60%, rgba(114, 137, 218, 0.06) 0%, transparent 50%);
    animation: historiaDepthFloat2 25s ease-in-out infinite;
    z-index: 3;
}

@keyframes historiaDepthFloat1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.08; }
    50% { transform: translate(30px, -30px); opacity: 0.12; }
}

@keyframes historiaDepthFloat2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.06; }
    50% { transform: translate(-30px, 30px); opacity: 0.1; }
}

/* ===== CONTAINER ===== */
.historia-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== TIMELINE ===== */
.historia-timeline {
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    gap: 50px;
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: start;
}

.timeline-item.timeline-item-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item-reverse {
    direction: rtl;
}

.timeline-item-reverse .timeline-content {
    direction: ltr;
}

/* ===== TIMELINE MARKER ===== */
.timeline-marker {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    flex-shrink: 0;
}

.marker-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: markerGlowPulse 3s ease-in-out infinite;
}

@keyframes markerGlowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 0.9; }
}

.marker-icon {
    font-size: 55px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(88, 101, 242, 0.8));
    animation: markerIconFloat 4s ease-in-out infinite;
}

@keyframes markerIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== TIMELINE LINE ===== */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 150px;
    background: rgba(88, 101, 242, 0.2);
    margin: -40px 0;
}

.line-progress {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #5865F2, #7289DA);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.8);
    transition: height 0.6s ease-out;
}

/* ===== TIMELINE CONTENT ===== */
.timeline-content {
    background: rgba(26, 27, 30, 0.95);
    border: 2px solid rgba(88, 101, 242, 0.5);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    min-width: 500px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 40px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:not(.timeline-item-reverse) .timeline-content::before {
    right: -20px;
    border-width: 15px 0 15px 20px;
    border-color: transparent transparent transparent rgba(88, 101, 242, 0.3);
}

.timeline-item-reverse .timeline-content::before {
    left: -20px;
    border-width: 15px 20px 15px 0;
    border-color: transparent rgba(88, 101, 242, 0.3) transparent transparent;
}

.timeline-content:hover {
    border-color: #5865F2;
    transform: translateY(-8px);
    box-shadow: 0 25px 70px rgba(88, 101, 242, 0.5);
}

/* ===== TIMELINE BADGE ===== */
.timeline-badge {
    display: inline-block;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
}

.badge-mission {
    background: linear-gradient(135deg, #43B581, #5865F2);
}

/* ===== TIMELINE TITLE ===== */
.timeline-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.timeline-title .highlight-brand {
    color: #5865F2;
    text-shadow: 0 0 20px rgba(88, 101, 242, 0.6);
}

.timeline-title .neon-text {
    color: #7289DA;
    text-shadow: 
        0 0 10px #7289DA,
        0 0 20px #7289DA,
        0 0 30px #7289DA;
    animation: titleNeonFlicker 2s ease-in-out infinite;
}

@keyframes titleNeonFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== TIMELINE DESCRIPTION ===== */
.timeline-description {
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.8;
    flex: 1;
}

.timeline-description p {
    margin-bottom: 18px;
}

.timeline-description strong {
    color: #fff;
    font-weight: 700;
}

.timeline-description .highlight-text {
    color: #7289DA;
    font-weight: 700;
}

.timeline-description .neon-inline {
    color: #5865F2;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.timeline-description .highlight-value {
    color: #43B581;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(67, 181, 129, 0.3);
}

/* ===== LATIN QUOTE ===== */
.latin-quote {
    font-style: italic;
    font-size: 1.2rem;
    padding: 20px;
    background: rgba(88, 101, 242, 0.1);
    border-left: 4px solid #5865F2;
    border-radius: 8px;
    margin: 20px 0;
}

.latin-quote .highlight-latin {
    color: #FAA61A;
    font-weight: 700;
}

.latin-quote .messenger-text {
    color: #5865F2;
    font-size: 1.3rem;
    text-shadow: 0 0 15px rgba(88, 101, 242, 0.6);
}

/* ===== MESSENGER VISUAL ===== */
.messenger-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    font-size: 3rem;
}

.messenger-icon,
.messenger-world {
    animation: messengerPulse 2s ease-in-out infinite;
}

.messenger-arrow {
    color: #5865F2;
    animation: messengerArrowSlide 2s ease-in-out infinite;
}

@keyframes messengerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes messengerArrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.mission-statement {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(114, 137, 218, 0.1));
    border-radius: 12px;
    margin-top: 20px;
}

.mission-statement .highlight-mission {
    color: #7289DA;
    font-weight: 800;
}

.mission-statement .world-text {
    color: #43B581;
    font-weight: 800;
    text-transform: uppercase;
}

/* ===== MISSION POINTS ===== */
.mission-intro {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.mission-intro .highlight-purpose {
    color: #5865F2;
    font-weight: 800;
}

.mission-points {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.mission-point {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(67, 181, 129, 0.1);
    border-left: 4px solid #43B581;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mission-point:hover {
    background: rgba(67, 181, 129, 0.2);
    transform: translateX(10px);
}

.point-icon {
    font-size: 1.5rem;
    color: #43B581;
    font-weight: 800;
}

.mission-point p {
    margin: 0;
    font-size: 1.05rem;
}

.mission-point strong {
    color: #43B581;
}

/* ===== MISSION CTA ===== */
.mission-cta {
    margin-top: 30px;
    text-align: center;
}

.cta-text {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 25px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(67, 181, 129, 0.2));
    border: 2px solid #5865F2;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(88, 101, 242, 0.3);
    animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(88, 101, 242, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 15px 50px rgba(88, 101, 242, 0.5); }
}

.cta-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* ===== VISUAL ELEMENTS ===== */
.timeline-visual-element {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.visual-orb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #5865F2;
    border-radius: 50%;
    box-shadow: 0 0 20px #5865F2;
    animation: orbFloat 4s ease-in-out infinite;
}

.visual-orb.orb-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.visual-orb.orb-2 {
    top: 30px;
    left: 30px;
    animation-delay: 0.5s;
}

.visual-orb.orb-3 {
    top: 60px;
    left: 60px;
    animation-delay: 1s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    50% { transform: translate(-10px, -10px); opacity: 1; }
}

/* ===== STATS SECTION ===== */
.historia-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 100px;
    padding-bottom: 40px;
}

.stat-card {
    background: rgba(47, 49, 54, 0.4);
    border: 2px solid rgba(88, 101, 242, 0.3);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.stat-card:hover {
    border-color: #5865F2;
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(88, 101, 242, 0.4);
}

.stat-icon {
    font-size: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(88, 101, 242, 0.6));
    animation: statIconBounce 3s ease-in-out infinite;
}

@keyframes statIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #5865F2;
    text-shadow: 0 0 15px rgba(88, 101, 242, 0.6);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: #B9BBBE;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== PARTÍCULAS ===== */
.historia-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.historia-particles .particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #7289DA;
    border-radius: 50%;
    box-shadow: 0 0 12px #7289DA;
    animation: historiaParticleFloat 20s infinite;
}

.historia-particles .particle:nth-child(1) {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.historia-particles .particle:nth-child(2) {
    top: 35%;
    right: 20%;
    animation-delay: 5s;
}

.historia-particles .particle:nth-child(3) {
    top: 65%;
    left: 10%;
    animation-delay: 10s;
}

.historia-particles .particle:nth-child(4) {
    top: 85%;
    right: 15%;
    animation-delay: 15s;
}

@keyframes historiaParticleFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0; 
    }
    10% { opacity: 0.8; }
    50% { 
        transform: translate(80px, -80px) scale(1.3); 
        opacity: 0.5; 
    }
    90% { opacity: 0.8; }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .timeline-item {
        grid-template-columns: 1fr 60px 1fr;
        gap: 30px;
    }

    .timeline-marker {
        width: 60px;
        height: 60px;
    }

    .marker-icon {
        font-size: 40px;
    }

    .timeline-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .about-historia-section {
        padding: 80px 0;
    }

    .historia-container {
        padding: 0 20px;
    }

    .timeline-item,
    .timeline-item-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        text-align: center;
    }

    .timeline-marker {
        margin: 0 auto 30px;
    }

    .timeline-content::before {
        display: none;
    }

    .timeline-line {
        display: none;
    }

    .timeline-title {
        font-size: 1.8rem;
    }

    .timeline-description {
        font-size: 1rem;
    }

    .messenger-visual {
        font-size: 2rem;
        gap: 15px;
    }

    .historia-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .timeline-content {
        padding: 25px 20px;
    }

    .timeline-title {
        font-size: 1.5rem;
    }

    .timeline-description {
        font-size: 0.95rem;
    }

    .latin-quote {
        font-size: 1rem;
        padding: 15px;
    }

    .messenger-visual {
        font-size: 1.5rem;
    }

    .mission-statement {
        font-size: 1rem;
    }

    .cta-text {
        font-size: 1.1rem;
        padding: 20px;
    }

    .stat-icon {
        font-size: 50px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}
