/*
Theme Name: RemStan Industrial Clean
Author: AI Developer
Description: Чистая тема без конструкторов. Сине-серая палитра, готовый прайс с 7 вкладками, архив документов и форма.
Version: 1.1.0
*/

/* ==========================================================================
   1. БАЗОВЫЕ СБРОСЫ СТИЛЕЙ И СЕТКА
   ========================================================================== */
html {
    line-height: 1.15;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #2d3748;
    background-color: #ffffff;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.flex-row {
    display: flex;
    flex-wrap: wrap;
}

/* ==========================================================================
   2. ШАПКА САЙТА И НАВИГАЦИЯ
   ========================================================================== */
.top-head {
    background-color: #1a2a3a;
    color: #ffffff;
    padding: 12px 0;
    font-size: 14px;
}
.top-head .flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.top-head a {
    color: #ffffff;
    text-decoration: none;
}
.top-head a:hover {
    color: #3182ce;
}
.top-head-left span {
    margin-right: 25px;
}
.middle-head {
    padding: 25px 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.middle-head .flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding h1 {
    margin: 0;
    font-size: 24px;
}
.site-branding h1 a {
    color: #1a2a3a;
    text-decoration: none;
    font-weight: 800;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}
.main-navigation a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.main-navigation a:hover {
    color: #3182ce;
}

/* ==========================================================================
   3. ГЛАВНЫЙ ИНДУСТРИАЛЬНЫЙ БАННЕР С ФОНОМ И ПАРАЛЛАКСОМ
   ========================================================================== */
.hero-banner {
    position: relative;
    background: url('https://unsplash.com') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    padding: 100px 0;
    color: #ffffff;
    text-align: center;
}

/* Сине-серый глубокий фильтр на фоновую картинку для читаемости букв */
.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 42, 58, 0.92) 0%, rgba(20, 30, 45, 0.85) 100%);
    z-index: 1;
}

.hero-banner .container {
    position: relative;
    z-index: 2;
    max-width: 1050px;
}
.hero-banner h2 {
    font-size: 42px;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    font-weight: 800;
}
.hero-banner p {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 850px;
    margin: 0 auto 35px auto;
    line-height: 1.6;
}
.btn-blue {
    background-color: #3182ce;
    color: #ffffff !important;
    padding: 15px 35px;
    text-transform: uppercase;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s ease;
}
.btn-blue:hover {
    background-color: #2b6cb0;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* ==========================================================================
   4. СЕКЦИИ КОНТЕНТА И СТРУКТУРА О КОМПАНИИ
   ========================================================================== */
section.page-section {
    padding: 60px 0;
}
section.page-section:nth-child(even) {
    background-color: #f7fafc;
}
section.page-section h2 {
    font-size: 28px;
    color: #1a2a3a;
    margin: 0 0 30px 0;
    position: relative;
    padding-left: 15px;
    border-left: 5px solid #3182ce;
    text-transform: uppercase;
}

/* ==========================================================================
   5. ИНТЕРАКТИВНЫЙ ПРАЙС-ЛИСТ (КНОПКИ С ТОЧКАМИ И ТАБЛИЦЫ)
   ========================================================================== */
/* Кнопки переключения вкладок */
.p-tab-btn {
    background-color: #f1f5f9;
    color: #1a2a3a;
    border: 1px solid #cbd5e1;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}
.p-tab-btn:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}
.p-tab-btn.active {
    background-color: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.3);
}

/* Анимация плавного появления таблиц */
.price-tab-content {
    animation: fadeInPrice 0.4s ease;
}
@keyframes fadeInPrice {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Контейнер адаптивных таблиц */
.price-container {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    min-width: 650px;
}
.price-table th {
    background-color: #1a2a3a;
    color: #ffffff;
    padding: 16px;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 2px solid #3182ce;
}
.price-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
}
.price-table tr:hover {
    background-color: #edf2f7;
}
.tag-price {
    font-weight: bold;
    color: #3182ce;
    white-space: nowrap;
}

/* ==========================================================================
   6. ФАЙЛОВЫЙ АРХИВ (ДОКУМЕНТАЦИЯ)
   ========================================================================== */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.doc-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3182ce;
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.doc-info {
    font-weight: 600;
    color: #2d3748;
}
.doc-btn {
    background: #1a2a3a;
    color: #ffffff;
    padding: 8px 18px;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}
.doc-btn:hover {
    background: #3182ce;
}

/* ==========================================================================
   7. ГАЛЕРЕЯ ВЫПОЛНЕННЫХ РАБОТ
   ========================================================================== */
