/* Base styles and utilities not covered by Tailwind */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure marquee text does not clip diacritics */
.animate-marquee span {
    line-height: 1.65 !important;
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
}

/* Shimmer text effect */
@keyframes shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.animate-shimmer {
    background: linear-gradient(90deg, #8c5227 0%, #df9e28 50%, #8c5227 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    display: inline-block;
    font-weight: 700;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a88151;
}



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

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

/* Subtle image placeholder styling */
.aspect-video, .aspect-\[4\/3\] {
    background-image: repeating-linear-gradient(
        45deg,
        #f3f4f6 25%,
        transparent 25%,
        transparent 75%,
        #f3f4f6 75%,
        #f3f4f6
    ), repeating-linear-gradient(
        45deg,
        #f3f4f6 25%,
        #ffffff 25%,
        #ffffff 75%,
        #f3f4f6 75%,
        #f3f4f6
    );
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
}

/* Premium Cinematic Transitions & Animations */

/* Ken Burns Pan & Zoom Effect */
@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.08) translate(-1%, -0.5%); }
    100% { transform: scale(1) translate(0, 0); }
}
.animate-kenburns {
    animation: kenburns 25s ease-in-out infinite;
}

/* 3D-Like Cinematic Floating Animation */
@keyframes float-cinematic {
    0%, 100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-15px) rotate(1.5deg);
    }
}
.animate-float-cinematic {
    animation: float-cinematic 6s ease-in-out infinite;
}

/* Ultra Smooth Hover Zoom on Images */
.hover-zoom-img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}
.hover-zoom-img:hover {
    transform: scale(1.06);
    filter: brightness(1.04);
}

/* Cinematic Elevating and Scaling for Cards */
.hover-scale-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}
.hover-scale-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(140, 82, 39, 0.12);
    border-color: #DF9E28 !important;
}

/* Zoom Container to mask Ken Burns scaling */
.zoom-container {
    overflow: hidden;
    position: relative;
}

/* VietQR Scan Effect */
@keyframes qr-scan {
    0% { top: 0%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.animate-qr-scan {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #DF9E28;
    box-shadow: 0 0 10px #DF9E28, 0 0 20px #DF9E28;
    animation: qr-scan 2.2s ease-in-out infinite;
}

/* Active Selector Cards for Calculator Wizard */
.calc-card-btn-active {
    border-color: #DF9E28 !important;
    background-color: #FFFDF6 !important; /* Warm light cream */
    box-shadow: 0 8px 25px rgba(223, 158, 40, 0.12);
    transform: translateY(-2px);
}
.calc-card-btn-active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: #DF9E28;
    color: #332211;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gentle bounce animation for scroll indicator */
@keyframes bounce-gentle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}
.animate-bounce-gentle {
    animation: bounce-gentle 1.6s ease-in-out infinite;
}

/* Ensure proper line-height for Vietnamese accented text in all bold headings */
h1 {
    line-height: 1.55 !important;
}
h2 {
    line-height: 1.45 !important;
}
h3 {
    line-height: 1.4 !important;
}

/* Image protection: Disable user drag, selection, and save options */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
