/* ====== Базовые сбросы стилей ====== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto;
    background-image: url('backgrouxnd.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ====== Фон страницы ====== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
	padding-bottom: 0px;     /* высота футера + запас */
}

html {
    background: url("background.webp") no-repeat center center fixed;
    background-size: cover;
}

#app {
    flex: 1;
}

/* ====== Стили футера ====== */
.site-footer {
    position: relative;
    margin-top: auto;
    margin-bottom: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #003a55;
    color: #fff;
    text-align: center;
    padding: 10px 10px;
    font-size: 18px;
    z-index: 2000;            /* поверх большинства элементов */
}

/* ====== CSS переменные (значения по умолчанию) ====== */
:root {
    /* Параметры меню */
    --menu-offset: 20px;
    --menu-bg: transparent;
    --menu-radius: 40px;
    --menu-padding-vertical: 13px;
    --menu-padding-horizontal: 20px;
    --menu-gap: 5px;
    --menu-font-size: clamp(18px, 1.2vw, 22px);
    --item-radius: 30px;
    --text-color: #d1d1d1;
	--base-font-size: 16px;  /* базовый размер шрифта сайта */
    --item-bg: #003a55;
    --item-hover-bg: #003a55;
    --item-hover-text: #FCFFF9;
    --transition-speed: 200ms;
    --glow-color: rgba(0,58,85,0.8);
    --glow-blur: 24px;
    --glow-offset: 0px;
    --contact-bg: #003a55;
    --contact-text: #FCFFF9;
    --contact-padding: 16px 22px;
    --contact-radius: 30px;
    --contact-hover-bg: #f6c142;
    --contact-transition-speed: 100ms;
    --font-base: clamp(14px, 1.1vw, 18px);
    --font-h1: clamp(22px, 3vw, 36px);
    --font-h2: clamp(20px, 2.5vw, 30px);
}

/* ====== Сброс стилей для элементов меню ====== */
.menu a, .menu button {
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    outline: none;
}

/* ====== Контейнер сцены Three.js ====== */
#scene-container {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

/* Канвас Three.js */
canvas {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

/* ====== Обёртка меню ====== */
.menu-wrapper {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: var(--menu-offset);
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 1200px;
    pointer-events: auto;
}

/* ====== Основное меню ====== */
.menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--menu-bg);
    color: var(--text-color);
    border-radius: var(--menu-radius);
    padding: 5px 12px;
    box-shadow: 0 6px 18px var(--glow-color);
    backdrop-filter: blur(6px);
}

/* ====== Логотип ====== */
.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: calc(var(--item-radius) + 2px);
    flex: 0 0 auto;
}

.logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    color: var(--text-color);
    font-weight: 700;
    font-size: 28px;
}

/* ====== Центральная часть меню ====== */
.menu-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--menu-gap);
    flex: 1 1 auto;
}

/* ====== Пункты меню ====== */
.menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--menu-padding-vertical) var(--menu-padding-horizontal);
    border-radius: var(--item-radius);
    background: var(--item-bg);
    color: var(--text-color);
    font-size: var(--menu-font-size);
    transition: background var(--transition-speed) ease, 
                color var(--transition-speed) ease, 
                transform var(--transition-speed) ease;
    white-space: nowrap;
    min-width: 0;
}

.menu-item:hover, .menu-item:focus {
    background: var(--item-hover-bg);
    color: var(--item-hover-text);
    transform: translateY(-2px);
}

.menu-item:focus-visible {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
    border-radius: var(--item-radius);
}

/* ====== Правая часть меню ====== */
.menu-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* ====== Кнопка "Связаться с нами" ====== */
.menu-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--contact-padding);
    border-radius: var(--contact-radius);
    background: var(--contact-bg);
    color: var(--contact-text);
    transition: background var(--contact-transition-speed) ease, 
                transform var(--contact-transition-speed) ease;
    white-space: nowrap;
    cursor: pointer;
}

.menu-contact:hover, .menu-contact:focus {
    background: var(--contact-hover-bg);
    transform: translateY(-2px);
}

/* ====== Кнопка гамбургер для мобильных устройств ====== */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}

/* ====== Мобильное меню ====== */
.mobile-menu {
    transform: translateY(-20px);
    opacity: 1;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: transparent; /* Фон контейнера мобильного меню */
    border-radius: 24px;
    padding: 12px;
}
.mobile-menu.open {
    display: block;
    transform: translateY(0);
    opacity: 0.0;
}

/* ====== Текстовые блоки ====== */
#app {
    flex: 1;
	position: relative;

}

.text-block {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: "GOST Type A", sans-serif;
    backdrop-filter: blur(3px);
    z-index: 1;
}

/* ====== Адаптивность для мобильных устройств ====== */

