/**
 * BranskoTel.eu - Enhanced Animations & UI Styles
 * Additional CSS for script.js animations and enhancements
 */

/* ====== ANIMATION BASE STYLES ====== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-child.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ====== SCROLL TO TOP BUTTON ====== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(255, 102, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #e55a00;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 102, 0, 0.4);
}

.scroll-to-top i {
    font-size: 18px;
}

/* ====== ENHANCED HEADER EFFECTS ====== */
.header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header.hidden {
    transform: translateY(-100%);
}

/* ====== MOBILE MENU ENHANCEMENTS ====== */
.nav-links {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .nav-links {
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.mobile-menu-toggle i {
    transition: all 0.3s ease;
}

body.menu-open {
    overflow: hidden;
}

/* ====== BUTTON ENHANCEMENTS ====== */
.cta-button, .view-more {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button::before, .view-more::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;
}

.cta-button:hover::before, .view-more:hover::before {
    left: 100%;
}

.cta-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.cta-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ====== CARD ENHANCEMENTS ====== */
.product-card, .stat-item, .value-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.product-card::before, .stat-item::before, .value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.05) 0%, rgba(255, 102, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.product-card:hover::before, .stat-item:hover::before, .value-item:hover::before {
    opacity: 1;
}

/* ====== FORM ENHANCEMENTS ====== */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group.focused label {
    transform: translateY(-20px) scale(0.9);
    color: #ff6600;
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.form-group input.error, .form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.875rem;
    color: #ef4444;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ====== PROGRESS INDICATOR ====== */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #ff6600;
    z-index: 9999;
    transition: width 0.3s ease;
    border-radius: 0 3px 3px 0;
}

/* ====== NOTIFICATIONS ====== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.warning {
    background: #f59e0b;
}

.notification.info {
    background: #3b82f6;
}

.notification .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.notification .close-btn:hover {
    opacity: 1;
}

/* ====== TOOLTIPS ====== */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== SPECIAL EFFECTS ====== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 102, 0, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ====== LOADING STATES ====== */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite;
}

/* ====== RESPONSIVE ENHANCEMENTS ====== */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .tooltip {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .progress-indicator {
        height: 2px;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-top i {
        font-size: 16px;
    }
}

/* ====== ACCESSIBILITY ENHANCEMENTS ====== */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .stagger-child,
    .scroll-to-top,
    .header,
    .nav-links,
    .cta-button,
    .view-more,
    .product-card,
    .stat-item,
    .value-item,
    .form-group input,
    .form-group textarea,
    .notification,
    .tooltip {
        transition: none;
        animation: none;
    }
    
    .float,
    .pulse-glow,
    .shimmer {
        animation: none;
    }
}

/* Focus styles for better accessibility */
.cta-button:focus,
.view-more:focus,
input:focus,
textarea:focus,
button:focus {
    outline: 2px solid #ff6600;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }
    
    .tooltip {
        border: 1px solid white;
    }
}