/* Custom Styles for Lumi Website */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2C5282;
}

/* Fade in animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in.visible {
    opacity: 1;
}

/* Enhanced River flow animations */
@keyframes flow {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(30px) translateY(-10px);
    }
    50% {
        transform: translateX(-20px) translateY(5px);
    }
    75% {
        transform: translateX(10px) translateY(-5px);
    }
}

@keyframes flowReverse {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-30px) translateY(10px);
    }
    50% {
        transform: translateX(20px) translateY(-5px);
    }
    75% {
        transform: translateX(-10px) translateY(5px);
    }
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-flow {
    animation: flow 8s ease-in-out infinite;
}

.animate-flow-reverse {
    animation: flowReverse 10s ease-in-out infinite;
}

.animate-flow-slow {
    animation: flow 12s ease-in-out infinite;
}

/* Navigation link active state */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2C5282;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Ripple effect for navigation links */
.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(44, 82, 130, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-link:active::before {
    width: 200px;
    height: 200px;
}

/* Logo hover effect with gentle wave */
nav img {
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.05);
    animation: gentle-wave 2s ease-in-out infinite;
}

@keyframes gentle-wave {
    0%, 100% {
        transform: scale(1.05) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-2px);
    }
}

/* Language toggle bubble effect */
@keyframes bubble-pop {
    0% {
        transform: scale(0);
        opacity: 0.3;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ==============================================
   LOADING STATES - Professional Implementation
   ============================================== */

/* 1. Loading Spinner - Water-drop inspired */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes water-drop {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

.spinner {
    border: 3px solid #F7FAFC;
    border-top: 3px solid #4FD1C5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Water-inspired spinner - Used for main loading states */
.loading-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(79, 209, 197, 0.2);
    border-top: 4px solid #4FD1C5;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.3);
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Mini loading indicator for language toggle */
.loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4FD1C5;
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(79, 209, 197, 0.6);
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* 2. Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: inherit;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay-text {
    margin-top: 1rem;
    color: #2C5282;
    font-weight: 500;
    font-size: 0.875rem;
}

/* 3. Skeleton Loaders with Shimmer */
@keyframes skeleton-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes shimmer-wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skeleton-loader {
    background: linear-gradient(
        90deg,
        #E2E8F0 0%,
        #CBD5E0 20%,
        #E2E8F0 40%,
        #E2E8F0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Teal shimmer overlay for brand consistency */
.skeleton-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(79, 209, 197, 0.15) 50%,
        transparent 100%
    );
    animation: shimmer-wave 2s ease-in-out infinite;
}

/* Circular skeleton for profile picture */
.skeleton-circle {
    border-radius: 50%;
}

/* Rectangular skeleton for logos */
.skeleton-rect {
    border-radius: 8px;
}

/* Image loading container */
.image-loading-container {
    position: relative;
    overflow: hidden;
}

.image-loading-container img {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

.image-loading-container img.loaded {
    opacity: 1;
}

.image-loading-container .skeleton-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease-out;
}

.image-loading-container .skeleton-loader.hide {
    opacity: 0;
    pointer-events: none;
}

/* 4. Fade-in-up Animation for Content */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Stagger animations for list items */
.stagger-animation {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease-out forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0ms; }
.stagger-animation:nth-child(2) { animation-delay: 30ms; }
.stagger-animation:nth-child(3) { animation-delay: 60ms; }
.stagger-animation:nth-child(4) { animation-delay: 90ms; }
.stagger-animation:nth-child(5) { animation-delay: 120ms; }
.stagger-animation:nth-child(6) { animation-delay: 150ms; }
.stagger-animation:nth-child(7) { animation-delay: 180ms; }
.stagger-animation:nth-child(8) { animation-delay: 210ms; }
.stagger-animation:nth-child(9) { animation-delay: 240ms; }
.stagger-animation:nth-child(10) { animation-delay: 270ms; }

/* 5. Shimmer Text Effect for Language Switching */
@keyframes shimmer-text {
    0% {
        background-position: -500px 0;
    }
    100% {
        background-position: 500px 0;
    }
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        currentColor 0%,
        rgba(79, 209, 197, 0.8) 50%,
        currentColor 100%
    );
    background-size: 500px 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-text 1.2s ease-in-out;
}

/* 6. Success and Error States */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: slideInFromTop 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message-success {
    background-color: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.form-message-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.form-message-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke: #10B981;
    stroke-width: 2;
    fill: none;
    animation: checkmark 0.6s ease-in-out forwards;
}

.checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #10B981;
    stroke-width: 2;
    fill: none;
    animation: checkmark 0.3s 0.3s ease-in-out forwards;
}

/* Error icon bounce */
@keyframes error-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.error-icon {
    animation: error-bounce 0.5s ease-in-out;
}

/* 7. Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* 8. Smooth Height Transition for Accordions */
.accordion-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.accordion-content.loading {
    opacity: 0.6;
}

/* 9. Content Placeholder States */
.content-loading {
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(79, 209, 197, 0.05) 50%,
        transparent 100%
    );
    animation: shimmer-wave 2s ease-in-out infinite;
}

/* 10. Language Toggle Loading State */
#languageToggle.loading {
    pointer-events: none;
    opacity: 0.7;
}