@media (max-width: 1200px) {
    :root {
        --menu-font-size: clamp(10px, 2.6vw, 14px); /* Планшеты */
    }
    .menu {
        padding: 4px 6px;
        gap: 4px;
    }

    .menu-item {
        font-size: clamp(12px, 1.2vw, 18px);
    padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1vw, 16px);
    }

    .menu-contact {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    .menu-logo img {
        height: 28px;
        width: auto;
    }
    
    .page-block {
        max-height: 80vh !important;
        margin-top: 80px !important;
    }

    .image-wrapper.left {
        float: none;
        margin: 0 auto 20px;
        text-align: center;
        
        width: 100%;
        max-width: 300px;
        flex: 0 0 300px;
    }

    .text-content {
        text-align: left;
		overflow: hidden
    }
    
    .page-grid-custom {
        grid-template-columns: repeat(2, 1fr);
}
    .page-card-title {
    padding: 10px;
    font-size: 20px;
    }
    .page-card-custom img {
    width: 90%;
    height: 180px;
    }
}

@media (max-width: 1024px) {
    :root {
        --menu-font-size: clamp(10px, 2.6vw, 14px); /* Планшеты */
    }
    .menu {
        padding: 4px 6px;
        gap: 4px;
    }

    .menu-item {
        font-size: clamp(12px, 1.2vw, 18px);
    padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1vw, 16px);
    }

    .menu-contact {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    .menu-logo img {
        height: 28px;
        width: auto;
    }
    
    .page-grid-custom {
    grid-template-columns: 1fr;
}
    .page-card-title {
    padding: 10px;
    font-size: 20px;
    }
    .page-card-custom img {
    width: 90%;
    height: 180px;
    }
    
    .image-wrapper.left {
        float: none;
        margin: 0 auto 20px;
        text-align: center;
        
        width: 100%;
        max-width: 300px;
        flex: 0 0 300px;
    }

    .text-content {
        text-align: left;
		overflow: hidden
    }
}

@media (max-width: 800px) {

    .page-card-title {
    padding: 10px;
    font-size: 16px;
    }
    .page-card-custom img {
    width: 60%;
    height: 150px;
    object-fit: cover;
    object-position: left;
    }
}

@media (max-width: 768px) {
    .menu-wrapper {
        width: calc(100% - 24px);
    }
    
    .menu-center {
        display: none;
    }
    
    .menu-toggle {
        display: inline-flex;
    }
    
    .menu {
        padding: 4px 6px;
        gap: 4px;
    }

    .menu-item {
        font-size: clamp(12px, 1.2vw, 18px);
    padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1vw, 16px);
    }

    .menu-contact {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    .menu-logo img {
        height: 28px;
        width: auto;
    }
    
    .page-block {
        padding: 20px !important;
        max-height: 80vh !important;
        margin-top: 80px !important;
    }

    .page-block h1 {
        font-size: 10px !important;
    }
    
    .image-wrapper.left {
        float: none;
        margin: 0 auto 20px;
        text-align: center;
        
        width: 100%;
        max-width: 300px;
        flex: 0 0 200px;
    }
}

@media (max-width: 600px) {

    .page-card-custom img {
    width: 50%;
    height: 120px;
    object-fit: cover;
    object-position: left;
    }
}

@media (max-width: 480px) {
    :root {
        --menu-padding-horizontal: 12px;
        --menu-gap: 8px;
    }
    
    .menu {
                padding: 4px 6px;
        gap: 4px;
    }

    .menu-item {
        font-size: clamp(12px, 1.2vw, 18px);
    padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1vw, 16px);
    }

    .menu-contact {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    .menu-logo img {
        height: 28px;
        width: auto;
    }
    
    .page-card-title {
    padding: 10px;
    font-size: 12px;
    }
    
    .page-block {
        padding: 20px !important;
        max-height: 80vh !important;
        margin-top: 80px !important;
    }

    .page-block h1 {
        font-size: 8px !important;
    }
    
    .content-with-image {
        flex-direction: column;
        align-items: center;
    }

    .image-wrapper.left {
        max-width: 100%;
        flex: none;
    }
}

/* ====== Утилиты доступности ====== */
.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}



/* Галерея: сетка 3x3 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    align-items: start;
    justify-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Каждый элемент галереи */
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    padding: 6px;
    box-sizing: border-box;
    max-width: 100%;
    text-align: center;
}

/* Подпись над изображением (центрирована) */
.image-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    font-size: 40px; 
    text-align: center;
    color: rgba(225,221,209,0.9);
    font-family: "GOST Type A", sans-serif;
    margin-bottom: 2px;
}



/* ====== ОБЩИЙ БЛОК СТРАНИЦ ====== */
.page-block {
    position: relative;
    width: 90%;
    display: block;
    max-width: 1550px;
    margin: 120px auto 0;
    box-sizing: border-box;
    z-index: 5;
    font-size: var(--font-base);
    flex: 2 1 300px;
}

.page-content {
    text-align: justify;
}

/* Заголовки */
.page-block h1 {
    font-size: var(--font-h1);
}

.page-block h2 {
    font-size: var(--font-h2);
}

