/*
 * Яхтклуб PaRUS — newstyle.css
 * Bootstrap 5.3 companion stylesheet
 */

:root {
  --parus-dark: #222;
  --parus-blue: #1a73a7;
  --parus-text: #666;
}

/* ===== GLOBAL ===== */
body {
  font-family: 'Roboto', sans-serif;
  color: var(--parus-text);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--parus-dark);
}

a {
  text-decoration: none;
  transition: color 0.3s;
}

section {
  padding: 60px 0;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
  color: #000;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--parus-blue);
}

/* ===== NAVBAR ===== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  padding: 45px 0;
}

.nav-container {
  position: relative;
}

/* Logo: absolute center, like original w3_navigation_pos */
.nav-logo {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  width: 20%;
  margin: 0 auto;
  z-index: 2;
  line-height: 0;
}

.nav-logo img {
  width: clamp(150px, 16vw, 250px);
}

/* Nav menu: centered inline-block items, like original */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.nav-menu li {
  display: inline-block;
  margin: 15px 1.8vw;
}

/* Gap for logo: 3rd item gets large right margin */
.nav-menu li:nth-child(3) a {
  margin-right: 16vw;
}

.nav-menu li a {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.3s;
}

/* Animated rectangle hover — top line */
.nav-menu li a span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s, opacity 0s 0.3s;
  opacity: 0;
}

/* Bottom line */
.nav-menu li a span::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s, opacity 0s 0.3s;
  opacity: 0;
}

/* Left line */
.nav-menu li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.3s, opacity 0s 0.3s;
  opacity: 0;
}

/* Right line */
.nav-menu li a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  transform: translateY(-100%);
  transition: transform 0.3s, opacity 0s 0.3s;
  opacity: 0;
}

.nav-menu li a:hover::before,
.nav-menu li a:hover::after,
.nav-menu li a:hover span::before,
.nav-menu li a:hover span::after {
  transform: translate(0, 0);
  opacity: 1;
  transition: transform 0.3s, opacity 0s 0s;
}

.nav-menu li a:hover {
  color: #fff;
}

/* Mobile hamburger */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 3;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== HERO CAROUSEL ===== */
#heroCarousel {
  margin-top: 0;
}

#heroCarousel .carousel-item img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

/* ===== LOCATIONS ===== */
#locations {
  background: #fff;
}

.location-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  aspect-ratio: 4 / 3;
}

.location-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

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

.location-card .card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: height 0.4s ease;
}

.location-card:hover .card-overlay {
  height: 100%;
}

.location-card .card-overlay h4 {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s 0.25s, transform 0.6s 0.25s;
}

.location-card:hover .card-overlay h4 {
  opacity: 1;
  transform: translateY(0);
}

/* Location detail modal */
.location-detail-img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.location-detail-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--parus-text);
}

/* ===== PORTFOLIO / PHOTOS ===== */
#portfolio {
  background: #fff;
  padding-left: 0;
  padding-right: 0;
}

#portfolio .section-title {
  padding-left: 15px;
  padding-right: 15px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.photo-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  opacity: 0.95;
  transition: opacity 0.35s, transform 0.35s;
  transform: scale3d(1.05, 1.05, 1);
}

.photo-item:hover img {
  opacity: 0.6;
  transform: scale3d(1, 1, 1);
}

/* Apollo effect: white diagonal stripe */
.photo-item .shutter-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.6s;
  transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, -100%, 0);
}

.photo-item:hover .shutter-top {
  transform: scale3d(1.9, 1.4, 1) rotate3d(0, 0, 1, 45deg) translate3d(0, 100%, 0);
}

/* ===== REVIEWS ===== */
#reviews {
  padding: 0;
}

#reviews .section-title {
  padding-top: 60px;
}

/* Left column */
.review-left {
  width: 50%;
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.review-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(52, 54, 66, 0.6);
}

.review-content {
  position: relative;
  z-index: 1;
  padding: 40px 50px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.review-content h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 25px;
}

.review-author-photo {
  width: 40%;
  height: auto;
  object-fit: cover;
  border: 5px solid #fff;
  display: block;
  margin: 0 auto 20px;
}

.review-author-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.875rem;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.review-quote {
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
}

/* Nav buttons */
.review-nav {
  display: flex;
  width: 100%;
  flex-shrink: 0;
}

