/* Custom styles for CEIP Monseñor Alves Bras */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Navigation styles */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d7377;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu animations */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-open .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(-8px);
}
.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible {
    opacity: 1;
}
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse animation for hero dot */
@keyframes soft-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}
.animate-pulse {
    animation: soft-pulse 2s ease-in-out infinite;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

/* Print styles */
@media print {
    nav, #contact-form, .mobile-menu {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in, .fade-in.visible {
        opacity: 1;
        transform: none;
    }
}
