* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    background: linear-gradient(135deg, #000000, #171717);
    color: #ffffff;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.header-container {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 60px;
}

/* Новий блок для Лого і Мов */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #ffffff;
}

/* Перемикач мов */
.lang-switch {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #333;
}

.lang-switch a {
    color: #666;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 5px;
    transition: 0.2s;
}

.lang-switch a:hover {
    color: #aaa;
}

.lang-switch a.active {
    color: #fff;
    text-decoration: underline;
}

.slogan {
    color: #888;
    font-size: 1.1rem;
    height: 30px;
}

.intro-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 12px;
    border: 1px dashed #333;
}

.intro {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.sub-intro {
    color: #666;
    font-size: 0.9rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 80px;
}

.card {
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 30px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #fff;
}

.card p {
    color: #aaa;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.btn-container {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-text {
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-container:hover .btn-text { transform: translateY(-40px); }
.btn-container:hover .contact-links { top: 0; }

.contact-links a {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: #222;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-right: 1px solid #111;
    transition: all 0.2s;
}

.contact-links a:last-child { border-right: none; }
.contact-links .link-tg:hover { background: #2AABEE; color: #fff; }
.contact-links .link-mail:hover { background: #EA4335; color: #fff; }
.contact-links .link-ds:hover { background: #5865F2; color: #fff; }

.btn-details {
    background: transparent;
    color: #888;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-details:hover {
    background: #222;
    color: #fff;
    border-color: #555;
}

footer {
    text-align: center;
    max-width: 600px;
    color: #555;
    font-size: 0.9rem;
    margin-top: auto;
    padding-bottom: 20px;
}

.links { margin-top: 15px; }
.links a {
    color: #888;
    text-decoration: none;
    font-weight: 700;
    margin: 0 10px;
    transition: color 0.2s;
}
.links a:hover { color: #fff; }

.modal {
    display: none; 
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-content {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    animation: modalFadeIn 0.3s ease;
    margin: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.close-btn:hover { color: #fff; }

#modal-title {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #fff;
    padding-right: 30px;
}

.modal-description {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.modal-gallery .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #333;
    transition: 0.3s;
    cursor: pointer;
}

.modal-gallery .gallery-item:hover {
    border-color: #fff;
    opacity: 0.8;
}

/* Двомовний діагональний водяний знак для маленьких картинок */
.modal-gallery .gallery-item::after {
    content: "ЦЕ ПРИКЛАД. ДАНІ ЗМІНЕНО.\A THIS IS AN EXAMPLE. DATA CHANGED.\A ЦЕ ПРИКЛАД. ДАНІ ЗМІНЕНО.\A THIS IS AN EXAMPLE. DATA CHANGED.\A ЦЕ ПРИКЛАД. ДАНІ ЗМІНЕНО.\A THIS IS AN EXAMPLE. DATA CHANGED.";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%; /* Робимо блок дуже широким, щоб тексту вистачило на кути */
    transform: translate(-50%, -50%) rotate(-35deg);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    white-space: pre; /* Дозволяє використовувати \A як перенос рядка */
    text-align: center;
    line-height: 2.5; /* Відстань між рядками */
}

.modal-gallery img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.empty-gallery-msg {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed #444;
    padding: 25px;
    border-radius: 8px;
    color: #888;
    text-align: center;
    font-size: 0.95rem;
    grid-column: 1 / -1;
    line-height: 1.5;
}

.empty-gallery-msg b.warn {
    color: #ff4444;
    text-transform: uppercase;
}

.price-box {
    background: #1a1a1a;
    border-left: 4px solid #fff;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.price-box p {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-cta-btn {
    display: block;
    width: 100%;
    background: #fff;
    color: #000;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s;
    font-size: 1.1rem;
}

.modal-cta-btn:hover { background: #ccc; }

.lightbox {
    display: none; 
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    animation: fadeIn 0.3s;
    overflow: hidden;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ОБГОРТКА ЛАЙТБОКСА ДЛЯ ДИНАМІЧНИХ ЗНАКІВ */
.lightbox-wrapper {
    position: relative;
    display: inline-block;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-wrapper img {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
    border: 2px solid #333;
    border-radius: 4px;
    cursor: default;
    position: relative;
    z-index: 201;
    display: block;
}

/* Шар, який обрізається по краях картинки */
.lightbox-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 4px;
    z-index: 202;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-watermark-container {
    width: 300%;
    height: 300%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: rotate(-35deg);
}

.lightbox-watermark-row {
    display: flex;
    margin: 15px 0;
}

.lightbox-watermark-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    user-select: none;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .header-top { flex-direction: column; align-items: flex-start; gap: 15px; }
    .grid-container { grid-template-columns: 1fr; gap: 15px; }
    body { padding: 20px 10px; }
    .intro-box { padding: 15px; margin-bottom: 30px; }
    .logo { font-size: 2.2rem; }
    .card { padding: 20px; }
    .modal-content { padding: 25px 20px; }
    #modal-title { font-size: 1.4rem; }
    
    .lightbox-wrapper { max-width: 95%; max-height: 95vh; }
    .lightbox-wrapper img { max-width: 100%; max-height: 95vh; }
    .lightbox-watermark-text { font-size: 1.2rem; }
}