/* ==========================================================================
   Album Examples & Visual Gallery Styles
   Harmonized with Front Page (index.html) and styles-friendly.css
   ========================================================================== */

/* Page Wrap */
.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

/* Top Search & Filter Bar */
.gallery-filter-card {
  background: #ffffff;
  border: 1px solid #ccdae4;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(18, 46, 64, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.gallery-search-wrap {
  flex: 1 1 300px;
  position: relative;
}

.gallery-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #bdd3e3;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #14384a;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.gallery-search-input:focus {
  border-color: #0b6a87;
  box-shadow: 0 0 0 3px rgba(11, 106, 135, 0.12);
}

.search-glyph {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6a8c9e;
  pointer-events: none;
}

.filter-btn-group {
  display: flex;
  gap: 8px;
}

.filter-ctrl-btn {
  padding: 8px 14px;
  border: 1px solid #0b6a87;
  border-radius: 8px;
  background: #ffffff;
  color: #0b6a87;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.filter-ctrl-btn:hover {
  background: #0b6a87;
  color: #ffffff;
}

/* Category Accordion Container (styled like .native-section) */
.cat-accordion-section {
  margin-bottom: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #ccdae4;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(18, 46, 64, 0.05);
  transition: border-color 140ms ease;
}

.cat-accordion-section:hover {
  border-color: #9cbcd3;
}

.cat-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #f4f9fc 0%, #e8f1f7 100%);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 120ms ease;
}

.cat-accordion-section.is-open .cat-accordion-header {
  border-bottom-color: #d4e0e9;
  background: linear-gradient(90deg, #eaf2f8 0%, #dfeaf2 100%);
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-header-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.cat-header-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.22rem;
  color: #14384a;
}

.cat-header-sub {
  font-size: 12.5px;
  color: #4a6f82;
  margin-left: 6px;
  display: none;
}

@media (min-width: 720px) {
  .cat-header-sub {
    display: inline;
  }
}

.cat-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cat-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #b8cee0;
  color: #0b6a87;
  font-size: 11px;
  font-weight: bold;
  transition: transform 180ms ease;
}

.cat-accordion-section.is-open .cat-chevron {
  transform: rotate(180deg);
}

.cat-accordion-body {
  display: none;
  padding: 20px;
}

.cat-accordion-section.is-open .cat-accordion-body {
  display: block;
}

/* Card Styling Exactly Matching Front Page .native-feature-card */
.front-feature-card {
  background: #ffffff;
  border: 1px solid #ccdae4;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(18, 46, 64, 0.06);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  display: flex;
  flex-direction: column;
}

.front-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(18, 46, 64, 0.11);
  border-color: #0b6a87;
}

.card-top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.front-feature-card h3 {
  margin: 0;
  color: #0b6a87;
  font-size: 1.15rem;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.3;
}

.front-feature-card p.card-explanation {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #3b5f70;
  line-height: 1.5;
  min-height: 38px;
}

/* Dynamic Small Image Frame */
.dynamic-thumb-frame {
  width: 100%;
  height: 180px;
  background: #f7fafc;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 4px rgba(18, 46, 64, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dynamic-thumb-frame * {
  cursor: pointer;
}

.dynamic-thumb-frame:hover {
  border-color: #0b6a87;
  box-shadow: 0 4px 12px rgba(11, 106, 135, 0.18);
}

.dynamic-thumb-frame img {
  max-width: 95%;
  max-height: 95%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 140ms ease;
}

.dynamic-thumb-frame:hover img {
  transform: scale(1.03);
}

.zoom-hint-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(11, 106, 135, 0.88);
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(2px);
  pointer-events: auto;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}

.dynamic-thumb-frame:hover .zoom-hint-badge {
  background: #0b6a87;
}

/* Dynamic Selector Dropdown */
.variation-control-group {
  margin-bottom: 12px;
}

.variation-control-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #1a495f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.variation-selector {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #b8cddc;
  border-radius: 6px;
  background: #fdfefe;
  color: #14384a;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 120ms ease;
}

.variation-selector:focus,
.variation-selector:hover {
  border-color: #0b6a87;
}

/* Card Bottom Actions */
.card-actions-wrapper {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-actions-wrapper .btn {
  flex: 1 1 calc(50% - 6px);
  min-width: 90px;
  text-align: center;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.card-actions-wrapper .btn.btn-txt,
.btn-txt {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155 !important;
  transition: all 120ms ease;
}

.card-actions-wrapper .btn.btn-txt:hover,
.btn-txt:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a !important;
}

.card-actions-wrapper .btn.btn-stampalbum,
.btn-stampalbum {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d !important;
  transition: all 120ms ease;
}

.card-actions-wrapper .btn.btn-stampalbum:hover,
.btn-stampalbum:hover {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d !important;
}

/* Lightbox Modal */
.lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 28, 41, 0.90);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.lightbox-overlay.active {
  display: flex !important;
}

.lightbox-card {
  max-width: 90vw;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-card img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border: 1px solid #dce7f0;
  border-radius: 6px;
  background: #ffffff;
}

.lightbox-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.lightbox-label {
  font-size: 14px;
  font-weight: 700;
  color: #14384a;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  background: #0b6a87;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: background 0.15s ease, transform 0.15s ease;
  line-height: 1;
  padding: 0;
}

.lightbox-close:hover {
  background: #084c61;
  transform: scale(1.1);
}