#languageToggle.loading .loading-dot {
    display: inline-block;
}

/* Hide loading dot by default */
#languageToggle .loading-dot {
    display: none;
    margin-left: 0.5rem;
}

/* Language switcher animation */
#languageToggle {
    transition: all 0.3s ease;
    position: relative;
}

#languageToggle:hover {
    transform: scale(1.05);
}

/* Mobile menu animation */
#mobileMenu {
    transition: max-height 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.show {
    max-height: 500px;
}

/* Service card gradient borders */
.gradient-border {
    position: relative;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #4FD1C5, #2C5282) border-box;
    border: 2px solid transparent;
}

/* Animated wave background */
.wave-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.wave-bg::before,
.wave-bg::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -100%;
    left: -50%;
    background: radial-gradient(ellipse at center, #4FD1C5 0%, transparent 70%);
    opacity: 0.05;
    animation: wave 15s linear infinite;
}

.wave-bg::after {
    animation-delay: 7.5s;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Form focus effects */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.2);
}

/* Enhanced button interactions with ripple effect */
button {
    position: relative;
    overflow: hidden;
}

button:active {
    transform: scale(0.98);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

/* Water-inspired hover effect for cards */
.hover-water-effect {
    position: relative;
    overflow: hidden;
}

.hover-water-effect::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(79, 209, 197, 0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: transform 0.6s;
}

.hover-water-effect:hover::after {
    transform: rotate(45deg) translateY(-100%);
}

/* Section reveal animations */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating animation for icons */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #2C5282 0%, #4FD1C5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom selection colors */
::selection {
    background: #4FD1C5;
    color: white;
}

::-moz-selection {
    background: #4FD1C5;
    color: white;
}

/* Text readability constraints */
.prose-content {
    max-width: 65ch;
}

p, li {
    line-height: 1.7;
}

/* Responsive typography - Keep base font at 16px minimum for accessibility */
@media (max-width: 640px) {
    html {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* Enhanced focus indicators for accessibility */
*:focus-visible {
    outline: 2px solid #2C5282;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #4FD1C5;
    outline-offset: 2px;
}

/* Accessibility improvements */
/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link focus state - only shows on keyboard focus */
#skip-link:focus,
#skip-link:focus-visible {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #2C5282;
    color: white;
    border-radius: 0.5rem;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    text-decoration: none;
}

#skip-link:focus:not(:focus-visible) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* Mobile Quick Nav Styles */
#mobileQuickNav {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-nav-btn {
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-nav-btn:active {
    transform: scale(0.95);
}

/* Extended Services Toggle */
#toggleExtendedServices {
    transition: all 0.3s ease;
}

#toggleExtendedServices:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(44, 82, 130, 0.2);
}

#toggleExtendedServices:active {
    transform: translateY(0);
}

#toggleIcon {
    transition: transform 0.3s ease;
}

#extendedServicesGrid {
    transition: opacity 0.4s ease-in-out;
}

#extendedServicesGrid.grid {
    animation: fadeInGrid 0.5s ease-in-out;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-lumi-light {
        background-color: white;
    }
    
    .text-lumi-dark {
        color: black;
    }
}

/* Form validation styles */
.input-error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.input-success {
    border-color: #10b981 !important;
}

/* Responsive iframe aspect ratio container */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

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

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Wavy section dividers */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider .shape-fill {
    fill: currentColor;
}

