/* assets/css/projeto-detalhe.css */
/* Styles specific to the individual project detail pages */

.projeto-detalhe-hero {
    padding-top: 200px;
    padding-bottom: 80px;
    position: relative;
}

.hero-top-nav {
    margin-bottom: 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: var(--color-text-main);
    transform: translateX(-5px);
}

.detalhe-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    max-width: 900px;
}

.detalhe-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2rem;
}

.detalhe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.detalhe-tag {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    color: var(--color-text-main);
}

.detalhe-year {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.detalhe-cover {
    width: 100%;
    height: 70vh;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: var(--color-bg-alt);
    cursor: zoom-in;
}

.detalhe-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.detalhe-cover:hover img {
    transform: scale(1.02);
}

.zoom-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.detalhe-cover:hover .zoom-hint,
.gallery-item:hover .zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Overview Section */
.projeto-overview {
    padding-top: 80px;
    padding-bottom: 80px;
}

.overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
}

.overview-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.overview-desc {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.overview-right {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.info-block h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.info-block p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Gallery Section */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: zoom-in;
    background: var(--color-bg-alt);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item:nth-child(3n) {
    grid-column: 1 / -1; /* Make every 3rd item span full width */
    aspect-ratio: 21/9;
}

/* Next Project CTA */
.next-project-section {
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 50px;
}

.next-project-link {
    display: block;
    text-decoration: none;
    color: var(--color-text-main);
    transition: opacity 0.3s ease;
}

.next-eyebrow {
    display: block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.next-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.next-title .arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.next-project-link:hover .arrow {
    transform: translateX(30px);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: transform 0.3s ease;
    touch-action: manipulation; /* Prevents double-tap zoom delay */
}

@media (hover: hover) {
    .lightbox-close:hover {
        transform: rotate(90deg) scale(1.1);
    }
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
}

.lightbox-modal.active .lightbox-content img {
    transform: scale(1);
}

.lightbox-modal.active .lightbox-content img.zoomed-in {
    cursor: grab;
}
.lightbox-modal.active .lightbox-content img.zoomed-in:active {
    cursor: grabbing;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .projeto-gallery {
        padding-bottom: 0;
    }
    
    .detalhe-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .detalhe-cover {
        height: 50vh;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item:nth-child(3n) {
        aspect-ratio: 16/10;
    }
}

/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pagination-info {
    font-size: 1.1rem;
    color: var(--color-text-muted, #666);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 1rem;
}

.pagination-btn {
    background: #0a0a0a;
    border: none;
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover:not(:disabled) {
    background: #333333;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.pagination-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    background: #e0e0e0;
    color: #999;
    box-shadow: none;
}

.pagination-btn svg {
    width: 20px;
    height: 20px;
}

/* GitHub Button with Hover Arrow for Project Details */
.github-btn-hover .github-arrow {
    opacity: 0;
    max-width: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    margin-left: -0.5rem;
}

.github-btn-hover:hover .github-arrow {
    opacity: 1;
    max-width: 20px;
    transform: translateX(0);
    margin-left: 0;
}