.page-block h3 {
    color: rgba(225,221,209,1);
    margin: 0 0 15px;
    letter-spacing: 2px;
    overflow: hidden;
}

/* Текст */
.page-block p {
    margin-bottom: 0;
    text-indent: 1.5em;
}

/* Списки */
.page-block ul,
.page-block ol {
    margin: 15px 0;
    padding-left: 30px;
}

.page-block li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Жирный текст */
.page-block strong {
    color: rgba(255,255,255,0.9);
}

/* ====== ИЗОБРАЖЕНИЯ ====== */

.content-with-image {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 2vw, 25px);
    flex-wrap: wrap;
}

.image-container {
    margin: 20px 0;
    text-align: center;
}

.image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.image-wrapper.left {
    float: none;
    margin-right: 25px;
    margin-bottom: 10px;
    width: 100%;
    flex: 1 1 250px;
    max-width: 400px;
}

.image-wrapper.right {
    position: relative;
    float: right;
    margin-left: 25px;
    margin-bottom: 10px;
    max-width: 30%;
    height: auto;
    display: block;
}

/* Универсальное изображение */
.page-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: 0.3s;
    border-radius: 40px;
}

.page-image.small {
    border-radius: 25px;
    
}

.page-image:hover {
    transform: scale(1.0);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.page-image-sk {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: 0.3s;
    border-radius: 0px;
}


/* ====== СКРОЛЛ ====== */
.page-block::-webkit-scrollbar {
    width: 8px;
}

.page-block::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.page-block::-webkit-scrollbar-thumb {
    background: rgba(0,58,85,0.6);
    border-radius: 4px;
}

.page-block::-webkit-scrollbar-thumb:hover {
    background: rgba(0,58,85,0.8);
}



/* ===== СЕТКА УСЛУГ (3x4) ===== */

.page-grid-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.page-card-custom {
    display: flex;
    flex-direction: column;
    background: rgba(0,58,85,0.7);
    border-radius: 25px;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease;
	padding: 15px;
    font-size: 28px;
    color: #FCFFF9;
    text-align: center;
}

.page-card-custom:hover {
    transform: scale(1.02);
}

.page-card-custom img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 25px;
}

.page-card-title {
    padding: 10px;
    font-size: 28px;
    color: #FCFFF9;
    text-align: center;
}



.back-button {
    float: left;
    margin: 0 15px 10px 0;

    background: #003a55;
    color: #fcfff9;
    border: none;
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 16px;
    cursor: pointer;

    transition: 0.2s;
}

.back-button:hover {
    background: #f6c142;
    color: #003a55;
}

/* ===== ТАБЛИЦА ===== */

table {
    display: table;
    width: 90%;
    border-collapse: collapse;
    margin: 20px auto;
	margin-left: auto;
	margin-right: auto;
}

th, td {
    padding: 10px;
    text-align: left;
    border: 2px solid #FCFFF9;
}

th {
    background-color: #333;
    color: #fff;
    font-size: 24px;
}

.content table {
    display: table;
}

.content tr {
    display: table-row;
}

.content td,
.content th {
    display: table-cell;
    line-height: 1.4;
    height: auto;
    position: static;
    vertical-align: top;
}

.content-scroll {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}


/* ====== СЛАЙДЕР ====== */
.slider {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 20px;
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    cursor: pointer;

}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* точки */
.dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: #f6c142;
}

/* viewer */
.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.viewer img {
    max-width: 90%;
    max-height: 90%;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.viewer-nav.prev { left: 20px; }
.viewer-nav.next { right: 20px; }


/* Стили для кнопки обратной связи */
.feedback-button-wrapper {
    margin-top: 20px;
    text-align: center;
}

.feedback-button {
    display: inline-block;
    background-color: var(--contact-bg);
    color: var(--contact-text);
    padding: 16px 22px;
    border-radius: var(--contact-radius);
    font-size: var(--menu-font-size);
    text-decoration: none;
    text-align: center;
    transition: background-color var(--contact-transition);
}

.feedback-button:hover {
    background-color: var(--contact-hover-bg);
}

.feedback-button:focus {
    outline: none;
    box-shadow: 0 0 10px var(--glow-color);
}


.cookie-banner {
  position: fixed;
  z-index: 10000;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  background: #FCFFF9;
  color: #003a55;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  font-family: inherit;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__content {
  max-width: 760px;
}

.cookie-banner__content strong {
  font-size: 17px;
}

.cookie-banner__content p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-banner a {
  color: #003a55;
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

.cookie-banner button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #003a55;
  border-radius: 4px;
  background: transparent;
  color: #003a55;
  font: inherit;
  cursor: pointer;
}

.cookie-banner #cookie-accept {
  background: #003a55;
  color: #FCFFF9;
}

.cookie-banner button:focus-visible,
.cookie-banner a:focus-visible {
  outline: 3px solid #f6c142;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner button {
    width: 100%;
  }
}
