/**
 * Timeline CSS - Carrossel 3D Espiral
 */

/* ==================== SEÇÃO DA TIMELINE ==================== */

.timeline-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
    overflow: hidden;
    margin-left: var(--sidebar-width);
}

/* ==================== HEADER ==================== */

.timeline-header {
    text-align: center;
    padding: 0 40px;
    margin-bottom: 30px;
}

.timeline-header .section-label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.timeline-header .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--cream);
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
}

/* ==================== CONTAINER DO CARROSSEL ==================== */

.spiral-container {
    position: relative;
    width: 100%;
    height: 420px;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.spiral-carousel {
    position: relative;
    width: 280px;
    height: 340px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== CARDS DA TIMELINE ==================== */

.timeline-card {
    position: absolute;
    width: 280px;
    height: 340px;
    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: 2px solid rgba(212, 175, 90, 0.4);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 28px;
    backface-visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0;
    top: 0;
    overflow: hidden;
}

.timeline-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;
}

.timeline-card.active {
    box-shadow: 0 25px 70px rgba(212, 175, 90, 0.25);
    border-color: var(--gold);
}

/* ==================== ELEMENTOS DOS CARDS ==================== */

.timeline-number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 36px;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 8px;
    line-height: 1;
}

.timeline-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: auto;
    width: fit-content;
}

.timeline-status.completed {
    background: rgba(76, 175, 80, 0.25);
    color: #4CAF50;
}

.timeline-status.progress {
    background: rgba(255, 193, 7, 0.25);
    color: #FFC107;
}

.timeline-status.pending {
    background: rgba(212, 175, 90, 0.25);
    color: rgba(245, 240, 232, 0.6);
}

.timeline-card .timeline-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--gold-light);
}

.timeline-card .timeline-desc {
    color: rgba(245, 240, 232, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==================== NAVEGAÇÃO DO CARROSSEL ==================== */

.spiral-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
}

.spiral-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(212, 175, 90, 0.1);
    color: var(--gold);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spiral-btn:hover {
    background: var(--gold);
    color: var(--navy-dark);
    transform: scale(1.1);
}

.spiral-btn:active {
    transform: scale(0.95);
}

/* ==================== INDICADORES ==================== */

.spiral-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.spiral-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 175, 90, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.spiral-dot.active {
    background: var(--gold);
    transform: scale(1.4);
}

.spiral-dot:hover {
    background: rgba(212, 175, 90, 0.6);
}

/* ==================== CONTADOR ==================== */

.spiral-counter {
    text-align: center;
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
    color: rgba(245, 240, 232, 0.6);
    font-size: 14px;
}

.spiral-counter span {
    color: var(--gold);
    font-weight: 600;
}

/* ==================== INSTRUÇÃO DE SWIPE ==================== */

.spiral-hint {
    text-align: center;
    color: rgba(245, 240, 232, 0.5);
    font-size: 12px;
    margin-top: 10px;
}

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

@media (max-width: 768px) {
    .timeline-section {
        margin-left: 0;
        padding: 60px 0;
    }

    .spiral-container {
        height: 380px;
    }

    .spiral-carousel {
        width: 240px;
        height: 300px;
    }

    .timeline-card {
        width: 240px;
        height: 300px;
        padding: 20px;
    }

    .timeline-number {
        font-size: 28px;
    }

    .timeline-card .timeline-title {
        font-size: 1.1rem;
    }

    .spiral-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ==================== TIMELINE HORIZONTAL ==================== */

.timeline-horizontal {
    padding: 40px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.timeline-track {
    position: relative;
    min-width: max-content;
    padding: 20px 40px;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 10%, var(--gold) 90%, transparent 100%);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-items {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    flex-shrink: 0;
}

.timeline-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--navy-dark);
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    z-index: 3;
}

.timeline-item.completed .timeline-dot {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-color: #4CAF50;
}

.timeline-item.progress .timeline-dot {
    background: linear-gradient(135deg, #FFC107, #FF9800);
    border-color: #FFC107;
}

.dot-number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--gold);
}

.timeline-item.completed .dot-number,
.timeline-item.progress .dot-number {
    color: white;
}

.timeline-card-h {
    background: linear-gradient(135deg, rgba(80, 115, 160, 0.75) 0%, rgba(60, 95, 140, 0.85) 100%);
    border: 1px solid rgba(212, 175, 90, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
}

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

.timeline-card-h .timeline-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--gold-light);
    margin: 10px 0 8px;
}

.timeline-card-h .timeline-desc {
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.7);
    line-height: 1.5;
}

/* Horizontal Responsive */
@media (max-width: 768px) {
    .timeline-horizontal {
        padding: 20px 10px;
    }

    .timeline-items {
        gap: 20px;
    }

    .timeline-item {
        width: 160px;
    }

    .timeline-dot {
        width: 40px;
        height: 40px;
    }

    .dot-number {
        font-size: 14px;
    }

    .timeline-card-h {
        padding: 15px;
    }
}

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

.timeline-vertical {
    position: relative;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line-v {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent 0%, var(--gold) 5%, var(--gold) 95%, transparent 100%);
    transform: translateX(-50%);
}

.timeline-item-v {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.timeline-item-v.left {
    flex-direction: row;
    padding-right: calc(50% + 40px);
}

.timeline-item-v.right {
    flex-direction: row-reverse;
    padding-left: calc(50% + 40px);
}

.timeline-dot-v {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--navy-dark);
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-item-v.completed .timeline-dot-v {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-color: #4CAF50;
}

.timeline-item-v.progress .timeline-dot-v {
    background: linear-gradient(135deg, #FFC107, #FF9800);
    border-color: #FFC107;
}

.dot-icon {
    font-size: 20px;
    color: var(--gold);
}

.timeline-item-v.completed .dot-icon,
.timeline-item-v.progress .dot-icon {
    color: white;
}

.timeline-card-v {
    flex: 1;
    background: linear-gradient(135deg, rgba(80, 115, 160, 0.75) 0%, rgba(60, 95, 140, 0.85) 100%);
    border: 1px solid rgba(212, 175, 90, 0.3);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-card-v:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--gold);
}

.timeline-card-v .card-number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 28px;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 5px;
}

.timeline-card-v .timeline-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--gold-light);
    margin: 10px 0 8px;
}

.timeline-card-v .timeline-desc {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.8);
    line-height: 1.6;
}

/* Vertical Responsive */
@media (max-width: 768px) {
    .timeline-line-v {
        left: 25px;
    }

    .timeline-item-v.left,
    .timeline-item-v.right {
        flex-direction: row;
        padding-left: 70px;
        padding-right: 0;
    }

    .timeline-dot-v {
        left: 25px;
        width: 40px;
        height: 40px;
    }

    .dot-icon {
        font-size: 16px;
    }

    .timeline-card-v {
        padding: 20px;
    }

    .timeline-card-v .card-number {
        font-size: 22px;
    }

    .timeline-card-v .timeline-title {
        font-size: 1.1rem;
    }
}

/* ==================== HIDDEN UTILITY ==================== */

.hidden {
    display: none !important;
}
