/* =========================================
   JBG-HUNGARY KFT. - EGYEDI STÍLUSLAP
   Kiegészítés a Tailwind CSS keretrendszerhez
   ========================================= */

/* --- 1. Glassmorphism (Üveg-effekt) Panelek --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-panel-light {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- 2. Scroll Reveal (Görgetésre előtűnő animációk) --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* --- 3. GYIK (Accordion) Finomhangolás --- */
/* Eltünteti az alapértelmezett böngésző-nyilakat a details/summary elemekről */
details > summary { 
    list-style: none; 
}

details > summary::-webkit-details-marker { 
    display: none; 
}

/* --- 4. Hero Slider (Váltakozó címsor) Animációk --- */
.hero-slide {
    opacity: 0;
    transform: translateY(15px);
    visibility: hidden;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.6s;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    position: relative;
}

/* --- 5. Scroll Progress Bar --- */
#scrollProgress {
    pointer-events: none;
}

#scrollProgressBar {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* --- 6. Back-to-Top Gomb --- */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- 7. Loading Skeleton --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* --- 8. Sticky Header & Scroll Animation --- */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sticky-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(0);
}

.sticky-header.scrolled .nav-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header.scrolled .logo-img {
    height: 2.75rem;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header .logo-img {
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menü linkek animációja scroll esetén */
.sticky-header.scrolled .nav-container a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger menü gomb animációja */
.sticky-header #mobileMenuBtn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header.scrolled #mobileMenuBtn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Telefon gomb animációja */
.sticky-header .nav-container a[href^="tel:"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header.scrolled .nav-container a[href^="tel:"] {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* --- 9. Hero Slider Animations --- */
#heroSlider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-slide.prev {
    opacity: 0;
    transform: translateX(-100px);
}

/* Progress Bar */
.hero-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, from-brand-400, to-brand-500);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Swipe hint */
.hero-swipe-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0.5;
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(-10px); opacity: 0.8; }
}

/* --- 10. Scroll Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animations */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* Parallax effect */
.parallax-slow {
    transform: translateY(0);
    transition: transform 0.1s linear;
}

.parallax-medium {
    transform: translateY(0);
    transition: transform 0.1s linear;
}

/* --- 11. Mobile Menu Animation --- */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
    padding: 0;
}

.mobile-menu.open {
    max-height: 600px;
    opacity: 1;
    padding: 1rem 0;
}

.mobile-menu-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.open .mobile-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.open .mobile-menu-item:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-item:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-item:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-menu-item:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.open .mobile-menu-item:nth-child(5) { transition-delay: 0.5s; }
.mobile-menu.open .mobile-menu-item:nth-child(6) { transition-delay: 0.6s; }

/* --- 12. Touch Optimization --- */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, a, input, textarea, select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better touch feedback */
    button:active, a:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Prevent text selection on touch devices */
    .no-select {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* --- 13. Responsive Padding --- */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* --- 14. Mobile-First Utilities --- */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-center {
        text-align: center !important;
        align-items: center !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
    
    .show-desktop {
        display: block !important;
    }
}

/* --- 15. Hamburger Menu Improvements --- */
#mobileMenuBtn {
    position: relative;
    z-index: 1001;
    touch-action: manipulation;
}

#mobileMenuBtn:active {
    transform: scale(0.95);
}

.hamburger-icon {
    transition: transform 0.3s ease;
}

.hamburger-icon.rotate {
    transform: rotate(180deg);
}

/* --- 16. Sticky Header --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sticky-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sticky-header.scrolled .logo-img {
    height: 40px;
}

.sticky-header.scrolled .nav-container {
    height: 70px;
}

.nav-container {
    transition: height 0.3s ease;
}

/* --- 17. Mobile Menu --- */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    position: relative;
    z-index: 1001;
}

.mobile-menu.open {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
}

.mobile-menu-item {
    transition: background-color 0.2s ease;
}