/* Animated wave */
@keyframes wave-animation {
    0% {
        d: path("M0,32L48,37.3C96,43,192,53,288,48C384,43,480,21,576,21.3C672,21,768,43,864,48C960,53,1056,43,1152,37.3C1248,32,1344,32,1392,32L1440,32L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z");
    }
    50% {
        d: path("M0,48L48,42.7C96,37,192,27,288,32C384,37,480,59,576,58.7C672,59,768,37,864,32C960,27,1056,37,1152,42.7C1248,48,1344,48,1392,48L1440,48L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z");
    }
    100% {
        d: path("M0,32L48,37.3C96,43,192,53,288,48C384,43,480,21,576,21.3C672,21,768,43,864,48C960,53,1056,43,1152,37.3C1248,32,1344,32,1392,32L1440,32L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z");
    }
}

.wave-animated path {
    animation: wave-animation 8s ease-in-out infinite;
}

/* Custom underline effect */
.custom-underline {
    position: relative;
    text-decoration: none;
}

.custom-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4FD1C5 0%, #2C5282 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.custom-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Testimonial card styles */
.testimonial-card {
    background: linear-gradient(135deg, rgba(79, 209, 197, 0.1) 0%, rgba(44, 82, 130, 0.1) 100%);
    backdrop-filter: blur(10px);
}

/* Elegant Accordion Styles */
.accordion-button {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.accordion-button:hover {
    color: #2C5282;
}

.accordion-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.accordion-button.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.accordion-content.active {
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.4s ease-in;
}

.accordion-content-inner {
    padding-top: 0.75rem;
}

/* Loading skeleton animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: skeleton-shimmer 2s infinite;
}

/* Water Ripple Effect for Buttons */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Flowing Form Input Underlines - Wrapper Based Approach */
.input-wrapper {
    position: relative;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4FD1C5 0%, #2C5282 100%);
    transition: width 0.4s ease-out;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(79, 209, 197, 0.4);
}

.input-wrapper input:focus ~ .input-underline,
.input-wrapper textarea:focus ~ .input-underline,
.input-wrapper select:focus ~ .input-underline {
    width: 100%;
    animation: shimmer-flow 1.5s ease-in-out infinite;
}

@keyframes shimmer-flow {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 8px rgba(79, 209, 197, 0.4);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 12px rgba(79, 209, 197, 0.6);
    }
}

/* Enhanced form input focus */
input,
textarea,
select {
    position: relative;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Enhanced Card Hover with Rippling Shadow */
.bg-white.rounded-xl.shadow-xl,
.bg-gradient-to-br.rounded-xl.shadow-xl {
    transition: all 0.3s ease;
}

.bg-white.rounded-xl.shadow-xl:hover,
.bg-gradient-to-br.rounded-xl.shadow-xl:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(79, 209, 197, 0.15),
        0 10px 20px rgba(44, 82, 130, 0.1),
        0 0 40px rgba(79, 209, 197, 0.08);
    animation: shadow-ripple 1.5s ease-in-out infinite;
}

@keyframes shadow-ripple {
    0%, 100% {
        box-shadow: 
            0 20px 40px rgba(79, 209, 197, 0.15),
            0 10px 20px rgba(44, 82, 130, 0.1),
            0 0 40px rgba(79, 209, 197, 0.08);
    }
    50% {
        box-shadow: 
            0 25px 50px rgba(79, 209, 197, 0.2),
            0 15px 30px rgba(44, 82, 130, 0.15),
            0 0 50px rgba(79, 209, 197, 0.12);
    }
}

/* Animated wave dividers */
.wave-divider svg {
    animation: wave-breath 8s ease-in-out infinite;
}

/* Sticky CTA Button for Mobile */
#stickyCTA {
    /* Safe area for mobile devices */
    bottom: env(safe-area-inset-bottom);
}

#stickyCTA.visible {
    transform: translateY(0);
}

/* Hide sticky CTA when user is at contact section */
#stickyCTA.at-contact {
    transform: translateY(100%);
}

/* Back to Top Button - Mobile Optimization */
#backToTop {
    /* Ensure button stays within safe areas on mobile devices */
    /* Adjusted to account for sticky CTA on mobile (positioned higher to avoid overlap) */
    bottom: calc(7.5rem + env(safe-area-inset-bottom));
    right: calc(1.5rem + env(safe-area-inset-right));
}

@media (min-width: 768px) {
    #backToTop {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Additional mobile optimization for button visibility */
@media (max-width: 767px) {
    #backToTop {
        width: 48px;
        height: 48px;
        padding: 12px;
    }
    
    #backToTop svg {
        width: 24px;
        height: 24px;
    }
}

