/* Modern CSS styles for Aid-PHP Application with aid.in.net color scheme */
:root {
  --primary-color: #6b282b; /* Бордовый/темно-красный с aid.in.net */
  --primary-dark: #5a1f22; /* Темнее основного бордового */
  --secondary-color: #fbebdd; /* Бежевый с aid.in.net */
  --success-color: #1cc88a; /* Оставляем зеленый для успешных действий */
  --warning-color: #f6c23e; /* Оставляем желтый для предупреждений */
  --danger-color: #e74a3b; /* Оставляем красный для ошибок */
  --dark-color: #140e13; /* Темный цвет с aid.in.net */
  --light-color: #f4ece8; /* Светлый цвет с aid.in.net */
  --text-color: #140e13; /* Темный цвет текста */
  --text-muted: #aaadb0; /* Серый цвет с aid.in.net */
  --border-color: #c06522;
  --cases-color: #35539b;
  --border-radius: 1.85rem;
  --bs-border-radius: 1.85rem;
  --box-shadow: 0 0.15rem 1.75rem 0 rgba(107, 40, 43, 0.15);
  --transition: all 0.2s ease-in-out;
}

html,
body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header {
  background: url("https://aid-php.onrender.com/bg.png");
  background-size: cover;
  background-position: 100% 80%;
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0 40rem;
  text-align: center;
  color: #fff;
  border: none;
}

header.no_wave {
  padding: 0;
  background: #fff;
  color: #000;
}

header a {
  color: #fff;
}

header.no_wave a {
  color: #000;
}

header.no_wave::before {
  padding: 0;
  background: none;
}

header::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

header .container {
  position: relative;
  z-index: 1000;
}

header .row {
  padding: 16px 80px;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  padding: 0 3rem;
  margin-top: 8rem;
  margin-bottom: 0;
  text-align: center;
  color: var(--secondary-color);
}

header img {
  height: 60px;
  border-radius: 10px;
}

header.no_wave svg {
  display: none;
}

header svg {
  position: absolute;
  z-index: 10;
  bottom: -1px;
  left: 0;
  width: 101%;
}

header svg path {
  fill: var(--light-color);
}