.review-nav button {
  width: 50%;
  border: none;
  color: #fff;
  padding: 15px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.review-nav button:first-child {
  background: rgba(80, 85, 110, 0.75);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.review-nav button:first-child:hover {
  background: rgba(65, 70, 95, 0.85);
}

.review-nav button:last-child {
  background: linear-gradient(#6e72bb, #4A75C6);
}

.review-nav button:last-child:hover {
  background: linear-gradient(#5a5ea0, #3a60a8);
}

/* Right column */
.review-right {
  width: 50%;
  background-size: cover;
  background-position: center;
}

.review-slide-inner {
  display: flex;
  min-height: 600px;
}

/* ===== FOOTER ===== */
footer {
  background: #fff;
  color: var(--parus-text);
  padding-top: 50px;
}

footer h5 {
  color: var(--parus-dark);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: var(--parus-text);
  font-size: 0.9rem;
  transition: color 0.3s;
}

footer ul li a:hover {
  color: var(--parus-dark);
}

.footer-subscribe .input-group {
  max-width: 300px;
}

.footer-subscribe input {
  background: #fff;
  border: 1px solid #ccc;
  color: var(--parus-dark);
  font-size: 0.9rem;
}

.footer-subscribe input::placeholder {
  color: #999;
}

.footer-subscribe input:focus {
  background: #fff;
  border-color: var(--parus-blue);
  box-shadow: none;
  color: var(--parus-dark);
}

.footer-subscribe .btn {
  background: var(--parus-blue);
  border-color: var(--parus-blue);
  color: #fff;
}

.footer-subscribe .btn:hover {
  background: #145d88;
  border-color: #145d88;
}

.footer-bottom {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 15px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--parus-text);
}

.footer-bottom a {
  color: var(--parus-text);
}

.footer-bottom a:hover {
  color: var(--parus-dark);
}

/* ===== LIGHTBOX ===== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-backdrop.show {
  display: flex;
}

.lightbox-backdrop img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 1070;
  opacity: 0.8;
  transition: opacity 0.3s;
  background: none;
  border: none;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--parus-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, opacity 0.3s;
  cursor: pointer;
}

.scroll-top:hover {
  background: #145d88;
}

.scroll-top.visible {
  display: flex;
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BLOG / INNER PAGES ===== */

/* Banner under navbar */
.page-banner {
  width: 100%;
  display: block;
}

.page-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content section */
.blog-section {
  padding: 50px 0 60px;
}

.blog-content {
  max-width: 870px;
  margin: 0 auto;
}

/* Narrow wrapper for text content on inner pages */
.inner-content {
  max-width: 870px;
  margin: 0 auto;
}

.blog-title,
.review-article > h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
  color: #000;
  position: relative;
  padding-bottom: 15px;
}

.blog-title::after,
.review-article > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #337ab7;
}

/* Подзаголовок категории блога (h3 сразу после .blog-title) */
.blog-title + h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  color: #000;
  margin-bottom: 35px;
}

/* Tag pills */
.tag-cloud {
  text-align: center;
  margin-bottom: 15px;
}

.tag-cloud .tag-label {
  display: inline-block;
  margin-right: 10px;
  color: var(--parus-text);
  font-size: 0.95rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid #337ab7;
  border-radius: 50rem;
  color: #337ab7;
  font-size: 0.85rem;
  margin: 4px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
  background: transparent;
}

.tag-pill:hover {
  background: #337ab7;
  color: #fff;
}

.tag-pill .tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 50%;
  background: #337ab7;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.25s, color 0.25s;
}

.tag-pill:hover .tag-count {
  background: #fff;
  color: #337ab7;
}

/* Post cards */
.post-item {
  padding: 25px 0;
  border-bottom: 1px solid rgba(51, 122, 183, 0.25);
}

.post-item:last-of-type {
  border-bottom: none;
}

.post-item h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--parus-dark);
  text-align: center;
  margin-bottom: 15px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--parus-text);
}

.post-meta a {
  color: #337ab7;
}

.post-meta a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* On mobile, keep in one line: date left / category right */
@media (max-width: 575.98px) {
  .post-meta {
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 0.8rem;
  }
  .post-meta > span:first-child {
    text-align: left;
  }
  .post-meta > span:last-child {
    text-align: right;
  }
}

.post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.post-body {
  font-size: 0.95rem;
  line-height: 1.7;
}

.post-body p {
  margin-bottom: 10px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body a {
  color: #337ab7;
}

.post-read-more {
  display: inline-block;
  margin-top: 15px;
  color: #337ab7;
  font-weight: 500;
  font-size: 0.9rem;
}

.post-read-more:hover {
  color: #23527c;
  text-decoration: underline;
}

/* Pagination */
.pagination-wrap {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.pagination .page-link {
  color: #337ab7;
  border-color: #e2e2e2;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.pagination .page-link:hover {
  background: rgba(51, 122, 183, 0.1);
  color: #23527c;
}

.pagination .page-item.active .page-link {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  color: #999;
  background: #f5f5f5;
}

/* Minimal footer (copyright) */
.copyright {
  padding: 30px 15px;
  text-align: center;
  background: #fff;
  font-size: 0.9rem;
  color: var(--parus-text);
}

.copyright a {
  color: var(--parus-text);
  font-family: 'Montserrat', sans-serif;
}

.copyright a:hover {
  color: var(--parus-dark);
}

/* Active menu item */
.nav-menu li.active a {
  color: #555;
  background: #fff;
}

.nav-menu li.active a::before,
.nav-menu li.active a::after,
.nav-menu li.active a span::before,
.nav-menu li.active a span::after {
  display: none;
}

/* ===== PROJECTS PAGE ===== */

.projects-section {
  padding: 50px 0 60px;
}

.projects-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #000;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 15px;
}

.projects-section h2:first-child {
  margin-top: 0;
}

.projects-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #000;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 12px;
}

.projects-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 15px;
}

.projects-section ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.projects-section ul li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.projects-section a {
  color: #337ab7;
}

.projects-section a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* Projects table */
.projects-table {
  width: 100%;
  margin-bottom: 25px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.projects-table thead th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  padding: 10px 12px;
  text-align: center;
  background: transparent;
  color: var(--parus-dark);
  border-bottom: 2px solid #ddd;
}

.projects-table tbody tr {
  border-bottom: 1px solid #e5e5e5;
  transition: background 0.2s;
}

.projects-table tbody tr:hover {
  background: rgba(51, 122, 183, 0.06);
}

.projects-table tbody td {
  padding: 9px 12px;
  vertical-align: middle;
  color: var(--parus-text);
}

.projects-table tbody td:first-child {
  text-align: center;
  width: 50px;
  color: #999;
}

.projects-table tbody td:last-child {
  text-align: center;
  width: 70px;
}

.projects-table tbody td a {
  color: #337ab7;
}

.projects-table tbody td a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* Modal form */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1055;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-form-box {
  background: #fff;
  border-radius: 6px;
  padding: 35px 40px;
  max-width: 560px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-form-box h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  color: var(--parus-dark);
}

