/* 🔴 Головні кольори */
:root {
    --red: #8b0000;
    --dark: #111;
    --white: #fff;
    --brown: brown;
    --gray: #8b1101;
}
body { 
    background: #ffffff !important; 
    margin: 0px;
   /* max-width: 1200px;*/
}

h2 {
    text-align: center;
    margin: 40px 0;
    font-size: 28px;
    position: relative; /* Обов'язково для позиціонування лінії */
    padding-bottom: 15px; /* Відступ між текстом і лінією */
    margin-bottom: 30px; /* Відступ від заголовка до наступного блоку */
    text-transform: uppercase;
}

h2::after {
    content: ""; /* Створює порожній елемент */
    position: absolute;
    bottom: 0;
    left: 50%; /* Центрування лінії */
    transform: translateX(-50%); /* Точне вирівнювання по центру */
    
    width:  30%;  /* Довжина лінії */
    height: 3px; /* Товщина лінії */
    background-color: #8B0000; /* Ваш темно-червоний колір */
}
 

/*  SVG іконки */
.icon {
    width: 20px;
    height: 20px;
    color: #8b0000;
}


.text-seo {
    display: block;
    width: 100%;
    height: 5px;
    overflow: hidden;
}



/* -----------------------------  ПЕРЕМИКАЧ МОВ --------------------------------*/
.language-switcher {
    position: relative;
    display: inline-block;
    z-index: 100;
    min-width: 40px; /* Гарантуємо зону для наведення */
    min-height: 30px; 
}

.language-switcher ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* Відображення елементів */
.language-switcher ul li {
    display: none; /* Ховаємо всі */
    padding: 15px 12px;
}

.language-switcher ul li.current-lang {
    display: block; /* Показуємо тільки активну */
}

/* Стан при наведенні */
.language-switcher:hover ul {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff; /* Фон з'являється тільки при ховері */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
}

.language-switcher:hover ul li {
    display: block; /* Показуємо всі мови */
}

/* Візуальне розділення активної мови у списку */
.language-switcher:hover ul li.current-lang {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.language-switcher img {
    display: block;
    width: 24px;
    height: auto;
    border-radius: 2px;
}

/* Щоб не було "дірки" між активним елементом і списком */
.language-switcher ul li a {
    display: flex;
    align-items: center;
    text-decoration: none;
}



/*-------------------------------------------------------------------------------------*/
.header-container { 
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}
.header-top {
    padding: 20px 0;
    /*border-bottom: 1px solid var(--gray);*/
}

.header-main-row {
    display: flex;
    align-items: center;
    /*gap: 5%;*/
    flex-wrap: wrap;
    justify-content: space-between;
}



/* Логотип */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    max-height: 55px;
    width: auto;
}

.header-logo a {
    text-decoration: none;
    color: #333;
}


/* Контакти */
.header-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phone-number {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
    text-decoration: none;
}

.work-hours {
    font-size: 13px;
    color: var(--gray);
}

/* Кнопки */
.header-actions {
    display: flex !important;
    gap: 15px !important;
} 
.btn-outline {
    border: 1px solid var(--dark);
    color: var(--dark);
    background-color: white;

    display: inline-block;
    padding: 10px 10px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
    /* border: 2px solid transparent; */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    /* box-shadow: 0 4px 15px rgb(0 0 0 / 30%); */
    content: ' →';
}
}

.btn-red {
    background-color: #d33333;
    color: #fff;
} 
/*ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo*/
/* ==========================================================================
   НАВІГАЦІЯ (ДЕСКТΟП)
   ========================================================================== */
.main-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #dddddd;
    border-top: 1px solid #dddddd;
    margin-bottom: 10px;
}

.menu_info {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 30px;
}

/* Батьківський елемент списку */
.menu-item {
    position: relative;
    padding: 20px 50px; /* Збільшуємо зону ховера, щоб меню не зникало */
}

