/* Custom Animations & Styles for Unsulbar Website */
/* Extracted from inline styles for better performance */

/* Sandeq Section Styles */
.sandeq-section {
    position: relative;
    overflow: hidden;
    background-color: var(--color-maroon-100);
}

.sandeq-section > * {
    position: relative;
    z-index: 1;
}

/* Sandeq Boat Animation */
@keyframes sailAcross {
    0% {
        left: -80px;
        transform: translateY(-50%) rotate(-3deg);
    }
    100% {
        left: calc(100% + 80px);
        transform: translateY(-50%) rotate(1deg);
    }
}

/* Header Sandeq Boats */
.header-sandeq {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.header-sandeq-1 {
    width: 150px;
    height: 100px;
    animation: sailAcross 35s linear infinite;
    animation-delay: -10s;
}

.header-sandeq-2 {
    width: 120px;
    height: 80px;
    animation: sailAcross 40s linear infinite;
    animation-delay: -25s;
}

.header-sandeq-3 {
    width: 130px;
    height: 90px;
    animation: sailAcross 45s linear infinite;
    animation-delay: -35s;
}

.header-sandeq::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('../uploads/images/sandeq-boat.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Section Sandeq Boats */
.section-sandeq {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.section-sandeq-1 {
    width: 180px;
    height: 120px;
    animation: sailAcross 40s linear infinite;
}

.section-sandeq-2 {
    width: 140px;
    height: 90px;
    animation: sailAcross 45s linear infinite;
}

.section-sandeq-3 {
    width: 160px;
    height: 100px;
    animation: sailAcross 50s linear infinite;
}

.section-sandeq::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('../uploads/images/sandeq-boat.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger Children Animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.active > *:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.active > *:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.active > *:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.active > *:nth-child(4) {
    transition-delay: 0.4s;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(112, 15, 28, 0.15);
}

/* Float Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* Mobile Menu Animations */
.mobile-menu-hidden {
    transform: translateX(100%);
}

.mobile-menu-visible {
    transform: translateX(0);
}

.menu-open .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-open .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-accordion-btn.active svg {
    transform: rotate(180deg);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header-sandeq,
    .section-sandeq {
        animation: none !important;
    }
}

/* Performance optimization: Pause animations when not visible */
.header-sandeq,
.section-sandeq {
    animation-play-state: running;
}

@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .header-sandeq-2,
    .header-sandeq-3,
    .section-sandeq-2,
    .section-sandeq-3 {
        display: none;
    }
}