.modal-form-box .modal-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--parus-text);
  margin-bottom: 20px;
}

.modal-form-box .modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-form-box .modal-close:hover {
  color: var(--parus-dark);
}

.modal-form-box .form-control {
  border-radius: 3px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.modal-form-box .form-control:focus {
  border-color: #337ab7;
  box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.15);
}

.modal-form-box textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.modal-form-box .btn-submit {
  width: 100%;
  background: #337ab7;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.modal-form-box .btn-submit:hover {
  background: #23527c;
}

.modal-form-box .policy-note {
  font-size: 0.78rem;
  color: #999;
  text-align: center;
  margin-bottom: 10px;
}

.modal-form-box .policy-note a {
  color: #337ab7;
}

/* Apply button that opens modal */
.btn-apply {
  display: inline-block;
  padding: 8px 22px;
  background: #337ab7;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
  text-decoration: none;
}

.btn-apply:hover {
  background: #23527c;
  color: #fff;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 991px) {

  /* Шапка компактнее */
  .site-header {
    padding: 15px 0;
  }

  /* Строка: логотип слева, гамбургер справа, меню ниже */
  .nav-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 15px;
    position: relative;
  }

  /* Большой центральный логотип прячем */
  .nav-logo {
    display: none !important;
  }

  /* Маленький логотип слева */
  .nav-logo-mobile {
    display: inline-block;
    margin-bottom: 0;
    line-height: 0;
  }

  .nav-logo-mobile img {
    height: 50px;
    width: auto;
  }

  /* Гамбургер справа */
  .nav-mobile-toggle {
    display: block;
    order: 2;
  }

  /* Меню — под шапкой, на всю ширину */
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 4px;
    padding: 10px 0;
    margin: 0;
    order: 3;
    flex-basis: 100%;
    margin-top: 10px;
  }

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

  .nav-menu li {
    display: block;
    margin: 0;
  }

  .nav-menu li:nth-child(3) a {
    margin-right: 0;
  }

  .nav-menu li a {
    padding: 10px 20px;
    justify-content: center;
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .nav-logo-mobile {
    display: none;
  }
}

@media (max-width: 767px) {
  .review-slide-inner {
    flex-direction: column;
    min-height: auto;
  }

  .review-left,
  .review-right {
    width: 100%;
  }

  .review-right {
    height: 300px;
  }

  .review-content {
    padding: 30px 25px;
  }

  .review-author-photo {
    width: 60%;
  }

  .post-image {
    margin-bottom: 15px;
  }
}

@media (max-width: 575px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== REVIEWS PAGE - mobile cards ===== */
.review-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.review-card:hover {
  background: rgba(51, 122, 183, 0.06);
  border-color: #337ab7;
  text-decoration: none;
}

.review-card__num {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  border-right: 1px solid #e5e5e5;
}

.review-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  gap: 3px;
}

.review-card__title {
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  color: #337ab7;
  line-height: 1.35;
}

.review-card__author {
  font-family: 'Roboto', sans-serif;
  font-size: 0.82rem;
  color: var(--parus-text);
}

/* ===== REVIEWS TABLE (modifier) ===== */
.projects-table--reviews tbody td:last-child {
  width: auto;
  text-align: left;
}

/* ===== MEMBERS TABLE ===== */

/* Десктоп: расширяем колонку "Звание", убираем жёсткую ширину последней колонки */
.projects-table--members tbody td:last-child {
  width: auto;
  text-align: left;
}

.projects-table--members tbody td:first-child {
  width: 50px;
}

/* Мобильные: таблица → карточки */
@media (max-width: 767px) {

  .members-table {
    border: 0;
  }

  .members-table thead {
    /* Скрываем, но оставляем для скринридеров */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .members-table tbody tr {
    display: block;
    position: relative;
    margin-bottom: 15px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
  }

  .members-table tbody tr:hover {
    background: rgba(51, 122, 183, 0.04);
  }

  .members-table tbody td {
    display: block;
    padding: 4px 0;
    border: none;
    text-align: left !important;
    width: auto !important;
  }

  /* Номер — маленький и серый в углу */
  .members-table tbody td[data-label="№"] {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 0;
    font-size: 0.8rem;
    color: #999;
  }

  .members-table tbody td[data-label="№"]::before {
    content: "№ ";
  }

  /* ФИО — крупно, без подписи */
  .members-table tbody td[data-label="ФИО"] {
    padding-top: 0;
    padding-bottom: 8px;
    padding-right: 50px; /* место под номер */
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--parus-dark);
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
  }

  .members-table tbody td[data-label="ФИО"] a {
    color: #337ab7;
  }

  /* Остальные ячейки — подпись + значение */
  .members-table tbody td[data-label="Звание"]::before,
  .members-table tbody td[data-label="Город"]::before,
  .members-table tbody td[data-label="Страна"]::before,
  .members-table tbody td[data-label="Отчёт"]::before {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--parus-dark);
    margin-right: 4px;
  }

  /* Пустые ячейки не показываем */
  .members-table tbody td:empty {
    display: none;
  }
}

/* ============================================
   MEMBER PAGE (single member profile)
   Карточка участника + таблица его проектов
   ============================================ */

/* ----- Карточка участника (фото + поля) ----- */
.member-card {
  margin-bottom: 30px;
}

.member-card__photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Список полей: "Метка: значение" в одну строку.
   По той же схеме, что и .project-info-list на странице проекта. */
.member-card__info {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.member-card__info dt {
  display: inline;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--parus-dark);
}

.member-card__info dt::after {
  content: ":";
}

.member-card__info dd {
  display: inline;
  margin: 0 0 0 4px;
  color: var(--parus-text);
}

