@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Noto+Serif+Display:ital,wght@0,100..900;1,100..900&display=swap');

@font-face {
    font-family: 'OpenSauce';
    src: url('fonts/OpenSauceSans-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'OpenSauce';
    src: url('fonts/OpenSauceSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    color: #323232;
    overflow-x: hidden; /* Запобігає горизонтальному скролу */
}

body h1, h2 {
    font-family: 'EB Garamond', sans-serif;
}

/* Fluid Typography: адаптивний розмір тексту */
body h1 { font-size: clamp(36px, 5vw, 70px); }
body h2 { font-size: clamp(26px, 4vw, 50px); line-height: 1.2; }
p { font-family: 'OpenSauce', sans-serif; font-size: clamp(16px, 2vw, 20px); }

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Перемикач мов --- */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 5%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 5px;
    display: flex;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.lang-switcher button {
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'OpenSauce', sans-serif;
    font-weight: bold;
    font-size: 14px;
    color: #323232;
    transition: all 0.3s ease;
}

.lang-switcher button.active {
    background: #003c64;
    color: #fff;
}

/* Логіка відображення мов */
[lang="ru"], [lang="lt"] { transition: opacity 0.3s ease; }
body.lang-lt [lang="ru"] { display: none; }
body.lang-ru [lang="lt"] { display: none; }

/* --- Title Section --- */
.title {
    background-image: url('img/1.jpg');
    background-size: cover;
    background-position: bottom;
    padding-bottom: clamp(150px, 25vw, 450px);
    padding-top: clamp(80px, 10vw, 120px);
}
.title h1 {
    transition: transform 0.5s ease;
    transform-origin: left;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    line-height: 1.1;
}
.title h2 {
    transition: transform 0.5s ease;
    transform-origin: left;
    margin-top: 30px;
}
.title h1:hover, .title h2:hover {
    transform: scale(1.03);
}

/* --- Law Section --- */
.law {
    padding-top: clamp(50px, 8vw, 100px);
    margin-bottom: clamp(40px, 6vw, 80px);
    padding-bottom: 20px;
}
.law__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    text-align: center;
}
.law__content__text {
    flex: 1;
}
.law__content__text p {
    font-style: italic;
    line-height: 1.5;
    margin-top: 30px;
    transition: transform 0.5s ease;
}
.law__content__text p:hover { transform: scale(1.02); }
.law__content__img {
    flex: 1;
    display: flex;
    justify-content: center;
}
.law__content__img img {
    height: clamp(300px, 40vw, 600px);
    width: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.law__content__img img:hover { transform: scale(1.02); }

/* --- Services Section --- */
.services {
    background: #323232;
    padding-top: clamp(40px, 6vw, 80px);
    padding-bottom: clamp(40px, 6vw, 80px);
}
.services__content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}
.services__title {
    font-family: "Noto Serif Display", sans-serif;
    color: #e3dfd6;
    margin-top: clamp(50px, 15vw, 250px);
    flex-shrink: 0;
}
.services__content__blocks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Гнучкі відступи замість margin-left */
}
.services__content__blocks__upper,
.services__content__blocks__lower {
    display: flex;
    gap: 30px;
}
.block {
    flex: 1;
    padding: clamp(20px, 4vw, 40px);
    transition: background 0.5s ease, color 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.block p {
    font-family: 'EB Garamond', sans-serif;
    font-size: clamp(20px, 2.5vw, 25px);
    line-height: 1.3;
}
.mt-20 { margin-top: 20px; }

/* Кольори блоків послуг */
.services__content__blocks__upper .block:nth-child(1) { background-color: #003c64; color: #fff; }
.services__content__blocks__upper .block:nth-child(1):hover { background: #fff; color: #003c64; }

.block-light { background-color: #e3dfd6; color: #323232; }
.block-light:hover { background: #1a1a1a; color: #e3dfd6; }

.block-white { background-color: #fff; color: #323232; }
.block-white:hover { background: #1a1a1a; color: #fff; }

.block-bg-img {
    background: url('img/3.jpg') center/cover no-repeat;
    min-height: 250px; /* Важливо для мобільної версії */
}

/* --- Info Section --- */
.info {
    padding-top: clamp(40px, 6vw, 60px);
    margin-bottom: clamp(40px, 6vw, 60px);
}
.info img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 40px;
}
.info__subtitle {
    text-decoration: underline;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
}
.info__lists ul {
    list-style: disc;
    margin-left: 20px;
}
.info__lists li {
    margin-top: 10px;
    line-height: 1.5;
}

/* --- Certificates Section --- */
.certificates {
    background: #e3dfd6;
    padding-top: clamp(50px, 8vw, 80px);
    padding-bottom: clamp(60px, 10vw, 140px);
}
.certificates__titles { text-align: center; }
.certificates__titles h2 { font-family: 'OpenSauce', sans-serif; margin-top: 10px; }
.certiciates__images {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: clamp(40px, 8vw, 80px);
    flex-wrap: wrap;
}
.certiciates__images img {
    max-width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.certiciates__images img:hover { transform: scale(1.05); }

/* --- Contacts Section --- */
.contacts {
    background: #323232;
    color: #e3dfd6;
    padding-top: clamp(60px, 10vw, 100px);
    padding-bottom: clamp(40px, 6vw, 60px);
}
.contacts__upper {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}
.contacts__upper__personal, .contacts__upper__address { flex: 1; }
.contacts__lower {
    margin-top: clamp(40px, 8vw, 80px);
}
.contacts a, .contacts span { text-decoration: underline; }
.contacts p {
    margin-top: 15px;
    line-height: 1.6;
}
.contacts h2 { margin-bottom: 20px; color: #fff;}

/* ================= АДАПТИВНІСТЬ (МЕДІА-ЗАПИТИ) ================= */

/* Планшети (Tablet) */
@media (max-width: 992px) {
    .law__content { flex-direction: column; text-align: left; }
    .law__content__img img { width: 100%; height: auto; max-height: 500px; }
    .services__content { flex-direction: column; }
    .services__title { margin-top: 0; text-align: center; }
    .contacts__upper { flex-direction: column; }
}

/* Мобільні телефони (Mobile) */
@media (max-width: 768px) {
    .services__content__blocks__upper,
    .services__content__blocks__lower {
        flex-direction: column;
        gap: 20px;
    }
    .lang-switcher {
        top: 10px; right: 10px;
        padding: 3px;
    }
    .lang-switcher button { padding: 6px 15px; font-size: 12px;}
    
    .certiciates__images { flex-direction: column; align-items: center; }
    .info__lists ul { margin-left: 15px; }
}