/* =========================================== */
/* =           GLOBAL & LAYOUT STYLES          = */
/* =========================================== */

html, body {
	overflow-x: hidden;
	height: 100%;
	margin: 0;
}

body {
  background-image: url("../images/rmm4.png");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center bottom;
  background-size: cover;
  font-family: 'Arial';
  margin: 0;
  padding: 0;
  width: 100%;
  color: #444;
  flex-direction: column;	
}

/* Layout containers */
.wrapper {
	display: flex;
	flex-direction: column;
	overflow: visible;
	min-height: 100vh;
}

.main {
	flex: 1 0 auto;
	display: flex;
    flex-direction: column;
	min-height: 0;
}

.content {
	flex: 1;
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
}

/* =========================================== */
/* =            NAVIGATION STYLES            = */
/* =========================================== */

.header {
	background: #3F4137;
	min-height: 60px;
	position: relative;
	z-index: 1020;
}

.logo {
	background: url('../images/logo.png') no-repeat 10px 5px;
	width: 70px;
	height: 60px;
}

#offcanvasResponsive {
	z-index: 20000 !important;
	width: 80%;
	max-width: 300px;
	border-top-right-radius: 20px;
	border-bottom-right-radius: 20px;
	box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

#offcanvasResponsive .offcanvas-header {
	background: #3F4137;
	color: #fff;
}

#offcanvasResponsive .btn-close {
	filter: invert(1);
}

/* =========================================== */
/* =            FOOTER STYLES                = */
/* =========================================== */

.footer {
	box-sizing: border-box;
	background: #3F4137;
	padding: 5px;
	color: #aaa;
	font-size: 14px;
	font-family: Verdana, Geneva, Arial, Helvetica;
	text-align: left;
	flex-shrink: 0;
}

.footer a {
	text-decoration: underline;
	color: #aaa;
}

/* =========================================== */
/* =            LINK & BUTTON STYLES         = */
/* =========================================== */

a {
	color: #100e63;
	text-decoration: none;
}

a:hover {
	color: #CC0000;
	text-decoration: underline;
}

/* Buttons and links styling */
p.link-read-post {
	text-align: right;
}

p.link-read-post a, button {
	display: inline-block;
    background-color: #3a85dc;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px 0;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.link-read-post a:hover {
    background-color: #357ABD;
}

.delete-btn a, button {
    background-color: #D0021B;
	color: white;
}

.delete-btn a:hover, button:hover {
    background-color: #9B001C;
	color: white;
}

.button-group {
	display: flex;
	justify-content: flex-end;
	gap: 25px;
	width: 100%;
}

/* =========================================== */
/* =           FORM STYLES                   = */
/* =========================================== */

.form-label {
	display: inline-block;
	min-width: 150px;
	vertical-align: top;
}

.form-error ul {
	list-style: none;
	padding: 0;
	color: #CC0000;
}

.form-input {
	width: 300px;
	font-size: 16px;
}

.form-button {
	min-width: 200px;
	font-size: 16px;
}

/* =========================================== */
/* =         ARTICLE & LIST STYLES           = */
/* =========================================== */


ul.list-articles {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

ul.list-articles li, ul.list-aritcles a, .article {
	border-bottom: 1px solid #ccc;
	text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3);
	display: block;

	width: 90%;
  max-width: 850px;
	margin-left: auto; 
	margin-right: auto;

  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);  
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 20px;       
  box-sizing: border-box;
  color: #333; 
	line-height: 1.2;
}

div.article-panel {
	background: rgba(238, 238, 238, 0.5);
	padding: 5px 10px;
	box-sizing: border-box;
	color: #555;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	color: #444;
}


div.article-panel p.first {
	margin: 0;
}

div.article-panel p.last {
	margin: 0;
}

.clear {
	clear: both;
}

/* =========================================== */
/* =         PAGINATION STYLES               = */
/* =========================================== */

/* Round Pagination Styles */
.pagination.pagination-round {
  gap: 12px;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  border: none;
}

.pagination-round .page-item {
  margin: 0;
  border: none;
}

.pagination-round .page-link {
  width: 35px;
  height: 35px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  border: none !important;
  background-color: #dbe4ef;
  color: #5a5e4b;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 !important;
}

.pagination-round .page-link:hover {
  background: #3F4137;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.pagination-round .page-item.active .page-link {
  /* background: linear-gradient(135deg, #3F4137 0%, #2c2e27 100%); */
  background: #3F4137 !important;
  color: #fff;
  box-shadow: 0 4px 12px rgba(63, 65, 55, 0.4);
  z-index: 3;
  border: none !important;
}

