
/* --- Root Variables (ВАШІ ІСНУЮЧІ ЗМІННІ) --- */
:root {
    --primary-dark-bg: #0D0D16;
    --secondary-dark-bg: #1B1B2A;
    --accent-purple: #BB86FC;
    --accent-purple-hover: #D0A7FF;
    --highlight-gold: #FFD700;
    --text-light: #F0F0F0;
    --text-muted: #B0B0B0;
    --overlay-color: rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 25px rgba(0, 0, 0, 0.5);
    --transition-speed: 0.3s;
    --transition-fast: 0.2s;
    --transition-overlay: 0.4s ease-in-out;
}

/* --- Basic Styles / Reset (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    overflow-x: hidden;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--primary-dark-bg);
    background-image: radial-gradient(ellipse at center, var(--secondary-dark-bg) 0%, rgba(13, 13, 22, 0.0) 70%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

}

/* --- Scroll to Top Button (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
#scrollToTopBtn {
    /* ... Ваші існуючі стилі для позиціонування та зовнішнього вигляду ... */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFD700; /* Оригінальний золотий (можемо зробити його трохи світлішим/яскравішим для більшого контрасту) */
    color: var(--primary-dark-bg); /* Змінено: Золота кнопка краще виглядає з темним текстом */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 1000;

    /* --- ЗМІНИ ТУТ ДЛЯ АНІМАЦІЇ --- */
    opacity: 0;
    visibility: hidden;
    /* Розширюємо transition, щоб він анімував також background-color та transform */
    transition: opacity 0.3s ease-in-out,
                visibility 0.3s ease-in-out,
                background-color 0.2s ease-in-out, /* Додано: анімація зміни фону */
                transform 0.2s ease-in-out; /* Додано: анімація підняття */

    /* Додаємо невелике початкове підняття, щоб "виїжджало" знизу */
    transform: translateY(100%);
}

/* Новий клас для показу кнопки */
#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Повертаємо кнопку на її нормальне місце */
}

#scrollToTopBtn:hover {
    background-color: #DAA520; /* Темніший, але не занадто темний золотий. Це "Goldenrod" */
    /* Можливо, колір тексту також захочете змінити при наведенні, якщо контраст падає */
    /* color: var(--text-light); */ /* Якщо потрібно, щоб текст ставав світлішим при наведенні */
    transform: translateY(-5px); /* Збільшимо ефект підняття при наведенні */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); /* Зробимо тінь більш вираженою */
}

/* --- Container (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Headings (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 700;
}

/* --- Main Section Header (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.main-section-header {
    text-align: center;
    margin-bottom: 60px;
    margin-top: 40px;
}

.main-section-header .subtitle {
    font-size: 1.2em;
    color: var(--highlight-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.main-section-header .subtitle::before,
.main-section-header .subtitle::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--highlight-gold);
}

.main-section-header h2 {
    font-size: 3.5em;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-top: 0;
    margin-bottom: 0;
}

a {
    text-decoration: none;
    color: var(--accent-purple);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-purple-hover);
}

/* --- Buttons (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.btn {
    display: inline-block;
    background-color: var(--accent-purple);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color var(--transition-speed) ease, transform var(--transition-fast) ease, box-shadow var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    box-shadow: var(--shadow-sm);

}

.header-btn:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;

}

.contact-form .btn.contact-submit-btn:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
    transform: translateY(-3px);
}

.btn.read-more-skills:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
    transform: translateY(-3px);
}

/* --- Header (ДЕКСТОПНІ СТИЛІ) --- */
.header {
    background-color: transparent;
    padding: 20px 0;
    box-shadow: none;
    border-bottom: none;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-bottom var(--transition-speed) ease;
}

.header.scrolled {
    background-color: rgba(13, 13, 22, 0.95);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--highlight-gold);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color var(--transition-speed) ease;
}

#pc-logo-img {
    display: block;
    margin: 0;
    padding: 0;
    max-width: 60px;
    height: auto;
    box-sizing: border-box;
    transition: border var(--transition-speed) ease, border-radius var(--transition-speed) ease, transform var(--transition-speed) ease;
    vertical-align: middle;
}



/* --- НАВІГАЦІЯ (ДЕСКТОПНІ СТИЛІ) --- */
.nav {
    display: flex; /* Показуємо nav на десктопі як flex-контейнер */
}

.nav ul {
    list-style: none;
    display: flex; /* Елементи списку горизонтально */
    padding: 0;
    margin: 0;
}

.nav ul li {
    margin-left: 40px;
}

.nav ul li:first-child {
    margin-left: 0;
}