.menu_info_element {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu_info_element:hover,
.menu-item:hover > .menu_info_element {
    color: #8B0000;
}

/* Стрілочка для підменю */
.sub-arrow {
    font-size: 9px;
    transition: transform 0.3s;
}

.menu-item:hover .sub-arrow {
    transform: rotate(180deg);
}

/* ==========================================================================
   ВИПАДАЮЧЕ МЕНЮ (SUB-MENU)
   ========================================================================== */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #ffffff;
    min-width: 240px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-top: 3px solid #8B0000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
     z-index: 9;
}

/* Поява при наведенні */
.menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-menu li {
    display: block; /* Повертаємо видимість елементам */
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s;
    text-transform: none; /* Дочірні зазвичай не капсом */
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu li a:hover {
    background: #fff5f5;
    color: #8B0000;
    padding-left: 25px;
}

/* ==========================================================================
   МОБІЛЬНЕ МЕНЮ (МЕНШЕ 768px)
   ========================================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: #8B0000;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-item {  padding: 20px 0px;   }
    /* Підменю у мобільній версії */
    .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none; /* Відкриваємо через JS */
        box-shadow: none;
        background: #f9f9f9;
        border-top: none;
        width: 50%;
        margin-left: 50%;

    }

    .menu-item.is-open .sub-menu {
        display: block;
    }

    .menu-item.is-open .sub-arrow {
        transform: rotate(180deg);
    }


    .header-main-row{ justify-content: center;  }
    .header-contact { padding: 10px; } 
    .language-switcher {     
        position: absolute;
        display: block;
        top: 50px;
        right: 10px;}
    }

/* Стан кнопки-бургера "Хрестик" */
.menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/*-------------*/


/* -----------------------------   HERO (СЛАЙДЕР) -------------------------------*/
.hero {
    position: relative; /* База для абсолютних слайдів */
    width: 100%;
    /*height: 80vh; /* 80% висоти вікна перегляду (або наприклад 600px) */ 
    min-height: 530px; /* Щоб на маленьких екранах не був занадто вузьким */
    overflow: hidden;
    background-color: #f0f0f0; /* Тимчасовий фон, поки вантажаться картинки */
    /*border-top: 2px dashed #8B0000;*/
    border-bottom: 2px dashed #8B0000;
 
}

.hero-slide {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    /*height: 100%;*/
    opacity: 0; /* Всі слайди за замовчуванням прозорі */
    transition: opacity 1s ease-in-out; /* Плавність зміни прозорості */
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



.hero-slide.active {
    opacity: 1; /* Активний слайд стає видимим */
    z-index: 2; /* Виводимо його на передній план */
}

.hero-content {
    width: 30%;
    margin-top: 200px;
}
.hero-overlay-title {
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.85);
    clip-path: polygon(0 0, 70% 0, 100% 100%, 10% 100%);
    display: flex;
    align-items: center;
    padding-left: 10%;
}
.hero-overlay-description {
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.85);
    clip-path: polygon(10% 0%, 100% 0%, 80% 100%, 0% 100%);
    display: flex;
    align-items: center;
    padding-left: 10%;
}
.hero-title {
    font-size: xx-large;
    text-align: left;
    padding: 30px 0px;
    color: var(--brown);
}
p.hero-line{margin: 0;}

.hero-description {
    text-align: left;
    padding: 0px 0px;
    font-size: x-large;
    color: #4e4b4b;
}
.hero-overlay-btn {
    position: absolute;
    top: 450px;
    left: 50%;
}


/* -----------------------------  ЛОГОТИП ТА ПРИВІТАННЯ --------------------------------*/

/* Стилізація самої секції (елементу) */
.slogan-grid {
    display: flex;
    /*flex-direction: column;*/
    align-items: center;
    justify-content: center;
   /* padding: 100px 0;*/
    text-align: center;
}
.slogan, .slogan-img-container{
     width: 50%;
} 

/* 1. Початковий стан для логотипу */
.animate-fade-up {
   
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}


/* 2. Початковий стан для рядків слогану */
.animate-line {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.8s ease forwards;
}

