.photos-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 10px 45px;
}

.photos-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 42px;
  padding: 38px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(155, 181, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: var(--card-box-shadow);
  overflow: hidden;
}

.photos-label {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 4px;
  opacity: 0.62;
}

.photos-hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.2;
}

.photos-desc {
  max-width: 660px;
  margin: 18px 0 28px;
  line-height: 1.9;
  opacity: 0.76;
}

.photos-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.photos-stats div {
  min-width: 110px;
  padding: 15px 18px;
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
}

.photos-stats strong {
  display: block;
  font-size: 25px;
  margin-bottom: 4px;
}

.photos-stats span {
  font-size: 13px;
  opacity: 0.65;
}

.photos-hero-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transform: rotate(2deg);
}

.photos-hero-card img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  display: block;
}

.hero-card-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.hero-card-info span {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.76;
}

.hero-card-info p {
  margin: 5px 0 0;
  font-weight: 600;
}

.photos-section {
  margin-bottom: 44px;
}

.section-title {
  margin-bottom: 20px;
}

.section-title h2 {
  margin: 0 0 8px;
  font-size: 27px;
}

.section-title p {
  margin: 0;
  line-height: 1.8;
  opacity: 0.68;
}

.photo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.photo-tab {
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--font-color);
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.photo-tab:hover {
  transform: translateY(-2px);
}

.photo-tab.active {
  color: #fff;
  background: var(--btn-bg);
}

.photo-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.photo-card img {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 16px 18px 20px;
  flex: 1;
}

.photo-card p {
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
  opacity: 0.68;
  min-height: 50px;
}
.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
}

.photo-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 16px 18px 20px;
}

.photo-card figcaption span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(128, 128, 128, 0.14);
  opacity: 0.75;
}

.photo-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.photo-card p {
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
  opacity: 0.68;
}

.photos-loading,
.photos-error,
.photos-empty {
  padding: 30px;
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
  text-align: center;
  opacity: 0.75;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.story-card {
  padding: 24px;
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
  transition: transform 0.25s ease;
}

.story-card:hover {
  transform: translateY(-5px);
}

.story-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: var(--btn-bg);
  font-weight: 700;
}

.story-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.story-card p {
  margin: 0;
  line-height: 1.9;
  opacity: 0.72;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.photo-viewer.show {
  display: flex;
}

.photo-viewer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.photo-viewer-content {
  position: relative;
  z-index: 1;
  max-width: min(960px, 94vw);
  max-height: 92vh;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.photo-viewer-content img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  background: #000;
}

.photo-viewer-info {
  padding: 18px 22px 22px;
}

.photo-viewer-info h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.photo-viewer-info p {
  margin: 0;
  line-height: 1.8;
  opacity: 0.72;
}

.photo-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 24px;
  line-height: 36px;
}

@media screen and (max-width: 920px) {
  .photo-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 560px) {
  .photo-masonry {
    grid-template-columns: 1fr;
  }

  .photo-card img {
    height: 220px;
  }
}