/* ======= CSS-only Burger menu styles ======= */
.burger-btn,
.burger-toggle,
.mobile-nav {
  display: none;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

.container {
  padding: 0;
  max-width: 100%;
}

.catalog {
  margin-top: 8rem;
}

/* Responsive container */
@media (max-width: 991.98px) {
  .container {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Стили для заблокированных полей
input:disabled,
select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
} */

.sticky-search {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 0;
  margin-top: -35rem;
  background: transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.sticky-search.scrolled form {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sticky-search.scrolled form > div {
  margin-inline: auto;
  max-width: 900px;
}

.sticky-search .input-group {
  height: 80px;
}

.sticky-search input.form-control {
  position: relative;
  height: 100%;
  padding: 1.5rem 2rem;
  border: 1px solid;
  flex: 16;
  outline: none;
  box-shadow: none;
  border-radius: var(--border-radius);
}

.sticky-search .search {
  padding: 0 5rem;
}

.sticky-search .dropdown-menu {
  top: 100px;
  padding: 2rem;
}

.sticky-search .dropdown-menu.slide-in {
  animation: popup-slide-in 0.3s;
}

.sticky-search .dropdown-item:hover {
  cursor: pointer;
}

@keyframes popup-slide-in {
  from {
    transform: translateY(10%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cityDropdown {
  width: 400px;
  max-height: 500px;
  border-right: none;
}

#cityDropdown input[name="distance"] {
  text-align: center;
  flex: 1;
  margin: 0 0.5rem;
  min-width: 80px;
  max-width: 80px;
  padding: 0;
  height: 3rem;
}

.filter-form {
  border-radius: 0;
  padding: 1.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-form.is-sticky {
}

.filter-form .row {
  max-width: 900px;
  margin: auto;
}

.filter-form .input-group-text {
  border: 1px solid;
  border-left: none;
}

.filter-form .btn-primary {
  height: 100%;
}

.filter-form .input-group-text:hover {
  cursor: pointer;
}

@media (min-width: 992px) {
  /* .filter-form .form-control {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .filter-form .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .filter-form .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .filter-form .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    } */
}

#officePhotosCarousel {
  max-width: 50%;
  background-color: var(--light-color);
}

.carousel-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-control-prev,
.carousel-control-next {
  background-color: rgba(0, 0, 0, 0.3);
  width: 10%;
  margin: auto 0;
  padding-top: 50%;
  aspect-ratio: 1;
  padding: 0.5rem;
  opacity: 0.8;
}

@media (min-width: 1200px) {
  #officePhotosCarousel {
    max-width: 40%;
  }

  .carousel-image-container {
    padding-top: 45%;
  }
}

@media (max-width: 1200px) {
  #officePhotosCarousel {
    max-width: 50%;
  }

  .carousel-image-container {
    padding-top: 45%;
  }
}

@media (max-width: 768px) {
  #officePhotosCarousel {
    max-width: 100%;
  }

  .carousel-image-container {
    padding-top: 60%;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 15%;
  }
}

/* Banner Styles */
.app-banner {
  z-index: 15;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  margin-top: 5rem;
  margin-bottom: 5rem;
  padding: 100px 0;
  text-align: center;
  position: relative;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
}

.app-banner.second {
  background-image: none;
  background: linear-gradient(180deg, rgb(2 4 8), rgb(48 78 147));
}

.app-banner.second::before {
  content: none;
}

.app-banner.second .btn {
  background-color: var(--cases-color);
  border-color: var(--light-color);
}

.app-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(219, 219, 219, 0.4);
  pointer-events: none;
}

.spinnerContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: unset;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

/* .app-banner > div {
  display: flex;
  background: white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
} */

.app-banner img {
  max-width: 100%;
  height: 200px;
  display: block;
  position: relative;
  z-index: 1;
}

.geo-adv-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 2rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
  text-align: center;
  position: relative;
}

.second .geo-adv-title {
  color: white;
  margin: 0 1rem 0 3rem;
}

.geo-adv-title span {
  /* background: white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem; */
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-control,
.form-select {
  border-radius: var(--border-radius);
  border: 1px solid #d1d3e2;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(107, 40, 43, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.85rem;
}

.userName {
  width: fit-content;
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* .town-select {
  border-radius: var(--border-radius) 0 0 var(--border-radius);
} */

/* .distance .form-control {
  padding: 0.5rem;
  font-size: 1.1rem;
} */

/* .town-group .distance {
  position: relative;
}

.town-group .distance input[type=number] {
  padding-left: 1.75rem;
}

.town-group .distance::before {
  content: "+";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  pointer-events: none;
}

.town-group input[type=number]::-webkit-inner-spin-button,
.town-group input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
} */

/* Button Styles */
.btn {
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

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

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  background-color: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 2rem 0 rgba(107, 40, 43, 0.2);
}

/* Specialist Card */
.specialist-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
}

.specialist-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  margin-bottom: 1rem;
}

.specialist-card:hover .specialist-avatar {
  transform: scale(1.05);
}

.specialist-info {
  flex-grow: 1;
}

.boosted {
  text-align: center;
}

.specialist-name {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.specialist-detail {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.specialist-detail strong {
  color: var(--dark-color);
  font-weight: 600;
}

.specialist-services {
  background-color: rgba(107, 40, 43, 0.05);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Стилі для секції відгуків */
.reviews-section {
  font-family: "Nunito", sans-serif;
  margin-bottom: 5px;
  margin-top: 5px;
  background-color: #fff;
}

.section-title {
  font-weight: 700;
  color: #333;
}

.section-description {
  color: #666;
  margin-bottom: 0;
}

/* Стилі для карток відгуків */
.review-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  background-color: #fff;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */
  transition: transform 0.2s;
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.avatar-circle {
  width: 40px;
  height: 40px;
  background-color: #6b282b;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.avatar-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #eee;
}

.reviewer-name {
  font-weight: 600;
  color: #333;
}

.star {
  font-size: 20px;
  color: #ddd;
}

.star.filled {
  color: #f1c40f;
}

.review-text {
  color: #444;
  line-height: 1.6;
}

.review-actions button {
  border-radius: 20px;
  font-size: 14px;
}

.auth-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.left-arrow {
  font-size: 1.2rem;
}

.auth-back-btn {
  position: absolute;
  top: 0;
  left: 10px;
  padding: 0.5rem;
  background: none;
  border: none;
}

.auth-modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 40%;
  min-width: 300px;
  max-width: 500px;
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
}

.digit {
  font-weight: bold;
  font-size: 2rem;
  border-radius: 3px;
  border: 1px solid #d1d3e2;
  padding: 0.5rem;
  text-align: center;
  width: 25%;
}

.digit::-webkit-outer-spin-button,
.digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.digit[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 10px;
  top: 0;
}

.btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.open-auth-modal {
  display: block;
}

.phone-country-code {
  color: var(--primary-color);
  width: fit-content;
  padding: 0.5rem;
  border: 1px solid #d1d3e2;
  border-radius: var(--border-radius);
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
}

.question-description {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 1;
}

.answers-list {
  display: flex;
  flex-direction: column;
}

.page-container {
  display: flex;
  flex-direction: column;
  max-width: 700px;
  margin: 0 auto;
}

.ask-form {
  display: flex;
  flex-direction: column;
  max-width: 700px;
}

/* Стилі для форми відгуку */
/*.review-form-container {
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
} */

.rating-stars {
  display: flex;
  gap: 5px;
  flex-direction: row-reverse;
}

.rating-stars input {
  display: none;
}

.rating-stars label {
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

.rating-stars input:checked ~ label,
.rating-stars label:hover ~ label,
.rating-stars label:hover {
  color: #f1c40f;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  transform: translateY(-2px);
}

.review-actions button.active.text-success {
  color: #28a745 !important;
  border-color: #28a745;
}

.review-actions button.active.text-danger {
  color: #dc3545 !important;
  border-color: #dc3545;
}

.scroll-to-top-btn {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none;
  cursor: pointer;
  color: var(--primary-color);
  background-color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.grecaptcha-badge {
  bottom: 180px !important;
}

footer {
  background-color: var(--dark-color);
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 -0.15rem 1.75rem 0 rgba(107, 40, 43, 0.15);
  color: white;
}

footer p {
  color: var(--light-color);
  margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .specialist-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .specialist-avatar {
    margin-bottom: 1rem;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--primary-color);
  margin: 0.7rem auto;
  font-size: 1rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s,
    box-shadow 0.2s;
}

.location-btn:hover,
.location-btn:focus {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 16px rgba(107, 40, 43, 0.18);
}

.location-btn .location-icon {
  font-size: 1.25em;
  margin-right: 0.4em;
}

.location-icon {
  font-size: 1.25rem;
}

@media (max-width: 1024px) {
  .app-banner {
    height: 300px;
    margin-top: 10rem;
    margin-bottom: 10rem;
  }

  .geo-adv-title {
    font-size: 1.2rem;
  }

  .sticky-search .search {
    padding: 0 5rem;
  }
}

@media (max-width: 768px) {
  header a,
  header.no_wave a {
    color: #fff;
  }
  .filter-form.is-sticky
    .col-12.col-md-4:not(:first-child):not(.search-btn-col) {
    display: none;
  }

  .filter-form.is-sticky .col-12.col-md-4:first-child {
    width: calc(100% - 50px);
    display: inline-block;
  }

  .filter-form.is-sticky .search-btn-col {
    display: inline-block;
    width: 45px;
    vertical-align: top;
  }

  .filter-form.is-sticky .search-btn-col .btn {
    height: 3rem;
    padding: 0.25rem;
    margin-left: 5px;
  }

  .filter-form.is-sticky .search-text {
    display: none;
  }

  .filter-form.is-sticky {
    padding: 0.25rem !important;
  }

  .filter-form.is-sticky .input-group,
  .filter-form.is-sticky .form-control,
  .filter-form.is-sticky .input-group-text {
    height: 3rem;
    font-size: 0.8rem;
    line-height: 1;
  }

  .filter-form.is-sticky .input-group-text {
    padding: 0.25rem 0.5rem;
  }

  .filter-form.is-sticky .form-control {
    padding: 0.25rem 0.5rem;
  }

  /* Move up cityDropdown when form is sticky */
  .filter-form.is-sticky + #cityDropdown {
    top: 3.5rem;
  }

  header h1 {
    font-size: 2rem;
  }
  header .row {
    padding: 16px 32px;
  }
  .main-nav {
    display: none !important;
  }
  .burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(107, 40, 43, 0.85);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1051;
    position: relative;
    transition: background 0.2s;
    gap: 5px;
  }
  .burger-line {
    width: 28px;
    height: 3px;
    background: #fff;
    display: block;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }
  .burger-toggle:checked + .burger-btn .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .burger-toggle:checked + .burger-btn .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.7);
  }
  .burger-toggle:checked + .burger-btn .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .burger-toggle:checked ~ .mobile-nav {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: rgba(107, 40, 43, 0.97);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    z-index: 1050;
  }
  .mobile-nav a {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 0;
  }
  .mobile-nav a:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .sticky-search .search {
    padding: 0 2rem;
  }
}

@media (max-width: 576px) {
  main {
  }
  .app-banner {
    width: 97%;
    margin: auto;
  }

  main > .container {
    margin-top: 6rem;
  }

  main > .catalog {
    margin-top: 15rem;
  }

  .scrolled ~ .catalog {
    margin-top: 10rem;
  }

  .section_home_feature {
    margin-top: 5rem;
  }
}

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

.input-group-text {
  background-color: var(--light-color);
  border: none;
}

.btn-primary {
  /* background-color: #ff6b01; */
  border: none;
}
