/* ========================================
   APEX HOME - Custom Styles & Animations
   ======================================== */

/* === Glass Effect === */
.glass-effect {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* === Nav Link Underline === */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #d4af37;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* === Image Hover Zoom === */
.img-container {
    overflow: hidden;
}
.img-container img {
    transition: transform 0.7s ease;
}
.img-container:hover img {
    transform: scale(1.05);
}

/* === Form Autofill Fix === */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS (multi-direction)
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Slide from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   SCROLL PROGRESS BAR
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f3e5ab, #d4af37);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* ========================================
   FLOATING ANIMATION (subtle bobbing)
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ========================================
   GOLD GLOW PULSE
   ======================================== */
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.15); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.3); }
}
.glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ========================================
   GRADIENT TEXT SHIMMER
   ======================================== */
@keyframes shimmer {
    0%, 100% {
        color: #d4af37;
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    }
    50% {
        color: #f3e5ab;
        text-shadow: 0 0 25px rgba(243, 229, 171, 0.4);
    }
}
.text-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

/* ========================================
   SECTION DIVIDER LINE GROW
   ======================================== */
.line-grow {
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.line-grow.active {
    width: 2rem;
}

/* ========================================
   SMOOTH COUNTER NUMBER
   ======================================== */
.counter-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   HERO PARALLAX OVERLAY
   ======================================== */
.hero-parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ========================================
   INFINITE MARQUEE
   ======================================== */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-item {
    flex: 0 0 auto;
    width: 280px;
    height: 380px;
    margin-right: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.marquee-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(212, 175, 55, 0.2);
}
.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.marquee-item:hover img {
    transform: scale(1.05);
}
@media (min-width: 768px) {
    .marquee-item {
        width: 350px;
        height: 450px;
    }
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 25, 47, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 80;
    backdrop-filter: blur(8px);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: #d4af37;
    color: #0a192f;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* ========================================
   SMOOTH LINK HIGHLIGHT (active nav)
   ======================================== */
.nav-link.active-link {
    color: #d4af37 !important;
}
.nav-link.active-link::after {
    width: 100%;
}