.industrial-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.industrial-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
    border: 1px solid #cbd5e1;
    background-color: #e2e8f0;
}
.industrial-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.industrial-gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-item-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(26,42,58,0.95), rgba(26,42,58,0));
    padding: 15px;
    color: #ffffff;
}

/* ==========================================================================
   8. ФОРМА ЗАКАЗА И ПОДВАЛ
   ========================================================================== */
.lead-form-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.form-field {
    margin-bottom: 20px;
}
.form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}
.form-field input, .form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 15px;
    background: #ffffff;
}
.form-field input:focus, .form-field textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}
.site-footer {
    background: #1a2a3a;
    color: #a0aec0;
    padding: 35px 0;
    text-align: center;
    font-size: 14px;
    border-top: 3px solid #3182ce;
}

/* ==========================================================================
   9. МОБИЛЬНАЯ АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 768px) {
    .top-head .flex-row, .middle-head .flex-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .doc-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .doc-btn {
        width: 100%;
        text-align: center;
    }
    .hero-banner h2 {
        font-size: 30px;
    }
    .price-tabs-nav {
        flex-direction: column;
    }
    .p-tab-btn {
        width: 100%;
        text-align: center;
    }
}


/* === Визуальное редактирование и фото === */
.custom-logo {
    max-height: 65px;
    width: auto;
    display: block;
}
.editable-photo {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.editable-photo-large {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}
.editable-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-placeholder-text {
    color: #718096;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
}
.entry-content img,
.wp-block-image img,
.woocommerce-product-gallery img,
.woocommerce ul.products li.product img {
    max-width: 100%;
    height: auto;
}
.wp-block-image,
.wp-block-gallery {
    margin-top: 24px;
    margin-bottom: 24px;
}
.alignwide {
    max-width: 1200px;
}
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
}
.woocommerce ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 18px;
    border-radius: 4px;
    text-align: center;
}
@media (max-width: 768px) {
    .editable-photo-large { grid-column: span 1; }
}


/* Исправление шапки: логотип не пропадает и текст не накладывается */
.remstan-middle-head {
    padding: 8px 0 !important;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
}
.remstan-header-main-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.remstan-site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}
.remstan-site-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.remstan-logo-img,
.custom-logo {
    display: block;
    max-height: 70px;
    width: auto;
    max-width: min(420px, 90vw);
    object-fit: contain;
}
.remstan-site-title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
}
.remstan-site-title a {
    color: #1a2a3a;
    text-decoration: none;
}
@media (max-width: 768px) {
    .remstan-header-main-row {
        min-height: 62px;
    }
    .remstan-logo-img,
    .custom-logo {
        max-height: 58px;
        max-width: 92vw;
    }
    .remstan-site-title h1 {
        font-size: 22px;
        letter-spacing: 1px;
        text-align: center;
    }
}


/* Исправление страницы загрузок: пункт остается в меню, но дублирующий заголовок на белом фоне скрыт */
.entry-title {
    font-size: 32px;
    color: #1a2a3a;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    text-transform: uppercase;
}
.banner-menu-row a[href$="/downloads/"] {
    display: inline-block !important;
}

/* ==========================================================================
   НАШИ РАБОТЫ: 20 окон, по 10 фото и описание
   ========================================================================== */
.works-page-wrap {
    margin-top: 40px;
    margin-bottom: 70px;
}
.works-main-title {
    font-size: 32px;
    color: #1a2a3a;
    margin: 0 0 25px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    text-transform: uppercase;
}
.works-page-intro {
    font-size: 16px;
    line-height: 1.7;
    color: #2d3748;
    margin-bottom: 30px;
}
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}
.work-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(26, 42, 58, 0.06);
}
.work-card-image {
    display: flex;
    height: 220px;
    background: #e2e8f0;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: 700;
    text-decoration: none;
}
.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-card-body {
    padding: 20px;
}
.work-card-body h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    line-height: 1.3;
}
.work-card-body h2 a {
    color: #1a2a3a;
    text-decoration: none;
}
.work-card-body h2 a:hover {
    color: #3182ce;
}
.work-card-text {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}
.work-mini-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.work-mini-gallery a,
.single-work-gallery a {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    background: #f7fafc;
}
.work-mini-gallery img {
    width: 100%;
    height: 54px;
    object-fit: cover;
    display: block;
}
.single-work-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 30px;
}
.single-work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.single-work-gallery img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}
.works-empty-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #3182ce;
    padding: 24px;
    color: #2d3748;
}
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
    .work-mini-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==========================================================================
   НАШИ РАБОТЫ: 20 окон, в каждом до 10 фото и описание
   ========================================================================== */