/* После каждой пары — перенос строки */
.member-card__info dd::after {
  content: "";
  display: block;
  margin-bottom: 8px;
}

.member-card__info dd a {
  color: #337ab7;
}

.member-card__info dd a:hover {
  color: #23527c;
  text-decoration: underline;
}

.member-card__vcard {
  margin-top: 15px;
}

/* Сам элемент a.btn — перебиваем цвет ссылки из .projects-section a,
   чтобы текст кнопки не сливался с её синей заливкой */
.member-card__vcard .btn-primary,
.member-card__vcard a.btn-primary {
  background: #337ab7;
  border-color: #337ab7;
  color: #fff;
}

.member-card__vcard .btn-primary:hover,
.member-card__vcard .btn-primary:focus,
.member-card__vcard a.btn-primary:hover,
.member-card__vcard a.btn-primary:focus {
  background: #23527c;
  border-color: #23527c;
  color: #fff;
  text-decoration: none;
}

/* ----- Таблица проектов участника (модификатор) ----- */

/* Десктоп: "Результат" — широкая колонка, выравнивание влево */
.projects-table--member-projects tbody td:last-child {
  width: auto;
  text-align: left;
}

.projects-table--member-projects tbody td:first-child {
  width: 50px;
}

/* Год — узкая центрированная колонка */
.projects-table--member-projects thead th:nth-child(3),
.projects-table--member-projects tbody td:nth-child(3) {
  width: 80px;
  text-align: center;
}

/* Мобильные: таблица → карточки (та же схема, что .members-table) */
@media (max-width: 767px) {

  .member-projects-table {
    border: 0;
  }

  .member-projects-table thead {
    /* Скрываем, но оставляем для скринридеров */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .member-projects-table tbody tr {
    display: block;
    position: relative;
    margin-bottom: 15px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
  }

  .member-projects-table tbody tr:hover {
    background: rgba(51, 122, 183, 0.04);
  }

  .member-projects-table tbody td {
    display: block;
    padding: 4px 0;
    border: none;
    text-align: left !important;
    width: auto !important;
  }

  /* Номер — маленький серый в углу */
  .member-projects-table tbody td[data-label="№"] {
    position: absolute;
    top: 14px;
    right: 16px;
    padding: 0;
    font-size: 0.8rem;
    color: #999;
  }

  .member-projects-table tbody td[data-label="№"]::before {
    content: "№ ";
  }

  /* Название — крупно, без подписи */
  .member-projects-table tbody td[data-label="Название"] {
    padding-top: 0;
    padding-bottom: 8px;
    padding-right: 50px; /* место под номер */
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--parus-dark);
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
  }

  .member-projects-table tbody td[data-label="Название"] a {
    color: #337ab7;
  }

  /* Год и Результат — подпись + значение */
  .member-projects-table tbody td[data-label="Год"]::before,
  .member-projects-table tbody td[data-label="Результат"]::before {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--parus-dark);
    margin-right: 4px;
  }

  .member-projects-table tbody td:empty {
    display: none;
  }
}

/* ============================================
   ARTICLE PAGE (single blog post)
   ============================================ */

/* Images inside article content
   Селекторы через .blog-content / .review-article и .post-body -
   работает даже если обёртку .post-body забыли в шаблоне. */
.blog-content .post-body img,
.blog-content > img,
.blog-content p img,
.review-article .post-body img,
.review-article p img,
.review-article figure img,
.review-article > img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  transition: transform 0.25s, box-shadow 0.25s;
}

.blog-content .post-body img:hover,
.blog-content > img:hover,
.blog-content p img:hover,
.review-article .post-body img:hover,
.review-article p img:hover,
.review-article figure img:hover,
.review-article > img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Author card (right-aligned pill with photo) */
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  float: right;
  margin: 25px 0 15px;
  padding: 8px 14px 8px 16px;
  background: rgba(51, 122, 183, 0.05);
  border: 1px solid rgba(51, 122, 183, 0.2);
  border-radius: 50rem;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.post-author:hover {
  background: rgba(51, 122, 183, 0.1);
  border-color: #337ab7;
  transform: translateY(-1px);
}

.post-author-info {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
}

.post-author-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--parus-text);
  opacity: 0.7;
}

.post-author-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #337ab7;
  margin-top: 2px;
}

.post-author-date {
  font-size: 0.75rem;
  color: var(--parus-text);
  opacity: 0.7;
  margin-top: 2px;
}

.post-author:hover .post-author-name {
  color: #23527c;
}

.post-author-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

/* Tags block at the bottom of the article */
.post-tags {
  clear: both;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(51, 122, 183, 0.25);
  text-align: center;
}

.post-tags .tag-label {
  display: inline-block;
  margin-right: 8px;
  color: var(--parus-text);
  font-size: 0.95rem;
  vertical-align: middle;
}
/* ============================================
   PROJECT SINGLE PAGE (отдельный проект)
   ============================================ */

/* Hero: главное фото + карточка параметров */
.project-hero {
  margin-top: 5px;
  margin-bottom: 25px;
}

.project-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Боковая карточка с параметрами похода */
.project-info-card {
  padding: 5px 0 0;
}

.project-info-list {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Метка и значение идут в одну строку: "Дата начала: 05.01.2022" */
.project-info-list dt {
  display: inline;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--parus-dark);
}

.project-info-list dt::after {
  content: ":";
}

.project-info-list dd {
  display: inline;
  margin: 0 0 0 4px;
  color: var(--parus-text);
}

/* После каждой пары — перенос строки */
.project-info-list dd::after {
  content: "";
  display: block;
  margin-bottom: 8px;
}

.project-info-list dd a {
  color: #337ab7;
}

