/* =========================================
   1. ЗМІННІ ТА СКІДАННЯ СТИЛІВ (RESET)
   ========================================= */
:root {
    --bg-color: #0F0524;
    --card-bg: #310062;
    --text-main: #FFFFFF;
    --text-dim: #A594C1;
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --glow: 0 0 15px rgba(245, 158, 11, 0.6);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* =========================================
   2. ТИПОГРАФІКА ТА СПІЛЬНІ КЛАСИ
   ========================================= */
h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; }

section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Кнопки */
.btn-primary, .btn-secondary, .btn-nav {
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { border: 2px solid var(--accent); color: var(--accent); }
.btn-nav { background: var(--accent); padding: 0.4rem 1.0rem; border-radius: 8px; }
.btn-nav:hover { background: var(--accent-hover); color: white; }

/* =========================================
   3. НАВІГАЦІЯ (HEADER)
   ========================================= */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
nav ul:first-of-type { margin-left: auto; margin-right: 2rem; }
nav ul { display: flex; list-style: none; gap: 2rem; align-items: center; }
nav a { text-decoration: none; color: var(--text-main); font-weight: 500; transition: var(--transition); }
nav a:hover { color: var(--accent); }

.burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.burger span { width: 25px; height: 3px; background: var(--text-main); transition: var(--transition); }

/* =========================================
   4. СТОРІНКИ ТА СЕКЦІЇ
   ========================================= */
/* Hero Section */
#hero {
    padding: 10rem 2rem 6rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
#hero p { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 2.5rem; }
.hero-btns { display: flex; justify-content: center; gap: 1.5rem; }

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
.service-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; margin-bottom: 1.5rem; }
.service-card h3 { font-size: 1.4rem; margin-bottom: 0.8rem; color: var(--text-main); }
.service-card p { font-size: 1rem; color: var(--text-dim); line-height: 1.5; }

/* Portfolio */
.portfolio-section { background-color: var(--bg-color); padding: 80px 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.portfolio-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(165, 148, 193, 0.1);
}
.portfolio-card:hover { transform: translateY(-10px); border-color: var(--accent); }
.portfolio-card:hover .card-overlay { opacity: 1; }

.swiper { width: 100%; height: 260px; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 5, 36, 0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition); z-index: 5;
}
.btn-details {
    padding: 12px 25px; background: var(--accent); color: var(--bg-color);
    border: none; border-radius: 8px; font-weight: 700; cursor: pointer;
    transition: var(--transition); text-transform: uppercase; letter-spacing: 1px;
}
.btn-details:hover { background: var(--accent-hover); box-shadow: var(--glow); transform: scale(1.05); }

.card-info { padding: 20px; }
.card-info h3 { margin: 0 0 8px 0; color: var(--text-main); }
.card-info p { margin: 0; color: var(--text-dim); }

/* Сторінки документів (Оферта, Політика) */
.document-content {
    padding: 120px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
.document-content h1 { margin-bottom: 2rem; color: var(--accent); }
.document-content h2 { margin-top: 2rem; margin-bottom: 1rem; font-size: 1.5rem; text-align: left; }
.document-content p, .document-content ul { margin-bottom: 1rem; opacity: 0.9; }
.document-content ul { padding-left: 20px; }
.btn-back { display: inline-block; margin-bottom: 2rem; text-decoration: none; color: var(--accent); font-weight: bold; }

/* =========================================
   5. КОМПОНЕНТИ (Модалка, Форма, FAB)
   ========================================= */
/* Модальне вікно */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 5, 36, 0.95); z-index: 9999;
    align-items: center; justify-content: center; backdrop-filter: blur(8px);
}
.modal-content {
    background: var(--card-bg); color: var(--text-main);
    max-width: 900px; width: 90%; border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.2); max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-body { padding: 40px; }
.close-modal { position: absolute; top: 20px; right: 25px; font-size: 35px; color: var(--text-dim); cursor: pointer; }
.modalSwiper { width: 100%; height: 400px; border-radius: 15px; overflow: hidden; }

.modal-info { padding-top: 25px; text-align: left; }
.modal-info h2 { margin-bottom: 15px; color: var(--accent); font-size: 2rem; text-align: left; }
.modal-info p { margin-bottom: 20px; color: var(--text-main); }
.modal-info h3 { margin-bottom: 10px; color: var(--text-dim); text-transform: uppercase; font-size: 0.9rem; }
.modal-info ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.modal-info ul li { position: relative; padding-left: 20px; color: var(--text-dim); }
.modal-info ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.modal-actions { margin-top: 30px; display: flex; justify-content: flex-start; }

