/* ============================================================
   Apartmani Božana — Custom Styles & Animations
   ============================================================ */

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- Nav active state ---- */
.nav-active {
    color: #f59e0b !important;
}

.lang-btn.active {
    background: rgba(245, 158, 11, 0.3) !important;
    color: white !important;
    font-weight: 600;
}

/* When scrolled */
.bg-white .lang-btn.active {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

/* ---- Animations ---- */

/* Slow zoom for hero background */
@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.animate-slow-zoom {
    animation: slowZoom 20s ease-in-out infinite alternate;
}

/* Float animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 8s ease-in-out 2s infinite;
}

/* Fade in up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.animate-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.animate-on-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

/* ---- Calendar ---- */
.booking-calendar {
    user-select: none;
}

.cal-day {
    transition: all 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.cal-day:hover {
    z-index: 1;
}

/* ---- Lightbox ---- */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox-img {
    transition: opacity 0.3s ease;
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
}

/* ---- Page transitions ---- */
#app {
    animation: fadeIn 0.3s ease;
}

/* ---- Responsive improvements ---- */
@media (max-width: 768px) {
    .cal-month {
        margin-bottom: 1rem;
    }

    .cal-day {
        height: 2.25rem !important;
        font-size: 0.75rem !important;
    }

    .cal-day-header {
        font-size: 0.65rem !important;
    }
}

/* ---- Summer gradient accents ---- */
.summer-gradient {
    background: linear-gradient(135deg, #f59e0b, #ef4444, #f59e0b);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ---- Pulse ring for today on calendar ---- */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }

    100% {
        box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
    }
}

/* ---- Wave animation ---- */
@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ---- Hero particles ---- */
@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-30px) translateX(10px) scale(1.5);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-15px) translateX(-15px) scale(1);
        opacity: 0.2;
    }

    75% {
        transform: translateY(-40px) translateX(5px) scale(1.3);
        opacity: 0.5;
    }
}

/* ---- Hero subtitle gradient shimmer ---- */
.hero-subtitle-gradient {
    background-size: 200% auto;
    animation: subtitleShimmer 4s ease-in-out infinite;
}

@keyframes subtitleShimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }
}

/* ---- Selection effect ---- */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: inherit;
}

/* ---- Loading spinner ---- */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}