/* ===== Базовые стили ===== */
:root {
  --primary-color: #f36f21;
  --primary-hover: #db641d;
  --success-color: #8cc864;
  --success-hover: #72a352;
  --warning-color: #ffc107;
  --back-color: #fffabc;
  --info-color: #17a2b8;
  --light-color: #fff;
  --dark-color: #a3acb5;
  --border-color: #dee2e6;
  --text-color: #495057;
}

/* Подключение шрифтов */
@font-face {
  font-family: 'OpenSans';
  src: url('/fonts/OpenSans-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'OpenSans';
  src: url('/fonts/OpenSans-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: 'OpenSans';
  src: url('/fonts/OpenSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

/* Общие стили */
body {
  font-family: 'OpenSans', sans-serif;
  font-weight: normal;
}

h1, h2, h4, h5, h6 {
  font-family: 'OpenSans', sans-serif;
  font-weight: 800; /* ExtraBold */
  margin-left: 25px;
}

h3 {
  font-family: 'OpenSans', sans-serif;
  font-weight: normal;
  margin-left: 5px;
}

/* Шапка с фоновым изображением */
.header-with-bg {
  background-image: url('/images/up.png');
  background-size: Cover;
  background-position: top;
  padding: 50px 0;
  color: white;
  text-align: left;
  position: relative;
  margin-top: 20px;
}


.header-content {
  position: static;
  color: black;
  z-index: 1;
}
.header {
  font-size: 3.4rem;
  margin-top: -30px;
  margin-bottom: 12px;
}

/* Стили для блока с фоновым изображением */
.info-section {
  background-image: url('/images/midle.png');
  background-size: cover;
  background-position: center;
  padding: 80px 0;
  color: white;
  text-align: center;
  position: relative;
  margin-top: -40px;
  border-radius: 8px;
  overflow: hidden;
}

.info-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.info-content h1 {
  font-family: 'OpenSans', sans-serif;
  font-weight: bold;
  margin-bottom: 10px;
  margin-left: -20%;
  color: #fff;
  font-style: italic;
}

.info-content p {
  font-family: 'OpenSans', sans-serif;
  font-weight: normal;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Стили для описания с кругами */
.usage-description {
  padding: 00px 0;
  
}

.usage-item {
  display: flex;
  align-items: center;
  margin-top: -30px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.usage-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 15px;
  margin-top: 7px;
  flex-shrink: 0;
  
}

.circle-blue {
	background-color: #6fdce3;
	margin-left: 25px;
	vertical-align: text-top;
}

/* Скрываем фильтр времени визуально, но оставляем в DOM */
#durationFilter-container {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Стили для навигации календаря */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 1px;
  margin-left: 15px;
  margin-right: 15px;
}

.calendar-title {
  font-family: 'OpenSans', sans-serif;
  font-weight: 800; /* ExtraBold */
  text-align: center;
}

/* Стили для правил посещения */
.library-rules {
  font-family: 'OpenSans', sans-serif;
  font-weight: 300;
  font-style: italic;
  margin-top: 40px;
  padding: 20px;
}

.rule-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.rule-item h3 {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  margin-left: 10%;
}

.rule-icon {
  position: absolute;
  max-width: none;
  width: 100px;
  height: 100px;
  margin-right: 15px;
  margin-top: 45px;
  flex-shrink: 0;
}

body {
  background-color: var(--light-color);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Для лучшего отображения иконки в кнопке */
#resetFilters i {
    margin-right: 5px;
}

/* ===== Календарь ===== */
#calendar {
  background-color: white;
  border-radius: 0.75rem;
  padding: 1rem;
}

.fc {
  font: inherit;
  border: none;
}

.fc-media-screen {
  background-color: var(--back-color) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* Заголовок */
.fc-toolbar-title {
  font-size: 1.25rem;
  color: var(--text-color);
}



/* Дни недели */
.fc-col-header-cell-cushion {
  color: var(--text-color);
  text-decoration: none;
}

/* Ячейки дней */
.fc-daygrid-day {
  border: 1px solid var(--border-color);
  background-color: white;
}

.fc-daygrid-day-frame {
  min-height: 100px;
  padding: 2px;
  border-radius: 4px;
}

.fc-daygrid-day-number {
  color: var(--text-color);
  padding: 4px;
}

/* События */
.fc-event {
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  color: white;
}

.fc-event.free { background-color: var(--success-color); }
.fc-event.pending { background-color: var(--dark-color); }
.fc-event.booked { background-color: var(--primary-color); opacity: 0.7; }

/* убираем точку в начале события в календаре */
.fc-daygrid-event-dot {
  display: none !important;
}

/* ===== Модальные окна ===== */
.modal-body img {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
  border-radius: 4px;
}

/* Карточки в модальных окнах */
.card-header[class*="bg-"] {
  color: white;
}

/* Изображения */
.img-thumbnail {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.event-image-thumb {
  width: 100px;
  height: 70px;
  object-fit: cover;
  margin: 0 10px 10px 0;
  border-radius: 4px;
}

/* ===== Админка ===== */
.admin-only {
  display: none;
  background-color: var(--light-color);
  border-left: 3px solid var(--primary-color);
  padding-left: 10px;
}

/* Комментарии */
#adminCommentsEdit {
  width: 100%;
  min-height: 100px;
}

.form-label {
	color: var(--primary-color);
	font-size: 1.3rem;
	font-weight: 800;
}

.form-label2 {
	color: var(--text-color);
	font-size: 1rem;
	font-weight: 300;
}

.form-select {
	color: var(--light-color);
	background-color: var(--primary-color);
	font-size: 1.2rem;
	font-weight: 800;
}

/* Общие стили для всех кнопок */
.btn {
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-family: 'OpenSans', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: var(--primary-color);
  color: white;
}

.btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--success-color); 
  color: white;
  font-size: 1.2rem;
}

.btn-outline-primary {
	font-size: 1.2rem;
}

.btn-primary:hover {
  background-color: var(--success-hover);
  transform: translateY(-2px);
}

.btn-warning {
	background-color: var(--dark-color);
}
.btn-warning:hover{
	background-color: var(--border-color);
}

/* Вторичная кнопка */
.btn-outline-secondary {
  background-color: var(--warning-color); 
  color: var(--text-color); 
  font-size: 1.2rem;
  
}

.btn-outline-secondary:hover {
  background-color: var(--back-color);
  color: var(--text-color);
  font-size: 1.2rem;
}

.booking-link {
  color: var(--primary-color);
  font-weight: 500;
}

.booking-link:hover {
  text-decoration: underline;
}

/* Подсказки */
.event-tooltip {
  position: absolute;
  z-index: 100;
  padding: 12px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 300px;
  border-left: 5px solid;
}

.offset-block {
  position: relative;
  margin-top: -190px;
  margin-left: 20%; /* Смещение от левого края */
  background-color: var(--back-color); /* Цвет фона */
  color: black; /* Цвет текста */
  padding: 5px;
  border-top-left-radius: 15px; /* Скругление левых углов */
  border-bottom-left-radius: 15px;
  overflow: hidden; /* Обрезаем правый край */
}

.offset-block h3 {
  font-family: 'OpenSans', sans-serif;
  font-weight: 300;
  font-style: italic;
  padding: 20px;
}

.tomik {
	position: relative;
	margin-left: -95px;
	margin-top: 0px;
}

a {
  color: var(--info-color); /* Цвет обычных ссылок */
}

.event-tooltip.status-free { border-left-color: var(--success-color); }
.event-tooltip.status-pending { border-left-color: var(--dark-color); }
.event-tooltip.status-booked { border-left-color: var(--primary-color); }

.month-nav-btn {
    color: var(--primary-color);
	background-color: var(--warning-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-nav-btn:hover {
	background-color: var(--back-color);
	transform: translateY(-2px);
	color: var(--primary-color);
}

.calendar-title {
	color: var(--primary-color); 
	font-size: 2.7rem; 
	margin-left: 0px;
}

/* Стили для иконок */
.nav-icon img {
    width: 20px; /* Размер иконки */
    height: 20px;
}

/* ===== Адаптивность ===== */
@media (max-width: 1024px) {
	
	body {
    width: 100vw; /* Занимает всю ширину viewport */
    overflow-x: hidden; /* Предотвращает горизонтальный скролл */
  }
  
  .container {
    max-width: 100%; /* Контейнер растягивается на всю ширину */
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Оптимизация элементов для альбомного режима */

  
  .col-md-1, .col-md-2 {
    flex: 1;
    min-width: 120px;
  }

	.form-select {
		color: var(--light-color);
		margin-top: 0px;
		background-color: var(--primary-color);
		font-weight: 800;    
		font-size: 0.9rem;
		padding: 0.25rem 0.5rem;
	}
	.col-md-1:nth-child(1),
	.col-md-1:nth-child(2) {
		width: 48%;
		margin-right: 2%;
	}
	.col-md-1:nth-child(2) {
		margin-right: 0;
	}
	.col-md-2:has(#showAllEvents),
	.col-md-2:has(#resetFilters) {
		width: 48%;
		display: inline-block;
		margin-right: 2%;
	}
	.col-md-2:has(#resetFilters) {
		margin-right: 0;
	}
	.btn {
		padding: 0.5rem;
		font-size: 0.9rem;
	}
	.form-label{
		font-size: 1.2rem;
	}
	.fc-toolbar-title { font-size: 1.2rem; }
	.fc-daygrid-day-number { font-size: 0.8rem; }
	.fc-event { font-size: 0.7rem; padding: 1px 2px; }

	.info-section { padding: 50px 0; }

	.rule-icon { display: none; }

	.info-content h2 { font-size: 1.5rem; }

	.info-content p { font-size: 1rem; }

	.fc-daygrid-day-frame { min-height: 80px; }

	.info-content h1 {
		font-family: 'OpenSans', sans-serif;
		font-weight: bold;
		margin-bottom: 1px;
		margin-left: 10%;
		color: #fff;
		font-style: italic;
		font-size: 1.6rem !important;
	}

	.tomik {margin-left: -70px;}
  
	.footer-content {
		flex-direction: column;
		gap: 20px;
	}
  
	.btn {
		padding: 8px 12px;
		height: auto !important;
	}
	
	.header {
		font-size: 1.5rem;
	}
	
	.calendar-header {
		font-size: 1rem !important;
	}
	
	.nav-text {
        display: none;
    }
    
    .month-nav-btn {
        padding: 0.25rem 0.5rem; /* Уменьшаем отступы */
    }
    
    .calendar-title {
        font-size: 1.5rem !important; /* Уменьшаем размер заголовка */
    }
	
	details summary {
		list-style: none;
		font-family: 'OpenSans', sans-serif;
		color: var(--primary-color);
		font-weight: 800;
		font-size: 0.5rem;
		line-height: 1;
	}
	
	.arrow {
		max-width: 30px;
	}
	
	.lead h3 {
		font-size: 1.2rem;
	}
	
	.summ {
		font-size: 1.2rem;
	}
}

/* Утилиты */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.text-center { text-align: center; }
.d-none { display: none; }

/* Стили для тултипа с изображением */
.event-tooltip {
    max-width: 300px !important;
    padding: 8px !important;
	position: absolute;
	pointer-events: none;
	z-index: 1000;
}

/* Стили для текста статуса */
.status-text {
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    display: inline-block;
}

.text-free { color: var(--success-color); }
.text-pending { color: var(--dark-color); }
.text-booked { color: var(--primary-color); }

.event-tooltip-image {
    border-radius: 4px;
    border: 1px solid #dee2e6;
    display: block;
    margin: 0 auto;
}

#tooltipTitle {
    color: var(--text-color);
}

.tooltip-title {
    font-weight: bold;
	color: red;
    margin-bottom: 8px;
    text-align: center;
}

.text-muted {
    color: var(--border-color);
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Стили футера */
.site-footer {
  background-color: #6fdce3;
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h4 {
  font-family: 'OpenSans', sans-serif;
  font-weight: 800;
  margin-bottom: 0px;
}

.footer-section p {
  margin: 0;
  font-family: 'OpenSans', sans-serif;
  font-weight: 300;
  margin-left: 25px;
  
}

.card {
	background-color: var(--back-color);
}

	

.large-button {
  font-size: 24px;
  padding: 10px 20px;
  margin: 10px;
}

.small-button {
  font-size: 14px;
  padding: 5px 10px;
  margin: 5px;
}

.medium-button {
  font-size: 18px;
  padding: 7px 15px;
  margin: 7px;
}

details summary {
	list-style: none;
	font-family: 'OpenSans', sans-serif;
	color: var(--primary-color);
	font-weight: 800;
	font-size: 2rem;
}