/* Додаємо затримку для кожного рядка слогану */
.animate-line:nth-child(1) { animation-delay: 0.5s; }
.animate-line:nth-child(2) { animation-delay: 0.9s; }
.animate-line:nth-child(3) { animation-delay: 1.3s; }

/* Опис ключових кадрів */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.slogan p {
    font-size: 1.4rem;
    /*margin: 5px 0;*/
    padding-bottom: 30px;
    color: #333;
    border-left: 3px solid #8B0000; /* Наш темно-червоний акцент */
    padding-left: 15px;
}


/* ---------------------- КОМПЛЕКСНІ   СИСТЕМИ   БЕЗПЕКИ   ПІД КЛЮЧ----------------------------*/
.home_top { margin: 50px;} 

.home_top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); */
    gap: 1%;
    font-size: 0.9em;
    text-align: center;
}
.home_top-item { 
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.home_top-img {  width: 20%;  }
.home_top-img img { width: 100%;  height: auto; }
.home_top-text   { font-size: small; text-align: left;} 
.home_top-text h5 { font-size: larger; margin: 0;}



/* -----------------------------  SERVICES (ПОСЛУГИ) --------------------------------*/
/*
section.services.container { 
  padding: 30px; 
  background-color: #f6f6f6;
      margin-bottom: 150px;
}
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5%; }


/* базово прихований тільки контейнер  
.card {
    position: relative;
    display: block;
    background: var(--white);
    padding: 25px;
    text-decoration: none;
    color: inherit; 
    border: 1px solid rgba(0,0,0,0.08);
    border-left: 2px solid #a00101;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    /* 1. Додаємо перехід для hover 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.card:hover { /*при наведені 
    transform: translateY(-6px);
    /* Додаємо м'яку тінь для підсилення ефекту "зльоту"  
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
/* Маленький, але важливий апгрейд це: прибирає мерехтіння робить анімацію плавнішою 
.card * { backface-visibility: hidden; }
.card   { will-change: transform, opacity; }


.card-icon {  float: left;  }
.card-icon img {
    height: 50px;
    width: auto;
}


 
/* keyframes - стани аісля анімації  
@keyframes normGorizont { to { opacity: 1; transform: translateX(0); } } /* повертає початкове значення горизонтальної анімації 
@keyframes normVertical { to { opacity: 1; transform: translateY(0); } } /* повертає початкове значення вертикальної анімації   
@keyframes normScale    { to { opacity: 1; transform: scale(1);      } } /* повертає початкове значення  анімації появи         

/* ЕФЕКТИ  */ 

/* 1-ий effect    
/*початкові станми 
.card[data-effect="1"] .card-icon  { opacity: 0.3; transform: scale(0.1); } 
.card[data-effect="1"] .card-title { opacity: 0.3; transform: translateX(-50px); }
.card[data-effect="1"] .card-desc  { opacity: 0.3; transform: translateX(50px); }
/*стани по завершенню анімації 
.card[data-effect="1"].in-view .card-icon  { animation: normScale    0.5s ease forwards;  animation-delay: 0.1s; }
.card[data-effect="1"].in-view .card-title { animation: normGorizont 1.5s ease forwards;  animation-delay: 0.3s; }
.card[data-effect="1"].in-view .card-desc  { animation: normVertical 1.5s ease forwards;  animation-delay: 0.9s; }


/* 2-ий effect    
/*початкові станми 
.card[data-effect="2"] .card-icon  { opacity: 0; transform: scale(0.1); } 
.card[data-effect="2"] .card-title { opacity: 0; transform: translateX(50px); }
.card[data-effect="2"] .card-desc  { opacity: 0; transform: translateX(-50px); }
/*стани по завершенню анімації 
.card[data-effect="2"].in-view .card-icon  { animation: normScale    0.5s ease forwards;  animation-delay: 0.2s; }
.card[data-effect="2"].in-view .card-title { animation: normGorizont 1.5s ease forwards;  animation-delay: 0.3s; }
.card[data-effect="2"].in-view .card-desc  { animation: normVertical 1.5s ease forwards;  animation-delay: 0.9s; }


/* 3-ій effect  Перекручування + заїзд (rotate + translate) 
/*початкові станми 
.card[data-effect="3"] .card-title { opacity: 0; transform: translateX(-60px) rotate(-10deg); }
.card[data-effect="3"] .card-desc  { opacity: 0; transform: translateX(60px) rotate(10deg); }
/*стани по завершенню анімації 
.card[data-effect="3"].in-view .card-title { animation: normGorizont 0.8s ease forwards; animation-delay: 0.3s; }
.card[data-effect="3"].in-view .card-desc  { animation: normGorizont 0.8s ease forwards; animation-delay: 0.6s; }



/* 4-ий effect  Перекрут (легкий “3D” без глюків браузера) без perspective, максимально стабільно   
.card[data-effect="4"] .card-inner         { opacity: 0; transform: rotateY(30deg) scale(0.95); }
.card[data-effect="4"].in-view .card-inner { animation: normScale 0.6s ease forwards; }



/* 5-ий effect   Зум + поворот (“UI/UX modern”)  
.card[data-effect="5"] .card-inner         { opacity: 0; transform: scale(0.7) rotate(-5deg); }
.card[data-effect="5"].in-view .card-inner { animation: normScale 0.6s ease forwards; }

 

/* 6-ий effect   Легкий “glitch-поява” (інженерний стиль - виглядає як “сигнал стабілізується”)  
.card[data-effect="6"] .card-title { opacity: 0; transform: translateX(-20px) skewX(-10deg); }
.card[data-effect="6"] .card-desc  { opacity: 0; transform: translateX(20px)  skewX(10deg);  }
/*стани по завершенню анімації 
.card[data-effect="6"].in-view .card-title,
.card[data-effect="6"].in-view .card-desc { animation: normGorizont 0.6s ease forwards; }

/* 7-ий effect   Drop + rotate (красиво для іконок - іконка “падає і вирівнюється”)   
.card[data-effect="7"] .card-icon { opacity: 0; transform: translateY(-40px) rotate(-15deg); }
.card[data-effect="7"].in-view .card-icon { animation: normVertical 0.5s ease forwards; }

 
/* 8-ий effect   Micro-bounce (виглядає як пружинка)   
 .card[data-effect="8"].in-view .card-inner { animation: normVertical 0.6s cubic-bezier(.34,1.56,.64,1) forwards; }

 

/* effect = 0 (без анімації)  
.card[data-effect="0"],
.card[data-effect="0"] * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}
*/

/*Заголовок*/
.section-header {
    display: block;
    width: 100%;
    text-align: center;
}
/*Підкреслюємо заголовок*/
.section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 3px;
    background-color: #8B0000;
}
/* Контейнер сітки карток */
.services-grid {
    display: grid;
    /* 3 колонки на десктопі, адаптується автоматично */
   /* grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;*/
    grid-template-columns: repeat(4, 1fr); 
    gap: 50px; 
    padding: 20px;
    padding-bottom: 80px;
}

