/*
 * Яхтклуб 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 {
  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 {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #337ab7;
}

/* 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;
}

.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;
  }

  .post-meta {
    flex-direction: column;
    gap: 3px;
  }
}

@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 {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--parus-dark);
    margin-right: 4px;
  }

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