.project-info-list dd a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* Краткое описание — блоком под списком параметров */
.project-info-description {
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--parus-text);
}

.project-info-description-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--parus-dark);
  margin-bottom: 4px;
}

/* Подзаголовки секций (Галерея, Участники) */
.project-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: #000;
  text-align: center;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  position: relative;
}

.project-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: #337ab7;
}

/* Галерея проекта.
   Сниппет Gallery рендерит обёртку NewGalleryAlbumTpl5 (div.row.g-3)
   и плитки NewGalItemThumb5 (div.col-6.col-md-4.gallery-thumb).
   Лайтбокс — Fancybox 3 (data-fancybox="gallery"), подключается сниппетом Gallery сам.
   Галерея располагается в левой колонке (col-lg-8), справа — участники. */
.project-gallery {
  margin-bottom: 0;
}

.gallery-thumb a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  line-height: 0;
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-thumb a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.gallery-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Нижний блок: галерея + участники в две колонки */
.project-bottom {
  margin-top: 10px;
}

/* Заголовки внутри .project-bottom не должны иметь больший верхний отступ */
.project-bottom .project-section-title {
  margin-top: 20px;
}

/* Таблица участников в узкой правой колонке — компактный вид */
.project-bottom .projects-table {
  font-size: 0.88rem;
}

.project-bottom .projects-table thead th {
  font-size: 0.9rem;
  padding: 8px 8px;
}

.project-bottom .projects-table tbody td {
  padding: 7px 8px;
}

.project-bottom .projects-table tbody td:first-child {
  width: 36px;
}

.project-bottom .projects-table tbody td:last-child {
  width: 70px;
  text-align: center;
}

/* Блок шаринга */
.project-share {
  margin-top: 35px;
  padding-top: 20px;
  border-top: 1px solid rgba(51, 122, 183, 0.2);
  text-align: center;
}

/* Блок комментариев */
.project-comments {
  margin-top: 30px;
}

/* Адаптив */
@media (max-width: 991.98px) {
  .project-info-card {
    margin-top: 8px;
  }
}

@media (max-width: 575.98px) {
  .gallery-thumb img {
    height: 120px;
  }
  .project-section-title {
    font-size: 1.2rem;
    margin: 30px 0 15px;
  }
}

/* Краткое описание проекта — в левой колонке, под главным фото */
.project-description {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--parus-text);
}

.project-description-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--parus-dark);
  margin-bottom: 6px;
  font-size: 1rem;
}

.project-description p {
  margin-bottom: 0.8em;
}

.project-description p:last-child {
  margin-bottom: 0;
}

/* ============================================
   REVIEW PAGE (single trip report)
   ============================================ */

.review-article-section {
  padding: 50px 0 60px;
}

.review-article {
  max-width: 870px;
  margin: 0 auto;
  display: flow-root;          /* изолируем внутренние float (.media-float, .post-author) */
}

/* Подзаголовки внутри отчёта (дни похода, этапы и т.п.) */
.review-article .post-body h3,
.review-article > h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #337ab7;
  text-align: center;
  clear: both;                /* сбрасываем float медиа-врезок из предыдущей секции */
  margin: 35px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(51, 122, 183, 0.25);
}

.review-article .post-body h3:first-child,
.review-article > h3:first-child {
  margin-top: 0;
}

/* Плавающая медиа-врезка (фото или видео сбоку от текста) */
.media-float {
  margin: 0 0 15px;
  padding: 0;
}

.media-float img,
.media-float iframe {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* На мобильных — полная ширина, обычный поток, над абзацем (дефолт, ничего не переопределяем) */

/* На десктопе — плавает сбоку, занимая примерно половину ширины */
@media (min-width: 768px) {
  .media-float {
    width: 48%;
    max-width: 420px;
  }
  .media-float--left {
    float: left;
    margin: 5px 20px 15px 0;
  }
  .media-float--right {
    float: right;
    margin: 5px 0 15px 20px;
  }
}

/* Видео. По умолчанию 9:16 (вертикальное / YouTube Shorts).
   Для горизонтального 16:9 используй модификатор .media-float__video--16x9 */
.media-float__video {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.media-float__video--16x9 {
  aspect-ratio: 16 / 9;
}

.media-float__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Картинки внутри .media-float — убираем auto-margin из общих стилей .post-body img */
.review-article .post-body .media-float img,
.review-article .media-float img,
.blog-content .post-body .media-float img {
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Цитата / вставка-врезка в отчёте
   Использование:
     <blockquote class="review-quote-block">
       <p>Текст цитаты...</p>
       <footer>Автор или источник</footer>   ← опционально
     </blockquote>
*/
.review-article .review-quote-block {
  clear: both;                /* сбрасываем плавающие .media-float перед цитатой */
  position: relative;
  margin: 25px 0;
  padding: 20px 25px 20px 30px;
  background: rgba(51, 122, 183, 0.05);
  border: 1px solid rgba(51, 122, 183, 0.25);
  border-left: 4px solid #337ab7;
  border-radius: 4px;
  font-style: italic;
  color: var(--parus-dark);
  line-height: 1.65;
}

.review-article .review-quote-block p {
  margin: 0 0 10px;
}

.review-article .review-quote-block p:last-of-type {
  margin-bottom: 0;
}

.review-article .review-quote-block footer {
  margin-top: 12px;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 500;
  color: #337ab7;
  text-align: right;
}

.review-article .review-quote-block footer::before {
  content: '— ';
}

/* ============================================
   REVIEW GALLERY (сетка фото в конце или между блоками отчёта)
   ============================================ */

.review-article .review-gallery {
  clear: both;                /* сбрасываем любые плавающие .media-float */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  margin: 25px 0;
}

.review-article .review-gallery figure {
  margin: 0;
  padding: 0;
}

/* Квадратная обрезка, чтобы получалась ровная плитка независимо от пропорций фото */
.review-article .review-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0;                  /* перебиваем общие .review-article img { margin: 20px auto } */
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
  transition: transform 0.25s, box-shadow 0.25s;
}

.review-article .review-gallery img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* ============================================
   MEDIA-FLOAT модификатор --wide: фото во всю ширину, без float
   Для ключевых / панорамных снимков в центре потока
   ============================================ */

.media-float--wide {
  clear: both;
  width: 100%;
  max-width: 100%;
  float: none;
  margin: 20px 0;
}

/* Отменяем десктопное плавание для --wide (оно выставлялось в @media min-width: 768px) */
@media (min-width: 768px) {
  .media-float--wide {
    width: 100%;
    max-width: 100%;
    float: none;
    margin: 20px 0;
  }
}


/* ============================================
   LK PAGE (личный кабинет)
   ============================================ */

.lk-section {
  padding: 50px 0 60px;
}

.lk-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.lk-panel__head {
  padding: 14px 20px;
  border-bottom: 1px solid #ddd;
  background: #f5f5f5;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.lk-panel__head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--parus-dark);
  text-align: center;
}

.lk-panel__head h2 i {
  color: #337ab7;
  margin-right: 6px;
}

.lk-panel__body {
  padding: 25px 20px;
}

.lk-panel__body h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--parus-dark);
  text-align: center;
}