.service-card {
    aspect-ratio: 1 / 1;
    min-height: 100px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.service-card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.4s ease;
}

 
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0) 20%, rgb(0 0 0 / 10%) 100% );
    transition: 0.4s ease;
}

.card-title {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    /*width: calc(100% - 40px);*/
    margin: 0;
    color: black;
    text-align: center;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    transition:
        top 0.45s ease,
        transform 0.45s ease,
        color 0.3s ease;
}
.card-desc {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 20%;
    opacity: 0;
    color: rgba(255,255,255,0.92);
    font-size: 14px;
    line-height: 1.5;
    z-index: 2;
    transform: translateY(15px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}
.service-card:hover .card-title {
    top: 12%;

    transform: translateX(-50%);

    color: #e90b0b;
}

.service-card:hover .card-desc {
    opacity: 1;

    transform: translateY(0);
}

.service-card:hover .card-overlay {
    background: rgba(0,0,0,0.84);
}

.service-card:hover .service-card-link {
    transform: scale(1.03);
}








/*===================================== TEXT HOME ===================================*/
.engineering-layout {
    position: relative;
    /*max-width: 900px;*/
    margin: 20px 120px;
    padding: 0px 40px;
    background-color: #ffffff;
    /* Фонова сітка як на міліметрівці */
    background-image: 
        linear-gradient(rgba(139, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid #ddd;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Декоративні кути (засічки креслення) */
.corner-node {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid #8b0000;
}
.top-left { top: -5px; left: -5px; border-right: none; border-bottom: none; }
.top-right { top: -5px; right: -5px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -5px; left: -5px; border-right: none; border-top: none; }
.bottom-right { bottom: -5px; right: -5px; border-left: none; border-top: none; }

/* Заголовок у стилі штампу креслення */
.reklama-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #8b0000;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-left: 3px solid #8b0000;
    padding-left: 10px;
}

.accent-text {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.text-body {
    border-left: 1px solid #8b0000;
    padding-left: 30px;
    margin-bottom: 30px;
    line-height: 1.8;
    color: #444;
}

.cta-text {
    font-weight: 700;
    color: #8b0000;
    text-align: center;
    border-top: 1px dashed #ddd;
    padding-top: 20px;
}




/*===================================== ШАБЛОН СТОРІНКИ ===================================*/

.container h1 { margin-left: 3%; }

/* Загальні налаштування секції */
.page-patern {
    max-width: 1200px;
    margin: 2%;
    padding: 3%;
   /*
    border-top: 1px solid #2e2525;
    border-bottom: 1px solid #dd1b1b;
    border-left: 1px solid #dd1b1b;
    border-right: 1px solid #2e2828;
    border-radius: 30px;
    border-image: linear-gradient(to right, #e90b0b 50%, #000000 50%) 1;
    */
    font-family: sans-serif;
    color: #333;
    overflow: hidden;
}

/*
.page-patern h2 {
    text-align: center;
    margin: 40px 0;
    font-size: 28px;
    position: relative; /* Обов'язково для позиціонування лінії 
    padding-bottom: 15px; /* Відступ між текстом і лінією 
    margin-bottom: 30px; /* Відступ від заголовка до наступного блоку 
    text-transform: uppercase;
}

.page-patern h2::after {
    content: ""; /* Створює порожній елемент 
    position: absolute;
    bottom: 0;
    left: 50%; /* Центрування лінії 
    transform: translateX(-50%); /* Точне вирівнювання по центру 
    
    width:  30%;  /* Довжина лінії 
    height: 3px; /* Товщина лінії 
    background-color: #8B0000; /* Ваш темно-червоний колір 
}
*/



/* HERO BLOCK */
.page-patern_hero-block {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}
.page-patern_hero-image {
    width: 50%;
}
.page-patern_hero-image img {
    width: 100%;
    border-radius: 8px;
}
.page-patern_hero-content {
    width: 50%;
}
/*-----------------------*/
.page-patern_check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    list-style: none;
    padding: 0;
    gap: 10px;
}

.page-patern_check-list li::before {
    content: "✓";
    color: #8B0000;
    font-weight: bold;
    margin-right: 10px;
}


/* СІТКА опис послуг (ІКОНКИ) */
.page-patern_top {
    border-bottom: 2px solid #d9d9d9;
    padding-bottom: 15px;
}
.page-patern_top-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    /* grid-template-columns: repeat(2, 1fr);*/
    /* grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); */
    gap: 1%;
    /*font-size: 0.9em;*/
    font-weight: 600;
    text-align: center;
    align-items: start;
}

.page-patern_top-item {
    display: flex;          /* Вмикаємо гнучку верстку */
    align-items: center;    /* Центруємо текст по вертикалі відносно картинки */
    /*gap: 20px;    */          /* Відступ між картинкою та текстом */ 
}
.page-patern_top-title {
    font-size: 1.5em;
    /* font-family: math; */
    font-weight: 900;
    margin-bottom: 15px;
    color: black;
}
.page-patern_top-title strong {
    color: red;
    font-weight: 900;
}

.page-patern_top-left {
    display: flex;
    flex-wrap: wrap;
    padding-left: 10%;
    padding-right: 10%;
    text-align: left;
   /* align-items: center;*/
       align-items: flex-start;
}
.page-patern_top-rignt img {
 width: 100%;
}


/* СІТКА ЧОМУ МИ (ІКОНКИ) */
.page-patern_features-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));*/
    gap: 1%;
    font-size: 0.9em;
    text-align: center;
}

