/* =============================================
   PAGE TECHNOLOGY — EEC STYLE
   ============================================= */

/* ── HERO — повністю в стилі prod-hero ── */
.tech-page-hero {
    background: #fff;
    border-bottom: 1px solid #dde6e7;
    display: flex;
    justify-content: center;
    padding: 56px 40px 48px;
    padding-top: 10%;
}

.tech-page-hero-inner {
    width: 100%;
    max-width: 1440px;
    box-sizing: border-box;
    justify-items: center;
    text-align: center;
}

.tech-page-hero .section-kicker {
    display: inline-block;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #168f87;
    margin-bottom: 12px;
}

.tech-page-title {
    margin: 0 0 14px;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 42px;
    line-height: 108%;
    color: #1e2a2e;
}

.tech-page-intro {
    margin: 0 0 28px;
    max-width: 680px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 154%;
    color: #607173;
}

/* Навігаційні пілюлі */
.tech-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #dde6e7;
    background: #fff;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 13px;
    color: #607173;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tech-nav-pill:hover,
.tech-nav-pill.active {
    border-color: #1ba59c;
    color: #1ba59c;
    background: rgba(27,165,156,0.06);
}

.tech-nav-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1ba59c;
    flex-shrink: 0;
}

/* ── БАЗОВІ СЕКЦІЇ ── */
.tech-section {
    width: 100%;
    padding: 72px 0;
}

.tech-section--light {
    background: #f4f8f8;
    border-top: 1px solid #dde6e7;
}

.tech-section--dark {
    background: #10292c;
}

.tech-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── ЗАГОЛОВКИ СЕКЦІЙ ── */
.tech-section-heading {
    max-width: 100%;
}

.tech-section-title {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 32px;
    line-height: 112%;
    color: #1e2a2e;
}

.tech-section-title--light {
    color: #fff;
}

.tech-section--dark .section-kicker {
    color: #7de0d8;
}

/* ── УНІВЕРСАЛЬНИЙ ВРАППЕР ЗОБРАЖЕННЯ ── */
.tech-diagram-wrap {
    position: relative;
    background: #fff;
    border: 1px solid #dde6e7;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.25s, border-color 0.25s;
    z-index: 1;
}

.tech-section--dark .tech-diagram-wrap {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.tech-diagram-wrap:hover {
    box-shadow: 0 16px 40px rgba(20,30,30,0.12);
    border-color: rgba(27,165,156,0.4);
}

.tech-diagram-wrap--fill {
    height: 100%;
    min-height: 200px;
}

.tech-diagram-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    display: block;
    padding: 16px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    pointer-events: none; /* Гарантує, що кліки проходять крізь порожні зони картинки */
    position: relative;
    z-index: 1;          /* Опускаємо картинку на нижній рівень всередині контейнера */
}

.tech-diagram-wrap:hover .tech-diagram-img {
    transform: scale(1.02);
}

/* Кнопка zoom */
.tech-zoom-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 38px;  /* Трохи збільшимо для зручності натискання пальцем на мобільному */
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid #dde6e7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #607173;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    pointer-events: auto !important; /* Кнопка обов'язково повинна приймати кліки */
    z-index: 10 !important;          /* Гарантовано вище за .tech-diagram-img */
}

.tech-zoom-btn:hover {
    background: #1ba59c;
    color: #fff;
    border-color: #1ba59c;
}

.tech-section--dark .tech-zoom-btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

.tech-section--dark .tech-zoom-btn:hover {
    background: #1ba59c;
    color: #fff;
    border-color: #1ba59c;
}

.tech-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    margin: 0;
}

/* ── LABEL ── */
.tech-diagram-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #168f87;
    margin-bottom: 10px;
}

.tech-diagram-label::before {
    content: '';
    display: block;
    width: 16px;
    height: 2px;
    background: #1ba59c;
    border-radius: 2px;
    flex-shrink: 0;
}

