/* Prva Lekcija — core animations & utilities (extracted from inline header.php) */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes pl-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); max-height: 0; }
    to   { opacity: 1; transform: translateY(0); max-height: 500px; }
}
@keyframes slideUp {
    from { opacity: 1; transform: translateY(0); max-height: 500px; }
    to   { opacity: 0; transform: translateY(-20px); max-height: 0; }
}
@keyframes dots {
    0%, 20%   { content: ''; }
    40%       { content: '.'; }
    60%       { content: '..'; }
    80%, 100% { content: '...'; }
}

.animate-fadeInUp     { animation: fadeInUp 0.6s ease-out; }
.animate-slideInRight { animation: slideInRight 0.5s ease-out; }
.animate-scaleIn      { animation: scaleIn 0.4s ease-out; }
.animate-bounceIn     { animation: bounceIn 0.8s ease-out; }
.animate-pulse        { animation: pl-pulse 2s infinite; }
.animate-float        { animation: float 3s ease-in-out infinite; }
.mobile-menu-slide-down { animation: slideDown 0.3s ease-out forwards; }
.mobile-menu-slide-up   { animation: slideUp 0.3s ease-out forwards; }

.hover-lift  { transition: all 0.3s ease; }
.hover-lift:hover  { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); }
.hover-glow  { transition: all 0.3s ease; }
.hover-glow:hover  { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
.hover-scale { transition: all 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }

.gradient-bg        { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-bg-blue   { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-bg-green  { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.gradient-bg-purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

.loading-dots { display: inline-block; }
.loading-dots::after { content: ''; animation: dots 1.5s steps(5, end) infinite; }

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 1;
}
.parallax .absolute { position: absolute; z-index: 0; }
.parallax .relative { position: relative; z-index: 10; }

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-shadow { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); }

.btn-modern { position: relative; overflow: hidden; transition: all 0.3s ease; }
.btn-modern::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.btn-modern:hover::before { left: 100%; }

.card-hover { transition: all 0.3s ease; position: relative; }
.card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}
.card-hover:hover::before { opacity: 1; }

.scroll-reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

section { position: relative; z-index: 1; }
section:nth-child(2) { z-index: 2; }
section:nth-child(3) { z-index: 3; }
section:nth-child(4) { z-index: 4; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }

a, button { transition: transform 0.15s ease; }
a:active, button:active { transform: scale(0.98); }

/* Responsive emergency */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, picture, svg, embed, object { max-width: 100%; height: auto; }
table { max-width: 100%; }

/* Visible focus indicators (WCAG 2.2) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion respect (vestibular safety) */
@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;
    }
    .animate-float, .animate-pulse { animation: none !important; }
}