.page-patern_feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 50%;
}

/* КАРТКИ ТИПІВ СИСТЕМ */
.page-patern_types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));*/
    gap: 2%;
}

.page-patern_type-card {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.page-patern_type-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.page-patern_type-card-content {
    padding: 20px;
    text-align: center;
}

.page-patern_type-card h3 {
    color: #8B0000;
    margin-top: 0;
}

/* ЕТАПИ РОБОТИ */
.page-patern_steps-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));*/
    gap: 1%;
}

.page-patern_step-item {
    background: #fff;
    text-align: center;
    /* padding: 20px; */
    /* border-left: 4px solid #8B0000; */
    box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}

.page-patern_step-number {
    color: #8B0000;
    font-weight: bold;
    font-size: 35px;
}



/* СІТКА Для яких об'єктів (ІКОНКИ) */
.page-patern_object-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    /* grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); */
    gap: 1%;
    font-size: 0.9em;
    text-align: center;
}
.page-patern_object-card {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
   /* box-shadow: 0 4px 10px rgba(0,0,0,0.05);*/
}

/*================================= PARTNERS =============================================*/
 
section.partners {
    padding: 1%;
    padding-bottom: 50px;
    border-bottom: 2px solid #8B0000;
}  
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /*grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));*/
    gap: 1%;
    font-size: 0.9em;
    text-align: center;

}
.partners-grid a {
    text-decoration: none;
    color: white;
}
.partners-card {
    overflow: hidden;
    border-radius: 10px;
    /* position: relative; */
}
.partners-grid img {
    width: 80%;
}

