/* Custom styles for Whale Eagle Counseling and Spiritual Center */

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #1e293b;
}

/* Print styles */
@media print {
    nav, .mobile-menu, #contactForm {
        display: none;
    }
    
    body {
        color: #0f172a;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* 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;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .service-card {
        border: 1px solid ButtonText;
    }
    
    .btn-magnetic {
        border: 1px solid ButtonText;
    }
}

/* Thin line animations */
@keyframes drawLine {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Subtle pulse for CTA buttons */
@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(13, 148, 136, 0);
    }
}

.btn-magnetic:hover {
    animation: subtlePulse 2s ease-in-out infinite;
}

/* Image hover zoom effect */
.service-card img,
section img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover img {
    transform: scale(1.02);
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Mobile menu animations */
.mobile-menu.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }

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

/* Hamburger to X animation */
#menuIcon.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuIcon.active #line2 {
    opacity: 0;
}

#menuIcon.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px;
}

/* Form input transitions */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    background-color: #fff;
}

/* Select dropdown styling */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Textarea resize handle */
textarea.form-input {
    resize: vertical;
    min-height: 120px;
}
