body {
  background-color: #f5f7fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.navbar-brand {
  font-weight: 700;
  color: #007bff;
  font-size: 1.5rem;
}

.company-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.company-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.company-img {
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  transition: transform 0.3s ease;
}

.company-card:hover .company-img {
  transform: scale(1.05);
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.3rem 1.5rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: #212529;
}

.card-text {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 40px;
}

.badge {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4em 0.75em;
  border-radius: 1rem;
}

.bg-success {
  background-color: #198754 !important;
  color: white !important;
}

.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.btn-view-review {
  background: transparent;
  border: none;
  color: #0d6efd;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  transition: color 0.3s;
  padding: 0;
}

.btn-view-review i {
  transition: transform 0.3s;
  font-size: 1rem;
}

.btn-view-review:hover {
  color: #084cd6;
}

.btn-view-review:hover i {
  transform: translateX(6px);
}

/* Поиск */
.search-wrapper {
  margin: 25px auto 0;
  width: 75%;
  max-width: 650px;
  display: flex;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgb(13 110 253 / 0.2);
  border-radius: 0.5rem;
  background-color: white;
  padding: 0.3rem 0.5rem;
}

.search-wrapper input {
  flex: 1;
  border: none;
  font-size: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  outline-offset: 2px;
  outline: none;
}

.search-wrapper input::placeholder {
  color: #6c757d;
}

.search-wrapper button {
  border: none;
  background-color: #0d6efd;
  color: white;
  border-radius: 0.5rem;
  padding: 0 1rem;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-wrapper button:hover {
  background-color: #084cd6;
  box-shadow: 0 0 12px rgba(8, 76, 214, 0.8);
}

/* Модалки */
.modal-content {
  border-radius: 1rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  padding: 1.2rem 1.8rem;
  font-size: 1rem;
  background: #fff;
/*  max-width: 480px;*/
  margin: 1.5rem auto;
  box-sizing: border-box;
}

.modal-header {
  border-bottom: none;
  padding-bottom: 0.5rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.4rem;
  color: #212529;
}

.btn-close {
  filter: brightness(0.7);
  transition: filter 0.3s ease;
}

.btn-close:hover {
  filter: brightness(1);
}
.font-weight-bold{
    font-weight:bold!important;
}

#ratingStars i {
  transition: color 0.2s ease, transform 0.2s ease;
}

#ratingStars i.hovered {
  transform: scale(1.2);
}



.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 6px rgba(13, 110, 253, 0.5);
  outline: none;
}


.input-icon {
  position: absolute;
    bottom: 0;
    left: 15px;
  color: #adb5bd;
  font-size: 1.1rem;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.3s;
}

.form-control:focus + .input-icon {
  color: #0d6efd;
}

.modal-footer {
  border-top: none;
  padding-top: 0.5rem;
}

.modal-footer button {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.55rem 0;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgb(13 110 253 / 0.3);
  width: 100%;
}

.text-center a {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
  cursor: pointer;
}

.text-center a:hover {
  color: #084cd6;
  text-decoration: underline;
}

/* Адаптив */
@media (max-width: 768px) {
  .search-wrapper {
    width: 100%;
    padding: 0 1rem;
  }
  .btn-view-review {
    font-size: 0.9rem;
  }
}

/* Мобильные стили для модалок и форм */
@media (max-width: 576px) {
  .modal-content {
    padding: 1rem 1.2rem;
    margin: 1rem;
  }



  .modal-title {
    font-size: 1.2rem;
  }

  .modal-footer button {
    font-size: 1rem;
    padding: 0.45rem 0;
  }
}

/* Поиск - современный и анимированный */
.search-wrapper {
  margin: 25px auto 0;
  width: 100%;
  max-width: 650px;
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 2rem;
  padding: 0.3rem 0.6rem;
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.15);
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

.search-wrapper:focus-within {
  box-shadow: 0 8px 30px rgba(13, 110, 253, 0.4);
}

.search-wrapper input {
  flex-grow: 1;
  border: none;
  font-size: 1.1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  outline: none;
  transition: width 0.4s ease;
  width: 100%;
  color: #212529;
}

.search-wrapper input::placeholder {
  color: #6c757d;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.search-wrapper input:focus::placeholder {
  opacity: 0.5;
}

.search-wrapper button {
  background-color: #0d6efd;
  border: none;
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  box-shadow: 0 4px 12px rgb(13 110 253 / 0.3);
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  flex-shrink: 0;
}

.search-wrapper button:hover {
  background-color: #084cd6;
  box-shadow: 0 6px 16px rgba(8, 76, 214, 0.8);
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .search-wrapper {
    padding: 0.25rem 0.4rem;
    max-width: 98%;
  }

  .search-wrapper input {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .search-wrapper button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-left: 6px;
  }
}
footer {
  background-color: #ffffff;
  color: #343a40;
  padding: 1rem 1rem; /* меньше отступов */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-top: 3px solid #0d6efd;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.05);
  flex-shrink: 0;
  font-size: 0.95rem;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0 0.75rem;
}

.footer-info {
  flex: 1 1 100%;
  font-weight: 600;
  color: #0d6efd;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
  white-space: normal;
}

.footer-links {
  flex: 1 1 65%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: center;
  min-width: 0;
}

.footer-links a {
  color: #495057;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.3s ease;
  padding: 2px 4px;
  border-radius: 3px;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #0d6efd;
  outline: none;
   text-decoration: none;
  background-color: #e7f1ff; /* лёгкий подсвет */
}

