/* AgênciaJR Custom Styles */

/* Custom scrollbar */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: #f1f1f1; 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb { 
    background: #a0aec0; 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #718096; 
}

/* Smooth scroll behavior */
html { 
    scroll-behavior: smooth; 
}

/* Base body styling */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Add subtle transition to links and buttons */
a, button {
    transition: all 0.3s ease-in-out;
}

/* Style for active nav link */
.nav-link-active {
    color: #3b82f6;
    font-weight: 600;
}

/* Enhance focus states for accessibility and style */
input:focus, textarea:focus, select:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

/* Custom class for section padding */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* Animation Classes */
/* Basic class for elements to animate - hidden initially */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* States for different animation types */
.animate-fade-in { 
    opacity: 0; 
}

.animate-slide-up { 
    opacity: 0; 
    transform: translateY(30px); 
}

.animate-slide-down { 
    opacity: 0; 
    transform: translateY(-30px); 
}

.animate-slide-left { 
    opacity: 0; 
    transform: translateX(30px); 
}

.animate-slide-right { 
    opacity: 0; 
    transform: translateX(-30px); 
}

/* Visible state - applied by JS */
.is-visible {
    opacity: 1;
    transform: none;
}

/* Header Animation */
@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Apply to header directly, assuming it's always visible or sticky */
header.sticky.top-0.z-50 {
    animation: fadeInDown 0.5s ease-out forwards;
}

/* Navigation link underline effect */
.nav-link-animate {
    position: relative;
    text-decoration: none;
}

.nav-link-animate::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease-out;
}

.nav-link-animate:hover::after {
    width: 100%;
}

/* Service card icon hover */
.service-icon-animate:hover i {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Ensure icons in service cards have a base transition */
#servicos .group .fa-solid {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Smooth Theme Transition */
html, body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Apply to common layout containers and text-carrying elements */
header, footer, section, div, h1, h2, h3, p, a, span, li, button, input, textarea, label {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Theme Toggle Icon Animation */
#theme-toggle .fa-moon,
#theme-toggle .fa-sun {
    transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
    display: inline-block;
}

/* Light mode (default): moon visible, sun hidden and scaled down */
#theme-toggle .fa-moon { 
    transform: scale(1) rotate(0deg); 
    opacity: 1; 
}

#theme-toggle .fa-sun { 
    transform: scale(0) rotate(-90deg); 
    opacity: 0; 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
}

/* Dark mode: moon hidden and scaled down, sun visible */
.dark #theme-toggle .fa-moon { 
    transform: scale(0) rotate(90deg); 
    opacity: 0; 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
}

.dark #theme-toggle .fa-sun { 
    transform: scale(1) rotate(0deg); 
    opacity: 1; 
    display: inline-block !important; 
    position: static; 
}