/* Custom styles for hcom_styles */

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 248, 240, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(5, 78, 59, 0.08) !important;
}

nav.scrolled .font-display {
    color: #064E3B !important;
}

/* Scroll reveal base — content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply hidden state when JS is active and motion is preferred */
.animate-motion .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Scroll reveal active state */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float 4s ease-in-out infinite 0.5s;
}

.floating-card-3 {
    animation: float 4s ease-in-out infinite 1s;
}

/* Scroll dot animation */
@keyframes scrollDot {
    0% { top: -100%; }
    100% { top: 200%; }
}

.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6EE7B7;
}

/* Selection color */
::selection {
    background: #D1FAE5;
    color: #064E3B;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Nav link hover underline */
.nav-link {
    position: relative;
}

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

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

/* Mobile link hover */
.mobile-link:hover {
    padding-left: 8px;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hero image grid hover */
.grid-cols-2 .rounded-3xl img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Service card hover lift */
.group:hover {
    transform: translateY(-4px);
}

.group {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Testimonial card hover */
.bg-white\/5:hover {
    transform: translateY(-4px);
}

.bg-white\/5 {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

/* Form input focus glow */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Gallery image hover */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Print styles */
@media print {
    nav, #back-to-top, .floating-card, .floating-card-2, .floating-card-3 {
        display: none !important;
    }
}
