html {
    scroll-behavior: smooth;
}
:root {
    --bg-color: hsl(0, 0%, 100%);
    --text-color: #000000;
    --accent-color: #0984e3;
    --secondary-text: #666666;
    --border-color: #eeeeee;
    --transition-speed: 0.6s;
    --easing: cubic-bezier(0.25, 1, 0.5, 1);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-blur: 20px;
}

/* Portfolio Item Animations */
.portfolio-item-enter {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.5s var(--easing), transform 0.5s var(--easing);
}

.portfolio-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Skeleton Screens */
.skeleton {
    background: #e1e1e1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 12px;
}

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

.portfolio-skeleton-card {
    height: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.skeleton-image {
    flex-grow: 1;
    border-radius: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
}

.skeleton-text {
    height: 16px;
    width: 40%;
}

.hidden-post {
    display: none !important;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 3rem;
}

#bg-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-color);
    background: radial-gradient(circle, hsla(195, 22%, 93%, 1) 0%, hsla(204, 69%, 81%, 1) 100%);
    background: -moz-radial-gradient(circle, hsla(195, 22%, 93%, 1) 0%, hsla(204, 69%, 81%, 1) 100%);
    background: -webkit-radial-gradient(circle, hsla(195, 22%, 93%, 1) 0%, hsla(204, 69%, 81%, 1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#E9EFF1", endColorstr="#AED6F0", GradientType=1);
}

/* Hero Icons and Message Bubbles */
:root {
    --bubble-size: 80px;
    --icon-size: 40%;
    --icon-top: 25%;
    --icon-left: 30%;
}

#hero-icons-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1; /* Place behind content but above background */
}

.bubble-wrapper {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--bubble-size);
    height: var(--bubble-size);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 1s var(--easing), transform 1s var(--easing);
    z-index: 1;
    animation: bubble-float 10s ease-in-out infinite alternate;
}

.bubble-wrapper.visible {
    opacity: 0.6; /* More subtle for background */
    transform: scale(1);
}

.bubble-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inner-icon {
    position: absolute;
    width: var(--icon-size);
    height: var(--icon-size);
    top: var(--icon-top);
    left: var(--icon-left);
    object-fit: contain;
}

@keyframes bubble-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(10px, -15px) rotate(2deg);
    }
    66% {
        transform: translate(-10px, 10px) rotate(-2deg);
    }
    100% {
        transform: translate(5px, -5px) rotate(1deg);
    }
}

/* Mobile adjustments for hero icons and bubbles */
@media (max-width: 768px) {
    .bubble-bg {
        display: none;
    }
    
    .bubble-wrapper {
        animation: none !important; /* Stop floating as requested "without the bubbles slowly floating" */
        width: 40px; /* Adjust size for mobile if necessary, or just keep icon relative */
        height: 40px;
    }
    
    .bubble-wrapper.visible {
        opacity: 0.4;
    }
    
    .inner-icon {
        position: static;
        width: 100%;
        height: 100%;
    }
}


html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    z-index: 1000;
}

#splash-video {
    max-width: 60%;
    max-height: 60%;
    position: absolute;
}

#splash-svg.hidden {
    display: none;
}

#splash-svg {
    width: 240px;
    height: 240px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-logo-appear {
    /*animation: logo-fade-in 1.2s var(--easing) 0.3s forwards;*/
}

@keyframes logo-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

header {
    padding: 40px 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: padding 0.4s var(--easing), background-color 0.4s var(--easing);
    opacity: 0;
    transform: translateY(-20px);
}

header.header-visible {
    opacity: 1;
    transform: translateY(0);
}

header.scrolled {
    padding: 20px 60px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

#headerLogo {
    width: 40px;
    height: 40px;
    opacity: 0;
    transform: translateX(-250px);
    transition: opacity 0.8s var(--easing), transform 0.8s var(--easing);
    display: flex;
    justify-content: center;
    align-items: center;
}

#headerLogo.logo-visible {
    opacity: 1;
    transform: translateX(-20px);
}

#headerLogo svg {
    width: 100%;
    height: 100%;
}

#hero-logo-container {
    width: 240px;
    height: 240px;
    margin-bottom: 60px;
    z-index: 5; /* Higher than icons and lines */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Ensure z-index works */
    opacity: 1;
}

#hero-logo-container svg,
#hero-logo-container img {
    opacity: 0;
}

