/* CS-Lak Kft. - Animations Stylesheet */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.animate {
    opacity: 0;
}

.animate.animated {
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in.animated {
    animation-name: fadeIn;
}

.animate-fade-in-left.animated {
    animation-name: fadeInLeft;
}

.animate-fade-in-right.animated {
    animation-name: fadeInRight;
}

.animate-fade-in-up.animated {
    animation-name: fadeInUp;
}

.animate-scale-in.animated {
    animation-name: scaleIn;
}

/* Stagger Animation Delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* Header Animation */
.header {
    animation: slideInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Animations */
.hero-badge {
    animation: fadeIn 0.6s 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeIn 0.6s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.hero-text {
    animation: fadeIn 0.6s 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.hero-buttons {
    animation: fadeIn 0.6s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.hero-image-container {
    animation: fadeInRight 0.8s 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Gallery Hover Effects */
.gallery-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
    animation: shimmer 1.5s ease infinite;
}

/* Reference Card Animation */
.reference-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reference-card:hover .reference-image {
    transform: scale(1.05);
}

.reference-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service Card Animation */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    animation: pulse 0.6s ease;
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll Indicator - styles moved to style.css */

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Image Reveal Animation */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.image-reveal.revealed::before {
    transform: scaleX(0);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Parallax Effect Helper */
.parallax-container {
    overflow: hidden;
}

.parallax-element {
    will-change: transform;
}

/* =====================================================
   NEW SECTIONS ANIMATIONS
   ===================================================== */

/* Why Us Cards */
.why-us-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-us-card:hover {
    transform: translateY(-8px);
}

.why-us-card:hover .why-us-icon {
    animation: pulse 0.6s ease;
    transform: scale(1.1);
}

.why-us-icon {
    transition: transform 0.3s ease;
}

/* Partner Logos */
.partner-logo {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-logo:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Service Categories */
.service-category {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-category:hover {
    transform: translateY(-8px);
}

.service-category-header {
    transition: all 0.3s ease;
}

.service-category:hover .service-category-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.service-category:hover .service-category-icon {
    animation: float 1s ease-in-out infinite;
}

.service-list li {
    transition: all 0.3s ease;
}

.service-list li:hover {
    background-color: var(--accent);
    padding-left: 12px;
    border-radius: var(--border-radius-sm);
}

/* Sustainability Section */
.sustainability-feature {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sustainability-feature:hover {
    transform: translateX(15px);
    background-color: rgba(255, 255, 255, 0.2);
}

.sustainability-feature:hover .sustainability-feature-icon {
    animation: pulse 0.6s ease;
}

.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.15);
}

.stat-number {
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* Process Steps */
.process-step {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover .process-step-number {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(45, 90, 123, 0.3);
}

.process-step-number {
    transition: all 0.3s ease;
}

.process-step-content {
    transition: all 0.3s ease;
}

.process-step:hover .process-step-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.process-step:hover .process-step-icon {
    animation: float 1s ease-in-out infinite;
}

.process-duration {
    transition: all 0.3s ease;
}

.process-step:hover .process-duration {
    transform: scale(1.05);
}

/* FAQ Items */
.faq-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-icon {
    transition: all 0.3s ease;
}

.faq-item.active .faq-question {
    background-color: var(--accent);
}

/* Legal Cards */
.legal-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow);
}

.legal-card:hover .legal-icon {
    animation: pulse 0.6s ease;
    transform: scale(1.1);
}

.legal-icon {
    transition: transform 0.3s ease;
}

/* Emergency Info */
.emergency-info {
    transition: all 0.3s ease;
}

.emergency-info:hover {
    transform: translateX(10px);
    background-color: var(--white);
}

/* Form Elements */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: scale(1.01);
}

.btn-large {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

/* Footer CTA */
.footer-cta {
    transition: all 0.3s ease;
}

.footer-cta:hover {
    transform: translateX(5px);
}

/* Certification Badges */
.certification-badge {
    transition: all 0.3s ease;
}

.certification-badge:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* =====================================================
   ELEGANT ISOMETRIC HOUSE ANIMATION
   ===================================================== */

.house-3d-container {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 1000px;
}

.iso-house {
    width: 380px;
    height: 380px;
    position: relative;
    transform: rotateX(5deg);
}

/* Blueprint Grid Background */
.blueprint-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(74, 124, 111, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(74, 124, 111, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 50%;
    opacity: 0;
    animation: fadeIn 1s 0.2s ease-out forwards;
}

/* Main Building */
.building {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 220px;
}

/* Foundation */
.foundation {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: 15px;
}

.foundation-top {
    position: absolute;
    width: 190px;
    height: 45px;
    background: linear-gradient(135deg, rgba(74, 124, 111, 0.15) 0%, rgba(74, 124, 111, 0.08) 100%);
    border: 1px solid rgba(74, 124, 111, 0.3);
    transform: rotateX(60deg) translateY(-30px);
    opacity: 0;
    animation: elegantFadeUp 0.8s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.foundation-front {
    position: absolute;
    width: 190px;
    height: 15px;
    background: linear-gradient(180deg, #5A8A7D 0%, #4A7C6F 100%);
    border-radius: 2px;
    opacity: 0;
    animation: elegantFadeUp 0.8s 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.foundation-side {
    position: absolute;
    right: -18px;
    width: 20px;
    height: 15px;
    background: linear-gradient(180deg, #3D6B5F 0%, #2D5B4F 100%);
    transform: skewY(-45deg);
    transform-origin: top left;
    opacity: 0;
    animation: elegantFadeUp 0.8s 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Walls */
.walls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 130px;
}

.wall {
    position: absolute;
    transition: all 0.5s ease;
}

.wall-front {
    width: 180px;
    height: 130px;
    background: linear-gradient(180deg, #FAFBFA 0%, #F0F2F0 50%, #E8EBE8 100%);
    border: 1px solid rgba(74, 124, 111, 0.2);
    box-shadow: 
        inset 0 0 60px rgba(255, 255, 255, 0.5),
        0 10px 40px rgba(0, 0, 0, 0.08);
    opacity: 0;
    animation: buildWall 1s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wall-side {
    right: -22px;
    width: 25px;
    height: 130px;
    background: linear-gradient(180deg, #E8EBE8 0%, #D8DBD8 100%);
    border: 1px solid rgba(74, 124, 111, 0.15);
    border-left: none;
    transform: skewY(-45deg);
    transform-origin: top left;
    opacity: 0;
    animation: buildWall 1s 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wall-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 180px;
    height: 4px;
    background: linear-gradient(90deg, #4A7C6F, #6A9C8F, #4A7C6F);
    opacity: 0;
    animation: elegantFadeUp 0.6s 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Windows */
.windows {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 130px;
    pointer-events: none;
}

.window-frame {
    position: absolute;
    background: #FFFFFF;
    border: 2px solid rgba(74, 124, 111, 0.4);
    box-shadow: 
        inset 0 0 20px rgba(135, 206, 235, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.window-glass {
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, 
        rgba(135, 206, 235, 0.4) 0%, 
        rgba(173, 216, 230, 0.6) 50%,
        rgba(135, 206, 235, 0.3) 100%);
    border: 1px solid rgba(74, 124, 111, 0.2);
}

.window-frame::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    right: 3px;
    height: 1px;
    background: rgba(74, 124, 111, 0.3);
}

.window-frame::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 3px;
    bottom: 3px;
    width: 1px;
    background: rgba(74, 124, 111, 0.3);
}

.window-1 {
    width: 40px;
    height: 50px;
    top: 25px;
    left: 20px;
    animation: windowReveal 0.6s 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.window-2 {
    width: 40px;
    height: 50px;
    top: 25px;
    right: 20px;
    animation: windowReveal 0.6s 1.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.window-3 {
    width: 30px;
    height: 35px;
    top: 35px;
    left: 75px;
    animation: windowReveal 0.6s 1.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Door */
.door-frame {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 130px;
    pointer-events: none;
}

.door-panel {
    position: absolute;
    bottom: 0;
    left: 70px;
    width: 40px;
    height: 65px;
    background: linear-gradient(180deg, #5A4A3A 0%, #4A3A2A 100%);
    border: 2px solid rgba(74, 124, 111, 0.3);
    border-bottom: none;
    border-radius: 2px 2px 0 0;
    opacity: 0;
    animation: doorReveal 0.6s 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.door-panel::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #C9A962;
    border-radius: 50%;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(201, 169, 98, 0.5);
}

.door-panel::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 6px;
    right: 6px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1px;
}

/* Roof */
.roof-structure {
    position: absolute;
    bottom: 145px;
    left: 50%;
    transform: translateX(-50%);
    width: 210px;
    height: 80px;
}

.roof-main {
    position: absolute;
    width: 0;
    height: 0;
    left: 0;
    border-left: 105px solid transparent;
    border-right: 105px solid transparent;
    border-bottom: 65px solid #4A7C6F;
    filter: drop-shadow(0 -5px 15px rgba(74, 124, 111, 0.2));
    opacity: 0;
    animation: roofReveal 0.8s 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.roof-side {
    position: absolute;
    right: -22px;
    top: 30px;
    width: 25px;
    height: 35px;
    background: linear-gradient(180deg, #3D6B5F 0%, #2D5B4F 100%);
    transform: skewY(-45deg);
    transform-origin: top left;
    opacity: 0;
    animation: elegantFadeUp 0.6s 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.roof-edge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 210px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4C4A8, transparent);
    opacity: 0;
    animation: fadeIn 0.5s 1.3s ease-out forwards;
}

/* Building Systems - Pipes */
.systems {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 130px;
    pointer-events: none;
}

.pipe {
    position: absolute;
    background: linear-gradient(90deg, #5A9182, #6AA192, #5A9182);
    border-radius: 2px;
    opacity: 0;
}

.pipe-main {
    width: 3px;
    height: 60px;
    bottom: 0;
    right: 35px;
    animation: pipeGrow 0.5s 2.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pipe-branch {
    width: 25px;
    height: 3px;
    bottom: 60px;
    right: 35px;
    animation: pipeGrow 0.4s 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pipe-vent {
    width: 3px;
    height: 25px;
    bottom: 63px;
    right: 57px;
    animation: pipeGrow 0.4s 2.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.heating-unit {
    position: absolute;
    width: 30px;
    height: 22px;
    bottom: 5px;
    right: 55px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F0F0 100%);
    border: 1px solid rgba(74, 124, 111, 0.3);
    border-radius: 2px;
    opacity: 0;
    animation: elegantFadeUp 0.5s 2.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.heating-unit::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: repeating-linear-gradient(
        90deg,
        #E0E0E0 0px,
        #E0E0E0 2px,
        #FFFFFF 2px,
        #FFFFFF 4px
    );
    border-radius: 1px;
}

/* Tech Elements - Floating decorations */
.tech-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tech-circle {
    position: absolute;
    border: 1px solid rgba(74, 124, 111, 0.2);
    border-radius: 50%;
    opacity: 0;
}

.circle-1 {
    width: 60px;
    height: 60px;
    top: 20px;
    right: 30px;
    animation: techPulse 4s 3s ease-in-out infinite, fadeIn 1s 3s ease-out forwards;
}

.circle-2 {
    width: 40px;
    height: 40px;
    bottom: 60px;
    left: 20px;
    animation: techPulse 4s 3.5s ease-in-out infinite, fadeIn 1s 3.2s ease-out forwards;
}

.tech-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(74, 124, 111, 0.3), transparent);
    opacity: 0;
}

.line-1 {
    width: 80px;
    height: 1px;
    top: 50px;
    left: 10px;
    transform: rotate(-15deg);
    animation: linePulse 3s 3.3s ease-in-out infinite, fadeIn 1s 3.3s ease-out forwards;
}

.line-2 {
    width: 60px;
    height: 1px;
    bottom: 100px;
    right: 20px;
    transform: rotate(20deg);
    animation: linePulse 3s 3.8s ease-in-out infinite, fadeIn 1s 3.5s ease-out forwards;
}

.tech-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(74, 124, 111, 0.4);
    border-radius: 50%;
    opacity: 0;
}

.dot-1 {
    top: 80px;
    right: 60px;
    animation: dotPulse 2s 3.4s ease-in-out infinite, fadeIn 0.5s 3.4s ease-out forwards;
}

.dot-2 {
    bottom: 120px;
    left: 40px;
    animation: dotPulse 2s 3.6s ease-in-out infinite, fadeIn 0.5s 3.6s ease-out forwards;
}

.dot-3 {
    top: 140px;
    left: 25px;
    animation: dotPulse 2s 3.8s ease-in-out infinite, fadeIn 0.5s 3.8s ease-out forwards;
}

/* Elegant Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes elegantFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buildWall {
    from {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes roofReveal {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes windowReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes doorReveal {
    from {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes pipeGrow {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes techPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes linePulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

