@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Open+Sans:wght@400;600;700&display=swap');

:root {
    --font-primary: 'Open Sans', sans-serif;
    --font-display: 'Playfair Display', serif;
    --color-dark-bg: #121212;
    --color-dark-surface: #1e1e1e;
    --color-primary: #a78bfa; /* Upravená fialová - svetlejšia */
    --color-secondary: #f472b6;
    --color-text: #e5e7eb;
    --color-text-muted: #9ca3af;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-glow: rgba(167, 139, 250, 0.3);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.3);
    --transition-fast: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-medium: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 62.5%; scroll-padding-top: 8rem; }
body { font-family: var(--font-primary); background-color: var(--color-dark-bg); color: var(--color-text); line-height: 1.7; overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body.menu-open, body.overlay-open { overflow: hidden; } 

/* --- Preloader --- */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-dark-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.8s ease, visibility 0.8s ease; }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-flower { width: 60px; height: 60px; border: 4px solid transparent; border-top-color: var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 2rem; }
.preloader p { font-size: 1.6rem; color: var(--color-text-muted); letter-spacing: 1px;}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Header --- */
header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 2.5rem 0; background: transparent; transition: var(--transition-fast); }
header.scrolled { background: rgba(30, 30, 30, 0.85); backdrop-filter: blur(10px); padding: 1.5rem 0; box-shadow: var(--shadow-sm); }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1300px; margin: 0 auto; padding: 0 3rem; }
.logo { font-family: var(--font-display); font-size: 2.8rem; color: var(--color-text); text-decoration: none; font-weight: 900; }
.nav-menu { display: flex; gap: 3.5rem; list-style: none; }
.nav-link { font-size: 1.6rem; color: var(--color-text-muted); text-decoration: none; font-weight: 600; position: relative; transition: var(--transition-fast); }
.nav-link::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px; background-color: var(--color-primary); transition: var(--transition-fast); }
.nav-link:hover, .nav-link.active { color: var(--color-text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.cta-button { display: inline-flex; align-items: center; gap: 1rem; padding: 1rem 2.5rem; background-image: linear-gradient(to right, var(--color-primary), var(--color-secondary)); color: white; border-radius: 50px; text-decoration: none; font-size: 1.5rem; font-weight: 700; transition: var(--transition-fast); box-shadow: 0 4px 15px var(--color-glow); }
.cta-button:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 25px var(--color-glow); }

.hamburger {
    display: none; 
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2.8rem; 
    cursor: pointer;
    z-index: 1005; 
    position: relative; 
    width: 30px; 
    height: 30px;
    padding: 0; 
}
/* Štýly pre ikony v hamburger tlačidle - pre dvojikonový prístup */
.hamburger .icon-close {
    display: none; 
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.hamburger.open .icon-menu { display: none; }
.hamburger.open .icon-close { display: inline-block; } /* Alebo block, ak je to vhodnejšie */


/* --- Mobilné Menu - Fullscreen Overlay --- */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0; 
        width: 100%;
        height: 100vh;
        background-color: rgba(18, 18, 18, 0.98); 
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem; 
        transform: translateY(-100%); 
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1002; 
        padding: 2rem;
    }
    .nav-menu.open { transform: translateY(0); }
    .nav-link { font-size: 2.8rem; margin: 1rem 0; }
    .nav-menu .cta-button { display: inline-flex; margin-top: 2rem;} 
    header .header-content > .cta-button { display: none; } 
    .hamburger { display: block; }
}


/* --- Hero Section --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding: 10rem 3rem 5rem; overflow: hidden; }
.hero-video-bg { position: absolute; top: 50%; left: 50%; width: auto; height: auto; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); z-index: -2; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.65); z-index: -1; }
.hero-content { z-index: 1; max-width: 900px; animation: fadeInHero 1.5s 0.5s ease-out backwards; }
@keyframes fadeInHero { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); }}
.hero-title { font-family: var(--font-display); font-size: clamp(4rem, 8vw, 7rem); color: #fff; line-height: 1.1; font-weight: 900; margin-bottom: 2rem; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: clamp(1.8rem, 3vw, 2.1rem); color: var(--color-text); margin-bottom: 4rem; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero-buttons { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.btn { padding: 1.5rem 4rem; text-decoration: none; border-radius: 50px; font-weight: 700; transition: var(--transition-fast); display: inline-flex; align-items: center; gap: 1rem; font-size: 1.6rem; cursor: pointer;}
.btn-primary { background-image: linear-gradient(to right, var(--color-primary), var(--color-secondary)); color: white; box-shadow: 0 4px 15px var(--color-glow); border: none; }
.btn-primary:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 25px var(--color-glow); }
.btn-secondary { background: transparent; color: var(--color-text); border: 2px solid var(--color-text); }
.btn-secondary:hover { background: var(--color-text); color: var(--color-dark-bg); border-color: var(--color-text); }
.scroll-down-indicator { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); font-size: 3rem; color: rgba(255,255,255,0.5); animation: bounce 2s infinite; cursor: pointer; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-15px); } 60% { transform: translateX(-50%) translateY(-7px); }}

/* --- General Section Styling --- */
.section { padding: 10rem 3rem; }
.section-accent { background-color: var(--color-dark-surface); }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 6rem; }
.section-tagline { display: inline-block; padding: 0.5rem 1.5rem; background-color: var(--color-primary); color: white; font-size: 1.4rem; font-weight: 700; border-radius: 50px; margin-bottom: 1rem; letter-spacing: 1px; text-transform: uppercase; }
.section-title { font-family: var(--font-display); font-size: clamp(3rem, 5vw, 4.2rem); color: var(--color-text); margin-bottom: 1.5rem; line-height: 1.2; }