/* =============================================
   СЕКЦІЯ: СКЛАДОВІ ЧАСТИНИ
   ============================================= */
.tech-parts-block {
    background: #fff;
    border: 1px solid #dde6e7;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(20,30,30,0.05);
}

.tech-parts-header {
    margin-bottom: 20px;
}

.tech-parts-hint {
    margin: 6px 0 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 13px;
    color: #8aa0a2;
}

/* Кнопки-кружечки */
.korpus-parts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.korpus-part-item {
    position: relative;
    display: flex;
    align-items: center;
}

.korpus-part-badge {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #1ba59c;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.2s;
    flex-shrink: 0;
}

.korpus-part-badge:hover,
.korpus-part-badge:focus-visible {
    background: #1ba59c;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(27,165,156,0.35);
    outline: none;
    z-index: 10;
}

.korpus-part-badge.is-active {
    background: #163437;
    border-color: #163437;
    transform: scale(1.08);
}

.korpus-part-badge.is-active .korpus-part-num { color: #fff; }
.korpus-part-badge:hover .korpus-part-num,
.korpus-part-badge:focus-visible .korpus-part-num { color: #fff; }

.korpus-part-num {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 14px;
    color: #1ba59c;
    transition: color 0.2s;
    pointer-events: none;
}

.korpus-part-name { display: none; }

/* Панель активної назви */
.korpus-active-name-panel {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #dde6e7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, margin-top 0.3s, opacity 0.25s;
}

.korpus-active-name-panel.is-visible {
    max-height: 60px;
    margin-top: 16px;
    opacity: 1;
}

.korpus-active-name-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #163437;
    color: #fff;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.korpus-active-name-text {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 15px;
    color: #1e2a2e;
}

/* Tooltip */
.korpus-part-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #163437;
    color: #fff;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s, transform 0.18s;
    z-index: 100;
    box-shadow: 0 6px 18px rgba(20,30,30,0.2);
}

.korpus-part-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: #163437;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s, transform 0.18s;
    z-index: 100;
}

.korpus-part-badge:hover::after,
.korpus-part-badge:focus-visible::after,
.korpus-part-badge:hover::before,
.korpus-part-badge:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip для нижніх рядків — вниз */
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge::after {
    bottom: auto;
    top: calc(100% + 10px);
    transform: translateX(-50%) translateY(-4px);
}
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge::before {
    bottom: auto;
    top: calc(100% + 4px);
    border-top-color: transparent;
    border-bottom-color: #163437;
    transform: translateX(-50%) translateY(-4px);
}
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge:hover::after,
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge:focus-visible::after,
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge:hover::before,
.korpus-parts-list .korpus-part-item:nth-last-child(-n+8) .korpus-part-badge:focus-visible::before {
    transform: translateX(-50%) translateY(0);
}

/* Діаграми конструкцій */
.tech-diagrams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tech-diagram-item {
    display: flex;
    flex-direction: column;
}

/* =============================================
   СЕКЦІЯ: З'ЄДНАННЯ
   ============================================= */
