:root {
  --primary-color: #066565;
  --secondary-color: #088282;
  --background-color: #f5f5f5;
  --text-color: #333;
  --white: #ffffff;
  --gray: #ddd;
  --error-color: #721c24;
  --success-color: #155724;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --active-gradient: linear-gradient(135deg, #6a1b9a, #ab47bc);
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
  overflow-x: hidden;
  box-sizing: border-box;
  background-image: url('https://www.treskunov.su/images/f_bumblebee.jpg');
  background-attachment: fixed;
}

*, *:before, *:after {
  box-sizing: inherit;
}

.nav_header {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color), #044444);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  height: 56px;
  display: flex;
  align-items: center;
  transition: background 0.5s ease;
}

.nav {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav_brand img {
  width: 40px;
  height: auto;
  transition: transform 0.3s ease;
  margin: 7px 28px 0 21px;
}

.nav_brand img:hover {
  transform: scale(1.1);
}

.nav_body {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.nav_item {
  padding: 14px 16px;
  color: var(--white);
  font-size: 16px;
  border-radius: 8px;
  transition: var(--transition), transform 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.nav_item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.nav_open {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.nav_item::after {
  display: none;
}

.nav_active .nav_item {
  background: var(--active-gradient);
  color: var(--white);
}

.nav_parent {
  position: relative;
}

.nav_sub {
  position: fixed;
  top: 66px;
  left: 10px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
  padding: 20px;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 15px;
  max-width: 1440px;
  min-width: 900px;
  border: 1px solid var(--gray);
}

.nav_sub::before {
  content: '';
  position: absolute;
  top: -10px;
  left: var(--arrow-left, 100px);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--white);
  z-index: 1;
}

.nav_sub::after {
  content: '';
  position: absolute;
  top: -11px;
  left: calc(var(--arrow-left, 100px) - 1px);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 11px solid var(--gray);
  z-index: 0;
}

.nav_open + .nav_sub {
  display: grid;
  animation: slideDown 0.3s ease;
}

.disease-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: var(--transition), box-shadow 0.3s ease;
  color: var(--text-color);
  background: var(--white);
  border: 1px solid var(--gray);
  text-decoration: none;
}

.disease-item:hover {
  background: #f0f4f4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.disease-item::before {
  content: '';
  width: 50px;
  height: 50px;
  background-image: var(--icon);
  background-size: cover;
  margin-right: 12px;
  transition: transform 0.3s ease;
}

.disease-item:hover::before {
  transform: scale(1.05);
}

.disease-item span {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.nav_search {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-icon {
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  padding: 10px;
  transition: color 0.3s ease;
  order: 1;
}

.search-icon:hover {
  color: #e0f7f7;
}

.appointment-btn {
  padding: 10px 16px;
  background: var(--secondary-color);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition), transform 0.2s ease;
  order: 3;
}

.appointment-btn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.search-input {
  width: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
  transition: width 0.4s ease, padding 0.4s ease, box-shadow 0.3s ease;
  order: 2;
}

.nav_search.active .search-input {
  width: 240px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav_search_results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  padding: 10px;
}

.nav_search_results.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.search-result {
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
}

.search-result:hover {
  background: #e8f0f0;
  color: var(--primary-color);
}

.nav_toggle {
  display: none;
  width: 30px;
  height: 20px;
  cursor: pointer;
  position: relative;
  margin-left: auto;
  z-index: 1001;
}

.nav_toggle span {
  display: block;
  height: 3px;
  background: var(--white);
  position: absolute;
  width: 100%;
  transition: var(--transition);
}

.nav_toggle span:nth-child(1) { top: 0; }
.nav_toggle span:nth-child(2) { top: 8px; }
.nav_toggle span:nth-child(3) { bottom: 0; }

.menu-open .nav_toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-open .nav_toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav_toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav_parent.reception .nav_sub {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    min-width: 300px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: #666;
  cursor: pointer;
}

.close:hover {
  color: var(--primary-color);
}

.appointment-form h2 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.input-group {
  margin-bottom: 20px;
}

.form_name {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: block;
}

.input_min, select, textarea {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  font-size: 14px;
  background: #f9f9f9;
  transition: var(--transition);
}

.input_min:focus, select:focus, textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(8, 130, 130, 0.1);
}

.input-icon, .input-icon-ta {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
}

.input-icon-ta {
  top: 40px;
}

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-group label {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.radio-group input {
  accent-color: var(--secondary-color);
}

.button_d {
  width: 100%;
  padding: 12px;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.button_d:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.alertmail {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
}

.alertmail.success {
  background: #d4edda;
  color: var(--success-color);
}

.alertmail.error {
  background: #f8d7da;
  color: var(--error-color);
}

@media (max-width: 1200px) and (min-width: 801px) {
  .nav_sub {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 800px) {
  .nav_header {
    height: 56px;
    background: var(--primary-color);
  }
  .nav_parent {
    line-height: 50px;
  }

  .nav {
    padding: 0 20px;
  }

  .nav_toggle {
    display: block;
    z-index: 1001;
  }

  .nav_body {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
  }

  .menu-open .nav_body {
    transform: translateX(0);
  }

  .menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
    pointer-events: auto;
  }

  .nav_item {
    width: 100%;
    max-width: calc(100% - 40px);
    padding: 15px;
    color: var(--text-color);
    border-radius: 8px;
    font-size: 18px;
    margin-bottom: 25px;
    text-align: left;
    text-decoration: none;
  }

  .nav_item:hover {
    background: none;
    transform: none;
  }

  .nav_sub {
    position: static;
    display: none;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: none;
    flex-direction: column;
    gap: 10px;
    grid-template-columns: none;
    margin: 0 20px;
    min-width: 200px;
  }

  .nav_sub::before,
  .nav_sub::after {
    display: none;
  }

  .nav_open + .nav_sub {
    display: flex;
  }

  .disease-item {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--gray);
    border-radius: 8px;
    margin-bottom: 8px;
     max-width: calc(100% - 60px);
    text-decoration: none;
  }

  .disease-item::before {
    width: 40px;
    height: 40px;
    margin-right: 15px;
  }

  .disease-item span {
    text-align: left;
    flex: 1;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 55px);
  }

  .nav_search {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .menu-open .nav_search {
    display: flex;
  }

  .search-icon {
    display: none;
  }

  .appointment-btn {
    width: 100%;
    max-width: calc(100% - 40px);
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }

  .appointment-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
  }

  .search-input {
    width: 100%;
    max-width: calc(100% - 40px);
    padding: 12px;
    position: static;
    transform: none;
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid var(--gray);
  }

  .nav_search.active .search-input {
    width: 100%;
    max-width: calc(100% - 40px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .nav_search_results {
    width: 100%;
    max-width: calc(100% - 40px);
    border-radius: 8px;
    margin-top: 10px;
  }

  .modal {
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    padding: 20px;
  }
  .nav_search {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .search-icon {
    display: none;
    order: 1;
  }

  .appointment-btn {
    order: 2;
    width: 100%;
    max-width: calc(100% - 40px);
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }

  .search-input {
    order: 3;
    width: 100%;
    max-width: calc(100% - 40px);
    padding: 12px;
    position: static;
    transform: none;
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid var(--gray);
  }

  .nav_search_results {
    order: 4;
    width: 100%;
    max-width: calc(100% - 40px);
    border-radius: 8px;
    margin-top: 10px;
  }
}

.footer {
  background: linear-gradient(135deg, #044444, var(--primary-color));
  color: var(--white);
  padding: 60px 20px 0;
  font-family: 'Inter', sans-serif;
}

.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__logo img {
  width: 52px;
  height: auto;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.footer__logo img:hover {
  transform: scale(1.08);
}

.footer__desc {
  font-size: 14px;
  opacity: 0.9;
  max-width: 320px;
  line-height: 1.5;
}

.footer__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

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

.footer__list li {
  margin-bottom: 14px;
}

.footer__list a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer__list a:hover {
  color: #fff;
}

.footer__contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.footer__contact-line i {
  font-size: 20px;
  color: var(--secondary-color);
}

.footer__contact-name {
  display: block;
  font-size: 13px;
  opacity: 0.85;
  margin-left: 30px;
  margin-top: 2px;
}

.footer__geo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.footer__geo i {
  color: var(--secondary-color);
  font-size: 20px;
}

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

.footer__social-list a {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.3s, transform 0.3s ease;
}

.footer__social-list a:hover {
  color: #fff;
  transform: translateY(-3px);
}

.footer__bottom {
  text-align: center;
  padding: 18px 0;
  font-size: 14px;
  opacity: 0.75;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .footer {
    padding: 40px 20px 0;
  }

  .footer__desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 35px;
  }

  .footer__contact-line {
    justify-content: center;
  }

  .footer__contact-name {
    margin-left: 0;
  }

  .footer__geo {
    justify-content: center;
  }

  .footer__social-list {
    justify-content: center;
  }
}

.fito-chat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

.fito-btn {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(6, 101, 101, 0.35);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fito-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(6, 101, 101, 0.45);
}

.fito-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e63946;
  color: white;
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.fito-modal {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 340px;
  height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #ddd;
}

.fito-modal.active {
  display: flex;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fito-header {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.fito-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

.fito-info {
  flex: 1;
}

.fito-name {
  font-weight: 600;
  font-size: 15px;
}

.fito-status {
  font-size: 12px;
  opacity: 0.9;
}

.fito-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 6px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fito-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.fito-close:hover {
  background: rgba(255,255,255,0.2);
}

.fito-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fito-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fito-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.fito-message.bot {
  background: #f0f4f4;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.fito-message.user {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.fito-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  display: block;
}

.fito-input-area {
  display: flex;
  padding: 12px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  gap: 8px;
}

.fito-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease;
}

.fito-input:focus {
  border-color: var(--secondary-color);
}

.fito-send {
  width: 40px;
  height: 40px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fito-send:hover {
  background: var(--primary-color);
  transform: scale(1.05);
}

@media (max-width: 800px) {
  .fito-chat {
    bottom: 16px;
    right: 16px;
  }

  .fito-btn {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .fito-modal {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    border-radius: 0;
    animation: none;
  }

  .fito-modal.active {
    display: flex;
  }
}

.content-layout {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1440px;
  margin: 100px auto 60px;
  padding: 0 20px;
}

.main-home {
  flex: 0 0 75%;
}

.main-content {
  flex: 0 0 75%;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.sidebar_inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.important-block-side {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.important-block-side h2 {
  margin-top: 0;
  color: #1565c0;
  border-bottom: 2px solid #64b5f6;
  padding-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #bbdefb 0%, transparent 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: #1565c0;
}
.important-block-side h2:hover {
  color: #0d47a1;
  border-bottom-color: #2196f3;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.tags_nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.post_tag.button.button_translucent {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #e8f6ff 0%, #f2faff 100%);
  color: #0366d6;
  border-radius: 20px;
  padding: 6px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-transform: uppercase;
  transition:
    background 0.5s ease,
    color 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.25s ease;
}

.post_tag.button.button_translucent:hover {
  background: linear-gradient(135deg, #64b5f6 0%, #1565c0 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px) scale(1.03);
}

.post_tag.button.button_translucent:active {
  animation: button-bounce 0.25s ease;
}

@keyframes button-bounce {
  0% { transform: translateY(-3px) scale(1.03); }
  50% { transform: translateY(1px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}


.button_tally {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 8px;
  color: inherit;
  transition: background 0.3s ease, color 0.3s ease;
}

@media (max-width: 900px) {
  .content-layout {
    flex-direction: column;
  }

  .main-content, .sidebar {
    flex: 1 1 100%;
  }
}

.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); justify-content:center; align-items:center; z-index:1000; }
.modal.active { display:flex; }
.modal-content { background:#fff; border-radius:12px; max-width:500px; width:90%; padding:20px 25px; box-shadow:0 10px 25px rgba(0,0,0,0.2); animation:fadeIn 0.3s ease; }
.modal-header { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #eee; margin-bottom:15px; padding-bottom:10px; }
.modal-header h2 { margin:0; font-size:1.5rem; color:#333; }
.modal-close { background:none; border:none; font-size:1.5rem; cursor:pointer; }

.input-group { margin-bottom:15px; position:relative; }
.input-group label { display:block; font-weight:600; margin-bottom:5px; color:#444; }
.input-group input, .input-group select, .input-group textarea { width:100%; padding:10px 12px; border:1px solid #ccc; border-radius:8px; font-size:1rem; transition:0.2s; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { outline:none; border-color:#6C63FF; box-shadow:0 0 5px rgba(108,99,255,0.5); }
.input-group .error-message { color:#e74c3c; font-size:0.875rem; margin-top:3px; display:none; }
.input-group .hint { font-size:0.8rem; color:#888; margin-top:3px; }

.input-group.radio-group { display:flex; gap:20px; align-items:center; }
.button_d { background:#6C63FF; color:#fff; padding:12px; border:none; border-radius:10px; cursor:pointer; font-size:1rem; width:100%; transition:0.2s; }
.button_d:hover { background:#5751d9; }

.date-panel, .time-panel { display:flex; flex-wrap:wrap; gap:10px; margin-top:5px; }
.date-panel button, .time-panel button { padding:8px 12px; border-radius:8px; border:1px solid #ccc; background:#f9f9f9; cursor:pointer; transition:0.2s; }
.date-panel button.active, .time-panel button.active { background:#6C63FF; color:#fff; border-color:#6C63FF; }
.date-panel button:hover, .time-panel button:hover { background:#e0e0ff; }

.alertmail { margin-bottom:10px; font-weight:600; display:block; }
.alertmail.error { color:#e74c3c; }
.alertmail.success { color:#2ecc71; }

@keyframes fadeIn { from {opacity:0; transform:translateY(-10px);} to {opacity:1; transform:translateY(0);} }

@media(max-width:600px){
  .modal-content { padding:15px 20px; }
}

.ticket-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #bbdefb;
  font-size: 15px;
  color: #1e3a8a;
}

.ticket-field:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.ticket-field label {
  font-weight: 600;
  color: #1565c0;
  min-width: 90px;
}

.ticket-field span {
  font-weight: 500;
  color: #1e40af;
  text-align: right;
  flex: 1;
  padding-left: 12px;
  font-style: italic;
}

.cancel-button,
.move-button {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.cancel-button {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.cancel-button:hover {
  background: #ffcdd2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(198,40,40,0.15);
}

.move-button {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
  border: 1px solid #90caf9;
}

.move-button:hover {
  background: linear-gradient(135deg, #bbdefb, #90caf9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21,118,220,0.2);
}

#move_appointment {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #90caf9;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(21,118,220,0.1);
}

#move_appointment.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.move-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.move-date-panel,
.move-time-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.move-date-panel button,
.move-time-panel button {
  padding: 10px 8px;
  font-size: 13px;
  background: var(--white);
  border: 1px solid #bbdefb;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  color: #1565c0;
}

.move-date-panel button:hover,
.move-time-panel button:hover {
  background: #e3f2fd;
  border-color: #64b5f6;
  transform: translateY(-1px);
}

.move-date-panel button.active,
.move-time-panel button.active {
  background: #1565c0;
  color: white;
  border-color: #1565c0;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(21,101,195,0.3);
}

.move-message {
  font-style: italic;
  color: #1565c0;
  text-align: center;
  margin: 4px 0 8px;
  font-weight: 500;
}

.move-phone-error {
  color: var(--error-color);
  font-size: 13px;
  text-align: center;
  margin: 4px 0;
  font-weight: 500;
}

.confirm-move-button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: linear-gradient(135deg, #64b5f6, #2196f3);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(33,150,243,0.2);
}

.confirm-move-button:hover {
  background: linear-gradient(135deg, #42a5f5, #1976d2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(25,118,210,0.3);
}

.confirm-move-button:disabled {
  background: #bbdefb;
  color: #90a4ae;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#appointment-isset > div[style*="background"] {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9) !important;
  color: #2e7d32 !important;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 12px !important;
  box-shadow: 0 2px 8px rgba(46,125,50,0.1);
  animation: fadeIn 0.4s ease;
}

.excerpt.modern {
    display: flex;
    gap: 1.5em;
    background: #fdfdfd;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-bottom: 2em;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.excerpt.modern.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.excerpt_thumbnail {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.excerpt_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.excerpt_header {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.excerpt_header h3.post_link {
    font-size: 1.7em;
    margin-bottom: 0.3em;
    color: #2a2a2a;
    line-height: 1.2em;
}

.excerpt_header h3.post_link a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.excerpt_header h3.post_link a:hover {
    color: #3a7bd5;
}

.post_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 1em;
}

.post_meta .post_tag {
    background: #e0f0ff;
    color: #064273;
    font-size: 0.75em;
    padding: 0.35em 0.7em;
    border-radius: 20px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post_meta .post_tag:hover {
    background: #c0e0ff;
}

.post_date {
    font-size: 1.4em;
}
.post_time {
    font-size: 1.4em;
}

.excerpt_header p {
    font-size: 1em;
    line-height: 1.6em;
    color: #333;
    margin-bottom: 1.2em;
}

.modal2 {
    display: flex;
    justify-content:center;
    align-items:center;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0);
    opacity: 0;
    visibility: hidden;
    z-index:1000;
    transition: opacity 0.3s ease, background 0.3s ease;
}
.modal2.show {
    opacity: 1;
    visibility: visible;
    background: rgba(0,0,0,0.5);
}
.modal2-content {
    background:#fff;
    border-radius:10px;
    padding:20px;
    max-width:600px;
    width:90%;
    max-height:80%;
    overflow-y:auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal2.show .modal2-content {
    transform: translateY(0);
}
.modal2-header { display:flex; justify-content:space-between; align-items:center; }
.modal2-close { background:none; border:none; font-size:1.5em; cursor:pointer; }
.tags_nav { display:flex; flex-wrap:wrap; gap:0.5em; margin-top:1em; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
      html, body {
      margin: 0;
      padding: 0;
      scroll-behavior: smooth;
      font-family: 'Inter', sans-serif;
      font-size: 16px;
      line-height: 1.6;
      color: var(--text-color);
      background: var(--background-color);
      overflow-x: hidden;
      box-sizing: border-box;
    }
    .excerpt.modern {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .excerpt_thumbnail {
        width: 100%;
        height: auto;
    }

    .excerpt_thumbnail img {
        width: 80%;
        height: auto;
        margin-bottom: 1em;
    }

    .excerpt_header h3.post_link {
        font-size: 1.5em;
    }

    .post_meta {
        justify-content: center;
    }

    .excerpt_header p {
        font-size: 0.95em;
    }

    .excerpt_header .excerpt_more.button {
        margin-top: 0.8em;
    }

    .excerpt_thumbnail {
      flex-shrink: 0;
      display: none;
      justify-content: center;
      align-items: center;
    }
    .doctor-card {
      display: block;
      text-align: center;
    }
}

.important-block {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  font-family: sans-serif;
  color: #222;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ib-f {
  margin: 0 0 20px 0;
}

.ib-sc {
  margin: 20px 0;
}

.specialists-block {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  font-family: sans-serif;
  color: #222;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin: 20px 0;
}

.doctor-info {
  padding: 0 20px 20px;
  text-align: left;
}

.phytotherapy-section {
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}
.phytotherapy-note {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}
.phytotherapy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}
.phytotherapy-warning {
  color: #a33;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255, 230, 230, 0.6);
  border: 1px solid #f3cccc;
  border-radius: 8px;
  padding: 12px 18px;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
}

.news-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid #cce5e5;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin: 5px auto;
}
.news-date {
  font-size: 14px;
  color: #999;
}
.news-author {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}
.news-title-text {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-top: 10px;
}
.news-ref {
  text-decoration: none;
  color: inherit;
}

.doctor-card {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5f2f2;
}

.doctor-card img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    border: 2px solid #088080;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.title {
  text-align: center;
  font-size: 20pt;
}

@media (max-width: 768px) {
    .content-layout {
      padding: 0;
      margin: 60px auto 60px;
    }
    .important-block {
      background: none;
      padding: 0;
      border-radius: 12px;
      font-family: sans-serif;
      color: none;
      margin: 0 auto;
      box-shadow: none;
    }
    .specialists-block {
      background: none;
      padding: 0;
      border-radius: 12px;
      font-family: sans-serif;
      box-shadow: none;
      margin: 20px 0;
    }
    .important-card {
        display: block;
        margin: 0;
        padding: 20px;
        background: #fff;
        border-bottom: 1px solid #e4e4e4;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);

    }
    .important-card + .important-card {
        margin-top: 10px;
    }
    .doctor-card {
        display: block;
        margin: 0;
        padding: 20px;
        background: #fff;
        border-bottom: 1px solid #e4e4e4;
    }

    .doctor-card + .doctor-card {
        margin-top: 10px;
    }

    .doctor-card img {
        float: left;
        width: 50%;
        max-width: 180px;
        height: auto;
        margin: 0 10px 6px 0;
        border-radius: 8px;
        border: 2px solid #088080;
    }

    .doctor-info {
        padding: 0;
        text-align: left;
    }

    .doctor-card::after {
        content: "";
        display: block;
        clear: both;
    }
    .title {
      text-align: center;
      font-size: 16pt;
    }
    .news-item {
      border: none;
      text-decoration: none;
      color: #333;
      box-shadow: none;
      transition: all 0.3s ease;
      margin: 5px auto;
    }
}

.chem-formula {
    font-family: 'STIX Two Text', 'Cambria', 'Times New Roman', serif;
    font-size: 1.2em;
    line-height: 1.6;
    margin: 10px 0;
    display: block;
    text-align: center;
    background-color: #f9f9f9;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chem-formula:hover {
    transform: scale(1.03);
    background-color: #f0f8ff;
}

.chem-formula sub {
    font-size: 0.7em;
    vertical-align: sub;
}

.chem-formula sup {
    font-size: 0.7em;
    vertical-align: super;
}

.chem-formula .reaction-arrow {
    margin: 0 0.5em;
    font-weight: bold;
    font-size: 1.2em;
}

.chem-formula .energy {
    color: #d14;
    font-style: italic;
    margin-left: 0.5em;
}

@media (max-width: 768px) {
    .chem-formula {
        font-size: 1em;
        padding: 6px 8px;
    }
    .chem-formula .reaction-arrow {
        font-size: 1em;
    }
    .chem-formula .energy {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .chem-formula {
        font-size: 0.9em;
        padding: 4px 6px;
    }
}