/* --- ПРЕМІУМ ЗМІННІ --- */
:root {
    --color-primary: #ff2a2a;
    --color-primary-hover: #e60000;
    --color-dark: #0a0a0a;
    --color-darker: #050505;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;

    --glow-red: 0 0 20px rgba(255, 42, 42, 0.6);
    --glow-red-strong: 0 0 35px rgba(255, 42, 42, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- ПРИХОВУВАННЯ ПОЛОСИ ПРОКРУТКИ --- */
::-webkit-scrollbar { width: 0px; height: 0px; background: transparent; }
html { scrollbar-width: none; }

/* --- БАЗОВІ НАЛАШТУВАННЯ --- */
html, body {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
    -ms-overflow-style: none;
    background-color: var(--color-darker);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
section { padding: 120px 10%; }
.section-dark { background-color: var(--color-dark); }
.section-darker { background-color: var(--color-darker); }

/* --- УНІВЕРСАЛЬНІ КЛАСИ (UTILITIES) --- */
.absolute-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.bg-cover { background-size: cover; background-position: center; }

.glass-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* --- ТИПОГРАФІКА --- */
.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 60px;
    text-align: center;
    display: block;
    width: 100%;
}
.section-title::after { content: '.'; color: var(--color-primary); text-shadow: var(--glow-red); }

/* Клас для заголовків по лівому краю (Секція контактів) */
.text-left { text-align: left; }

/* --- HEADER --- */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 20px 0; transition: all var(--transition-smooth); border-bottom: 1px solid transparent;
}
.header.scrolled {
    background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border); padding: 10px 0;
}
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 0 10%; max-width: 1600px; margin: 0 auto; }

.logo { font-size: 1.8rem; font-weight: 800; text-decoration: none; color: white; text-transform: uppercase; }
.logo span { color: var(--color-primary); text-shadow: var(--glow-red); }

.nav-links { list-style: none; display: flex; gap: 40px; }
.nav-links li a {
    text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem;
    text-transform: uppercase; transition: color var(--transition-smooth); position: relative;
}
.nav-links li a::after {
    content: ''; position: absolute; width: 0%; height: 2px; bottom: -8px; left: 0;
    background-color: var(--color-primary); box-shadow: var(--glow-red); transition: width 0.3s ease;
}
.nav-links li a:hover { color: white; }
.nav-links li a:hover::after { width: 100%; }

.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001; }
.hamburger .bar { width: 30px; height: 2px; background-color: white; transition: all 0.3s ease; }

/* --- 1. HERO --- */
.hero { position: relative; height: 100vh; min-height: 700px; display: flex; align-items: center; padding: 0 10%; overflow: hidden; }
.hero-bg { animation: kenBurns 20s infinite alternate ease-in-out; z-index: 1; }
@keyframes kenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
.hero-overlay { background: linear-gradient(90deg, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.7) 50%, rgba(5,5,5,0.2) 100%); z-index: 2; }

.hero-content { position: relative; z-index: 3; max-width: 800px; opacity: 0; animation: fadeUpIn 1s ease forwards; animation-delay: 0.3s; }
@keyframes fadeUpIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

.hero-title { font-size: 4.5rem; font-weight: 800; line-height: 1.05; margin-bottom: 25px; text-transform: uppercase; letter-spacing: -2px; }
.hero-title span { color: var(--color-primary); text-shadow: var(--glow-red-strong); }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 45px; max-width: 600px; border-left: 3px solid var(--color-primary); padding-left: 20px; }

/* КНОПКА ПРЕМІУМ */
.btn-pulse {
    display: inline-block; padding: 18px 45px; background: var(--color-primary); color: white;
    text-decoration: none; border-radius: 4px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; position: relative; transition: all var(--transition-smooth); z-index: 1;
    overflow: hidden; box-shadow: 0 10px 30px rgba(255, 42, 42, 0.2); border: 1px solid rgba(255, 100, 100, 0.3); cursor: pointer;
}
.btn-pulse::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: all 0.6s ease; z-index: -1;
}
.btn-pulse:hover::before { left: 100%; }
.btn-pulse:hover { background: var(--color-primary-hover); box-shadow: var(--glow-red-strong); transform: translateY(-3px); }

/* --- 2. ПОСЛУГИ --- */
.services-container { display: flex; flex-wrap: wrap; gap: 24px; }
.service-card { border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--glass-border); }
.service-card-inner { position: relative; width: 100%; height: 100%; }

.service-card-front, .service-card-back {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 40px;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.2, 1);
}
.service-card-front { transform: translateX(0) skewX(0); opacity: 1; z-index: 2; }
.service-card-back { transform: translateX(100%) skewX(-10deg); opacity: 0; z-index: 1; }

.service-card-front::before, .service-card-back::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.service-card-front::before { background: linear-gradient(180deg, rgba(5,5,5,0.1) 0%, rgba(5,5,5,0.9) 100%); }
.service-card-back::before { background: rgba(5, 5, 5, 0.8); backdrop-filter: blur(5px); }