.tech-conn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.tech-conn-diagram {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Ряд деталей — горизонтально, не переносяться на мобільному */
.tech-parts-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.tech-conn-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tech-conn-photo {
    flex: 1;
}

.tech-conn-photo .tech-diagram-wrap {
    height: 100%;
    min-height: 260px;
}

.tech-conn-desc {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 16px 20px;
}

.tech-conn-desc p {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 152%;
    color: rgba(255,255,255,0.75);
}

/* =============================================
   СЕКЦІЯ: ВЕНТИЛЯЦІЯ + ЗАКРИТТЯ
   ============================================= */
.tech-vent-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.tech-vent-text .section-kicker {
    display: inline-block;
    margin-bottom: 12px;
}

.tech-vent-text .tech-section-title {
    margin-bottom: 16px;
}

.tech-vent-text p {
    margin: 0 0 14px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 15px;
    line-height: 158%;
    color: #455558;
}

.tech-vent-text p:last-child { margin-bottom: 0; }

.tech-vent-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

/* Розділювач між вентиляцією та закриттям */
.tech-section-divider {
    height: 1px;
    background: #dde6e7;
    border: none;
}

/* Блок закриття */
.tech-closing-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.tech-closing-images {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.tech-closing-text .section-kicker {
    display: inline-block;
    margin-bottom: 12px;
}

.tech-closing-text .tech-section-title {
    margin-bottom: 16px;
}

.tech-closing-text p {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 15px;
    line-height: 158%;
    color: #455558;
}

/* =============================================
   СЕКЦІЯ: МОНТАЖ І КРІПЛЕННЯ
   ============================================= */
.tech-install-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.tech-install-block,
.tech-mount-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tech-install-block .section-kicker,
.tech-mount-block .section-kicker {
    display: inline-block;
}

.tech-install-text,
.tech-mount-text {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 15px;
    line-height: 158%;
    color: rgba(255,255,255,0.72);
}

/* Список способів кріплення */
.tech-mount-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-mount-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 148%;
    color: rgba(255,255,255,0.78);
    transition: background 0.2s, border-color 0.2s;
}

.tech-mount-list li:hover {
    background: rgba(27,165,156,0.1);
    border-color: rgba(27,165,156,0.3);
}

.tech-mount-list li svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.tech-mount-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.tech-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(7,18,20,0.9);
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.tech-lightbox.is-open {
    display: flex;
}

.tech-lightbox-img {
    max-width: min(1200px, 94vw);
    max-height: 88vh;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.4);
}

.tech-lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    width: 42px; height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tech-lightbox-close:hover {
    background: #1ba59c;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .tech-vent-block,
    .tech-closing-block,
    .tech-install-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .tech-conn-grid {
        grid-template-columns: 1fr;
    }

    .tech-diagrams-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tech-page-hero { padding: 88px 20px 36px; }
    .tech-page-title { font-size: 28px; }
    .tech-page-intro { font-size: 15px; }

    .tech-section { padding: 48px 0; }
    .tech-inner { padding: 0 20px; gap: 32px; }

    .tech-parts-block { padding: 20px 16px; }

    /* На мобільному tooltip ховаємо, показуємо панель */
    .korpus-part-badge::after,
    .korpus-part-badge::before { display: none; }

    .korpus-parts-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        gap: 8px;
    }

    .korpus-part-item { width: 100%; }
    .korpus-part-badge { width: 40px; height: 40px; margin: 0 auto; }
    .korpus-part-num { font-size: 13px; }

    /* Деталі з'єднань — горизонтально навіть на мобільному */
    .tech-parts-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .tech-vent-images,
    .tech-closing-images,
    .tech-mount-images {
        grid-template-columns: 1fr;
    }

    .tech-section-title { font-size: 24px; }

    .tech-closing-block { grid-template-columns: 1fr; }
    .tech-closing-images { order: 2; }
    .tech-closing-text { order: 1; }
	.tech-section--dark .tech-zoom-btn {
     background: rgba(255, 255, 255, 0.85) !important; /* Робимо білою та помітною на мобільному */
     color: #10292c !important;
     border-color: #fff !important;
    }
}

@media (max-width: 480px) {
    .tech-page-title { font-size: 24px; }
    .tech-section-title { font-size: 20px; }
    .tech-inner { padding: 0 16px; }
    .tech-page-hero { padding: 88px 16px 28px; }

    .tech-nav-pill { font-size: 12px; padding: 5px 10px; }
    .tech-nav-pills { gap: 6px; }
}

/* Toggle кнопка — стан "розгорнуто" */
.tech-zoom-btn--toggle.is-expanded {
    background: #1ba59c;
    color: #fff;
    border-color: #1ba59c;
}

.tech-zoom-btn--toggle.is-expanded svg {
    /* rotate — показує "згорнути" */
    transform: rotate(180deg);
}