/* style.css */
:root {
    /* Світла тема */
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --primary-red: #d32f2f;
    --primary-red-hover: #b71c1c;
    --gray-light: #f5f5f5;
    --gray-dark: #333333;
    --border-color: #e0e0e0;
    --header-bg: #ffffff;
    --footer-bg: #222222;
    --footer-text: #cccccc;
    --card-bg: #ffffff;
}

[data-theme="dark"] {
    /* Темна тема */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --primary-red: #ef5350;
    --primary-red-hover: #e53935;
    --gray-light: #1e1e1e;
    --gray-dark: #e0e0e0;
    --border-color: #333333;
    --header-bg: #1f1f1f;
    --footer-bg: #0a0a0a;
    --footer-text: #999999;
    --card-bg: #1e1e1e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* System UI Stack для максимальної швидкості та нативності */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Header & Top Bar */
.top-bar {
    background: var(--gray-light);
    font-size: 0.85rem;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.contacts-top a {
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

header {
    background: var(--header-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo img { height: 50px; }

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a:hover { color: var(--primary-red); }

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

/* Typography & Layout */
main { padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
h1, h2, h3 { margin-bottom: 15px; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 40px; border-bottom: 2px solid var(--primary-red); padding-bottom: 10px; display: inline-block;}
p { margin-bottom: 15px; }

.btn {
    display: inline-block;
    background: var(--primary-red);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}
.btn:hover { background: var(--primary-red-hover); }

/* Grid Layouts */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Calculator Section */
.calculator {
    background: var(--gray-light);
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.calc-grid input, .calc-grid select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}
.calc-result-box {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
    margin-top: 15px;
}

/* Modal / Popup */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* GDPR Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: var(--gray-dark);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner button { margin-left: 10px; }

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 20px;
    margin-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-links a { display: block; margin-bottom: 8px; color: var(--footer-text); }
.footer-links a:hover { color: #fff; }

/* Media Queries */
@media (max-width: 768px) {
    .top-bar { flex-direction: column; gap: 10px; text-align: center; }
    header { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; }
    .cookie-banner { flex-direction: column; gap: 15px; text-align: center; }
}
/* Додаткові стилі для внутрішніх сторінок */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.gallery-grid figure {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
}
.gallery-grid img {
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.gallery-grid figcaption strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}
.gallery-grid figcaption {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
}
.faq-item h3 {
    color: var(--primary-red);
    margin-bottom: 10px;
    font-size: 1.2rem;
}
.content-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}