/* ===== Custom Styles for Total Health Nutrition Center ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0a0f0a;
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #e6b84b, #d4a017);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #e6b84b !important;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(10, 15, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(85, 122, 62, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu */
.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(230, 184, 75, 0.1);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.mobile-link:hover::before {
    width: calc(100% + 24px);
}

.mobile-link:hover {
    color: #e6b84b !important;
}

/* Menu button animations */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Floating Cards ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-main {
    animation-delay: 0s;
}

.floating-card.card-top-right {
    animation-delay: -1.5s;
}

.floating-card.card-bottom-left {
    animation-delay: -3s;
}

.floating-card.card-mid {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .floating-card {
        animation: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #0a0f0a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #3d5f2d;
}

/* ===== Selection ===== */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #f2f7f2;
}

/* ===== Focus ===== */
:focus-visible {
    outline: 2px solid #e6b84b;
    outline-offset: 2px;
}

/* ===== Button hover glow ===== */
button:hover, a:hover {
    transition: all 0.3s ease;
}

/* ===== Input autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #142014 inset !important;
    -webkit-text-fill-color: #e3ecd3 !important;
    caret-color: #e3ecd3;
}

/* ===== Gold shimmer on hover for cards ===== */
.group:hover .group-hover\:scale-110 {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Form transitions ===== */
input:focus, textarea:focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Service card hover ===== */
.group {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Smooth section transitions ===== */
section {
    position: relative;
}

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