/* ========================================
   Marine Park Family Vision — Custom Styles
   ======================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5f7;
}
::-webkit-scrollbar-thumb {
    background: #dcb8cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c98fae;
}

/* Selection color */
::selection {
    background: #dcb8cc;
    color: #31111d;
}

/* Floating card animations */
.floating-card-1 {
    animation: floatCard1 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: floatCard2 7s ease-in-out infinite;
}
.floating-card-3 {
    animation: floatCard3 5s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-1deg); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
}

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

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

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

/* Active nav state */
.nav-link.active::after {
    width: 60%;
}

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }

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

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

/* Pulse ring for badge */
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

/* Form input focus ring animation */
input:focus, select:focus, textarea:focus {
    animation: focusRing 0.3s ease forwards;
}

@keyframes focusRing {
    from { box-shadow: 0 0 0 3px rgba(162, 73, 114, 0.1); }
    to { box-shadow: 0 0 0 3px rgba(162, 73, 114, 0.2); }
}

/* Image hover zoom container */
img {
    transition: transform 0.6s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .floating-card-1 {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        display: inline-block;
    }
    .floating-card-2 {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        display: inline-block;
    }
    .floating-card-3 {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        max-width: 100%;
    }
    
    #hero {
        min-height: auto;
        padding-bottom: 3rem;
    }
    
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
    }
}