.nav ul li a {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--highlight-gold);
    transition: width var(--transition-speed) ease-out;
}

.nav ul li a:hover::after {
    width: 100%;
}

.nav ul li a:hover {
    color: var(--highlight-gold);
}

/* Header Button (ВАШІ ІСНУЮЧІ СТИЛІ) */
.header-btn {
    background-color: transparent;
    border: 2px solid var(--highlight-gold);
    border-radius: 25px;
    padding: 10px 25px;
    margin-left: 30px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out, border 0.4s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
}

.header-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--highlight-gold);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}

.header-btn:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
}

.header-btn:hover::before {
    width: 100%;
}

/* --- Hero Section (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* З Particles.js зазвичай не треба нічого робити тут для pointer-events,
       оскільки він сам є ціллю інтерактивності */
}

.hero {
    border-bottom: 5px solid var(--accent-purple);
    background-color: var(--primary-dark-bg);
    color: var(--text-light);
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    height: auto;
    box-sizing: border-box;
    position: relative;
    /* Заберіть будь-який z-index з .hero, якщо він тут є */
}

/* Ваш оверлей повинен пропускати події */
.hero::before {
    pointer-events: none; /* ЦЕ ПРАВИЛЬНО: Оверлей не повинен перехоплювати події */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: 1; /* Цей z-index хороший для візуального шару */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    position: relative;
    z-index: 2; /* Контент знаходиться над оверлеєм та частинками */
    pointer-events: none; /* <--- ДОДАЙТЕ ЦЕЙ РЯДОК: Дозволяє подіям проходити крізь .hero-content */
}

.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
    pointer-events: none; /* <--- ДОДАЙТЕ ЦЕЙ РЯДОК: Дозволяє подіям проходити крізь .hero-text */
}

.hero h1 {
    font-size: 3.8em;
    margin-bottom: 10px;
    color: var(--text-light);
    line-height: 1.2;
    text-shadow: var(--shadow-md);
    font-weight: 700;
    /* Текстові елементи зазвичай не потребують pointer-events: none,
       якщо їхній батьківський елемент вже має pointer-events: none.
       Але можна додати для надійності, якщо це окремий випадок.
       Тут можна опустити, якщо hero-text вже має none. */
}

.typed-text-wrapper {
    height: 1.5em;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    caret-color: transparent;
    pointer-events: none; /* <--- ДОДАЙТЕ ЦЕЙ РЯДОК: Дозволяє подіям проходити крізь обгортку з текстом, що друкується */
}

.cursor {
    display: inline-block;
    background-color: var(--text-light);
    width: 3px;
    height: 1.2em;
    margin-left: 5px;
    vertical-align: middle;
    animation: none;
    /* pointer-events: none; - можна додати, але він вже частина typed-text-wrapper */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.cursor.blink {
    animation: blink 0.7s infinite;
}

.hero p {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: 0;
    margin-right: auto;
    color: var(--text-muted);
    pointer-events: none; /* <--- ДОДАЙТЕ ЦЕЙ РЯДОК: Дозволяє подіям проходити крізь параграфи */
}

.social-icons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    pointer-events: auto; /* <--- ДОДАЙТЕ ЦЕЙ РЯДОК: ДУЖЕ ВАЖЛИВО! Повертаємо інтерактивність для контейнера іконок */
}

.social-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-dark-bg);
    color: var(--text-light);
    font-size: 1.2em;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, transform var(--transition-fast) ease;
    pointer-events: auto; /* <--- ДУЖЕ ВАЖЛИВО! Повертаємо інтерактивність для самих іконок */
}

.social-icon-circle:hover {
    background-color: #FFD700;
    color: var(--primary-dark-bg);
    transform: translateY(-3px);
}

/* Якщо у вас є кнопки в Hero-секції, також додайте їм pointer-events: auto; */
/* Наприклад, якщо у вас є клас .hero-button */
.hero-button {
    pointer-events: auto; /* Для кнопок в Hero-секції */
}
/* --- About Us / Services (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.about {
    background-color: var(--primary-dark-bg);
    padding: 100px 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.about-content p {
    font-size: 1.2em;
    max-width: 900px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    line-height: 1.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.service-item {
    position: relative;
    overflow: hidden;
    background-color: var(--secondary-dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.service-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 0%;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: height 0.4s ease;
    z-index: 0;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-item:hover::before {
    height: 100%;
}

.service-item > * {
    position: relative;
    z-index: 1;
}

.service-item i {
    font-size: 4em;
    color: var(--highlight-gold);
    margin-bottom: 25px;
}

.service-item h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-light);
}

.service-item p {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- "Read More" Link Style (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.read-more {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
    text-decoration: none;
}

.read-more:hover {
    color: var(--highlight-gold);
    transform: translateX(5px);
}

.read-more i {
    font-size: 0.8em;
    transition: transform var(--transition-speed) ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

.read-more::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background-color: var(--highlight-gold);
    margin-left: 10px;
    border-radius: 1px;
    flex-shrink: 0;
    transition: width var(--transition-speed) ease;
}

.read-more:hover::after {
    width: 25px;
}

/* --- Portfolio / Gallery (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.portfolio-intro-text {
  padding-top: 80px;
    text-align: center; /* Центрує текст всередині абзацу */
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 600px;
    color: var(--text-muted);

    /* Додайте ці два рядки для центрування самого блоку */
    margin-left: auto;
    margin-right: auto;
    /* Або коротше: margin: 0 auto 30px auto; */
}