/* Форма контактів */
.contact-container { max-width: 600px; margin: 0 auto; text-align: center; }
.contact-subtitle { color: var(--text-dim); margin-bottom: 2rem; font-size: 1.1rem; display: block; }
#contactForm { display: flex; flex-direction: column; gap: 1.2rem; }
input, textarea { padding: 1rem; background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: white; font-size: 1rem; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.btn-submit { background: var(--accent); color: white; padding: 1rem; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-submit:hover { background: var(--accent-hover); }

.privacy-notice { font-size: 12px; color: #a0a0a0; margin-top: 15px; text-align: center; line-height: 1.4; }
.privacy-notice a { color: #3b82f6; text-decoration: underline; }

/* FAB (Floating Action Button) */
.fab-container { position: fixed; bottom: 30px; right: 30px; z-index: 1001; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.fab-main {
    width: 60px; height: 60px; background: var(--accent); border: none; border-radius: 50%;
    color: white; font-size: 30px; cursor: pointer; box-shadow: var(--glow); transition: var(--transition);
    display: flex; align-items: center; justify-content: center; animation: fab-pulse 2s infinite;
}
.fab-main:hover, .fab-container.active-fab .fab-main { transform: scale(1.1) rotate(45deg); background: var(--accent-hover); }
.fab-main:hover .chat-icon { transform: scale(1.1); }

.fab-options {
    display: flex; flex-direction: column; gap: 10px; opacity: 0;
    transform: translateY(20px); visibility: hidden; transition: var(--transition);
}
.fab-container:hover .fab-options, .fab-container.active-fab .fab-options { opacity: 1; transform: translateY(0); visibility: visible; }

.fab-option {
    width: 50px; height: 50px; background: var(--card-bg); border: 1px solid var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: var(--transition);
    font-size: 32px;;
}
.fab-option svg { display: block; }
.fab-option.viber { color: #7360f2; border-color: #7360f2;}
.fab-option.viber:hover { background: #7360f2; color: white; }
.fab-option.telegram { color: #0088cc; border-color: #0088cc; }
.fab-option.telegram:hover { background: #0088cc; color: white; }
.fab-option.email { color: #f87171; border-color: #f87171; }
.fab-option.email:hover { background: #f87171; color: white; }

@keyframes fab-pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }

/* =========================================
   6. ФУТЕР
   ========================================= */
.main-footer {
    background-color: #050111;
    padding: 80px 10% 40px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-col { flex: 1; display: flex; flex-direction: column; gap: 15px; min-width: 200px; align-items: center; text-align: center; }
.footer-logo { font-size: 2.2rem; font-weight: 800; color: var(--accent); text-decoration: none; margin-bottom: 5px; display: block; }
.footer-desc { color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; max-width: 350px; margin: 0 auto; }
.footer-col h4 { color: var(--text-main); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.footer-col a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; transition: var(--transition); }
.footer-col a:hover { color: var(--accent); transform: translateX(5px); }

.footer-socials { display: flex; gap: 15px; margin-top: 10px; justify-content: center; }
.footer-socials a { transition: var(--transition); }
.footer-socials a:hover { background: var(--accent); color: var(--bg-color); transform: translateY(-3px); border-radius: 50%; }

/* =========================================
   7. АДАПТИВНІСТЬ (MEDIA QUERIES)
   ========================================= */
@media (max-width: 992px) {
    .main-footer { flex-wrap: wrap; padding: 60px 5% 30px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero-btns { flex-direction: column; }
    
    /* Мобільне меню */
    .burger { display: flex; }
    nav ul {
        display: none; flex-direction: column; position: absolute;
        top: 70px; left: 0; width: 100%; background: var(--bg-color);
        padding: 2rem; border-bottom: 1px solid var(--accent);
    }
    nav ul.active { display: flex; }

    /* Футер */
    .main-footer { flex-direction: column; text-align: center; align-items: center; padding: 40px 20px; gap: 35px; }
    .footer-col { width: 100%; gap: 12px; }
    .footer-desc { max-width: 280px; }
    .footer-col a:hover { transform: scale(1.05); }
    .footer-socials { gap: 20px; }
    .footer-socials a { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; } }

/*==========================================
    8. ДОДАТКОВІ СТИЛІ (FAQ, Технічна підтримка)
==========================================*/
    .seo-faq { margin: 4rem auto; max-width: 800px; padding: 0 20px; }
    .seo-faq h2 { text-align: center; margin-bottom: 2rem; }
    .seo-faq details { background: var(--bg-color, #f9f9f9); margin-bottom: 1rem; padding: 1rem; border-radius: 8px; border: 1px solid var(--border-color, #eee); }
    .seo-faq summary { font-weight: bold; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
    .seo-faq summary::-webkit-details-marker { display: none; }
    .seo-faq summary::after { content: '+'; font-size: 1.5rem; color: var(--accent, #333); }
    .seo-faq details[open] summary::after { content: '-'; }
    .seo-faq p { margin-top: 1rem; color: var(--text-color, #555); line-height: 1.6; }
