/* Custom styles for Island Explorers Childcare */

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

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

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

::-webkit-scrollbar-thumb {
    background: #831443;
    border-radius: 6px;
}

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

/* Animation for floating elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Fade in animation for scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure animations only run on elements that support them */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

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

/* Reduced motion preference */
@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;
    }
}

/* Print styles */
@media print {
    nav,
    .animate-float,
    .animate-float-delayed {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Focus visible styles for accessibility */
:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure proper image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift */
img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Custom selection color */
::selection {
    background-color: #831443;
    color: #fff;
}

::-moz-selection {
    background-color: #831443;
    color: #fff;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Ensure good contrast for all text */
.text-plum-900 {
    color: #500724;
}

.text-plum-800 {
    color: #831443;
}

.text-plum-700 {
    color: #9d174d;
}

.text-plum-600 {
    color: #be185d;
}

.text-plum-500 {
    color: #db2777;
}

.text-amber-900 {
    color: #451a03;
}

.text-amber-800 {
    color: #78350f;
}

.text-amber-700 {
    color: #92400e;
}

.text-amber-600 {
    color: #b45309;
}

.text-amber-500 {
    color: #d97706;
}

.text-amber-400 {
    color: #fbbf24;
}

/* Ensure all interactive elements are keyboard accessible */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Ensure proper spacing on all screen sizes */
@media (min-width: 360px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 359px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