/* --- About, Services, Technologies, Process Sections (štýly zostávajú ako predtým) --- */
.about-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 5rem; align-items: center; }
.about-text p { font-size: 1.7rem; color: var(--color-text-muted); margin-bottom: 2rem; }
.about-image img { width: 100%; border-radius: 1rem; box-shadow: var(--shadow-md); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; }
.service-card { background-color: var(--color-dark-bg); padding: 4rem 3rem; border-radius: 1rem; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition-medium); border: 1px solid var(--color-border); }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.service-icon { font-size: 4rem; color: var(--color-primary); margin-bottom: 2rem; display: inline-block; transition: var(--transition-fast); }
.service-card:hover .service-icon { transform: scale(1.2) rotate(-10deg); }
.service-title { font-family: var(--font-primary); font-size: 2rem; font-weight: 700; color: var(--color-text); margin-bottom: 1rem; }
.service-text { font-size: 1.5rem; color: var(--color-text-muted); }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2.5rem; text-align: center; }
.tech-item { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2rem; background-color: var(--color-dark-surface); border-radius: 0.5rem; border: 1px solid var(--color-border); transition: var(--transition-fast); }
.tech-item:hover { transform: translateY(-5px); border-color: var(--color-primary); }
.tech-item i { font-size: 4rem; color: var(--color-primary); }
.tech-item span { font-size: 1.4rem; color: var(--color-text-muted); }
.tech-footer-text { text-align: center; margin-top: 4rem; font-size: 1.6rem; color: var(--color-text-muted); }

.process-timeline { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.process-step { display: flex; align-items: flex-start; gap: 2.5rem; padding: 2rem; background-color: var(--color-dark-bg); border-left: 3px solid var(--color-primary); border-radius: 0.5rem; }
.process-icon { font-size: 3rem; color: var(--color-primary); flex-shrink: 0; width: 50px; text-align: center; }
.process-content h3 { font-size: 2rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.5rem; }
.process-content p { font-size: 1.5rem; color: var(--color-text-muted); }
@media (min-width: 768px) {
    .process-timeline { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

/* --- Gallery Section (Zlúčené a opravené) --- */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
}

.gallery-item { 
    position: relative;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    opacity: 1;
    transform: translateY(0) scale(1);
    overflow: hidden; /* Dôležité pre max-height animáciu */
    max-height: 500px; /* Nastavte na dostatočne veľkú hodnotu pre plne viditeľný prvok */
    transition: opacity 0.5s ease-out, 
                transform 0.5s ease-out, 
                max-height 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                /* Pridajte prechody pre margin/padding/border, ak ich meníte v .project-item-hidden */
                margin-top 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                margin-bottom 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                padding-top 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                padding-bottom 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-width 0.5s ease-out;
}
    
 


.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.5s ease; 
}

.gallery-item:hover img { 
    transform: scale(1.1); 
}

.project-item-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important; 
}

.project-buttons-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4rem; 
}

.text-center { 
    text-align: center; 
}

/* Opravený selektor pre skrytie JEDINÉHO tlačidla */
#project-toggle-btn.hidden {
    display: none;
}