.pagination-round .page-item.disabled .page-link {
  background: #f8f9fa;
  color: #ced4da;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* .list-pages {
	text-align: center;
	margin: 0;
}

.list-pages ul {
	margin: 20px 0 0 0;
	padding: 0;
	list-style: none;
}

.list-pages ul li {
	display: inline-block;
	margin: 0 20px 0 0;
}

.list-pages a {
	color: #000;
	font-size: 24px;
	text-decoration: none;
}

.list-pages .page-num,
.page-num-selected {
	display: inline-block;
	width: 60px;
	height: 44px;
	padding: 16px 0 0 0;
	border: 1px solid #d0d0d0;
	border-radius: 30px;
}

.list-pages .page-num:hover {
	box-shadow: 3px 3px 1px #d0d0d0;
}

.list-pages .page-num-selected {
	border: none;
	color: #000;
	font-size: 20px;
}

.list-pages .page-num-selected:hover {
	box-shadow: none;
} */

@media (max-width: 576px) {
    .pagination {
        --bs-pagination-padding-x: 0.5rem;
        --bs-pagination-padding-y: 0.25rem;
        font-size: 0.875rem;
    }
    .page-link {
        margin: 0 2px; /* Чуть сужаем расстояние между кнопками */
    }
}

/* =========================================== */
/* =         SIDEBAR & MENU STYLES           = */
/* =========================================== */

.left-chapters {
	background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0 20px 20px;
}

.left-chapters ul {
    padding: 0;
}

.left-chapters ul li {
	margin: 30px 0 0 0;
	color: #999;
}

.left-chapters ul li.selected {
	color: #0059b2;
}

.left-chapters ul li a {
	color: #444;
	text-decoration: none;
}

.left-chapters ul li a:hover {
	color: #CC0000;
}

.left-chapters ul li.share {
	margin: 60px 0 0 0;
}

.left-chapters ul li.share p {
	margin: 30px 0 30px 0;
}

.left-chapters ul li.share a {
	display: inline-block;
	width: 40px;
	height: 40px;
	margin: 0 20px 0 0;
}

.left-chapters ul li.share a.share-yt {
	width: 100%;
	height: 30px;
	background: url('../images/share_yt.png') no-repeat 0 0
}

.left-chapters ul li.share a.share-yt:hover {
	width: 100%;
	height: 30px;
	background: url('../images/share_yt.png') no-repeat 0 -30px
}

ul.mainmenu {
	list-style: none;
	margin: 0;
	padding: 0;
	height: 60px;
	color: #fdc073;
	font-size: 20px;
	overflow: hidden;
}

ul.mainmenu li {
	float: left;
	margin: 18px 40px 0 30px;
}

ul.mainmenu li.logo {
	margin: 0;
}

ul.mainmenu li.last {
	float: right;
}

ul.mainmenu li a {
	color: #fdc073;
	text-decoration: none;
}

ul.mainmenu li a:hover {
	color: #FDA83D;
}

/* =========================================== */
/* =         UTILITY CLASSES                 = */
/* =========================================== */

.dropdown-toggle::after {
  content: none;
}

.custom-shadow {
  box-shadow: 2px 2px 5px 6px #372c2c;
}

.product_id {
  color: gray;
  font-size: 15px;
}

.badge.bg-warning.text-dark {
  position: absolute;
  top: 10px;
  right: 5px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 1rem;
  box-shadow: 2px 2px 15px 9px #000000;
}

.badge-banner {
  top: 80%;
  border-radius: 15px;
  font-size: 0.7rem;
}

.mt-auto {
    margin-top: auto;
    padding: 20px 0;
}

/* =========================================== */
/* =         IMAGE STYLES                    = */
/* =========================================== */

img {
	max-width: 100%;
	height: auto;
}

img.img-article-left {
	max-width: 300px;
	height: auto;
	float: left;
	padding: 0 10px 10px 0;
}

img.img-article-left.thumb {
	max-width: 150px;
	height: auto;
}

/* =========================================== */
/* =         FILE VIEWER STYLES              = */
/* =========================================== */

.file-viewer-container {
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 30000 !important;
}

.file-content object,
.file-content embed {
  width: 100% !important;
  height: 80vh !important;
  min-height: 400px !important;
}

.pdf-content {
  width: 100% !important;
 
}

.pdf-content object,
.pdf-content embed {
  width: 100% !important;
  min-height: 600px;
}

.attachments-preview {
	margin: 10px 0;
	padding: 8px;
	background-color: #f8f9fa;
	border-radius: 4px;
	border-left: 3px solid #007bff;
}

.pdf-link, .file-link {
	font-size: 14px;
	color: #495057;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.pdf-link:hover, .file-link:hover {
	color: #007bff;
	text-decoration: underline;
}