/* ===================================== CONTACT FORM ==================================== */

section.contact {
  /*  width: 100%;*/
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    background-color: #f5f5f5; 
    background: url('/wp-content/themes/roman-theme/assets/img/bg_contact.png') no-repeat center;
    background-size: cover;    /* Розтягує картинку, щоб заповнити все тло */
    background-position: center; /* Центрує картинку, щоб обрізка була рівномірною */
    background-repeat: no-repeat;
    margin-bottom: 60px;
    border-top: 2px solid #8B0000;
    
}


.contact-grid {  
    display: grid;
    gap: 0px; 
    grid-template-columns: repeat(3, 1fr); 
}

.contact_left  {
    min-height: 150px;
    background-color: #000000;
    background: url('/wp-content/themes/roman-theme-2/assets/img/form_left_bg.png') no-repeat center;
    background-size: cover;    /* Розтягує картинку, щоб заповнити все тло */
    background-position: center; /* Центрує картинку, щоб обрізка була рівномірною */
    
}
.contact_center{
    /*min-height: 50px; */
    padding: 15px 0;
    background-color:#3c3c3c;
    background: url('/wp-content/themes/roman-theme-2/assets/img/form_center_bg.png') no-repeat center;
    background-size: cover;    /* Розтягує картинку, щоб заповнити все тло */
    background-position: center; /* Центрує картинку, щоб обрізка була рівномірною */
}


.contact_center h3{
    padding-left: 5%;
    color: white;
}
.contact_center ul {
    list-style: none;
    padding-left: 5%;
    color: white;
    font-size: small;
}

.contact_center  ul li {
    position: relative;
    padding-left: 30px; /* Місце для галочки */
    margin-bottom: 10px;
}

.contact_center ul li::before {
    content: "✔"; /* Символ галочки */
    position: absolute;
    left: 0;
    color: #e90b0b; /* Ваш фірмовий червоний */
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
}


