/* === Общие стили === */
body {
  background-color: #ffffff;
  font-family: "Poppins", "Arsenal", sans-serif;
}

/* Подключение Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* === Заголовки === */
.zag-1 {
  color: #462807;
  font-family: "Poppins", "Arsenal", sans-serif;
  font-size: 35px;
  text-align: center;
  font-weight: bold;
  margin-top: 30px;
}

.zag-10 {
  margin-top: -10px;
  margin-bottom: 5px;
  color: #462807;
  font-family: "Poppins", "Arsenal", sans-serif;
  font-size: 35px;
  font-weight: bold;
}

.zag-1-1 {
  color: #462807;
  font-family: "Poppins", "Arsenal", sans-serif;
  font-size: 20px;
  text-align: center;
  font-weight: bold;
}

.zag-2 {
  color: #462807;
  font-family: "Poppins", "Arsenal", sans-serif;
  font-size: 40px;
  text-align: center;
  font-weight: bold;
  margin-top: 30px;
}

.titletext {
  font-size: 40px;
  font-family: "Poppins", "Arsenal", sans-serif;
  color: #4f2900;
  font-weight: bold;
  font-style: italic;
  margin-top: 20px;
}

/* === Кнопка администратора === */
.adm {
  font-family: "Poppins", "Arsenal", sans-serif;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  user-select: none;
  background: rgb(121,0,0);
  padding: .7em 1.5em;
  outline: none;
}

.adm:hover {
  background: rgb(193,0,0);
}

.adm:active {
  background: rgb(121,0,0);
}

/* === ОБНОВЛЕННЫЕ СТИЛИ МЕНЮ === */

/* Лого для мобильной версии */
.mobile-logo {
  display: none;
  text-align: center;
  padding: 10px 0;
  background-color: #2b2b2b;
}

nav {
  margin: 0;
  padding: 0;
  background-color: #2b2b2b;
  box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
}

/* Скрываем чекбокс */
#drop {
  display: none;
}

/* ДЕСКТОПНАЯ ВЕРСИЯ */
nav ul.menu {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-left {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.menu-right {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
}

nav ul.menu li {
  display: inline-block;
}

nav a {
  display: block;
  font-family: "Poppins", sans-serif;
  padding: 14px 20px;
  color: #dddddd;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(150,150,150,0.15);
}

nav a:hover {
  background-color: #f1f1f1;
  color: #2b2b2b;
}

/* Подменю */
nav ul ul {
  display: none;
  position: absolute;
}

nav ul li:hover > ul {
  display: inherit;
}

nav ul ul li {
  float: none;
  display: list-item;
  position: relative;
  width: 300px;
}

nav ul ul ul li {
  position: relative;
  top: -60px;
  left: 170px;
}

li > a:after {
  content: '+';
}

li > a:only-child:after {
  content: '';
}

/* МОБИЛЬНАЯ ВЕРСИЯ */
@media all and (max-width: 768px) {
  /* Показываем мобильное лого */
  .mobile-logo {
    display: block;
  }
  
  /* Скрываем десктопное лого в меню */
  .menu-center {
    display: none;
  }
  
  /* Скрываем меню по умолчанию */
  nav ul.menu {
    display: none;
  }
  
  /* Показываем кнопку меню */
  .toggle {
    display: block;
    font-family: "Poppins", sans-serif;
    background-color: #2b2b2b;
    padding: 14px 40px;
    color: #dddddd;
    font-size: 20px;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid rgba(150,150,150,0.15);
    text-align: center;
    cursor: pointer;
    width: 100%;
  }
  
  .toggle:hover {
    background-color: #f1f1f1;
    color: #2b2b2b;
  }
  
  /* Показываем меню при активации чекбокса */
  #drop:checked ~ ul.menu {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  /* Стили для развернутого меню */
  nav ul.menu li {
    display: block;
    width: 100%;
  }
  
  .menu-left,
  .menu-right {
    display: block;
    width: 100%;
  }
  
  .menu-left li,
  .menu-right li {
    width: 100%;
    display: block;
  }
  
  nav ul ul {
    float: none;
    position: static;
  }
  
  nav ul ul li {
    display: block;
    width: 100%;
  }
  
  /* Скрываем плюсики в мобильной версии */
  li > a:after {
    content: '';
  }
}

/* === Таблицы, блоки и прочее === */
#container {
  margin: 0 auto;
  max-width: 960px;
}

.social {
  padding: 50px;
}

.bold {
  font-weight: bold;
}

.portfolio-padding {
  margin-bottom: 30px;
}

.time-block-padding {
  margin-bottom: 20px;
}

.portfolio-border {
  border-width: 3px;
  border-color: #8B4513;
  border-style: solid;
}

.time-block {
  color: #fdf5ec;
  font-weight: bold;
  float: left;
  width: 130px;
  height: 130px;
  padding-top: 15px;
  margin: 10px;
  background-color: #fff;
  border: 2px solid #623900;
  text-align: center;
  clear: both;
}

.footertext {
  font-size: 12px;
  font-weight: bold;
  bottom: 0;
  display: block;
}

.time-block-new-active {
  display: flex;
  flex-direction: column;
  width: 130px;
  height: 130px;
  margin: 10px;
  text-align: center;
  font-weight: bold;
  color: #fff;
  background-color: #2b2b2b;
  border: 2px solid #623900;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.time-block-new-active:hover {
  background-color: #444444;
  color: #fff;
}

.time-block-new-active .time-date {
  color: #ffffff;
}

.time-block-new-empty {
  display: flex;
  flex-direction: column;
  width: 130px;
  height: 130px;
  margin: 10px;
  text-align: center;
  font-weight: bold;
  color: #fff;
  background-color: #2b2b2b;
  border: 2px dashed #623900;
  cursor: default;
}

.time-block-new-empty .time-date {
  color: #ffffff;
}

/* === Карточки мастеров === */
.master-card {
  background-color: #fdf5ec;
  border: 2px solid #e0c8a0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 15px;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.master-photo {
  border-radius: 12px;
  max-height: 300px;
  object-fit: cover;
  margin-bottom: 12px;
}

.master-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}

