/* Базові стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --index: calc(1vw + 1vh);
    --color-header: #f4efec;
    --color-header-h2: linear-gradient(90deg, #FF7E00, #FEBF5B);
    --color-text: #cdc6c3;
    --gallery-gap: calc(var(--index) * 7.5);
}

/* Preloader Container */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff; /* Колір фону preloader'а */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Високий пріоритет */
  transition: opacity 0.5s ease; /* Плавне зникнення */
}

/* Loader (обертання) */
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1); /* Легкий сірий контур */
  border-top: 4px solid #3498db; /* Синя частина зверху */
  border-radius: 50%; /* Коло */
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite; /* Анімація обертання */
}

/* Анімація обертання */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}



body {
    padding-top: 70px;
    background-image: url(../img/bg.jpg);
    background-size: 50px;
    color: #fafafa;
    font-family: raleway-c;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: calc(var(--index) * 0.5);
    height: calc(var(--index) * 1);
}

::-webkit-scrollbar-track {
    background-image: url(../img/bg.jpg);
    background-size: 50px;
}

::-webkit-scrollbar-thumb {
    background: #FAFAFA;
    border-radius: 10px;
    border: 2px solid #f4f4f4;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@font-face {
    font-family: raleway-c;
    src: url(../fonts/raleway-regular.woff2);
}

@font-face {
    font-family: outfit-c;
    src: url(../fonts/outfit-regular.woff2);
}

h1, h2, h3, h4, h5, h6 {
    font-family: outfit-c;
}



/* Декоративні елементи */
.contacts-link {
    text-decoration: none;
    color: var(--color-header);
    position: relative;
    transition: color 0.3s ease;
}

.contacts-link:hover {
    color: var(--color-header-h2);
}

.contacts-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #eb0f0f;
    transition: width 0.3s ease;
}

.text-block__h {
    font-size: 2.2rem;
    color: #FFFFFF; /* Білий текст для браузерів без підтримки градієнта */
    background: linear-gradient(90deg, #FF7E00, #FEBF5B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contacts-link:hover::after {
    width: 100%;
}

.contact-info {
    position: fixed; /* Закріплює елемент у верхній частині вікна */
    top: 0; /* Вирівнює по верхньому краю */
    left: 0; /* Вирівнює по лівому краю */
    width: 100%; /* Розтягує на всю ширину */
    z-index: 1; /* Велике значення для перекриття інших елементів */
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0);
    gap: 30px;
    font-size: 1.3rem;
    color: var(--color-header);
}

.contact-info ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.contact-info li {
    display: inline-block;
}

.contact-info a {
    text-decoration: none;
    color: #f4efec;
    position: relative;
}

.contact-info a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: #f4efec;
    transition: width 0.3s ease;
}

.hero-section {
    position: relative;
}

/* Основні блоки */
.hero {
    width: 100%;
    position: absolute;
    z-index: -1;
}

.hero__logo {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    width: 100%; 
    height: auto; 
}

.main-header {
    height: 100vh;
}

.contact-title {
    width: min-content;
    font-size: calc(var(--index) * 1.1);
    position: absolute;
    top: 3vh;
    right: 0;
}

.text-block__about {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 10%;
    border-radius: 8px;
}

.text-block__about__h {
    font-size: 2rem;
    line-height: 2.4rem;
    color: var(--color-header);
    margin-bottom: 20px;
}

.container__about {
    padding: 0 7vw;
    height: 30vh;
}

.gallery__item__about {
    max-width: calc(var(--index) * 21);
    border-radius: 8px;
}

.container {
    padding: 0 7vw;
}

.main-title {
    font-size: calc(var(--index) * 3);
    position: absolute;
    width: min-content;
    bottom: 12vh;
    line-height: 0.9;
}

.gallery {
    display: flex;
    padding: calc(var(--index) * 8) 0 calc(var(--index) * 1);
}

.gallery > * {
    flex: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.gallery__item {
    max-width: calc(var(--index) * 21);
    margin-bottom: var(--gallery-gap);
    max-height: 90vh;
    border-radius: 8px;
}

.gallery__left {
    margin-top: calc(var(--gallery-gap) * 1.75);
}

.gallery__right .gallery__item {
    margin: 0;
    margin-top: calc(var(--gallery-gap) * .75);
}

/* Адаптивність */
@media screen and (max-width: 768px) {

/* Contact Info Adjustments for mobile */
.contact-info {
    gap: 10px;
}

.contact-info {
    position: fixed; /* Закріплює елемент у верхній частині вікна */
    top: 0; /* Вирівнює по верхньому краю */
    left: 0; /* Вирівнює по лівому краю */
    width: 100%; /* Розтягує на всю ширину */
    z-index: 1; /* Велике значення для перекриття інших елементів */
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0);
    gap: 30px;
    font-size: 0.9rem;
    color: var(--color-header);
}


.main-title {
    position: absolute; /* Абсолютне позиціонування */
    bottom: 0; /* Відстань віднизу */
    font-size: calc(var(--index) * 1.5);
    
}

.text-block__h {
    font-size: 1.4rem;
    color: var(--color-header-h2);
}

.gallery {
    flex-direction: column;  /* Stack gallery items vertically */
    padding: 20px 0;
}



.gallery__item {
    width: 100%; /* Фото заповнює всю ширину контейнера */
    max-width: 90%; /* Контролюємо максимальну ширину, щоб уникнути занадто великих розмірів */
    height: auto; /* Автоматична висота для збереження пропорцій */
    margin-bottom: 20px; /* Відступи між фото */
    object-fit: cover;
}

/* Adjust the text blocks and portfolio items */
.text-block__about {
    padding: 15px;
}

.text-block__about__h {
    font-size: 1.2rem;
}

/* Adjust other elements for smaller screens */
.hero__logo {
    max-width: 100%;
}

.contact-info {
    padding-top: 5px;
}

.container{
    height: 120px;
}

.main-header {
    position: relative;
    height: 25vh;
    padding-bottom: 10px;
}
}