#contact_right{
    /*min-height: 50px; */
    background-color: red;
    background: url('/wp-content/themes/roman-theme-2/assets/img/form_right_bg.png') repeat; 
}
#contact_right h3, #contact_right p{
    margin: 10px 5%;
    color: white;
}


form#contactForm {
    width: 70%;
    margin-left: 5%;
}

/*

.contact-bg {
    /*width: 100%;
    max-width: 500px; /* Фіксована ширина для десктопа 
    margin: 80px auto;
    padding: 20px;
    background: #ffffffa6;
    /* Зовнішній скіс всієї форми як на __form_contact.png 
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
*/
.eng-input-wrapper {
    position: relative;
    width: 87%;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Стилізація іконок (схематичні, як ви просили) */
.eng-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    z-index: 9;
}

/* Використання стандартних іконок через маски (або замініть на свої SVG) */
.icon-user    { background-image: url('data:image/svg+xml;utf8,<svg ...>user-svg</svg>');  }
.icon-phone   { background-image: url('data:image/svg+xml;utf8,<svg ...>phone-svg</svg>'); }
.icon-message { background-image: url('data:image/svg+xml;utf8,<svg ...>phone-svg</svg>'); }
.eng-form-styled input, 
.eng-form-styled textarea {
    width: 100%;
    padding: 3px 15px 3px 50px; /* Відступ під іконку */
    border: 1px solid #e0e0e0;
    background: #fdfdfd;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
    /* Скоси для кожного поля */
    clip-path: polygon(0 0, 95% 0, 100% 20%, 100% 100%, 0 100%);
    resize: none; /* Заборона зміни розміру */
}

.eng-form-styled input:focus, 
.eng-form-styled textarea:focus {
    border-color: var(--eng-red);
    background: #fff;
}

/* КНОПКА зі скосом як на малюнку */
.eng-btn-submit {
    width: 100%;
    background: #000000; /*var(--red);*/
    color: #fff;
    border: none;
    padding: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* Складний скіс кнопки з __form_contact.png 
    clip-path: polygon(0 0, 93% 0, 100% 30%, 100% 100%, 7% 100%, 0 70%);*/
    transition: 0.3s;
}

.eng-btn-submit:hover {
    background: #a00000;
    transform: translateY(-2px);
}

.form-status {
    margin-top: 10px;
    font-size: 14px;
    color: #8b0000;
}





/*============================== BUTTON ===================================*/
 
.btn {
    display: inline-block;
    padding: 10px 10px;
    background-color: #8B0000; 
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
      /*Легке закруглення або гострі кути. Для інженерного стилю краще 2-4px  */
    border-radius: 2px; 
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);*/
    content: ' →'; /* Додамо "інженерний" акцент — маленьку стрілку або лінію після тексту  */
}

/* Ефект при наведенні  */
.btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #8B0000;
    border-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

/* Додамо "інженерний" акцент — маленьку стрілку або лінію після тексту  */
.btn::after {
    content: ' →';
    opacity: 0;
    margin-left: -10px;
    transition: all 0.3s ease;
}

.btn:hover::after {
    opacity: 1;
    margin-left: 10px;
}


 




/*===============================  FOOTER =================================*/
/* Основні налаштування футера */
.footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 60px 0 0 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-top: 4px solid #8b0000;
    position: relative;
    overflow: hidden;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
}