.pdf-link i, .file-link i {
	font-size: 16px;
}

/* Основной контейнер просмотрщика */
.viewer-window {
    min-height: 400px;
    min-width: 320px;
    max-width: 100%;
}

/* Настройка изменения размера только для десктопов */
@media (min-width: 768px) {
    .resizable {
        resize: both;
        overflow: auto;
    }
}

/* Контейнер для самого контента (чтобы кнопки снизу не прыгали) */
.file-content-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 350px;
}

/* Стили для PDF */
.pdf-object {
    width: 100%;
    height: 70vh; /* Занимает 70% высоты экрана */
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Стили для текстового превью */
.text-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 65vh;
    overflow-y: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    text-align: left;
}

/* Центрирование и ограничение изображений */
.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f1f1;
    border-radius: 4px;
    padding: 10px;
}

.viewer-img {
    max-height: 75vh;
    object-fit: contain;
}

/* =========================================== */
/* =         RESPONSIVE MEDIA QUERIES        = */
/* =========================================== */

@media (max-width: 768px) {
  .file-viewer-container {
    position: relative;
    z-index: 30000 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .file-content object,
  .file-content embed {
    width: 100% !important;
    height: 80vh !important;
    min-height: 400px !important;
  }

  .pdf-content object,
  .pdf-content embed {
    min-height: 80vh !important;
    height: auto !important;
  }
}
@media (max-width: 576px) {
    /* Еще больше уменьшаем шрифт и отступы специально для мобильного вьюера */
    .file-viewer-footer .btn-sm {
        font-size: 0.75rem; /* Совсем компактный шрифт */
        padding: 0.25rem 0.5rem;
    }
    
    /* Убираем лишние иконки на очень узких экранах, если нужно сэкономить место */
    .file-viewer-footer i {
        font-size: 0.8rem;
    }
}

/* for equipment post.html */



/* Стиль для вертикальных карточек со скроллом версия 2 */
.info-scroll-box {
        max-height: 200px; /* Ограничиваем высоту */
        overflow-y: auto;  /* Включаем вертикальный скролл */
        padding: 1rem;
        background-color: #fdfdfd;
        border: 1px solid #e9ecef;
        border-radius: 0.375rem;
    }

   
/* Улучшенный контейнер с возможностью изменения размера */
.resizable-scroll-box {
        min-height: 100px;   /* Минимальная высота */
        max-height: 600px;   /* Максимальная высота, чтобы не ушло в бесконечность */
        height: 200px;       /* Начальная высота */
        
        overflow: auto;      /* Включает и скролл, и позволяет работать resize */
        resize: vertical;    /* Позволяет пользователю тянуть за нижний правый угол (вверх/вниз) */
        
        padding: 15px;
        background-color: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
        margin-bottom: 1rem;
    }

    /* Визуальный индикатор того, что блок можно тянуть */
.resizable-scroll-box::after {
  content: "";
  display: block;
  height: 10px;
}    


.equipment-box {
        /* Важно: свойства ниже включают изменение размера */
        display: block;
        overflow: auto; 
        resize: vertical;
        
        /* Начальные размеры */
        min-height: 80px;
        height: 150px; /* Фиксированная начальная высота */
        width: 100%;
        
        /* Внешний вид */
        padding: 12px;
        background-color: #f8f9fa; /* Светло-серый фон, чтобы видеть границы */
        border: 2px solid #dee2e6; /* Заметная рамка */
        border-radius: 6px;
        margin-bottom: 20px;
    }

    /* Делаем полосу прокрутки всегда видимой, если текст не влезает */
    .equipment-box::-webkit-scrollbar {
        width: 8px;
    }
    .equipment-box::-webkit-scrollbar-thumb {
        background-color: #585e65;
        border-radius: 4px;
    }
    .equipment-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .equipment-box::-webkit-scrollbar-thumb:hover {
     background: #2c2e27;
  }


  /* ЕЩЁ ОДНА ФИЧА ДЛЯ ПОСТА */

/* Контейнер для текста */
.expandable-content {
    position: relative;
    max-height: 150px; /* Высота в свернутом виде */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-bottom: 5px;
}

/* Эффект затухания текста снизу */
.expandable-content.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none; /* Чтобы градиент не мешал кликать по тексту */
}

/* Когда блок развернут, убираем затухание */
.expandable-content.expanded::after {
    display: none;
}

/* Кнопка */
.btn-toggle-expand {
    display: inline-block;
    color: #3F4137;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed #3F4137;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.btn-toggle-expand:hover {
    color: #CC0000;
    border-color: #CC0000;
}  