#hero-logo-container .hero-logo-appear {
    opacity: 1;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s var(--easing);
    opacity: 0.5;
}

.nav-links a:hover {
    opacity: 1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    padding: 10px;
}

.hamburger-bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s var(--easing);
}

.language-switcher {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: transparent; /* Робимо фон прозорим */
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s var(--easing);
    opacity: 0.5;

    position: relative; /* Обов'язково для позиціонування заливки */
    overflow: hidden;   /* Щоб заливка не виходила за межі кнопки */
    z-index: 1;         /* Контроль шарів */
}

/* Створюємо шар заливки */
.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Ховаємо заливку зліва */
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: all 0.4s var(--easing);
    z-index: -1; /* Ставимо під текст */
}

/* Ефект при наведенні та для активного стану */
.lang-btn:hover, .lang-btn.active {
    opacity: 1;
    color: var(--bg-color);
    border-color: transparent;
}

.lang-btn:hover::before, .lang-btn.active::before {
    left: 0; /* Заливка виїжджає на всю ширину */
}

.hidden-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s var(--easing), transform 1.2s var(--easing);
}

.visible-content {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
    background: transparent;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--secondary-text);
    margin-bottom: 48px;
    max-width: 600px;
    font-weight: 400;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 18px 36px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.4s var(--easing);
    border: 1px solid var(--accent-color);
}

.btn-solid {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.btn-solid:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-success {
    background-color: #2ecc71 !important;
    border-color: #2ecc71 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-success img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1,
.hero-content p,
.cta-buttons {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s var(--easing), transform 1.2s var(--easing);
}

.hero-content h1.hero-item-visible,
.hero-content p.hero-item-visible,
.cta-buttons.hero-item-visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section {
    padding: 160px 60px;
    max-width: 1600px;
    margin: 80px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 80px;
    text-transform: uppercase;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.content-item {
    transition: transform 0.6s var(--easing);
    background: rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-item:hover {
    transform: translateY(-10px);
}

.content-item img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: contain;
    margin-bottom: 24px;
    transition: filter 0.6s var(--easing);
    filter: grayscale(100%);
}

.content-item:hover img {
    filter: grayscale(0%);
}

.content-item-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.content-item-info p {
    font-size: 0.9rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#services-grid .content-item {
    border-top: 1px solid var(--accent-color);
    padding-top: 32px;
    background: rgba(255, 255, 255, 0.4);
}

#services-grid .content-item:hover {
    border-top: 2px solid var(--accent-color);
}

#services-grid .content-item-info h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.haptic:active {
    transform: scale(0.95); /* Кнопка злегка стискається */
    transition: transform 0.1s ease;
}

#services-grid .content-item-info p {
    text-transform: none;
    font-size: 1rem;
    line-height: 1.6;
}

.about-content p {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}


.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

#random-gif-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.contact-gif {
    max-width: 150px;
    height: auto;
    border-radius: 12px;
}

.contact-qr {
    max-width: 200px;
    height: auto;
    border-radius: 12px;
}

.contact-info p {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s var(--easing), background-color 0.3s var(--easing);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.6);
}

.form-status {
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-status.success {
    color: #2ecc71;
}

.form-status.error {
    color: #e74c3c;
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

footer {
    padding: 60px 60px 60px;
    border-top: 1px solid var(--accent-color);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px;
}

    .footer-nav {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-around;
    }

.footer-nav, .footer-socials {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.footer-nav a, .footer-socials a, .footer-email a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.5;
    transition: opacity 0.3s var(--easing);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.footer-nav a:hover, .footer-socials a:hover, .footer-email a:hover {
    opacity: 1;
}

.footer-copyright {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--easing);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    footer {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    #headerLogo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    #headerLogo.logo-visible {
        transform: translateX(-50%);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s var(--easing);
        z-index: 1000;
        gap: 50px;
    }

    .nav-container.active {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .nav-links a {
        font-size: 1.5rem;
        opacity: 1;
    }

    .language-switcher {
        margin-left: 0;
    }

    /* Hamburger Animation */
    .mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .bubble-wrapper {
        display: none;
    }
    header {
        padding: 30px 40px;
    }
    .content-section {
        padding: 100px 40px;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
    footer {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 20px 40px 40px;
    }
    .footer-nav, .footer-socials {
        flex-direction: column;
    }
    .footer-nav a {
        font-size: 1.2rem;
    }
}
