/* ===================================================
   COMPONENTS.CSS — Buttons, Cards, Tags, Timeline, Modal, CTA
   =================================================== */

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease,
                color 0.3s ease;
    will-change: transform;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-hover);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn:hover::after { transform: scaleY(1); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible,
.btn-link:focus-visible,
.modal-close:focus-visible,
.video-card:focus-visible,
.hamburger:focus-visible,
.nav-links a:focus-visible {
    box-shadow: 0 0 0 4px rgba(139, 30, 45, 0.2);
    border-radius: 10px;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--accent-primary);
}

.btn-outline:hover { background-color: var(--accent-primary); }

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Customização para o botão de CV com estilo mais "Industrial Refined" */
.btn-cv {
    display: inline-flex;
    align-items: center;
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(139, 30, 45, 0.05);
}

.btn-cv svg {
    color: var(--accent-primary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-cv:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -5px rgba(139, 30, 45, 0.6);
}

.btn-cv:hover svg {
    color: #fff;
    transform: translateY(2px);
}

.btn-link {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.btn-link:hover { color: var(--accent-primary); }

/* Magnetic active class */
.magnetic-active { transition: transform 0.1s linear; }

/* ---- Skill Cards ---- */
.skill-card {
    background-color: var(--bg-primary);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-primary);
}

.skill-card ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ---- Project Cards ---- */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    color: inherit;
}

.project-image {
    height: 140px;
    background: linear-gradient(45deg, #1a1a1d 0%, #2d0b11 100%);
    position: relative;
    flex-shrink: 0;
}

.project-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.72);
}

.project-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}


.project-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ---- Tags ---- */
.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tags span {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-large {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(139, 30, 45, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ---- Video Cards ---- */
.video-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
    appearance: none;
    padding: 0;
}

.video-thumbnail {
    height: 140px;
    background: linear-gradient(135deg, #1a1a1d, #000);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.video-card-cypress .video-thumbnail {
    background: linear-gradient(135deg, #0f1f18 0%, #14392b 55%, #08110d 100%);
}

.video-card-cart .video-thumbnail {
    background: linear-gradient(135deg, #1a1320 0%, #24425c 55%, #090d14 100%);
}

.video-card-api .video-thumbnail {
    background: linear-gradient(135deg, #2f140d 0%, #7b2f14 55%, #140804 100%);
}

.video-card-mobile .video-thumbnail {
    background: linear-gradient(135deg, #140f2c 0%, #2c2f78 55%, #090812 100%);
}

.video-card-playwright .video-thumbnail {
    background: linear-gradient(135deg, #0e1e14 0%, #1e4d2e 55%, #08110b 100%);
}

/* Thumbnail image overlay for play icon */
.video-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.play-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 30, 45, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.play-icon svg {
    width: 20px;
    height: 20px;
}

.video-card:hover .play-icon {
    transform: scale(1.15);
    background: var(--accent-primary);
}

.video-info {
    padding: var(--spacing-md);
}

.video-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}

/* ---- Quality Cards ---- */
.quality-card {
    padding: 24px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.3s ease, border-color 0.3s ease;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100px;
}

.quality-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.quality-icon {
    width: 32px;
    height: 32px;
    line-height: 1;
    color: var(--accent-primary);
}

.quality-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.quality-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.quality-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ---- Methodology ---- */
.methodology-intro {
    max-width: 760px;
    margin: 0 auto var(--spacing-md);
    text-align: center;
    font-size: 1.05rem;
}

.method-card {
    position: relative;
    padding: 28px 24px 24px;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%),
        var(--bg-primary);
    border: 1px solid var(--border-color);
    min-height: 220px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.method-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 30, 45, 0.6);
    box-shadow: 0 14px 36px -16px rgba(0, 0, 0, 0.55);
}

.method-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    margin-bottom: 18px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    background: rgba(139, 30, 45, 0.12);
    border: 1px solid rgba(139, 30, 45, 0.3);
}

.method-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.method-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- Methodology Steps ---- */
.step {
    text-align: center;
    padding: var(--spacing-md);
}

.step-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--border-color);
    margin-bottom: var(--spacing-xs);
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

/* ---- Contact Link ---- */
.contact-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
}

/* ---- Spotlight Card Effect ---- */
.spotlight-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(139, 30, 45, 0.15),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.spotlight-card:hover::before { opacity: 1; }

.spotlight-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 30, 45, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* ---- Combined hover for grid cards ---- */
.skill-card,
.project-card,
.video-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}

.skill-card:hover,
.project-card:hover,
.video-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-primary);
}

/* ---- Certifications Interactive (Industrial Refined) ---- */
.certifications-grid-interactive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
}

.cert-card-interactive {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05); /* Borda sutil industrial */
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
}

.cert-card-interactive::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 30, 45, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cert-card-interactive:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

.cert-card-interactive:hover::before {
    opacity: 1;
}

.cert-icon-large {
    width: 64px;
    height: 64px;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-icon-large svg {
    width: 48px; /* Travado para evitar gigantismo */
    height: 48px;
    fill: currentColor;
}

.cert-card-interactive:hover .cert-icon-large {
    transform: scale(0.8) translateY(-10px);
    opacity: 0.3;
}

.school-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.school-stat {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* Details Drawer - More robust containment */
.cert-details-drawer {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(8px);
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.cert-card-interactive:hover .cert-details-drawer {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.course-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.course-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.course-list li:last-child { margin-bottom: 0; }

.course-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 8px;
    height: 2px;
    background: var(--accent-primary);
}

.cert-card-interactive:hover .course-list li {
    opacity: 1;
    transform: translateX(0);
}

.cert-card-interactive:hover .course-list li:nth-child(1) { transition-delay: 0.1s; }
.cert-card-interactive:hover .course-list li:nth-child(2) { transition-delay: 0.15s; }
.cert-card-interactive:hover .course-list li:nth-child(3) { transition-delay: 0.2s; }
.cert-card-interactive:hover .course-list li:nth-child(4) { transition-delay: 0.25s; }

@media (max-width: 991px) {
    .certifications-grid-interactive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .certifications-grid-interactive {
        grid-template-columns: 1fr;
    }
    .cert-card-interactive {
        min-height: 240px;
    }
}

/* ---- Testimonials (kept for future use) ---- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.testimonial-card {
    background: var(--bg-primary);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
}

.quote-icon {
    font-size: 4rem;
    color: var(--accent-primary);
    opacity: 0.2;
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: serif;
    line-height: 1;
}

.author {
    margin-top: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-color);
}
