html { 
    scroll-behavior: smooth; 
}
body {
    background-color: #121212; 
    color: #f5f5f5;
    font-family: sans-serif;
    margin: 0;
    padding-top: 70px; 
}

/* --- PRELOADER (Načítací obrazovka) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #121212;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
#preloader.hidden {
    opacity: 0;
    pointer-events: none; /* Přestane překážet klikání */
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

/* --- HORNÍ LIŠTA --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px;
    z-index: 1200; 
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* PC menu */
.desktop-nav {
    display: flex;
    gap: 30px;
}
.desktop-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.3s;
}
.desktop-nav a:hover {
    color: #888;
}
.desktop-nav a.active {
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 5px;
}

/* --- MOBILNÍ HAMBURGER --- */
.hamburger {
    display: none; 
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1300; 
}
.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

/* Transformace do křížku */
.hamburger.open span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}
.hamburger.open span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* --- MOBILNÍ MENU --- */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0; 
    background-color: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1050; 
    overflow: hidden;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}
.mobile-overlay.open {
    height: 100vh; 
}
.mobile-overlay a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    transition: 0.3s;
    letter-spacing: 1px;
}
.mobile-overlay a:hover, .mobile-overlay a.active {
    color: #888;
}

/* --- ZÁKLAD SEKCE --- */
section {
    padding-top: 50px; 
    padding-bottom: 30px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
}

section h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

#domu {
    min-height: 70vh; 
    text-align: center;
    padding: 40px 20px;
}
#domu h1 {
    font-size: 48px;
    margin-top: 0;
    margin-bottom: 20px;
    min-height: 110px; 
}
#domu p {
    font-size: 18px;
    color: #bbb;
}

/* --- PULZUJÍCÍ TEČKA --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 14px;
    margin-bottom: 30px;
}
.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* --- KARTY --- */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 40px; 
    margin-top: 20px; 
    max-width: 1200px;
}
.card {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 20px;
    border-radius: 15px;
    width: 280px;
    text-align: left;
    transition: all 0.4s ease; 
    /* Zajišťuje plynulost návratu karty u 3D tiltu */
    transform-style: preserve-3d;
}
.card:hover {
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3); 
    border: 1px solid rgba(56, 189, 248, 0.5);
}
.card-img {
    width: 100%; 
    height: 160px;
    object-fit: contain; 
    background-color: #fff; 
    padding: 10px; 
    box-sizing: border-box; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    /* Vystoupení obrázku ve 3D */
    transform: translateZ(20px); 
}

.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #fff; 
    color: #000; 
    text-decoration: none; 
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s ease;
}
.btn:hover {
    background-color: #ddd; 
    transform: scale(1.05); 
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 20px; 
    max-width: 1000px;
}
.service-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 15px;
    width: 250px;
    text-align: center;
    transition: all 0.3s ease;
}
.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.5);
}
.service-box i {
    font-size: 40px;
    color: #fff;
    margin-bottom: 20px;
}
.service-box h3 {
    margin-bottom: 15px;
}

/* --- KONTAKT --- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 900px;
    margin: 20px auto 0 auto; 
    text-align: left;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}
.contact-left {
    flex: 1;
    min-width: 280px;
}
.contact-left h3 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #fff;
    padding-bottom: 10px;
    display: inline-block;
}
.contact-left p {
    font-size: 18px;
    margin-bottom: 10px;
}
.contact-left i {
    margin-right: 10px;
}

.contact-right {
    flex: 1;
    min-width: 280px;
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}
.contact-right h3 {
    margin-bottom: 20px;
}
.contact-right input, .contact-right textarea {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-family: inherit;
    box-sizing: border-box;
}
.contact-right input:focus, .contact-right textarea:focus {
    border-color: #888;
    outline: none;
}
.submit-btn {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    text-transform: uppercase;
    margin-top: 15px;
}
.submit-btn:hover {
    background-color: #ddd;
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(18, 18, 18, 0.9);
    font-size: 12px;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- ANIMACE --- */
.reveal {
    opacity: 0;
    transform: translateY(50px); 
    transition: all 0.8s ease-out; 
}
.reveal.active {
    opacity: 1;
    transform: translateY(0); 
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #fff;
    color: #121212;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none; 
    transition: all 0.3s ease;
}
.back-to-top.show {
    opacity: 1;
    pointer-events: auto; 
}
.back-to-top:hover {
    background-color: #ddd;
    transform: scale(1.1); 
}

/* --- RESPONSIVITA --- */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .hamburger {
        display: block;
        position: absolute;
        right: 30px;
        top: 25px; 
    }

    section {
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    #domu {
        min-height: 60vh;
        padding-top: 60px;
    }
    #domu h1 {
        font-size: 32px;
        min-height: 80px;
    }

    .card, .service-box {
        width: 100%;
        max-width: 100%;
    }
    .contact-wrapper {
        flex-direction: column;
    }

    #kontakt p,
    .contact-left {
        text-align: center;
    }

    .back-to-top {
        bottom: 20px; 
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
.logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
    position: absolute; /* Vytrhne logo z běžné řady */
    left: 30px;         /* Připíchne ho pevně na levý okraj */
}

.logo span {
    color: #38bdf8;     /* Zabarví část slova domodra */
}