.footer-social {
  flex: 1 1 30%;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.footer-social a {
  color: #6c757d;
  font-size: 1.4rem;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 50%;
}

.footer-social a:hover,
.footer-social a:focus {
  color: #0d6efd;
  background-color: #e7f1ff;
  outline: none;
}

.footer-copy {
  flex: 1 1 100%;
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  color: #adb5bd;
  margin-top: 0.8rem;
  user-select: none;
}

/* Адаптив */

@media (max-width: 768px) {
  footer .container {
    flex-direction: column;
    align-items: center;
  }
  .footer-links {
    flex: 1 1 100%;
    margin-bottom: 0.75rem;
    justify-content: center;
  }
  .footer-social {
    flex: 1 1 100%;
    margin-bottom: 0.75rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-links a {
    font-size: 0.85rem;
    padding: 1.5px 3px;
  }
  .footer-social a {
    font-size: 1.2rem;
  }
  .footer-info {
    font-size: 0.95rem;
  }
}


/* Блок компании */
.company-info {
  display: flex;
  gap: 3rem;
  background: #f9fafd;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  align-items: center;
  flex-wrap: wrap; /* для адаптивности */
}

.company-photo-wrapper {
  position: relative;
  width: 400px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  margin-bottom: 1rem; /* отступ на мобильных */
}

.company-photo-wrapper:hover {
  transform: scale(1.05);
}

.company-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.company-rating-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #198754;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  padding: 6px 14px;
  border-radius: 40px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.company-rating-badge i {
  color: #ffd93b;
  font-size: 1.7rem;
}

.company-name {
  font-size: 3rem;
  font-weight: 900;
  color: #0d6efd;
  margin-bottom: 0.3rem;
  max-width: 600px;
}

.company-description {
  font-size: 1.15rem;
  color: #444;
  line-height: 1.5;
  max-width: 600px;
}

.company-address {
  font-size: 1rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.25rem;
}

.company-address i {
  color: #0d6efd;
  font-size: 1.2rem;
}

.reviews-count {
  font-size: 1rem;
  color: #888;
  font-style: italic;
}

.btn-add-review {
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.btn-add-review i {
  font-size: 1.25rem;
}

.btn-add-review:hover {
  background-color: #0b5ed7;
}

/* Контролы */
.reviews-controls {
  font-size: 1rem;
  color: #555;
}

.reviews-sort select {
  max-width: 180px;
}

/* Отзывы */
.review-card {
  background-color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  transition: box-shadow 0.3s ease;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.review-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.user-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0d6efd;
}

.user-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0d6efd;
}

.review-date {
  font-size: 0.85rem;
  color: #888;
}

.rating-badge {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rating-badge.bg-success {
  background-color: #198754;
}

.rating-badge.bg-warning {
  background-color: #ffc107;
  color: #212529;
}

.rating-badge i {
  font-size: 1.5rem;
  color: #ffd93b;
}

.review-body p {
  margin: 0.4rem 0;
  line-height: 1.4;
  font-size: 1rem;
  color: #333;
}

.collapsed-text {
  max-height: 4.5em;
  overflow: hidden;
  transition: max-height 0.4s ease;
  position: relative;
}

.collapsed-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5em;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

.collapsed-text.expanded {
  max-height: 999px;
}

.collapsed-text.expanded::after {
  display: none;
}

.btn-read-more {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  color: #0d6efd;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-read-more:hover,
.btn-read-more:focus {
  text-decoration: underline;
  outline: none;
}

/* Пагинация */
.pagination-nav .pagination {
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination .page-link {
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 0;
  line-height: 38px;
  font-weight: 700;
  color: #0d6efd;
  background-color: transparent;
  border: 2px solid #0d6efd;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.pagination .page-link:hover:not(.disabled) {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
  cursor: default;
}

.pagination .page-item.disabled .page-link {
  color: #ccc;
  border-color: #ccc;
  pointer-events: none;
  background-color: transparent;
  cursor: default;
}

/* Адаптив для мелких экранов */
@media (max-width: 768px) {
  .company-info {
    flex-direction: column;
    padding: 1rem;
  }

  .company-photo-wrapper {
    width: 100%;
    max-width: 400px;
    margin-bottom: 1rem;
  }

  .company-name {
    font-size: 2.2rem;
    text-align: center;
  }

  .company-description {
    max-width: 100%;
    text-align: center;
  }
  
  .review-card {
    padding: 0.8rem;
  }

  .pagination-nav {
    gap: 0.3rem;
  }

  .pagination .page-link {
    width: 36px;
    height: 36px;
    line-height: 34px;
    font-size: 0.9rem;
  }
}
.company-photo-wrapper {
    
  position: relative; /* добавляем контекст позиционирования для абсолютного блока */
}
a{
    text-decoration:none;
}

label.form-label {
  white-space: nowrap; /* запретить перенос в лейбле */
}

.company-rating-wrapper {
  position: absolute;
  bottom: 5px; /* отступ снизу фото */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #198754;
  user-select: none;
  max-width: 170px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.company-rating-wrapper .stars {
  font-size: 1.5rem;
  color: #ffd93b;
  display: flex;
  gap: 4px;
}

.rating-value {
  font-size: 1.2rem;
  color: #198754;
}

.rating-bar {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background-color: #198754;
  width: 0;
  border-radius: 12px;
  transition: width 0.5s ease;
}


.invalid-feedback {
    display:block!important;
    text-align: center;
    font-size: 12px;
}