/* Modern Animations & Visual Effects */

/* Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(184, 3, 61, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(184, 3, 61, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f0f0f0, #e0e0e0);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #B8033D, #8B0022);
    border-radius: 6px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8B0022, #B8033D);
}

/* Page Load Animation */
.page-wrapper {
    animation: fadeIn 0.8s ease-out;
}

/* Hero Section Enhancements */
.hero-container {
    position: relative;
    height: 85vh;
    width: 100%;
    overflow: hidden;
}

.hero-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(184, 3, 61, 0.1) 0%, rgba(0, 0, 0, 0) 50%);
    z-index: 1;
    pointer-events: none;
}

.media-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Enhanced Typing Animation */
.typing-animation {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid white;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white }
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-hover:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-animate:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Marquee Enhancement */
@keyframes smooth-marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.announcement-marquee {
    display: inline-block;
    animation: smooth-marquee 30s linear infinite;
    padding-left: 100%;
    will-change: transform;
}

.announcement-marquee:hover {
    animation-play-state: paused;
}

/* Gallery Scroll Enhancement */
@keyframes smooth-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.gallery-track {
    animation: smooth-scroll 40s linear infinite;
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

.gallery-track:hover {
    animation-play-state: paused;
}

/* Spotlight Modal Enhancement */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #B8033D;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Parallax Effect */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, #B8033D, #8B0022, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Elements */
.floating-element {
    animation: float 3s ease-in-out infinite;
}

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

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

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}

/* Hover Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(184, 3, 61, 0.4);
}

/* Section Entrance Animations */
.section-entrance {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section-entrance.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-animate {
    animation: countUp 1s ease-out;
}

/* Scroll Indicator Animation */
@keyframes scroll-indicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

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

/* Bounce Slow Animation */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

/* Pulse Slow Animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.2;
    }
}

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

/* Ken Burns Effect */
@keyframes ken-burns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.animate-ken-burns {
    animation: ken-burns 20s ease-in-out infinite alternate;
}

/* Shimmer Animation */
.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Line clamp utility */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient borders */
.gradient-border {
    border: double 3px transparent;
    background-image: linear-gradient(white, white), 
                      linear-gradient(to right, #B8033D, #8B0022);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Text shadow effects */
.text-shadow-lg {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.text-shadow-xl {
    text-shadow: 4px 4px 8px rgba(0,0,0,0.4);
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 1.125rem;
    }
    
    /* Disable heavy animations on mobile */
    .gallery-track {
        animation: none;
    }
    
    .announcement-marquee {
        animation-duration: 20s;
    }
}

@media (min-width: 768px) {
    .text-responsive {
        font-size: 1.25rem;
    }
}

/* Custom focus styles */
.focus-ring {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 3, 61, 0.3);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Custom cursor effects */
.pointer-cursor {
    cursor: pointer;
}

.grab-cursor {
    cursor: grab;
}

.grab-cursor:active {
    cursor: grabbing;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-container {
        height: calc(var(--vh, 1vh) * 90);
    }
    
    /* Reduce animations on mobile for performance */
    .animate-float,
    .animate-float-slow,
    .animate-pulse-slow {
        animation-duration: 4s;
    }
    
    /* Better touch targets */
    .btn-animate,
    .nav-link,
    .mobile-link {
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .hero-container,
    .announcement-marquee,
    .btn-animate,
    .mobile-toggle,
    .progress-bar {
        display: none;
    }
}