/* Hobby page styles for SOFTMAR-MM */

.hobby-page {
  background: var(--paper, #faf9f6);
}

.hobby-hero {
  padding: 55px 0 35px;
  background: linear-gradient(180deg, #f0f5f8 0%, rgba(240, 245, 248, 0) 100%);
  border-bottom: 1px solid #e1e9ef;
}

.hobby-hero .eyebrow {
  margin-bottom: 14px;
}

.hobby-hero h1 {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 700;
  letter-spacing: -1.8px;
  line-height: 1.15;
  color: var(--ink, #192f36);
  margin-bottom: 18px;
}

.hobby-hero .lead {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.8;
  color: #496174;
  margin-bottom: 28px;
}

.hobby-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.hobby-badges a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #dce5ec;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 550;
  color: #244b6e;
  transition: all .2s ease;
  text-decoration: none;
}

.hobby-badges a:hover {
  background: #244b6e;
  color: #fff;
  border-color: #244b6e;
  transform: translateY(-1px);
}

.hobby-section {
  padding: 55px 0;
  border-bottom: 1px solid #e6edf2;
}

.hobby-section:last-of-type {
  border-bottom: 0;
}

.hobby-section-header {
  margin-bottom: 28px;
}

.hobby-section-header .section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--orange, #ef865c);
  margin-bottom: 8px;
}

.hobby-section-header h2 {
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink, #192f36);
  margin-bottom: 10px;
}

.hobby-section-header p {
  font-size: 15px;
  line-height: 1.75;
  color: #556e82;
  max-width: 740px;
}

/* Gallery Grid */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.hobby-grid-dense {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #e9eff4;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid #dce5ec;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  outline: none;
}

.gallery-item:hover, .gallery-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(25, 47, 54, 0.12);
  border-color: #9bb6cb;
}

.gallery-item:focus-visible {
  outline: 3px solid #bd4d24;
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item .overlay-zoom {
  position: absolute;
  inset: 0;
  background: rgba(25, 47, 54, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  color: #fff;
  font-size: 26px;
  pointer-events: none;
}

.gallery-item:hover .overlay-zoom {
  opacity: 1;
}

/* Lightbox dialog */
.lightbox-dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  margin: auto;
  overflow: visible;
  outline: none;
}

.lightbox-dialog::backdrop {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  display: block;
  max-width: min(1200px, 86vw);
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  background: #111;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 12px;
  font-size: 13px;
  color: #e2e9ef;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lightbox-counter {
  background: rgba(255,255,255,0.18);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: all .2s;
  z-index: 10;
  user-select: none;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-btn.prev {
  left: -55px;
}

.lightbox-btn.next {
  right: -55px;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: opacity .2s;
}

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

@media (max-width: 800px) {
  .hobby-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
  .hobby-grid-dense {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 9px;
  }
  .lightbox-btn.prev {
    left: 8px;
    background: rgba(0,0,0,0.6);
  }
  .lightbox-btn.next {
    right: 8px;
    background: rgba(0,0,0,0.6);
  }
  .lightbox-close {
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }
  .lightbox-img {
    max-width: 94vw;
    max-height: 75vh;
  }
}

@media (max-width: 480px) {
  .hobby-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hobby-grid-dense {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .hobby-hero h1 {
    font-size: 30px;
  }
  .hobby-hero .lead {
    font-size: 14px;
  }
}