/*--- Project Overlay Styles ---*/
.project-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 10, 26, 0.9); 
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    padding: 2rem;
}
.project-overlay.visible { opacity: 1; visibility: visible; transition: opacity 0.4s ease, visibility 0s linear 0s; }
.overlay-content {
    background-color: var(--color-dark-surface);
    padding: 3rem 4rem; border-radius: 1rem;
    max-width: 700px; width: 90%;
    position: relative; box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transform: scale(0.95) translateY(20px); opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
    max-height: 90vh; overflow-y: auto;
}
.project-overlay.visible .overlay-content { transform: scale(1) translateY(0); opacity: 1; }
.overlay-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; font-size: 3rem; color: var(--color-text-muted); cursor: pointer; line-height: 1; padding: 0.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.overlay-close:hover { color: var(--color-primary); transform: rotate(90deg); }
.overlay-image { width: 100%; max-height: 350px; object-fit: cover; border-radius: 0.8rem; margin-bottom: 2.5rem; border: 1px solid var(--color-border); }
.overlay-title { font-family: var(--font-display); color: var(--color-text); margin-bottom: 1.5rem; font-size: 2.8rem; line-height: 1.3; }
.overlay-description { color: var(--color-text-muted); margin-bottom: 2.5rem; font-size: 1.6rem; line-height: 1.8; }
.overlay-links a { display: inline-block; margin-right: 1.5rem; margin-bottom: 1rem; padding: 1rem 2rem; background-image: linear-gradient(to right, var(--color-primary), var(--color-secondary)); color: white; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1.4rem; transition: var(--transition-fast); box-shadow: var(--shadow-sm); }
.overlay-links a:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--color-glow); }
.overlay-links a i { margin-right: 0.8rem; }


/* --- Testimonials Section --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.testimonial-card { background-color: var(--color-dark-bg); padding: 3rem; border-radius: 1rem; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.testimonial-text { font-size: 1.6rem; font-style: italic; color: var(--color-text-muted); margin-bottom: 2rem; line-height: 1.8; position: relative; padding-left: 3rem; }
.testimonial-text::before { content: '\f10d'; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 0; font-size: 2rem; color: var(--color-primary); opacity: 0.5; }
.testimonial-author { font-size: 1.5rem; font-weight: 700; color: var(--color-text); text-align: right; }

/* --- Contact Form --- */
.contact-form-container { max-width: 700px; margin: 0 auto; background: var(--color-dark-surface); padding: 5rem 4rem; border-radius: 1rem; box-shadow: var(--shadow-md); border: 1px solid var(--color-border); }
.form-group { margin-bottom: 2.5rem; }
.form-input { width: 100%; padding: 1.5rem; background: var(--color-dark-bg); border: 1px solid var(--color-border); border-radius: 0.5rem; color: var(--color-text); font-size: 1.6rem; transition: var(--transition-fast); }
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-glow); }
.form-input::placeholder { color: var(--color-text-muted); }
.btn-submit { width: 100%; }

/* --- Footer --- */
.footer { background-color: #0c0c0c; padding: 8rem 3rem 3rem; border-top: 1px solid var(--color-border); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4rem; max-width: 1200px; margin: 0 auto 5rem auto; }
.footer-column h3 { font-family: var(--font-primary); font-weight:700; font-size: 2rem; color: var(--color-text); margin-bottom: 2rem; }
.footer-column p, .footer-column a { font-size: 1.5rem; color: var(--color-text-muted); text-decoration: none; margin-bottom: 1rem; display: block; transition: var(--transition-fast); }
.footer-column a:hover { color: var(--color-primary); }
.footer-column i.fas, .footer-column i.fab { margin-right: 1rem; width: 20px; text-align: center; color: var(--color-primary); }
.social-links { display: flex; gap: 1.5rem; }
.social-links a { font-size: 2.2rem; color: var(--color-text-muted); transition: var(--transition-fast); }
.social-links a:hover { color: var(--color-primary); transform: scale(1.2); }
.copyright { text-align: center; color: var(--color-text-muted); font-size: 1.4rem; padding-top: 3rem; border-top: 1px solid var(--color-border); }

/* --- Animations & Responsive --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.8); 
    transition: opacity 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) scale(1); 
}
@media (max-width: 992px) {
    html { scroll-padding-top: 7rem; } 
    header.scrolled { padding: 1rem 0; }
    .header-content, .container { padding: 0 2rem; }
    .section { padding: 8rem 2rem; }
    .footer-content { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
    html { font-size: 58%; }
    /* Štýly pre hamburger a mobilné menu z .hamburger a .nav-menu @media (max-width: 992px) by mali byť tu, ak chcete iný breakpoint pre hamburger */
    /* Alebo nechajte breakpoint 992px pre hamburger, ak je to v poriadku */

    .hamburger.open .fa-bars { display: none; } 
    .hamburger.open .fa-times { display: block; }
    .hamburger .fa-times { display: none; } 

    .hero-title { font-size: clamp(3.2rem, 10vw, 4.5rem); }
    .hero-subtitle { font-size: clamp(1.6rem, 4vw, 1.9rem); }
    .btn { padding: 1.2rem 3rem; font-size: 1.5rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-column { margin-bottom: 3rem; }
    .social-links { justify-content: center; }
}