/* --- 18. Professional Chrome/Metallic Effects --- */
.chrome-text {
    background: linear-gradient(180deg,
        #ffffff 0%,
        #e8e8e8 15%,
        #a0a0a0 30%,
        #ffffff 45%,
        #707070 55%,
        #c8c8c8 70%,
        #404040 85%,
        #b0b0b0 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    -webkit-text-stroke: 3px white;
    text-stroke: 3px white;
    animation: chrome-shimmer 3s ease-in-out infinite;
}

@keyframes chrome-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.gold-text {
    background: linear-gradient(135deg,
        #92400e 0%,
        #b45309 15%,
        #d97706 30%,
        #fbbf24 45%,
        #fef3c7 55%,
        #fbbf24 65%,
        #d97706 80%,
        #92400e 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gold-shimmer 4s ease-in-out infinite;
}

@keyframes gold-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.shimmer-text {
    background-image: linear-gradient(
        105deg,
        #92400e 0%,
        #b45309 20%,
        #d97706 35%,
        #fbbf24 43%,
        #fef9c3 50%,
        #fbbf24 57%,
        #d97706 65%,
        #b45309 80%,
        #92400e 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-position: 0% center;
    animation: shimmer-sweep 2.8s linear infinite;
}

@keyframes shimmer-sweep {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 100% center;
    }
}

.chrome-effect {
    background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 25%, #b0b0b0 50%, #ffffff 75%, #e0e0e0 100%);
    background-size: 200% 200%;
    animation: chrome-shine 3s ease-in-out infinite;
}

@keyframes chrome-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.metallic-gradient {
    background: linear-gradient(135deg, 
        #2c3e50 0%, 
        #34495e 25%, 
        #5d6d7e 50%, 
        #34495e 75%, 
        #2c3e50 100%);
    background-size: 200% 200%;
    animation: metallic-flow 4s ease-in-out infinite;
}

@keyframes metallic-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- 19. Modern Wow Effects --- */
.aurora-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    contain: layout paint;
}

.aurora-mesh::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(234, 179, 8, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 70%, rgba(234, 179, 8, 0.15) 0%, transparent 50%);
    animation: aurora-drift 15s ease-in-out infinite;
    filter: blur(60px);
}

@keyframes aurora-drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.glow-border {
    position: relative;
    border-radius: inherit;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.6), 
        rgba(234, 179, 8, 0.6), 
        rgba(59, 130, 246, 0.6));
    background-size: 300% 300%;
    animation: glow-rotate 4s linear infinite;
    z-index: -1;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes glow-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.neon-glow {
    text-shadow: 
        0 0 3px rgba(59, 130, 246, 0.5),
        0 0 6px rgba(59, 130, 246, 0.3),
        0 0 9px rgba(59, 130, 246, 0.2);
}

.neon-glow-gold {
    text-shadow: 
        0 0 3px rgba(255, 255, 255, 0.6),
        0 0 6px rgba(255, 255, 255, 0.4),
        0 0 9px rgba(234, 179, 8, 0.3);
}

.chrome-border {
    border: 2px solid rgba(192, 192, 192, 0.5);
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.glow-chrome {
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.5),
                0 0 40px rgba(192, 192, 192, 0.3),
                0 0 60px rgba(192, 192, 192, 0.1);
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 75%,
        transparent 100%
    );
    background-size: 250% 250%;
    background-position: 200% 0;
    background-repeat: no-repeat;
    transition: background-position 0s ease;
}

.shine-effect:hover::before {
    background-position: -100% 0;
    transition: background-position 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 19. Enhanced Wow Effects --- */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4),
                    0 0 40px rgba(59, 130, 246, 0.2);
    }
    50% { 
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6),
                    0 0 60px rgba(59, 130, 246, 0.4);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scale-pulse {
    animation: scale-pulse 2s ease-in-out infinite;
}

@keyframes scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.industrial-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(250, 204, 21, 0.1) 0%, transparent 50%);
    background-size: 20px 20px;
    contain: layout paint;
}

.tech-grid {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, similar(rgba(59, 130, 246, 0.1)) 1px, transparent 1px);
    background-size: 50px 50px;
}