/* Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #333333;
    --text: #1a1a1a;
    --gray-light: #f5f5f5;
}

* {
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Enhanced Animations */
.hover\:scale-105:hover {
    transform: scale(1.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}                   

.fade-in-delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.hover-effect {
    position: relative;
    overflow: hidden;
}

.hover-effect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.hover-effect:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Custom Shadows */
.custom-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.custom-shadow:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Form Styles */
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Button Animations */
.btn-primary {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300%;
    height: 300%;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Section Transitions */
section {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Hover Effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Header Scroll Animation */
.header-scroll {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.4s ease;
}

/* Mobile Menu Animation */
.mobile-menu {
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Portfolio Styles */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item .group {
    position: relative;
    cursor: pointer;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .portfolio-item .group > div {
        opacity: 0.9;
    }

    .portfolio-item:hover img {
        transform: none;
    }

    .portfolio-item .group {
        touch-action: pan-y pinch-zoom;
    }

    #imageModal .modal-content {
        margin: 0;
        width: 100%;
        height: auto;
        max-height: 90vh;
        border-radius: 0;
    }

    #imageModal .p-4 {
        padding: 0.5rem;
    }
}

/* Modal Styles */
#imageModal {
    -webkit-overflow-scrolling: touch;
}

#imageModal .modal-content {
        background: white;
        max-width: 100%;
        margin: auto;
        max-height: 90vh;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
}

@media (min-width: 1024px) {
    #imageModal .modal-content {
        max-height: 80vh;
        min-height: 400px;
        padding-right: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

#imageModal img {
    max-width: 100%;
    height: auto;
    display: block;
}

#imageModal button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

/* Portfolio Grid Navigation */
.portfolio-nav button {
    transition: all 0.3s ease;
}

.portfolio-nav button.active {
    opacity: 1;
    transform: scale(1.2);
}

/* Portfolio Image Loading Animation */
.portfolio-item img {
    opacity: 0;
    animation: imageLoad 0.5s ease forwards;
}

@keyframes imageLoad {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Portfolio Hover Effects */
.portfolio-item .hover-content {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .hover-content {
    transform: translateY(0);
}

/* Portfolio Modal */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    #imageModal button {
        position: fixed;
        top: 24px;
        right: 24px;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 9999;
        color: #fff;
        text-shadow: none;
        transition: color 0.2s;
}
@media (max-width: 768px) {
    #imageModal button {
        top: 12px;
        right: 12px;
        font-size: 2.2rem;
    }
}
#imageModal button:hover {
        color: #e5e5e5;
}
    }
    transition: opacity 0.4s ease;
}

.portfolio-modal.active {
    display: flex;
    opacity: 1;
}

.portfolio-modal-content {
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    background: white;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-modal.active .portfolio-modal-content {
    transform: translateY(0);
}

/* Melhorias de acessibilidade */
.portfolio-item .group {
    outline: none;
}

.portfolio-item .group:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Melhorias de interação */
.portfolio-item .group {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.portfolio-item img {
    pointer-events: none;
}