.lk-panel__body hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid #eee;
}

.lk-panel__body p {
  margin: 0 0 8px;
}

/* --- Форма оплаты --- */
.lk-form .col-form-label {
  font-weight: 400;
  color: var(--parus-dark);
}

.lk-form .form-select,
.lk-form .form-control {
  border-radius: 3px;
  font-size: 0.95rem;
}

.lk-form .form-select:focus,
.lk-form .form-control:focus {
  border-color: #337ab7;
  box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.15);
}

.lk-form .s-message {
  display: none;
}

/* --- Ссылки под формой входа --- */
.lk-login-links p {
  margin: 0 0 4px;
}

.lk-login-links a {
  color: #337ab7;
  font-size: 0.9rem;
}

.lk-login-links a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* --- Сообщение о сбросе пароля --- */
.loginResetPass .loginResetPassHeader {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--parus-dark);
  margin-bottom: 10px;
}

.loginResetPass .loginResetPassText {
  margin: 0;
}

.loginResetPass a {
  color: #337ab7;
}

.loginResetPass a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* --- Списки документов --- */
.lk-docs-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin: 10px 0 20px;
  color: var(--parus-dark);
  text-align: center;
}

.lk-docs {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.lk-docs li {
  position: relative;
  padding: 4px 0 4px 18px;
}

.lk-docs li::before {
  content: '\F38B'; /* bi-file-earmark-text */
  font-family: 'bootstrap-icons';
  position: absolute;
  left: 0;
  top: 5px;
  color: #337ab7;
  font-size: 0.85rem;
}

.lk-docs a {
  color: #337ab7;
}

.lk-docs a:hover {
  color: #23527c;
  text-decoration: underline;
}

/* Сетка для длинных списков (напр. протоколы президиума) */
.lk-docs--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 16px;
}

/* --- Нижние действия --- */
.lk-actions {
  margin-top: 10px;
}

.lk-actions a {
  color: var(--parus-dark);
  font-size: 0.95rem;
}

.lk-actions a i {
  color: #337ab7;
  margin-right: 6px;
}

.lk-actions a:hover {
  color: #337ab7;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .lk-panel__body {
    padding: 20px 15px;
  }

  .lk-form .col-form-label {
    margin-bottom: 6px;
  }

  .lk-form .offset-sm-4 {
    margin-left: 0;
  }

  .lk-docs--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Таблица ведомости --- */
.lk-panel .table-responsive {
  margin-bottom: 0;
}

.lk-panel .table-responsive > .table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.lk-panel .table-responsive > .table thead th {
  background: #337ab7;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  padding: 12px 14px;
  text-align: left;
}

.lk-panel .table-responsive > .table tbody td {
  padding: 10px 14px;
  border-top: 1px solid #eee;
  color: var(--parus-text);
  vertical-align: middle;
}

.lk-panel .table-responsive > .table tbody tr:hover td {
  background: #f5faff;
}

/* Строка-разделитель раздела (colspan) */
.lk-panel .table-responsive > .table tbody td[colspan] {
  background: #f5f5f5;
  font-weight: 500;
  color: var(--parus-dark);
  font-family: 'Montserrat', sans-serif;
}

.lk-panel .table-responsive > .table tbody td[colspan]:hover {
  background: #f5f5f5;
}

/* Числовые колонки — справа */
.lk-panel .table-responsive > .table thead th:not(:first-child),
.lk-panel .table-responsive > .table tbody td:not([colspan]):not(:first-child),
.lk-panel .table-responsive > .table tfoot td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Итого */
.lk-panel .table-responsive > .table tfoot td {
  padding: 12px 14px;
  border-top: 2px solid #337ab7;
  font-weight: 600;
  color: var(--parus-dark);
  background: #fafafa;
}

/* Задолженность — последняя колонка, подсветка красным если > 0 */
.lk-panel .table-responsive > .table tbody td:last-child:not(:empty):not([colspan]) {
  font-weight: 500;
}

/* Мобильный вид — компактнее */
@media (max-width: 575px) {
  .lk-panel .table-responsive > .table thead th,
  .lk-panel .table-responsive > .table tbody td,
  .lk-panel .table-responsive > .table tfoot td {
    padding: 8px 10px;
    font-size: 0.88rem;
  }
}

