/* ==================================================
   PROJETOS.CSS
   Página de Projetos
==================================================

Objetivo:
- Criar uma timeline horizontal de projetos.
- Apresentar cards interativos.
- Mostrar detalhes dos projetos num modal.
- Manter o estilo visual do portfólio.
================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

header {
    text-align: center;
    padding: 50px 20px 25px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #94a3b8;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.timeline-wrapper {
    position: relative;
    margin-top: 0;
    overflow: visible;
}

.timeline-carousel {
    position: relative;
    display: flex;
    gap: 30px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: auto;
    scroll-snap-type: none;
    padding: 100px 20px 45px;
    scrollbar-width: none;
}

.timeline-carousel::-webkit-scrollbar {
    display: none;
}

.timeline-line {
    position: absolute;
    top: 66px;
    left: 135px;
    height: 4px;
    width: calc((230px + 30px) * 9);
    background: linear-gradient(90deg, #2563eb, #38bdf8, #22c55e);
    border-radius: 50px;
    z-index: 0;
}

.timeline-card {
    position: relative;
    z-index: 1;
    min-width: 230px;
    max-width: 230px;
    min-height: 260px;
    background: #1e293b;
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s, box-shadow 0.25s, border 0.25s;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
}

.timeline-dot {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #38bdf8;
    border-radius: 50%;
    border: 4px solid #0f172a;
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.25),
        0 0 20px rgba(56, 189, 248, 0.4);
    z-index: 10;
}

.timeline-label {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e293b;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    border: 1px solid #38bdf8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.timeline-label::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.timeline-card:hover .timeline-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.timeline-card img {
    max-width: 125px;
    height: 125px;
    object-fit: contain;
    margin-bottom: 18px;
}

.timeline-card h3 {
    margin: 10px 0 0;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.3;
}

footer {
    text-align: center;
    padding: 30px;
    color: #64748b;
}

/* ==================================================
   MODAL
================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: #1e293b;
    padding: 35px 30px;
    border-radius: 22px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    animation: abrirModal 0.25s ease;
}

@keyframes abrirModal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content img {
    max-width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 18px;
}

.modal-content h2 {
    margin: 10px 0;
    color: #ffffff;
}

.modal-content p {
    color: #cbd5e1;
    line-height: 1.5;
}

.modal-tech {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    color: #7dd3fc;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 145px;
    padding: 12px 18px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.modal-btn.live {
    background: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.modal-btn.live:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.modal-btn.github {
    background: #374151;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.3);
}

.modal-btn.github:hover {
    background: #111827;
    transform: translateY(-2px);
}

.close {
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: 30px;
    color: #94a3b8;
    cursor: pointer;
}

.close:hover {
    color: #ffffff;
}

/* ==================================================
   INDICADORES DO CARROSSEL
================================================== */

.carousel-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    font-weight: bold;
    color: rgba(56, 189, 248, 0.4);
    pointer-events: none;
    z-index: 20;
    animation: pulse 2s infinite;
}

.carousel-hint.left {
    left: -10px;
}

.carousel-hint.right {
    right: -10px;
}

@keyframes pulse {
    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: .8;
    }
}

.timeline-wrapper::before,
.timeline-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 15;
    pointer-events: none;
}

.timeline-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #0f172a, transparent);
}

.timeline-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #0f172a, transparent);
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .timeline-card {
        min-width: 210px;
        max-width: 210px;
    }

    .timeline-card img {
        max-width: 110px;
        height: 110px;
    }

    .timeline-line {
        left: 125px;
        width: calc((210px + 30px) * 9);
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }
}