.portfolio {

    padding: 80px 0;
    text-align: center;
    background: var(--primary-dark-bg);
}

.portfolio h1 {
    font-size: 5em;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

.portfolio .ipa-label {
    transform: translateY(-130px);
    box-shadow: var(--shadow-sm);
    border: 5px solid black;
    background-color: var(--highlight-gold);
    color: var(--primary-dark-bg);
    padding: 15px 105px;
    font-weight: 600;
    font-size: 3em;
    display: inline-block;
    margin-bottom: 20px;
    transform: rotate(-3deg);
    border-radius: 3px;
}

.portfolio .cta-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    margin-top: 30px;
}

.portfolio .cta-text {
    font-size: 2.2em;
    font-weight: 600;
    color: var(--text-light);
    text-shadow: var(--shadow-sm);
    line-height: 1.2;
}
.portfolio .btn {
  border-radius: 10px;
    background-color: transparent;
    border: 2px solid var(--highlight-gold);
    padding: 20px 25px;
    margin-left: 30px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out, border 0.4s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
}

.portfolio .btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--highlight-gold);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}

.portfolio .btn:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
}

.portfolio .btn:hover::before {
    width: 100%;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.portfolio-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}
.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5em;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px;
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
}

.overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: block;
}

/* --- Skills Section (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.skills-section {
    background: var(--primary-dark-bg);
    padding: 100px 0;
    color: var(--text-light);
}

.skills-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
}

.skills-text {
    flex: 1;
    min-width: 300px;
    padding-right: 20px;
}

.skills-text h3 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.3;
}

.skills-text p {
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn.read-more-skills {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.2em;
    background-color: transparent;
    border: 2px solid var(--highlight-gold);
    border-radius: 25px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out, border 0.4s ease-in-out, transform var(--transition-speed) ease;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.btn.read-more-skills::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--highlight-gold);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}

.btn.read-more-skills:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
    transform: translateY(-3px);
}

.btn.read-more-skills:hover::before {
    width: 100%;
}

.skills-bars {
    flex: 1;
    min-width: 300px;
    padding-left: 20px;
}

.skill {
    margin-bottom: 25px;
}

.skill span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.1em;
    position: relative;
}

.skill span::after {
    content: attr(data-percent) '%';
    font-size: 1.4em;
    color: var(--text-light);
    font-weight: 700;
    flex-shrink: 0;
}

.progress {
    background: var(--secondary-dark-bg);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    background: var(--highlight-gold);
    transition: width 0.8s ease-in-out;
}

/* --- Contact Us (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.contact {
    padding: 100px 0;
    color: var(--text-light);
    background-color: var(--primary-dark-bg);
}

.contact-content {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 50px;
}

.contact-left {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
}

.contact-left .company-address-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 25px;
}

.contact-left .company-address-text {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-detail-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: var(--secondary-dark-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.contact-detail-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 0%;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: height 0.4s ease;
    z-index: 0;
}

.contact-detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-detail-item:hover::before {
    height: 100%;
}

.contact-detail-item > * {
    position: relative;
    z-index: 1;
}

.contact-detail-item i {
    font-size: 2.5em;
    color: var(--highlight-gold);
    flex-shrink: 0;
    margin-top: 5px;
}

.contact-detail-item .detail-text h4 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-detail-item .detail-text p {
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.5;
}

.contact-right {
    flex: 1;
    min-width: 320px;
    max-width: 550px;
    background-color: var(--secondary-dark-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.contact-form-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 25px;
    text-align: left;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.contact-form .form-row input {
    width: 48%;
    min-width: unset;
    flex-shrink: 0;
}

.contact-form input,
.contact-form textarea {
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.05em;
    width: 100%;
    transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    background-color: var(--primary-dark-bg);
    color: var(--text-light);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--highlight-gold);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    outline: none;
}

.contact-form .btn.contact-submit-btn {
    width: auto;
    align-self: flex-start;
    margin-top: 10px;
    padding: 15px 40px;
    font-size: 1.2em;
    background-color: transparent;
    border: 2px solid var(--highlight-gold);
    border-radius: 25px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out, border 0.4s ease-in-out, transform var(--transition-speed) ease;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.contact-form .btn.contact-submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--highlight-gold);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}

.contact-form .btn.contact-submit-btn:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
}

.contact-form .btn.contact-submit-btn:hover::before {
    width: 100%;
}

/* --- Footer (ВАШІ ІСНУЮЧІ СТИЛІ) --- */
.footer {
    background-color: #08080C;
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-nav a {
    color: var(--text-muted);
    margin: 0 15px;
    transition: color var(--transition-speed) ease;
}

.footer-nav a:hover {
    color: var(--highlight-gold);
}

/* --- МЕДІА-ЗАПИТИ ДЛЯ АДАПТАЦІЇ --- */

/* Планшети (Medium Screens): 768px до 1199px */
@media (max-width: 1199px) {
    .container {
        padding: 0 15px; /* Зменшимо внутрішні відступи */
    }

    .main-section-header h2 {
        font-size: 2.8em; /* Трохи зменшимо заголовки секцій */
    }

    .hero h1 {
        font-size: 3em; /* Зменшимо заголовки Hero */
    }
    .hero p {
        font-size: 1em;
    }

    .nav ul li {
        margin-left: 25px; /* Зменшимо відстань між пунктами меню */
    }

    .portfolio h1 {
        font-size: 4em;
    }

    .portfolio .ipa-label {
        font-size: 2.5em;
        padding: 12px 80px;
    }

    .portfolio .cta-text {
        font-size: 1.8em;
    }

    .skills-text h3 {
        font-size: 2em;
    }

    .contact-content {
        gap: 30px; /* Зменшимо відступи в контактній секції */
        flex-direction: column; /* На планшетах можемо робити колонку */
        align-items: center;
    }

    .contact-left, .contact-right {
        max-width: 90%; /* Збільшимо ширину блоків на планшетах */
    }

    .contact-form .form-row {
        flex-direction: column; /* Поля форми у стовпець */
    }
    .contact-form .form-row input {
        width: 100%;
    }
}


/* Мобільні пристрої (Small Screens): до 767px */
@media (max-width: 767px) {
    /* --- ХЕДЕР: ПОВНЕ ЗНИКНЕННЯ --- */
    .header {
        display: none; /* Хедер повністю зникає на малих екранах */
    }

    body {
        /* Якщо хедер зникає, може знадобитися відкоригувати padding-top, якщо ви його мали для фіксованого хедера */
        padding-top: 0;
    }

    .main-section-header {
        margin-bottom: 40px;
        margin-top: 20px;
    }

    .main-section-header h2 {
        font-size: 2em; /* Ще менші заголовки */
    }

    .main-section-header .subtitle {
        font-size: 1em;
        gap: 10px;
    }
    .main-section-header .subtitle::before,
    .main-section-header .subtitle::after {
        width: 30px; /* Коротші лінії навколо підзаголовка */
    }

    .hero {
        padding: 60px 20px;
        min-height: unset; /* Відновимо висоту до автоматичної */
    }

    .hero-content {
        flex-direction: column; /* Контент Hero у стовпець */
        text-align: center;
    }
    .hero-text {
        min-width: unset;
        max-width: 100%;
        padding-right: 0;
    }

    .hero h1 {
        font-size: 2.2em; /* Ще менший заголовок Hero */
    }
    .typed-text-wrapper {
        font-size: 1.2em;
        height: 1.3em;
    }
    .hero p {
        font-size: 0.95em;
    }

    .social-icons {
        justify-content: center; /* Центруємо іконки */
    }

    .about {
        padding: 60px 0;
    }
    .about-content p {
        font-size: 1em;
        text-align: justify; /* Можемо вирівняти по ширині для зручності читання */
    }

    .services-grid {
        grid-template-columns: 1fr; /* Один стовпець для сервісів */
    }
    .service-item {
        padding: 30px 20px;
    }
    .service-item h3 {
        font-size: 1.5em;
    }
    .service-item p {
        font-size: 0.95em;
    }
    .service-item i {
        font-size: 3em;
    }

    .portfolio {
        padding: 60px 0;
    }
    .portfolio h1 {
        font-size: 2.5em;
    }
    .portfolio .ipa-label {
        font-size: 1.5em;
        padding: 10px 40px;
    }
    .portfolio .cta-text {
        font-size: 1.2em;
    }
    .portfolio .btn {
        font-size: 1em;
        padding: 10px 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr; /* Один стовпець для портфоліо */
    }
    .portfolio-item img {
        height: 200px; /* Зменшимо висоту зображень */
    }
    .item-overlay {
        font-size: 1.2em;
    }

    .skills-section {
        padding: 60px 0;
    }
    .skills-content {
        flex-direction: column; /* Секція навичок у стовпець */
        gap: 30px;
    }
    .skills-text, .skills-bars {
        padding: 0;
        min-width: unset;
        width: 100%;
    }
    .skills-text h3 {
        font-size: 1.8em;
    }
    .skills-text p {
        font-size: 0.95em;
    }
    .skill span {
        font-size: 1em;
    }
    .skill span::after {
        font-size: 1.2em;
    }

    .contact {
        padding: 60px 0;
    }
    .contact-content {
        flex-direction: column; /* Контактна секція у стовпець */
        gap: 20px;
    }
    .contact-left, .contact-right {
        padding: 30px;
        max-width: 100%;
    }
    .contact-left .company-address-title,
    .contact-form-title {
        font-size: 1.8em;
        text-align: center; /* Центруємо заголовки контактів */
    }
    .contact-left .company-address-text {
        text-align: center;
    }
    .contact-form .btn.contact-submit-btn {
        align-self: center; /* Центруємо кнопку форми */
    }
    .contact-detail-item {
        flex-direction: column; /* Елементи контактної інформації у стовпець */
        align-items: center;
        text-align: center;
    }
    .contact-detail-item i {
        margin-bottom: 10px;
    }
    .contact-detail-item .detail-text h4 {
        margin-bottom: 0;
    }

    .footer {
        padding: 20px 0;
    }
    .footer-nav {
        flex-direction: column;
        gap: 8px;
    }
    .footer-nav a {
        margin: 0;
    }

    #scrollToTopBtn {
        width: 45px; /* Зменшимо кнопку прокрутки вгору */
        height: 45px;
        font-size: 16px;
        bottom: 15px;
        right: 15px;
    }
}
/* ===== Language toggle button ===== */
/* Додайте до файлу main.css */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px; /* Відступ між кнопками */
}