/* --- Ведомость по всем членам (allBalance) --- */
.lk-members-balance {
  display: flex;
  flex-direction: column;
}

/* Сетка: имя тянется, числовые колонки фиксированной ширины — выравнивание гарантировано */
.lk-members-balance__head,
.lk-member__summary,
.lk-mb-row {
  display: grid;
  grid-template-columns: 1fr 90px 90px 110px;
  gap: 0 10px;
  align-items: center;
  padding-left: 14px;
  padding-right: 14px;
}

.lk-members-balance__head {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #f5f5f5;
  color: #337ab7;
  border-bottom: 2px solid #337ab7;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.lk-mb-col--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lk-mb-col--debt {
  color: #c0392b;
  font-weight: 500;
}

/* --- Модификатор: ведомость расходов (2 колонки) --- */
.lk-charge.lk-members-balance .lk-members-balance__head,
.lk-charge .lk-member__summary,
.lk-charge .lk-mb-row {
  grid-template-columns: 1fr 120px;
}

@media (max-width: 767px) {
  .lk-charge.lk-members-balance .lk-members-balance__head,
  .lk-charge .lk-member__summary,
  .lk-charge .lk-mb-row {
    grid-template-columns: minmax(0, 1fr) 90px;
  }
}

@media (max-width: 420px) {
  .lk-charge.lk-members-balance .lk-members-balance__head,
  .lk-charge .lk-member__summary,
  .lk-charge .lk-mb-row {
    grid-template-columns: minmax(0, 1fr) 75px;
  }
}

/* --- Один участник --- */
.lk-member {
  border-bottom: 1px solid #eee;
}

.lk-member[open] {
  background: #fafcff;
}

.lk-member__summary {
  padding-top: 12px;
  padding-bottom: 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--parus-dark);
  list-style: none; /* убираем стандартный маркер */
  transition: background 0.15s;
}

.lk-member__summary::-webkit-details-marker {
  display: none;
}

.lk-member__summary:hover {
  background: #f5faff;
}

.lk-member__arrow {
  color: #337ab7;
  margin-right: 8px;
  font-size: 0.8rem;
  transition: transform 0.2s;
  display: inline-block;
}

.lk-member[open] .lk-member__arrow {
  transform: rotate(90deg);
}

/* --- Детализация --- */
.lk-member__detail {
  padding: 4px 0 12px;
  background: #fff;
}

.lk-mb-row {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 0.92rem;
  color: var(--parus-text);
}

/* В детализации имя немного отступает, симулируя место стрелки */
.lk-member__detail .lk-mb-row .lk-mb-col--name {
  padding-left: 22px;
}

.lk-mb-row + .lk-mb-row {
  border-top: 1px dashed #eee;
}

/* --- Модификаторы для страницы детализации одного члена --- */
.lk-member--static {
  border-bottom: none;
}

.lk-member__detail--flush {
  padding: 0;
}

.lk-mb-row--total {
  border-top: 2px solid #337ab7 !important;
  background: #fafafa;
  font-weight: 600;
  color: var(--parus-dark);
  padding-top: 12px;
  padding-bottom: 12px;
}

.lk-mb-row--total .lk-mb-col--name {
  font-family: 'Montserrat', sans-serif;
}

/* --- Планшет и телефон --- */
@media (max-width: 767px) {
  .lk-members-balance__head,
  .lk-member__summary,
  .lk-mb-row {
    grid-template-columns: minmax(0, 1fr) 70px 70px 75px;
    font-size: 0.82rem;
    gap: 0 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .lk-members-balance__head {
    font-size: 0.7rem;
    letter-spacing: 0;
  }

  .lk-member__detail {
    padding: 4px 0 10px;
  }

  .lk-member__detail .lk-mb-row .lk-mb-col--name {
    padding-left: 16px;
  }

  .lk-member__arrow {
    margin-right: 4px;
  }
}

/* --- Совсем узкий телефон --- */
@media (max-width: 420px) {
  .lk-members-balance__head,
  .lk-member__summary,
  .lk-mb-row {
    grid-template-columns: minmax(0, 1fr) 58px 58px 62px;
    font-size: 0.78rem;
    gap: 0 4px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .lk-members-balance__head {
    font-size: 0.65rem;
  }
}

/* --- Сводный отчёт по годам (debKred) --- */
.lk-summary-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lk-summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.lk-summary thead th {
  padding: 10px 12px;
  background: #f5f5f5;
  color: #337ab7;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  text-align: right;
  border-bottom: 2px solid #337ab7;
  white-space: nowrap;
}

.lk-summary thead th.lk-summary__label {
  text-align: left;
}

.lk-summary tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--parus-text);
  white-space: nowrap;
}

.lk-summary tbody td.lk-summary__label {
  text-align: left;
  font-weight: 500;
  color: var(--parus-dark);
  white-space: normal;
}

/* Sticky первая колонка при горизонтальной прокрутке */
.lk-summary thead th.lk-summary__label,
.lk-summary tbody td.lk-summary__label {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 4px 0 4px -2px rgba(0, 0, 0, 0.08);
}

.lk-summary thead th.lk-summary__label {
  background: #f5f5f5;
  z-index: 3;
}

.lk-summary tbody tr:hover td {
  background: #f5faff;
}

.lk-summary tbody tr:hover td.lk-summary__label {
  background: #f5faff;
}

/* Последняя строка — остаток на конец года: выделить */
.lk-summary tbody tr:last-child td {
  border-top: 2px solid #337ab7;
  border-bottom: none;
  background: #fafafa;
  font-weight: 600;
  color: var(--parus-dark);
  padding-top: 12px;
  padding-bottom: 12px;
}

