/* gallery.css — галерея альбомов VIP AUTO.
   Использует токены темы из base.css: --accent-color1 (#FE4819), --accent-color2 (#191919).
   Отдельный файл, чтобы не раздувать style.css и не сбрасывать его кэш. */

.gal { padding: 40px 0 60px; }
.gal .section-header { margin-bottom: 28px; }
.gal .section-header h2 { margin: 0 0 8px; }

/* --- сетка альбомов --- */
.gal-list { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .gal-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px)  { .gal-list { grid-template-columns: repeat(3, 1fr); } }

.gal-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid rgba(25,25,25,.10);
  overflow: hidden; border-radius: 12px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.gal-card:hover { border-color: var(--accent-color1); box-shadow: 0 8px 24px rgba(25,25,25,.10); }
.gal-card:focus-visible { outline: 3px solid var(--accent-color1); outline-offset: 3px; }

.gal-cover { position: relative; aspect-ratio: 4 / 3; background: var(--bg-color1, #E3E3E3); overflow: hidden; }
.gal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gal-card:hover .gal-cover img { transform: scale(1.04); }

.gal-body { padding: 16px 18px 20px; }
.gal-body .gal-label {
  display: inline-block; margin-bottom: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-color1);
}
.gal-body h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.25; }
.gal-body p { margin: 0; color: #6b6b6b; font-size: 14px; }
.gal-place { color: #8a8a8a; font-size: 13px; margin-top: 6px; }

.gal-empty { padding: 40px 0; color: #8a8a8a; }
.gal-count { color: #8a8a8a; font-size: 14px; }

/* --- страница альбома --- */
.gal-hero { padding: 28px 0 8px; }
.gal-hero h1 { margin: 10px 0 14px; }
.gal-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #6b6b6b; font-size: 14px; margin-bottom: 6px; }
.gal-desc { max-width: 760px; font-size: 16px; color: #4b4b4b; margin: 14px 0 0; }

.gal-photos { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); padding: 24px 0 60px; }
@media (min-width: 720px)  { .gal-photos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gal-photos { grid-template-columns: repeat(4, 1fr); } }

.gal-shot {
  display: block; position: relative; aspect-ratio: 1 / 1;
  background: var(--bg-color1, #E3E3E3); overflow: hidden;
  border: 0; padding: 0; cursor: zoom-in; width: 100%; border-radius: 8px;
}
.gal-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-shot:focus-visible { outline: 3px solid var(--accent-color1); outline-offset: 2px; }

/* --- лайтбокс --- */
.gal-lb {
  border: 0; padding: 0; background: transparent; margin: 0;
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; display: none;
}
.gal-lb[open] { display: grid; place-items: center; }
.gal-lb::backdrop { background: rgba(10,10,10,.94); }

.gal-lb-stage { display: grid; place-items: center; width: 100%; height: 100%; padding: 56px 16px; }
.gal-lb-stage img { max-width: 100%; max-height: calc(100vh - 120px); display: block; object-fit: contain; }

.gal-lb-close {
  position: fixed; top: 14px; right: 16px; width: 46px; height: 46px;
  border: 0; background: rgba(255,255,255,.14); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; border-radius: 50%;
  display: grid; place-items: center;
}
.gal-lb-close:hover { background: rgba(255,255,255,.28); }
.gal-lb-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.gal-lb-nav {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; color: #fff; font-size: 14px;
}
.gal-lb-nav button {
  width: 46px; height: 46px; border: 0; background: rgba(255,255,255,.14);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center;
}
.gal-lb-nav button:hover { background: rgba(255,255,255,.28); }
.gal-lb-nav button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gal-lb-nav button[disabled] { opacity: .3; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .gal-card, .gal-cover img { transition: none; }
  .gal-card:hover .gal-cover img { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .gal-lb[open] { animation: gal-fade .16s ease; }
  @keyframes gal-fade { from { opacity: 0; } to { opacity: 1; } }
}

/* --- блок-тизер на странице «О компании» --- */
.gal-teaser { padding: 48px 0; }
.gal-teaser .section-header { margin-bottom: 26px; }
.gal-teaser .section-header p { color: #6b6b6b; margin: 8px 0 0; max-width: 620px; }
.gal-teaser-more { margin-top: 26px; }
.gal-teaser-more .btn { display: inline-flex; align-items: center; }

/* на странице «О компании» сетка уже: три карточки в один ряд */
@media (min-width: 992px) {
    .gal-teaser .gal-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 639px) {
    .gal-teaser .gal-list { grid-template-columns: 1fr; }
}
