html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1F2937;
    overflow-x: hidden;
}

body.overflow-hidden {
    overflow: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Domine', serif;
}

.text-balance {
    text-wrap: balance;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.section-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    padding: 0.5rem 0;
}

#navbar.scrolled {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
}

#header-logo {
    height: 3.5rem;
    transition: filter 0.3s ease, height 0.3s ease;
    filter: brightness(0) invert(1);
}

#navbar.scrolled #header-logo {
    filter: none;
    height: 3rem;
}

@media (min-width: 768px) {
     #header-logo {
       height: 4rem;
    }
    #navbar.scrolled #header-logo {
       height: 3.5rem;
    }
}


.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #E5B95F;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.text-white {
    color: #ffffff;
}

.nav-link.text-brand-dark {
    color: #1C2B36;
}

#navbar.scrolled .nav-link {
    color: #1C2B36;
}
#navbar.scrolled .nav-link:hover {
     color: #E5B95F;
}
#navbar.scrolled #menuBtn {
    color: #1C2B36;
}


.phone-button {
    background-color: #E5B95F;
    color: #1C2B36;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.phone-button:hover {
    background-color: #d9a93d;
}


#mobileMenu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background-color: #1C2B36;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#mobileMenu.open {
    transform: translateX(0);
}


@media (min-width: 640px) {
    #mobileMenu {
        width: 320px;
    }
}

#menuBtn, #closeMenu {
    transition: color 0.3s ease;
    cursor: pointer;
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#hero .absolute.inset-0 img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    #hero p {
        font-size: 1rem;
    }
}

.bg-image-overlay {
    position: relative;
}

.bg-image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(28, 43, 54, 0.8), rgba(28, 43, 54, 0.9));
    z-index: 1;
}

.bg-image-overlay > * {
    position: relative;
    z-index: 2;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(28, 43, 54, 0.8) 0%, rgba(28, 43, 54, 0) 50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card img {
    transition: transform 0.8s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.project-card:hover .project-content {
    transform: translateY(0);
    opacity: 1;
}

.project-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-item .relative {
    overflow: hidden;
}

.project-item img {
    transition: transform 0.6s ease;
    width: 100%;
    height: 224px;
    object-fit: cover;
}

.project-item:hover img {
    transform: scale(1.05);
}

.expand-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: white;
    border-radius: 9999px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 5;
}

.expand-btn:hover {
    opacity: 1;
    background-color: #E5B95F;
}

.bg-brand-accent\/20 {
    background-color: rgba(229, 185, 95, 0.2);
}

#lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 99;
    display: none;
    opacity: 0;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-image {
    max-height: 80vh;
}

#lightbox.active #lightbox-image {
    transform: scale(1);
}

#lightbox-title {
    color: white;
    font-size: 1.5rem;
    margin-top: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#lightbox-description {
    color: #e5e7eb;
    font-size: 1rem;
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    cursor: pointer;
    z-index: 100;
    transition: color 0.3s ease;
    font-size: 1.5rem;
}

#close-lightbox:hover {
    color: #E5B95F;
}


#kontakt .bg-brand-dark {
    position: relative;
    overflow: hidden;
}

#kontakt form input,
#kontakt form select,
#kontakt form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.25rem;
}

#kontakt form input:focus,
#kontakt form select:focus,
#kontakt form textarea:focus {
    border-color: #E5B95F;
    box-shadow: 0 0 0 2px rgba(229, 185, 95, 0.1);
    outline: none;
}

#kontakt form button {
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 0.25rem;
}

#kontakt form button:hover {
    transform: translateY(-2px);
}

#kontakt form button:active {
    transform: translateY(0);
}

#kontakt a.hover\:text-brand-accent {
    transition: color 0.3s ease;
}

#kontakt a.hover\:text-brand-accent:hover {
    color: #E5B95F;
}

#kontakt .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#kontakt .absolute.top-0 {
    z-index: 0;
}


#kontakt-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#chat-initial-popup, #chat-full-popup {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 380px;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    background-color: white;
    border: 1px solid #f3f4f6;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

#chat-full-popup {
     width: 450px;
     box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


#chat-initial-popup.active, #chat-full-popup.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}


#chat-button {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #E5B95F;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 2;
}

#chat-button:hover {
    background-color: rgba(229, 185, 95, 0.9);
    transform: translateY(-2px);
}

#chat-button .tooltip {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

#chat-button:hover .tooltip {
    opacity: 1;
}

#chat-yes-btn, #chat-no-btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#chat-yes-btn:hover {
    transform: translateY(-2px);
}

#chat-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0;
}

#kontakt-form-content, #chat-success-content {
     padding: 1.5rem;
}


.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #E5B95F;
    outline: none;
    box-shadow: none;
}

.form-input.error, .form-select.error, .form-textarea.error {
    border-color: #ef4444;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 185, 95, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(229, 185, 95, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 185, 95, 0);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}


@media (max-width: 640px) {
     #chat-initial-popup, #chat-full-popup {
        width: auto;
        left: 1.5rem;
        right: 1.5rem;
        bottom: 6rem;
        max-width: none;
        transform: scale(0.95) translateY(10px);
        max-height: 75vh;
    }

    #chat-initial-popup.active, #chat-full-popup.active {
         transform: scale(1) translateY(0);
    }

     #chat-button {
        bottom: 1rem;
        right: 1rem;
     }
}


@media (max-width: 768px) {
    .project-item img {
        height: 200px;
    }
}