.screenshots {
    background-color: var(--surface);
}

.screenshots .section-subtitle {
    margin-top: -2.5rem;
    margin-bottom: 3rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.screenshot-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    color: inherit;
    display: block;
    cursor: pointer;
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.screenshot-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.screenshot-card figure {
    margin: 0;
    padding: 0;
}

/* Performance: aspect-ratio para evitar CLS durante carregamento */
.screenshot-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    display: block;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: none;
    object-fit: cover;
}

.screenshot-card-content {
    padding: 1.5rem;
}

.screenshot-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.screenshot-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.screenshots-cta {
    text-align: center;
    margin-top: 2rem;
}

.screenshots-cta .btn {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
}

/* Tablet and up: 3 columns */
@media (min-width: 768px) {
    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Desktop: maintain 3 columns with better spacing */
@media (min-width: 1024px) {
    .screenshots-grid {
        gap: 2.5rem;
    }

    .screenshot-card-content {
        padding: 2rem;
    }
}

/* Modal Styles */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.screenshot-modal.active {
    opacity: 1;
    visibility: visible;
}

.screenshot-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.screenshot-modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.screenshot-modal.active .screenshot-modal-content {
    transform: scale(1);
}

.screenshot-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--primary-contrast);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    z-index: 2;
}

.screenshot-modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.screenshot-modal-close:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.screenshot-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.screenshot-modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg);
}

.screenshot-modal-image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .screenshot-modal-content {
        max-width: 95vw;
        padding: 1.5rem;
    }

    .screenshot-modal-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .screenshot-modal-image {
        max-height: calc(90vh - 100px);
    }

    .screenshot-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}
