/* ===== Custom Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fade-up-delay {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up-delay-2 {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 7s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-fade-up-delay {
    animation: fade-up-delay 0.8s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-fade-up-delay-2 {
    animation: fade-up-delay-2 0.8s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: translateX(0);
}

/* ===== Menu Tabs ===== */
.menu-tab {
    background: transparent;
    color: var(--tw-text-slate-500, #64748b);
    border: 1.5px solid transparent;
}

.menu-tab:hover {
    background: rgba(20, 184, 166, 0.1);
    color: #0d9488;
    border-color: rgba(20, 184, 166, 0.3);
}

.menu-tab.active {
    background: #0d9488;
    color: white;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.menu-item {
    animation: scale-in 0.5s ease-out forwards;
}

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

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

::-webkit-scrollbar-track {
    background: #f0fdfa;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #0d9488, #14b8a6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0f766e, #0d9488);
}

/* ===== Selection ===== */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #134e4a;
}

/* ===== Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ===== Mobile Menu Link Animations ===== */
.mobile-link {
    position: relative;
    display: inline-block;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5eead4;
    transition: width 0.3s ease;
}

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

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Image Loading ===== */
img {
    background-color: #f0fdfa;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, #contacto, footer {
        display: none;
    }
}