.footer-grid {
    /*max-width: 1200px;*/
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    justify-content: space-around;
    gap: 40px;
    padding: 0 20px 40px 20px;
    position: relative;
    z-index: 2;
}
/* Декоративна інженерна сітка на фоні */
.footer-grid::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgb(245 245 245 / 3%) 1px, transparent 1px),
                      linear-gradient(90deg, rgb(245 245 245 / 3%) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
/* Логотип */
.footer-logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-logo span {
    color: #8b0000;
}

/* Заголовки колонок */
.column-title {
    color: #ffffff; /*#8b0000;*/
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(139, 0, 0, 0.3);
    padding-bottom: 10px;
    display: inline-block;
}

/* Список посилань */

.cut-title {
    /* обрізаємо назву новини якщо не влазить в блок */ 
    display: -webkit-box;
    -webkit-line-clamp: 2;    /* Кількість рядків, які треба залишити */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
    font-size: 15px;
}

.footer-links a:hover {
    color: #8b0000;
    padding-left: 8px;
}

/* Контакти */
.contact-item {
    margin-bottom: 15px;
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item .icon {
    font-size: 18px;
    filter: sepia(1) saturate(5) hue-rotate(-50deg); /* Тонування emoji під ваш колір */
}

/* Пульсуючий статус */
.engineering-status {
    margin-top: 25px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ff00;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pulse {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    animation: footerPulse 2s infinite;
}

@keyframes footerPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Карта */
.map-wrapper {
    position: relative;
    border: 1px solid #333;
    background: #000;
    line-height: 0;
}

.map-wrapper iframe {
    filter: grayscale(1) invert(0.9) contrast(1.2) opacity(0.6);
    transition: 0.5s ease;
}

.map-wrapper:hover iframe {
    filter: grayscale(0) invert(0) contrast(1) opacity(1);
}

.map-corner {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: #8b0000;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

/* Нижня панель */
.footer-bottom {
    background: #111111;
    border-top: 1px solid #222;
    padding: 20px 0;
    font-size: 12px;
    color: #555;
}

.bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-id {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Адаптивність */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
         padding: 0px;
         justify-content: space-around;
    } 
    .column-title {
        margin: 0 auto 0px auto;
        display: table;
    }

    .contact-item {
        justify-content: center;
        margin-bottom: 1px;
        text-align: left;
    }
 
    .engineering-status {
        justify-content: center;
    }

    .bottom-container {
        flex-direction: column;
        gap: 10px;
    }
    
   .card-title { font-size: 0.8em; } 
    
    
}

/*================================ MOBIL ===================================*/

@media (max-width: 768px) {
    /*.logo img {  width: 25%;      }*/
    .hero { min-height: 300px;} /* Щоб на маленьких екранах не був занадто вузьким */
    .hero-content { width: 55%; margin-top: 60px; }
    .hero-title { font-size: large; }
    .hero-description { font-size: large; }
    .hero-overlay-btn { top: 250px;  }
    .home_top { margin: 10px;} 
    .home_top-grid { grid-template-columns: repeat(2, 1fr);}
    .home_top-img { width: 50%; margin: auto; }
    .home_top-text { text-align: center; margin: auto; }
    .slogan, .slogan-img-container { width: auto; }
    .slogan p { font-size: 1.0rem; }
    .page-patern_top-item { flex-direction: column; }
    .page-patern_top-img  {  width: 50%; }
    .page-patern_top-text {  width: 100%; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap:10px;}
    .contact-grid {   grid-template-columns: repeat(1, 1fr);  }
    .partners-grid {  grid-template-columns: repeat(2, 1fr); }
    .engineering-layout { margin: 10px 5px; } 



    /* ПАТЕРНИ КОРИСТУВАЦЬКИХ СТИЛІВ */
    .page-patern_hero-block { flex-direction: column; }
    .page-patern_check-list { grid-template-columns: 1fr; }
    .page-patern_top-grid { grid-template-columns:  1fr 0fr;}
    .page-patern_top-item {  padding-top: 20px; }
    .page-patern_hero-image { width: 100%; } 
    .page-patern_hero-content { width: 100%; }
    .page-patern_features-grid { grid-template-columns: repeat(2, 1fr); }
    .page-patern_types-grid { grid-template-columns: repeat(1, 1fr); }
    .page-patern_steps-grid { grid-template-columns: repeat(3, 1fr); } 
    .page-patern_object-grid{ grid-template-columns: repeat(5, 1fr); }
    .page-patern_steps-grid { grid-template-columns: repeat(2, 1fr); }
}