.works-page-wrap {
    margin-top: 40px;
    margin-bottom: 70px;
}
.works-main-title {
    font-size: 32px;
    color: #1a2a3a;
    margin: 0 0 24px;
    padding-left: 15px;
    border-left: 5px solid #3182ce;
    text-transform: uppercase;
}
.works-page-intro {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.7;
}
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}
.work-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(26, 42, 58, 0.06);
}
.work-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 210px;
    background: #edf2f7;
    color: #718096;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
}
.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-card-body {
    padding: 18px;
}
.work-card-body h2 {
    font-size: 19px;
    margin: 0 0 10px;
    line-height: 1.3;
}
.work-card-body h2 a {
    color: #1a2a3a;
    text-decoration: none;
}
.work-card-body h2 a:hover {
    color: #3182ce;
}
.work-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 14px;
}
.work-mini-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}
.work-mini-gallery a,
.work-mini-gallery span {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    border-radius: 3px;
    color: #94a3b8;
    font-size: 12px;
    text-decoration: none;
    overflow: hidden;
}
.work-mini-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-card-empty {
    border-style: dashed;
}
.works-empty-box {
    margin-top: 25px;
    padding: 20px;
    background: #f7fafc;
    border-left: 4px solid #3182ce;
    color: #2d3748;
}
.single-work-content {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
}
.single-work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.single-work-gallery a {
    display: block;
    background: #edf2f7;
    border-radius: 6px;
    overflow: hidden;
}
.single-work-gallery img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .works-grid { grid-template-columns: 1fr; }
    .work-card-image { height: 190px; }
}

/* Исправление раздела «Наши работы»: на общей странице показывается только главное фото */
.work-card {
    overflow: hidden;
}
.work-card-image {
    position: relative;
    display: block;
    cursor: pointer;
}
.work-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: rgba(26, 42, 58, 0.86);
    color: #fff;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.work-card-image:hover .work-card-overlay,
.work-card-image:focus .work-card-overlay {
    opacity: 1;
}
.work-card-note {
    margin: 8px 0 0;
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}
.work-card .work-mini-gallery {
    display: none !important;
}
.single-work-content {
    max-width: 900px;
    margin: 0 auto 30px;
    font-size: 17px;
    line-height: 1.7;
}
.single-work-gallery {
    margin-top: 25px;
}

/* Страница одной работы: всегда показываем 10 рамок для фото */
.work-text-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #3182ce;
    border-radius: 6px;
    padding: 24px;
}
.work-gallery-title {
    margin: 32px 0 18px;
    font-size: 24px;
    color: #1a2a3a;
}
.work-photo-frames {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.work-photo-frame {
    min-height: 210px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
}
.work-photo-frame.has-photo {
    border-style: solid;
    border-color: #e2e8f0;
    background: #ffffff;
}
.work-photo-frame img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}
.empty-photo-frame span {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 4px;
}


/* Кнопка назад и полноэкранный просмотр фото работ */

.works-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 24px;
}
.works-nav-buttons .works-back-btn {
    margin-bottom: 0;
}

.works-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 12px 20px;
    background: #1a2a3a;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.4px;
}
.works-back-btn:hover,
.works-back-btn:focus {
    background: #3182ce;
    color: #ffffff;
}
.work-photo-frame.has-photo {
    cursor: zoom-in;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.work-photo-frame.has-photo:hover,
.work-photo-frame.has-photo:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 42, 58, 0.18);
}
.work-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 18, 28, 0.92);
}
.work-lightbox.is-open {
    display: flex;
}
.work-lightbox-img {
    max-width: 96vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.work-lightbox-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #1a2a3a;
    font-size: 34px;
    line-height: 42px;
    cursor: pointer;
    font-weight: 700;
}
.work-lightbox-close:hover,
.work-lightbox-close:focus {
    background: #3182ce;
    color: #ffffff;
}
body.work-lightbox-open {
    overflow: hidden;
}
@media (max-width: 768px) {
    .works-back-btn {
        width: 100%;
        justify-content: center;
    }
    .work-lightbox {
        padding: 12px;
    }
    .work-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

.page-nav-buttons{margin:20px auto;max-width:1200px;padding:0 20px}.page-nav-buttons .btn-blue{margin-right:10px}


/* Клик по фото на главной: открытие на весь экран */
.editable-photo-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}
.editable-photo-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