.lk-summary tbody tr:last-child td.lk-summary__label {
  background: #fafafa;
}

.lk-summary tbody tr:last-child:hover td,
.lk-summary tbody tr:last-child:hover td.lk-summary__label {
  background: #fafafa;
}

@media (max-width: 575px) {
  .lk-summary {
    font-size: 0.85rem;
  }

  .lk-summary thead th,
  .lk-summary tbody td {
    padding: 8px 8px;
  }

  .lk-summary thead th {
    font-size: 0.72rem;
    letter-spacing: 0;
  }
}

/* ============================================
   LOGBOOK PAGE (single member logbook)
   Карточка участника (переиспользует .member-card)
   + таблица походов с итоговой строкой
   ============================================ */

/* Заголовок над таблицей походов */
.logbook-heading {
  margin-top: 35px;
}

/* ----- Таблица походов (модификатор .projects-table) ----- */

/* Десктоп: маршрут — самая широкая колонка, числовые — узкие и по центру */
.projects-table--logbook {
  font-size: 0.88rem;
}

.projects-table--logbook tbody td:first-child,
.projects-table--logbook tbody td:last-child {
  width: auto;
  text-align: left;
  color: var(--parus-text);
}

/* Сроки — компактная колонка без переноса */
.projects-table--logbook thead th:nth-child(1),
.projects-table--logbook tbody td:nth-child(1) {
  width: 140px;
  white-space: nowrap;
}

/* Ветер / Дней / Ночей / Дистанция — узкие числовые колонки по центру */
.projects-table--logbook thead th:nth-child(3),
.projects-table--logbook thead th:nth-child(4),
.projects-table--logbook thead th:nth-child(5),
.projects-table--logbook thead th:nth-child(6),
.projects-table--logbook tbody td:nth-child(3),
.projects-table--logbook tbody td:nth-child(4),
.projects-table--logbook tbody td:nth-child(5),
.projects-table--logbook tbody td:nth-child(6) {
  width: 90px;
  text-align: center;
}

/* Прилив — тоже по центру, чуть пошире */
.projects-table--logbook thead th:nth-child(7),
.projects-table--logbook tbody td:nth-child(7) {
  width: 110px;
  text-align: center;
}

/* Итоговая строка в tfoot */
.projects-table--logbook tfoot .logbook-table__totals {
  border-top: 2px solid #ddd;
  font-family: 'Montserrat', sans-serif;
  color: var(--parus-dark);
}

.projects-table--logbook tfoot .logbook-table__totals td {
  padding: 12px;
  font-weight: 500;
}

.projects-table--logbook tfoot .logbook-table__totals td:first-child {
  text-align: right;
}

.projects-table--logbook tfoot .logbook-table__totals td:nth-child(2) {
  text-align: center;
}

/* Мобильные: таблица → карточки (та же схема, что .members-table) */
@media (max-width: 767px) {

  .logbook-table {
    border: 0;
    font-size: 0.95rem;
  }

  .logbook-table thead {
    /* Скрываем, но оставляем для скринридеров */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .logbook-table tbody tr {
    display: block;
    position: relative;
    margin-bottom: 15px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
  }

  .logbook-table tbody tr:hover {
    background: rgba(51, 122, 183, 0.04);
  }

  .logbook-table tbody td {
    display: block;
    padding: 4px 0;
    border: none;
    text-align: left !important;
    width: auto !important;
    white-space: normal !important;
  }

  /* Маршрут — крупно, первым в карточке, без подписи */
  .logbook-table tbody td[data-label="Маршрут"] {
    padding-top: 0;
    padding-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--parus-dark);
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
    order: -1; /* наверх карточки */
  }

  /* Чтобы order работал — делаем строку flex-контейнером */
  .logbook-table tbody tr {
    display: flex;
    flex-direction: column;
  }

  /* Остальные ячейки — подпись + значение */
  .logbook-table tbody td[data-label="Сроки"]::before,
  .logbook-table tbody td[data-label="Ветер"]::before,
  .logbook-table tbody td[data-label="Дней"]::before,
  .logbook-table tbody td[data-label="Ночей"]::before,
  .logbook-table tbody td[data-label="Дистанция"]::before,
  .logbook-table tbody td[data-label="Прилив"]::before {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--parus-dark);
    margin-right: 4px;
  }

  /* Пустые ячейки не показываем */
  .logbook-table tbody td:empty {
    display: none;
  }

  /* Итоговая строка на мобильных — отдельной карточкой */
  .logbook-table tfoot {
    display: block;
  }

  .logbook-table tfoot .logbook-table__totals {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 16px;
    margin-bottom: 15px;
    border: 1px solid #337ab7;
    border-radius: 4px;
    background: rgba(51, 122, 183, 0.04);
  }

  .logbook-table tfoot .logbook-table__totals td {
    display: inline;
    padding: 0;
    border: none;
    text-align: left !important;
    width: auto !important;
  }

  /* Последняя пустая ячейка итогов скрывается */
  .logbook-table tfoot .logbook-table__totals td:last-child:empty {
    display: none;
  }

  .logbook-table tfoot .logbook-table__totals td:first-child {
    font-weight: 500;
    color: var(--parus-dark);
  }

  .logbook-table tfoot .logbook-table__totals td:nth-child(2) {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--parus-dark);
  }

  .logbook-table tfoot .logbook-table__totals td:nth-child(2)::before {
    content: "Дистанция: ";
    font-weight: 400;
    color: var(--parus-text);
  }

  .logbook-table tfoot .logbook-table__totals td:nth-child(2)::after {
    content: " nm";
    font-weight: 400;
    color: var(--parus-text);
  }
}
