/* Custom Styles for SPALMATOIO Website */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Header styles */
#header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Navigation link styles */
.nav-link {
    position: relative;
    padding-bottom: 8px;
    font-weight: 500;
    color: #1E2D5C;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #6BC56F;
    transition: width 0.3s ease-in-out;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #1E2D5C;
}


/* Hero section typewriter effect */
#typewriter {
    border-right: none; /* Remove border from span, use custom cursor */
}

.cursor {
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Animations */
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-down {
    animation: fade-in-down 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-600 { animation-delay: 0.6s; }

/* Portfolio item hover effect */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.portfolio-item img {
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 45, 92, 0.9), transparent);
    color: white;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* WhatsApp floating button */
.whatsapp-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* General Buttons */
.btn-primary {
    @apply inline-block bg-verde-vivo text-white px-8 py-3 rounded-full font-semibold hover:bg-azul-profundo transition-all duration-300 transform hover:scale-105;
}

.btn-secondary {
    @apply inline-block bg-azul-profundo text-white px-8 py-3 rounded-full font-semibold hover:bg-verde-vivo transition-all duration-300 transform hover:scale-105;
}

/* Portfolio filter buttons */
.filter-btn {
    @apply px-5 py-2 rounded-full font-semibold text-sm transition-all duration-300;
    border: 1px solid #1E2D5C;
    color: #1E2D5C;
}

.filter-btn:hover {
    background-color: #1E2D5C;
    color: white;
}

.filter-btn.active {
    background-color: #1E2D5C;
    color: white;
}

/* Portfolio item animation for filtering */
.portfolio-item {
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.portfolio-item.hide {
    transform: scale(0.9);
    opacity: 0;
    display: none;
}
.portfolio-item.show {
    transform: scale(1);
    opacity: 1;
}

/* Contact form inputs */
.form-input {
    @apply w-full px-4 py-3 bg-gris-claro border-2 border-transparent rounded-lg focus:outline-none focus:ring-2 focus:ring-verde-vivo focus:border-transparent transition-all duration-300;
}

/* Social icons on contact page */
.social-icon {
    transition: transform 0.3s ease;
}
.social-icon:hover {
    transform: translateY(-5px);
}