.master-description {
  font-size: 16px;
  color: #555;
  margin-bottom: 12px;
  text-align: center;
}

.master-portfolio {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 12px;
}

.master-portfolio .portfolio-img {
  border-radius: 8px;
  height: 80px;
  object-fit: cover;
  margin: 4px;
}

.master-info-card {
  background: #2c2c2c;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.master-info-card .mi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 8px;
}

.master-info-card .mi-row .mi-icon {
  font-size: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.master-info-card .mi-heading {
  font-weight: bold;
  margin-bottom: 4px;
}

.master-info-card .mi-text {
  margin: 0;
}

.master-info-card .mi-row.mi-negative {
  background: rgba(255,0,0,0.1);
  border-left: 3px solid #ff4d4d;
  padding-left: 8px;
}

.master-prices {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.master-prices li {
  margin: 0 6px 4px;
  background: #f1f1f1;
  color: #333;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
}

/* Обновленные стили портфолио */
.master-portfolio {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
    gap: 8px; /* отступы между фото */
}

.master-portfolio .portfolio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    padding: 0;
}

/* 4 фото в ряд - на всех устройствах */
.master-portfolio:has(.portfolio-item:nth-child(4):last-child) .portfolio-item {
    flex: 1 1 calc(25% - 8px);
}

/* 3 фото в ряд - на всех устройствах */
.master-portfolio:has(.portfolio-item:nth-child(3):last-child) .portfolio-item {
    flex: 1 1 calc(33.333% - 8px);
}

.master-portfolio .portfolio-img {
    width: 100%;
    height: 200px; /* большая высота */
    object-fit: cover; /* обрезаем фото чтобы сохранить пропорции */
    border-radius: 8px;
    display: block;
}

.master-portfolio .portfolio-desc {
    font-size: 13px;
    color: #333;
    text-align: center;
    margin-top: 6px;
    line-height: 1.2;
    word-break: break-word;
}

/* Только уменьшаем размер фото на мобильных, но сохраняем количество в ряду */
@media (max-width: 768px) {
    .master-portfolio {
        gap: 6px; /* немного меньше отступов на мобильных */
    }
    
    .master-portfolio .portfolio-img {
        height: 300px; /* уменьшаем высоту на мобильных */
    }
    
    .master-portfolio .portfolio-desc {
        font-size: 11px;
        margin-top: 4px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .master-portfolio {
        gap: 4px;
    }
    
    .master-portfolio .portfolio-img {
        height: 100px; /* еще меньше на очень маленьких экранах */
    }
    
    .master-portfolio .portfolio-desc {
        font-size: 10px;
    }
}

/* Стили для выбора типа стрижки */
.haircut-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.haircut-selection h5 {
    color: #462807;
    font-family: "Poppins", "Arsenal", sans-serif;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0;
}

.haircut-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.haircut-option {
    flex: 0 0 auto;
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2b2b2b;
    border: 2px solid #623900;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
    padding: 10px;
}

.haircut-option:hover {
    background-color: #444444;
    transform: translateY(-2px);
}

/* Мобильная версия для выбора стрижки */
@media (max-width: 768px) {
    .haircut-options {
        gap: 10px;
        justify-content: flex-start;
    }
    
    .haircut-option {
        flex: 0 0 calc(50% - 10px);
        width: auto;
        height: 80px;
        font-size: 14px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .haircut-option {
        flex: 0 0 calc(50% - 5px);
        height: 70px;
        font-size: 12px;
        padding: 5px;
    }
}


/* Стили для табов в серо-белой цветовой схеме */
.tabs { 
    width: 100%; 
    padding: 0px; 
    margin: 0 auto; 
}

.tabs>input { 
    display: none; 
}

.tabs>div {
    display: none;
    padding: 12px;
    border: 1px solid #C0C0C0;
    background: #ffffff; /* белый фон содержимого */
}

.tabs>label {
    display: inline-block;
    padding: 12px 20px;
    margin: 0 -5px -1px 0;
    text-align: center;
    color: #333333;
    border: 1px solid #C0C0C0;
    background: #f1f1f1; /* светло-серый фон неактивных вкладок */
    cursor: pointer;
    font-family: "Arsenal";
    font-weight: bold;
    font-size: 16px;
}

.tabs>label:hover {
    background: #e0e0e0; /* темнее при наведении */
}

.tabs>input:checked + label {
    color: #000000;
    border: 1px solid #C0C0C0;
    border-bottom: 1px solid #ffffff;
    background: #ffffff; /* белый фон активной вкладки */
}

#tab_1:checked ~ #txt_1,
#tab_2:checked ~ #txt_2,
#tab_3:checked ~ #txt_3,
#tab_4:checked ~ #txt_4 { 
    display: block; 
}

/* Улучшаем отображение времени */
.add.form-group.row.text-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.add.form-group.row.text-center > div {
    flex: 0 0 calc(50% - 10px);
    margin-bottom: 10px;
}

.add.form-group.row.text-center input {
    text-align: center;
    font-family: "Arsenal";
}

/* Стили для форм внутри табов */
.tabs .container {
    background: #ffffff;
    padding: 15px;
    border-radius: 5px;
}

.tabs .alert-secondary {
    background-color: #f1f1f1 !important; /* светло-серый */
    color: #333333 !important; /* темно-серый текст */
    border-color: #C0C0C0 !important; /* серые границы */
    font-family: "Arsenal";
}

.tabs .form-control {
    font-family: "Arsenal";
    border: 1px solid #C0C0C0;
}

.tabs .bold {
    font-family: "Arsenal";
    font-weight: bold;
    color: #333333;
}

/* Цвет кнопки как в основном стиле */
.tabs .adm {
    font-family: "Arsenal";
    font-size: 15px;
    color: #fff;
    background: rgb(121,0,0);
    padding: .7em 1.5em;
    outline: none;
    border: none;
    cursor: pointer;
}

.tabs .adm:hover { 
    background: rgb(193,0,0); 
}

.tabs .adm:active { 
    background: rgb(121,0,0); 
}