/* style.css */

:root {
    --header-height: 80px;
    --logo-width: 150px;
    --grid-ratio: 1fr 3fr; 
}

/* Скидання базових стилів */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: #111;
}

/* --- HEADER --- */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60%;
    width: auto;
    max-width: var(--logo-width);
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #000;
}

/* --- MAIN CONTENT --- */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: 60px;
}

.content-wrapper {
    width: 90%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: var(--grid-ratio);
    gap: 60px;
    align-items: center;
}

/* Контейнер для картинок */
.icon-box {
    aspect-ratio: 1 / 1;
    background-color: #fafafa;
    border: 1px solid #f3f3f3;
    
    display: flex; /* Важливо для центрування, якщо картинки немає */
    position: relative; /* Важливо для absolute позиціювання картинок */
    
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    
    width: 100%;
    max-width: 250px; 
    margin: 0 auto;
    overflow: hidden; 
}

/* Стилі для змінних картинок */
.slide-img {
    position: absolute; /* Накладаються одна на одну */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Масштабування: заповнює весь квадрат, обрізаючи зайве */
    /* object-fit: contain; <--- розкоментуйте це, якщо треба бачити картинку повністю без обрізки */
    
    opacity: 0; /* Приховано за замовчуванням */
    transition: opacity 1s ease-in-out; /* Плавний перехід */
    z-index: 1;
}

.slide-img.visible {
    opacity: 1; /* Показати */
    z-index: 2;
}

/* --- SLIDER TEXT --- */
.content-rotator {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
}

.info-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

.info-block.visible {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.info-block h1, .info-block h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.info-block p { color: #555; line-height: 1.6; }

/* --- TEXT PAGES & CONTACTS --- */
.text-page {
    align-items: flex-start;
    padding-top: calc(var(--header-height) + 40px);
}

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

.text-container h1 { font-size: 2rem; font-weight: 600; margin-bottom: 30px; }
.text-container h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; margin-top: 20px; }
.text-container p { margin-bottom: 10px; line-height: 1.6; color: #4b5563; }

/* Сітка контактів */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 32px;
}

/* Форма */
.contact-form-card {
    background-color: #f9fafb;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
    position: relative;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.submit-btn {
    background-color: #111;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.submit-btn:hover { background-color: #333; }
.submit-btn:disabled { background-color: #999; cursor: not-allowed; }

.msg-box {
    margin-top: 10px;
    padding: 10px;
    font-size: 0.875rem;
    text-align: center;
    border-radius: 4px;
}
.msg-success { background-color: #dcfce7; color: #166534; }
.msg-error { background-color: #fee2e2; color: #991b1b; }

.hidden { display: none !important; }

/* --- FOOTER --- */
footer {
    background-color: #ffffff;
    padding: 20px 5%;
    margin-top: auto;
    border-top: 1px solid #f9f9f9;
}

.footer-content {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
}

.footer-content a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s;
}
.footer-content a:hover { color: #000; }

@media (max-width: 768px) {
    .content-wrapper { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-content { justify-content: center; flex-wrap: wrap; gap: 16px; }
}