.service-card h3, .service-card p { position: relative; z-index: 2; }
.service-card h3 { font-size: 1.8rem; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; line-height: 1.2; }
.service-card p { color: var(--text-muted); }

.service-card:hover .service-card-front { transform: translateX(-100%) skewX(10deg); opacity: 0; }
.service-card:hover .service-card-back { transform: translateX(0) skewX(0); opacity: 1; }
.service-6 {
  min-height: 500px !important; /* Додано для збільшення висоти шостої картки */
}

.card-wide { flex: 1 1 60%; min-height: 350px; }
.card-small { flex: 1 1 35%; min-height: 350px; }
.card-tall { flex: 1 1 30%; min-height: 450px; }
.card-standard { flex: 1 1 30%; min-height: 300px; }

/* --- 3. СЛАЙДЕР ПРОЕКТІВ --- */
.slider-container { position: relative; max-width: 1200px; height: 600px; margin: 0 auto; overflow: hidden; padding: 0; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; display: flex; align-items: flex-end; padding: 60px; }
.slide.active { opacity: 1; z-index: 2; }

/* Автоматичний градієнт для всіх слайдів */
.slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(5,5,5,0.1) 0%, rgba(5,5,5,0.95) 100%); z-index: 1; }
.slide-content { position: relative; z-index: 2; max-width: 600px; transform: translateY(30px); transition: 0.6s 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.slide.active .slide-content { transform: translateY(0); }

.slide-content .tag { display: inline-block; padding: 5px 12px; background: var(--color-primary); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; border-radius: 3px; margin-bottom: 15px; }
.slide-content h3 { font-size: 2.5rem; font-weight: 800; text-transform: uppercase; line-height: 1.1; margin-bottom: 15px; }
.slide-content p { color: #ccc; font-size: 1.1rem; }

.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; color: white; font-size: 24px; cursor: pointer; z-index: 10; transition: var(--transition-smooth); display: flex; justify-content: center; align-items: center; border-radius: 50%; border: 1px solid var(--glass-border); }
.slider-btn:hover { background: var(--color-primary); border-color: var(--color-primary); box-shadow: var(--glow-red); }
.prev { left: 30px; } .next { right: 30px; }

/* --- 4. ПАРАЛАКС (PRO NAS) --- */
.parallax-section { position: relative; height: 700px; display: flex; align-items: center; justify-content: center; padding: 0 10%; }
.parallax-bg { background-attachment: fixed; z-index: -2; height: 120%; }
.parallax-overlay { background: rgba(5,5,5,0.75); z-index: -1; }
.about-content { padding: 60px; max-width: 800px; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.about-content .section-title { margin-bottom: 30px; }
.about-content p { font-size: 1.2rem; color: #ddd; }
.about-content p span { color: var(--color-primary); font-weight: 800; text-shadow: var(--glow-red); }

/* --- 5. КОНТАКТИ --- */
.contact-wrapper { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; }
.contact-text { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; max-width: 500px; }

.direct-contacts { display: flex; flex-direction: column; gap: 20px; }
.social-card { display: flex; align-items: center; gap: 20px; padding: 20px 30px; text-decoration: none; color: white; transition: var(--transition-smooth); }
.social-card:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateX(10px); }
.social-card.whatsapp:hover svg { stroke: #25D366; }
.social-card.instagram:hover svg { stroke: #E1306C; }
.social-card svg { transition: stroke var(--transition-smooth); }
.social-card div { display: flex; flex-direction: column; }
.social-card span { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.social-card strong { font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; }

.modern-form { padding: 50px; }
.form-heading { font-size: 1.8rem; font-weight: 800; margin-bottom: 30px; text-transform: uppercase; }

/* Tagi wyboru */
.topics { margin-bottom: 30px; }
.topics p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; font-weight: 700; text-transform: uppercase; }
.tags-container { display: flex; flex-wrap: wrap; gap: 12px; }
.tag-label input { display: none; }
.tag-label span { display: inline-block; padding: 10px 20px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--glass-border); border-radius: 50px; font-size: 0.9rem; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all var(--transition-smooth); }
.tag-label span:hover { border-color: rgba(255, 255, 255, 0.3); color: white; }
.tag-label input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: white; box-shadow: var(--glow-red); }

/* Form inputs */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.input-wrapper { position: relative; margin-bottom: 25px; }
.input-wrapper input, .input-wrapper textarea { width: 100%; padding: 20px 20px 10px 20px; background: rgba(0, 0, 0, 0.4); color: white; border: 1px solid var(--glass-border); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: all var(--transition-smooth); }
.input-wrapper input:focus, .input-wrapper textarea:focus { outline: none; border-color: var(--color-primary); background: rgba(255, 42, 42, 0.05); box-shadow: 0 0 15px rgba(255, 42, 42, 0.1); }
.input-wrapper label { position: absolute; left: 20px; top: 18px; color: var(--text-muted); font-size: 1rem; pointer-events: none; transition: all 0.2s ease-out; }

.input-wrapper input:focus ~ label, .input-wrapper input:not(:placeholder-shown) ~ label,
.input-wrapper textarea:focus ~ label, .input-wrapper textarea:not(:placeholder-shown) ~ label { top: 6px; font-size: 0.75rem; color: var(--color-primary); font-weight: 700; }

.modern-form .btn-pulse { width: 100%; padding: 20px; margin-top: 10px; }

/* --- 6. FOOTER --- */
.footer { background: var(--color-darker); border-top: 1px solid var(--glass-border); padding: 80px 10% 30px; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 50px; max-width: 1400px; margin: 0 auto; border-bottom: 1px solid var(--glass-border); padding-bottom: 50px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; margin-bottom: 25px; }
.footer-col h3 span { color: var(--color-primary); text-shadow: var(--glow-red); }
.footer-col p { color: var(--text-muted); margin-bottom: 15px; }
.footer-col .phone { font-size: 1.2rem; font-weight: 700; color: white; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { text-decoration: none; color: var(--text-muted); text-transform: uppercase; font-size: 0.9rem; font-weight: 700; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--color-primary); padding-left: 8px; }

.footer-bottom { text-align: center; padding-top: 30px; color: #555; font-size: 0.9rem; }
.social-link { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; transition: var(--transition-smooth); margin-top: 10px; font-weight: 700; border: 1px solid var(--glass-border); padding: 10px 20px; border-radius: 4px; }
.social-link:hover { background: var(--color-primary); border-color: var(--color-primary); box-shadow: var(--glow-red); }
.social-link svg { width: 20px; height: 20px; stroke: currentColor; }

/* --- АНІМАЦІЇ СКРОЛУ --- */
.reveal { opacity: 0; transition: all 1s cubic-bezier(0.25, 1, 0.2, 1); filter: blur(5px); }
.reveal-bottom { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal.active { opacity: 1; transform: translate(0) !important; filter: blur(0); }

/* =========================================
   ФОНОВІ ЗОБРАЖЕННЯ (КАРТКИ ТА СЛАЙДИ)
   ========================================= */

.hero-bg { background: url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?q=80&w=2000') center/cover no-repeat; }

.service-1 .service-card-front, .service-1 .service-card-back { background-image: url('images/IMG_5522.jpeg'); }
.service-2 .service-card-front, .service-2 .service-card-back { background-image: url('images/IMG_5527.jpeg'); }
.service-3 .service-card-front, .service-3 .service-card-back { background-image: url('images/IMG_5523.jpeg'); }
.service-4 .service-card-front, .service-4 .service-card-back { background-image: url('images/IMG_5524.jpg'); }
.service-5 .service-card-front, .service-5 .service-card-back { background-image: url('images/IMG4933.jpeg'); }
.service-6 .service-card-front, .service-6 .service-card-back { background-image: url('images/laweta.jpg'); }

.slide-1 { background-image: url('images/IMG_3235.jpeg'); }
.slide-2 { background-image: url('images/IMG_3195.jpeg'); }
.slide-3 { background-image: url('images/IMG_3226.jpeg'); }

.parallax-bg { background-image: url('images/about-bg.jpg'); }

/* --- МОБІЛЬНА АДАПТАЦІЯ --- */
@media (max-width: 992px) {
    .hamburger { display: flex; }
    .nav-links { position: fixed; right: -100%; top: 0; height: 100vh; width: 100%; background-color: rgba(5,5,5,0.98); backdrop-filter: blur(20px); flex-direction: column; align-items: center; justify-content: center; gap: 40px; transition: right 0.5s cubic-bezier(0.25, 1, 0.2, 1); }
    .nav-links.active { right: 0; }
    .nav-links li a { font-size: 2rem; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero { justify-content: center; padding: 0 5%; text-align: center; }
    .hero-overlay { background: linear-gradient(0deg, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.6) 100%); }
    .hero-title { font-size: 2.8rem; text-align: center; }
    .hero-subtitle { font-size: 1.1rem; border-left: none; padding-left: 0; margin-left: auto; margin-right: auto; text-align: center; }

    section { padding: 80px 5%; }

    .section-title { font-size: 2.2rem; margin-bottom: 40px; text-align: center; }
    .text-left { text-align: center; }

    .card-wide, .card-small, .card-tall, .card-standard { flex: 1 1 100%; min-height: 300px; }

    .slider-container { height: 500px; border-radius: 0; border-left: none; border-right: none; }
    .slide { padding: 30px; }
    .slide-content h3 { font-size: 1.8rem; }

    /* Збільшуємо зону натискання для мобільних */
    .slider-btn { width: 50px; height: 50px; font-size: 20px; background: rgba(0,0,0,0.5); }
    .prev { left: 10px; } .next { right: 10px; }

    .parallax-section { height: auto; min-height: 500px; padding: 60px 5%; }
    .about-content { padding: 40px 20px; }

    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .contact-text { text-align: center; margin: 0 auto 30px auto; font-size: 1rem; }
    .modern-form { padding: 30px 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .tags-container { justify-content: center; }

    .footer-container { flex-direction: column; text-align: center; gap: 40px; padding-bottom: 30px; }
    .parallax-bg { background-attachment: scroll; } /* Вимикаємо паралакс на iOS для уникнення багів */
}
