/* Custom styles for Colegio Marin Amat */

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

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.5);
        transform-origin: top;
    }
}

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

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

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

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Navbar styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c8a45c;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #0a1628 !important;
    background: rgba(10, 22, 40, 0.04) !important;
}

.navbar-scrolled .font-display,
.navbar-scrolled .text-navy-900 {
    color: #0a1628 !important;
}

/* Mobile menu */
#mobileMenu {
    animation: fadeIn 0.3s ease;
}

.mobile-link {
    transition: all 0.3s ease;
}

/* Hero section */
#inicio {
    position: relative;
}

/* Service cards hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c8a45c;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #c8a45c;
    color: #0a1628;
}

/* Map hover */
iframe:hover {
    filter: grayscale(0);
    transition: filter 0.5s ease;
}

/* Footer link hover underline */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c8a45c;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-display.font-800 {
        font-size: 2.5rem;
    }

    .font-display.font-bold.text-4xl {
        font-size: 2rem;
    }
}