@keyframes wave-breath {
    0%, 100% {
        transform: translateX(0) scaleY(1);
    }
    25% {
        transform: translateX(-10px) scaleY(1.05);
    }
    50% {
        transform: translateX(0) scaleY(0.95);
    }
    75% {
        transform: translateX(10px) scaleY(1.05);
    }
}

.wave-divider path {
    animation: wave-undulate 12s ease-in-out infinite;
}

@keyframes wave-undulate {
    0%, 100% { d: path('M0,0 C300,80 600,40 900,60 C1050,70 1200,50 1200,50 L1200,120 L0,120 Z'); }
    50% { d: path('M0,10 C300,70 600,50 900,50 C1050,60 1200,60 1200,60 L1200,120 L0,120 Z'); }
}

/* Parallax river flow effect */
.animate-flow,
.animate-flow-reverse,
.animate-flow-slow {
    will-change: transform;
}

/* Extended Services Card Styling */
[data-service="5"] {
    border-left: 5px solid #4FD1C5; /* Teal */
}

[data-service="6"] {
    border-left: 5px solid #2C5282; /* Navy */
}

[data-service="7"] {
    border-left: 5px solid #D2B48C; /* Beige */
}

[data-service="8"] {
    border-left: 5px solid #4FD1C5; /* Teal */
}

[data-service="9"] {
    border-left: 5px solid #2C5282; /* Navy */
}

[data-service="10"] {
    border-left: 5px solid #D2B48C; /* Beige */
}

[data-service="11"] {
    border-left: 5px solid #4FD1C5; /* Teal */
}

[data-service] h3 {
    font-size: 1.375rem;
    line-height: 1.3;
    margin-bottom: 0.875rem;
    letter-spacing: -0.01em;
}

[data-service] [data-i18n-key="quote"] {
    font-size: 0.9375rem;
    font-style: italic;
    color: #4A5568;
    line-height: 1.5;
    border-left: 3px solid #4FD1C5;
    padding-left: 0.75rem;
    margin-bottom: 1rem;
}

[data-service] [data-i18n-key="description"] {
    font-size: 1rem;
    line-height: 1.625;
    color: #2D3748;
}

.accordion-content-inner ul {
    padding-left: 0.5rem;
}

.accordion-content-inner li {
    line-height: 1.75;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

/* Enhanced floating particles with size variation */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-particle-1 {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    top: 20%;
    left: 10%;
    animation: float-particle 8s ease-in-out infinite;
}

.hero-particle-2 {
    width: 4px;
    height: 4px;
    background: rgba(79, 209, 197, 0.3);
    top: 35%;
    left: 25%;
    animation: float-particle 10s ease-in-out infinite 1s;
}

.hero-particle-3 {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    top: 55%;
    right: 20%;
    animation: float-particle 12s ease-in-out infinite 2s;
}

.hero-particle-4 {
    width: 5px;
    height: 5px;
    background: rgba(210, 180, 140, 0.2);
    bottom: 30%;
    left: 30%;
    animation: float-particle 9s ease-in-out infinite 0.5s;
}

.hero-particle-5 {
    width: 3px;
    height: 3px;
    background: rgba(79, 209, 197, 0.25);
    top: 65%;
    right: 35%;
    animation: float-particle 11s ease-in-out infinite 1.5s;
}

.hero-particle-6 {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    top: 80%;
    left: 15%;
    animation: float-particle 13s ease-in-out infinite 2.5s;
}

.hero-particle-7 {
    width: 2px;
    height: 2px;
    background: rgba(79, 209, 197, 0.2);
    top: 45%;
    left: 70%;
    animation: float-particle 10s ease-in-out infinite 3s;
}

.hero-particle-8 {
    width: 6px;
    height: 6px;
    background: rgba(210, 180, 140, 0.15);
    bottom: 40%;
    right: 10%;
    animation: float-particle 14s ease-in-out infinite 1s;
}

.hero-particle-9 {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    top: 25%;
    right: 45%;
    animation: float-particle 9s ease-in-out infinite 2s;
}

.hero-particle-10 {
    width: 4px;
    height: 4px;
    background: rgba(79, 209, 197, 0.25);
    bottom: 25%;
    left: 60%;
    animation: float-particle 11s ease-in-out infinite 0.5s;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -15px);
        opacity: 0.6;
    }
    50% {
        transform: translate(-20px, 10px);
        opacity: 0.4;
    }
    75% {
        transform: translate(15px, -8px);
        opacity: 0.7;
    }
}