/* animations.css - Apple-like smooth animations for GrineGóra website */

/* Global transition settings - Apple-like spring physics */
:root {
    --apple-easing: cubic-bezier(0.25, 0.1, 0.25, 1);
    --apple-duration: 0.4s;
    --apple-duration-short: 0.2s;
    --apple-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --apple-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Apply smooth transitions to all interactive elements */
*, *::before, *::after {
    transition-timing-function: var(--apple-easing);
}

/* Smooth scrolling with Apple-like physics */
html {
    scroll-behavior: smooth;
}

/* Button animations - Apple-like subtle lift */
button, .btn, .lang-btn {
    transition: transform var(--apple-duration-short) var(--apple-easing),
                box-shadow var(--apple-duration-short) var(--apple-easing),
                background-color var(--apple-duration-short) var(--apple-easing);
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

button:hover, .btn:hover, .lang-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--apple-shadow-hover);
}

button:active, .btn:active, .lang-btn:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.1s;
}

/* Link hover animations - Apple-like subtle */
a {
    transition: color var(--apple-duration-short) var(--apple-easing),
               opacity var(--apple-duration-short) var(--apple-easing);
}

a:hover {
    opacity: 0.85;
}

/* Card animations - Apple-like hover effect */
.card, .news-item, .gallery-item {
    transition: transform var(--apple-duration) var(--apple-easing),
                box-shadow var(--apple-duration) var(--apple-easing);
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.card:hover, .news-item:hover, .gallery-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--apple-shadow-hover);
}

/* Image hover effects - Apple-like subtle zoom */
.gallery-item img {
    transition: transform var(--apple-duration) var(--apple-easing),
                filter var(--apple-duration) var(--apple-easing);
    backface-visibility: hidden;
    will-change: transform, filter;
}

.gallery-item:hover img {
    transform: scale(1.02);
    filter: brightness(1.03);
}

/* Form field animations - Apple-like focus state */
input, textarea, select {
    transition: transform var(--apple-duration-short) var(--apple-easing),
                box-shadow var(--apple-duration-short) var(--apple-easing),
                border-color var(--apple-duration-short) var(--apple-easing);
    backface-visibility: hidden;
    will-change: transform, box-shadow, border-color;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-1px);
    box-shadow: var(--apple-shadow);
}

/* Navigation hover effect - Apple-like subtle */
nav ul li a {
    position: relative;
    transition: color var(--apple-duration-short) var(--apple-easing);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width var(--apple-duration) var(--apple-easing);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Mobile menu toggle animation - Apple-like */
.mobile-menu-toggle {
    transition: transform var(--apple-duration-short) var(--apple-easing);
    backface-visibility: hidden;
    will-change: transform;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

/* Language switcher animations - Apple-like subtle */
.language-switcher {
    transition: transform var(--apple-duration-short) var(--apple-easing),
                opacity var(--apple-duration-short) var(--apple-easing);
}

.language-switcher:hover {
    transform: translateY(-1px);
}

/* Document frame - Apple-like subtle border */
.document-frame {
    transition: box-shadow var(--apple-duration) var(--apple-easing);
    box-shadow: var(--apple-shadow);
    border-radius: 8px;
    overflow: hidden;
}

/* Make logo always static */
.logo-container, .logo, .logo * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    will-change: auto !important;
}

/* Remove any accidental movement on logo image */
.logo img, .logo-container img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
}
