/* ==========================================================================
   Компоненты (stekspb-стиль)
   ========================================================================== */

/* ---- Cookie-баннер ---- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 40px);
    max-width: 760px;
    z-index: 9000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 18px 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.cookie-banner.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.cookie-content { display: flex; flex-direction: column; gap: 14px; }
.cookie-text { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.cookie-text a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Форма заявки ---- */
.form-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-md);
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}
.form-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
}
.form-title { text-align: center; margin-bottom: 0.3em; }
.form-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 30px; }

.order-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.5;
}
.form-consent input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.form-consent a { text-decoration: underline; }
.form-note { font-size: 0.82rem; color: var(--text-faint); }
.form-message { margin-top: 6px; }
.form-message .msg {
    padding: 13px 18px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    border: 1px solid;
}
.form-message .msg-success { color: #2e7d32; border-color: rgba(46, 125, 50, 0.3); background: rgba(46, 125, 50, 0.06); }
.form-message .msg-error { color: #c62828; border-color: rgba(198, 40, 40, 0.3); background: rgba(198, 40, 40, 0.06); }

/* ---- Карточки услуг ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.service-card {
    position: relative;
    display: block;
    padding: 34px 30px 56px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: all 0.25s ease;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    color: var(--text);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card.card-bg {
    background-size: cover;
    background-position: center;
    background-color: var(--surface);
}
.service-card.card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(0,0,0,0.75));
    z-index: 0;
}
.service-card.card-bg > * { position: relative; z-index: 1; }
.service-card.card-bg .service-title,
.service-card.card-bg .service-text { color: #fff; }

.service-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-2);
    background: var(--gradient-soft);
    border-radius: var(--radius);
    margin-bottom: 20px;
    transition: all 0.25s ease;
}
.service-card:hover .service-icon { color: #fff; background: var(--accent); }
.service-title { font-size: 1.2rem; margin-bottom: 8px; font-weight: 700; }
.service-text { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }
.service-arrow {
    position: absolute;
    right: 22px;
    bottom: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    transition: all 0.25s ease;
}
.service-card:hover .service-arrow { color: #fff; background: var(--accent); border-color: transparent; }

/* ---- Инфо-карточки ---- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.info-card {
    padding: 30px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.25s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.info-card-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-2);
    background: var(--gradient-soft);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.info-card-title { font-size: 1.1rem; margin-bottom: 8px; }
.info-card-text { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* ---- 404 ---- */
.block-404 { text-align: center; padding: 130px 20px; }
.code-404 {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

/* ---- Галерея ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.gallery-item { display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.4s ease; display: block; }
.gallery-item:hover img { transform: scale(1.05); }

/* ---- Контакты ---- */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.contact-card {
    padding: 30px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.25s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { margin: 0; font-size: 0.95rem; }
.map-wrap { margin-top: 44px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { width: 100%; border: 0; display: block; min-height: 380px; }

/* Адаптивность */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid, .contacts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .services-grid, .cards-grid, .contacts-grid, .gallery-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-wrap { padding: 28px 20px; }
    .site-main > section { padding: 60px 0; }
}
