/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1c1917;
}

::-webkit-scrollbar-thumb {
    background: #991b1b;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7f1d1d;
}

/* Ornate Border */
.ornate-border {
    border: 3px double #991b1b;
    padding: 4px;
    position: relative;
}

.ornate-border::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid #D4AF37;
    pointer-events: none;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Header Logo Color Control */
#navbar img {
    filter: invert(1) brightness(0);
    transition: filter 0.3s ease;
}

.dark #navbar img {
    filter: invert(0) brightness(1);
}

/* Logo Animations */
@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes logoPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

@keyframes logoHeroEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-animated {
    animation: logoFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.logo-animated:hover {
    animation: logoPulse 0.6s ease-in-out;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.logo-hero-animated {
    animation: logoHeroEntrance 1.2s ease-out forwards;
}

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(253, 246, 227, 0.98) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .navbar-scrolled {
    background: rgba(12, 10, 9, 0.98) !important;
}

/* Material Icons Animation */
.material-icons {
    transition: all 0.3s ease;
}

button:hover .material-icons,
a:hover .material-icons {
    transform: scale(1.1);
}

/* Button Animations */
@keyframes buttonPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(153, 27, 27, 0);
    }
}

button,
a.inline-block,
a.inline-flex {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

button:hover,
a.inline-block:hover,
a.inline-flex:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button:active,
a.inline-block:active,
a.inline-flex:active {
    transform: translateY(0);
}

/* Card Animations */
.group:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Mobile Menu Slide */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.show {
    display: block;
    max-height: 500px;
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: opacity 0.3s, transform 0.3s;
}

#scroll-to-top.show {
    opacity: 1 !important;
    pointer-events: all !important;
    animation: buttonPulse 2s infinite;
}

/* Image Hover Effects */
img {
    transition: all 0.5s ease;
}

img:hover {
    transform: scale(1.02);
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text Animation */
@keyframes textShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.text-shine {
    background: linear-gradient(90deg,
            #991b1b 0%,
            #D4AF37 50%,
            #991b1b 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s linear infinite;
}

/* Border Animation */
@keyframes borderGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(153, 27, 27, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(153, 27, 27, 0.8), 0 0 30px rgba(212, 175, 55, 0.5);
    }
}

.border-animated {
    animation: borderGlow 2s ease-in-out infinite;
}

/* Float Animation for Icons */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Stagger Animation Delays */
.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in-up:nth-child(5) {
    animation-delay: 0.5s;
}

.fade-in-up:nth-child(6) {
    animation-delay: 0.6s;
}

/* Text Selection */
::selection {
    background-color: #991b1b;
    color: white;
}

::-moz-selection {
    background-color: #991b1b;
    color: white;
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid #991b1b;
    outline-offset: 2px;
}

/* Hover Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
}

/* Shake Animation for CTA */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-on-hover:hover {
    animation: shake 0.5s;
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.bounce-animation {
    animation: bounce 2s infinite;
}

/* Print Styles */
@media print {

    nav,
    footer,
    #scroll-to-top {
        display: none !important;
    }
}

/* Accessibility */
.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;
}

/* Infinite Scroll Reviews */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.reviews-scroll {
    display: flex;
    animation: scroll 40s linear infinite;
    width: fit-content;
}

.reviews-scroll:hover {
    animation-play-state: paused;
}

.review-card {
    flex-shrink: 0;
    width: 400px;
    margin: 0 16px;
}

@media (max-width: 768px) {
    .review-card {
        width: 320px;
    }
}

/* 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;
    }

    .logo-animated {
        animation: none;
    }
    
    .reviews-scroll {
        animation: none;
    }
}

/* Cookie Banner Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

#cookie-banner {
    transition: all 0.5s ease-in-out;
}
