:root {
    --acid: #ccff00;
    --black: #111;
    --dark-gray: #1a1a1a;
    --text: #eee;
    --danger: #ff3b30;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--black);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 { text-transform: uppercase; font-weight: 900; }
.highlight { color: var(--acid); }
.humor-strike { text-decoration: line-through; font-size: 0.7em; opacity: 0.6; vertical-align: middle; margin-left: 5px; }

.btn {
    display: inline-block;
    background: var(--acid);
    color: #000;
    padding: 7px 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: 0.3s;
    font-size: 1.0rem;
    margin-top: 20px;
    border: 2px solid var(--acid);
}
.btn:hover { background: #fff; border-color: #fff; transform: translateY(-5px); box-shadow: 0 0 30px rgba(204, 255, 0, 0.4); }

.btn-article {
    background: transparent; color: var(--acid); border: 2px solid var(--acid); font-size: 1rem; padding: 15px 30px; margin-top: 30px; display: inline-block; text-decoration: none; font-weight: bold;
}
.btn-article:hover { background: var(--acid); color: #000; box-shadow: 0 0 20px rgba(204, 255, 0, 0.2); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('/images/background.png');
    background-size: cover;
    background-position: center;
    border-bottom: 5px solid var(--acid);
}

.top-bar { position: absolute; top: 0; left: 0; width: 100%; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; z-index: 10; }
.logo-img { height: 60px; width: auto; display: block; }

.phone-icon-btn { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border: 2px solid var(--acid); border-radius: 50%; transition: 0.3s; background: rgba(0,0,0,0.5); }
.phone-icon-btn svg { width: 24px; height: 24px; stroke: var(--acid); }
.phone-icon-btn:hover { background: var(--acid); box-shadow: 0 0 15px var(--acid); }
.phone-icon-btn:hover svg { stroke: #000; }

.hero-content h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 40px auto; color: #ccc; font-family: 'Roboto Mono', monospace; }

section { padding: 100px 0; }
.section-gray { background: var(--dark-gray); }

.bazar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.photo-frame { border: 4px solid var(--acid); padding: 10px; transform: rotate(-2deg); max-width: 100%; }
.photo-frame img { width: 100%; height: auto; display: block; filter: grayscale(100%) contrast(1.2); transition: 0.5s; }
.photo-frame:hover img { filter: grayscale(0%); }
.bazar-content h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--acid); }

.features-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card { background: #1a1a1a; padding: 40px; border-left: 5px solid #333; transition: 0.3s; }
.feature-card:hover { border-left: 5px solid var(--acid); background: #222; }
.icon { font-size: 3rem; margin-bottom: 20px; color: var(--acid); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.portfolio-item { position: relative; height: 300px; overflow: hidden; border: 1px solid #333; cursor: pointer; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.portfolio-item:hover img { transform: scale(1.1); filter: brightness(1.2); }
.portfolio-label { position: absolute; bottom: 0; left: 0; background: var(--acid); color: #000; padding: 5px 15px; font-weight: bold; pointer-events: none; }
.click-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; background: rgba(0,0,0,0.7); padding: 10px 20px; border-radius: 20px; opacity: 0; transition: 0.3s; font-weight: bold; pointer-events: none; }
.portfolio-item:hover .click-hint { opacity: 1; }

/* --- МОДАЛЬНОЕ ОКНО --- */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.95); justify-content: center; align-items: center; flex-direction: column; }
.modal-content { position: relative; width: 95%; max-width: 1000px; border: 2px solid var(--acid); background: #000; padding: 0; display: block; overflow: hidden; }
.close-btn { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 10001; }
.close-btn:hover { color: var(--acid); }
.modal-text { color: #fff; margin-top: 20px; font-size: 1.2rem; text-align: center; }

/* --- НАШ САМОПИСНЫЙ СЛАЙДЕР (ЖЕЛЕЗОБЕТОННЫЙ) --- */
.custom-slider {
    position: relative;
    width: 100%;
    max-height: 80vh; 
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
}

.custom-slider img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    pointer-events: none;
}

/* Картинка "После" - лежит снизу */
.img-base { width: 100%; }

/* Картинка "До" - лежит сверху в обрезаемом блоке */
.resize-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    border-right: 3px solid #000;
    z-index: 10;
}

/* Сама картинка "До" внутри обрезки */
.resize-image img {
    /* Важно: ширина будет задаваться скриптом, чтобы совпадать с контейнером */
    width: 1000px; 
    max-width: none;
    height: 100%; 
}

/* Ползунок */
.handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--acid);
    border: 3px solid #000;
    border-radius: 50%;
    z-index: 20;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.handle::after { content: "↔"; color: #000; font-weight: bold; font-size: 20px; }

/* Лейблы До/После */
.slider-label {
    position: absolute;
    top: 20px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 30;
}
.label-before { left: 20px; }
.label-after { right: 20px; }

/* FAQ & Footer */
.faq-item { border-bottom: 1px solid #333; margin-bottom: 20px; padding-bottom: 20px; }
.faq-question { font-size: 1.3rem; font-weight: bold; color: #fff; margin-bottom: 10px; cursor: pointer; }
.faq-question::before { content: '?? '; color: var(--acid); }
.faq-answer { color: #aaa; padding-left: 30px; }

.section-cheap { padding: 80px 0; background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('/images/background.png'); background-size: cover; background-position: center; text-align: center; border-top: 2px solid var(--danger); border-bottom: 2px solid var(--danger); }
.cheap-box { border: 2px dashed var(--danger); padding: 40px; display: inline-block; max-width: 900px; background: rgba(0,0,0,0.7); }
.cheap-box h2 { color: var(--danger); margin-bottom: 20px; font-size: 2.2rem; }

footer { padding: 60px 0; text-align: center; background: var(--black); }
.social-link { display: block; margin-top: 20px; color: #777; text-decoration: none; }

@media (max-width: 768px) {
    .logo-img { height: 35px; } .phone-icon-btn { width: 35px; height: 35px; } .phone-icon-btn svg { width: 18px; height: 18px; } .top-bar { padding: 15px 20px; }
    .hero-content { padding-top: 70px; } .hero-content h1 { font-size: 2.2rem; }
    .bazar-grid { display: flex; flex-direction: column; gap: 30px; }
    .photo-frame { transform: rotate(0deg); width: 100%; max-width: 400px; margin: 0 auto; }
    .bazar-content { width: 100%; }
    h2, .bazar-content h2, .features-title { font-size: 1.8rem; overflow-wrap: break-word; }
    .modal-content { max-height: 60vh; }
}