:root {
    --accent: #1fc602; /* Определяем переменную для акцентного цвета */
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background: #f4f6f8;
    color: #333;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}
.select-hide {
  display: none;
}

.select-show {
  display: block;
  z-index: 9999;
}
/* Стили для таблицы цен */
.prices-section {
    margin-top: 120px; /* Учитываем фиксированную шапку */
    padding: 40px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
    margin-bottom: 30px;
}

.section-title {
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    margin-top: 148px;
}
.page-title{
    margin-top: 100px;
}
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: nowrap;
}

/* Поиск */
.search-big {
    flex: 1;
    margin: 0;
}
.search-big input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 25px;
    border: 2px solid #ddd;
    font-size: 14px;
    height: 46px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.search-big:hover input {
    border-color: var(--accent);
    background-color: rgba(31,198,2,0.05);
}
.search-big input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31,198,2,0.1);
    background-color: rgba(31,198,2,0.05);
}

/* Фильтры */
.custom-select {
  position: relative;
  font-family: inherit;
  flex: 0 0 220px;
  height: 46px;
  cursor: pointer;
}

.select-selected {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 25px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  user-select: none;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-selected:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  border: 6px solid transparent;
  border-top-color: var(--accent);
  transform: translateY(-30%);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.custom-select.active .select-selected:after {
  transform: translateY(-70%) rotate(180deg);
}

.select-items {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  z-index: 99;
  max-height: 220px;
  overflow-y: auto;
  /* opacity: 0; */
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-select.active .select-items {
  opacity: 1;
  transform: translateY(0);
}

.select-items div {
  padding: 10px 15px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.select-items div:hover {
  background: var(--accent);
  color: #fff;
}

.select-hide {
  display: none;
}

/* активный */
.custom-select.active .select-selected {
  border-radius: 25px 25px 0 0;
  border-bottom: none;
}

/* Кнопка сброса */
.controls .reset-btn {
    flex: 0 0 220px;
    height: 46px;
    border: 2px solid var(--accent);
    border-radius: 25px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.controls .reset-btn:hover {
    background: var(--accent);
    color: #fff;
}

#countInfo {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #555;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

.prices-table {
    width: 100%; /* Полная ширина контейнера */
    min-width: 0; /* Предотвращает переполнение */
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 0 auto; /* Центрирование */
    box-sizing: border-box; /* Учитывает padding и border */
}

.prices-table th,
.prices-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
}

.prices-table th {
    background: var(--accent);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 16px;
}

.prices-table td {
    color: #333;
}

.prices-table tr:nth-child(even) {
    background: #f9f9f9;
}

.prices-table tr:hover {
    background: #f0f7f0;
    transition: background-color 0.3s;
}

.prices-table tr.hidden {
    display: none;
}

.prices-table tr.show {
    display: table-row;
    animation: fadeIn 0.3s ease-in;
}

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

#pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

#pagination button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #f4f4f4;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

#pagination button:hover {
    background: var(--accent);
    color: #fff;
}

#pagination button.active {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

#pagination span {
    padding: 10px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    color: #555;
}

/* Адаптивность для таблицы и элементов управления */
@media (max-width: 768px) {
    .prices-section {
        margin-top: 100px;
        padding: 20px 10px;
    }

    .section-title {
        font-size: 24px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-big input {
        width: 100%;
    }

    .custom-select {
        width: 100%;
        flex: none;
    }

    .controls .reset-btn {
        flex: none;
        width: 100%;
    }

    .prices-table th,
    .prices-table td {
        padding: 10px;
        font-size: 14px;
    }

    .prices-table th {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .prices-table {
        display: block;
        overflow-x: auto;
    }

    .prices-table thead {
        display: none;
    }

    .prices-table tr {
        display: block;
        margin-bottom: 15px;
        border-bottom: 2px solid #eee;
    }

    .prices-table td {
        display: block;
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    .prices-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        font-weight: 700;
        text-align: left;
    }

    .prices-table td:nth-child(1)::before {
        content: "Услуга";
    }

    .prices-table td:nth-child(2)::before {
        content: "Специальность врача";
    }

    .prices-table td:nth-child(3)::before {
        content: "Цена (руб.)";
    }

    .prices-table td:nth-child(4)::before {
        content: "Город";
    }
}

@media (max-width: 992px) {
    .controls {
        flex-wrap: wrap; /* при маленьком экране переходят в колонку */
        justify-content: center;
    }

    .custom-select,
    .controls .reset-btn {
        flex: 1 1 45%; /* две колонки */
        min-width: 150px;
    }

    .search-big {
        flex: 1 1 100%;
    }
}

.price--download {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
}
.price--download .doc-card {
    background: var(--card);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price--download .doc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.price--download .doc-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.price--download .doc-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.5;
}

.price--download .doc-link {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.price--download .doc-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.price--download .doc-link a:hover {
    /* text-decoration: underline; */
    color: #49bb35;
}

.price--download .doc-link a::after {
    content: "→";
    font-size: 18px;
}

@media (max-width: 768px) { 
    .price--download {
        grid-template-columns: repeat(1, 1fr);
    }
}