.lang-toggle {
    margin: 10px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    font-size: 14px; /* Розмір шрифту для ПК */
    padding: 7px 12px; /* Внутрішній відступ для ПК */
    border-radius: 50px;
    background-color: var(--secondary-dark-bg);
    color: var(--text-light);
    border: 2px solid var(--highlight-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.lang-toggle:hover {
    background-color: var(--highlight-gold);
    color: var(--primary-dark-bg);
}

.lang-flag {
    display: inline-block;
    width: 24px;
    height: 16px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}
.info-page-wrapper {
    max-width: 800px;
    margin: 80px auto 40px auto;
    padding: 20px;
    background-color: var(--secondary-dark-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    color: var(--text-light);
}

.info-page-wrapper h1 {
    font-size: 2.5em;
    color: #FFD700;
    margin-bottom: 25px;
    text-align: center;
}

.info-page-wrapper h2 {
    font-size: 1.8em;
    color: var(--text-light);
    margin-top: 30px;
    margin-bottom: 15px;
}

.info-page-wrapper p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.info-page-wrapper ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.info-page-wrapper ul li {
    margin-bottom: 8px;
}

.back-button-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.back-button {
    background-color: transparent;
    border: 2px solid var(--highlight-gold);
    border-radius: 25px;
    padding: 10px 25px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out, border 0.4s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.back-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--highlight-gold);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}

.back-button:hover {
    color: var(--primary-dark-bg);
    border: 2px solid transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-button:hover::before {
    width: 100%;
}

@media (max-width: 768px) {
    .info-page-wrapper {
        margin: 40px 15px 20px 15px;
        padding: 15px;
    }
    .info-page-wrapper h1 {
        font-size: 2em;
    }
    .info-page-wrapper p {
        font-size: 1em;
    }
}

/* Мобільні пристрої (екрани до 768px) */
@media (max-width: 768px) {
    .lang-toggle {
        font-size: 12px; /* Зменшений розмір шрифту */
        padding: 5px 10px; /* Зменшений внутрішній відступ */
        top: 15px; /* Зменшений відступ зверху */
        right: 15px; /* Зменшений відступ справа */
    }
}
@media (max-width: 767px) {
    .main-section-header .subtitle::before,
    .main-section-header .subtitle::after {
        width: 20px; /* Зробіть лінії ще коротшими для вузьких екранів */
    }
}
