.edg-gallery {
  --eden-beige: #f5f0ea;
  --eden-card: #fffaf5;
  --eden-dark: #2a2333;
  --eden-brown: #5c4033;
  --eden-gold: #c9b178;
  --eden-muted: #665f6f;
  --eden-line: rgba(42, 35, 51, 0.14);
  background: var(--eden-beige);
  color: var(--eden-dark);
  font-family: Inter, Montserrat, Arial, sans-serif;
  margin: 0 auto;
  max-width: none;
  padding: clamp(0.35rem, 1vw, 0.8rem) 0 clamp(3rem, 7vw, 6rem);
  box-shadow: 0 0 0 100vmax var(--eden-beige);
  clip-path: inset(0 -100vmax);
  overflow-x: clip;
  white-space: normal !important;
  width: 100%;
}

.entry-content .edg-gallery,
.wp-block-post-content .edg-gallery,
.page-content .edg-gallery {
  max-width: none;
}

.entry-content > p:empty:has(+ .edg-gallery),
.entry-content > p:has(+ .edg-gallery):empty,
.entry-content > .edg-gallery + p:has(> code:empty) {
  display: none;
}

.edg-gallery *,
.edg-gallery *::before,
.edg-gallery *::after {
  box-sizing: border-box;
  white-space: normal !important;
}

.edg-gallery .screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.edg-gallery-inner {
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
  padding-left: clamp(18px, 4vw, 40px);
  padding-right: clamp(18px, 4vw, 40px);
  width: 100%;
}

.edg-hero {
  margin-bottom: clamp(1.35rem, 3vw, 2.25rem);
}

.edg-eyebrow {
  align-items: center;
  color: var(--eden-dark);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 0.8rem;
  letter-spacing: 0.16em;
  line-height: 1.2;
  margin-bottom: 0.95rem;
  text-transform: uppercase;
}

.edg-eyebrow::after {
  background: var(--eden-gold);
  content: "";
  display: block;
  height: 1px;
  width: 58px;
}

.edg-hero h2 {
  color: var(--eden-dark);
  font-family: "Playfair Display", Cormorant Garamond, Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 4.15rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
}

.edg-hero p {
  color: var(--eden-muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 680px;
}

.edg-hero-rules {
  align-items: stretch;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
  max-width: 760px;
}

.edg-hero-rules span {
  background: rgba(255, 250, 245, 0.82);
  border: 1px solid rgba(201, 177, 120, 0.62);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(42, 35, 51, 0.06);
  display: grid;
  gap: 0.32rem;
  padding: 0.9rem 1rem;
}

.edg-hero-rules strong {
  color: var(--eden-brown);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.edg-hero-rules em {
  color: var(--eden-dark);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
}

.edg-controls {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 clamp(1.4rem, 3vw, 2.3rem);
  max-width: 760px;
}

.edg-control-panel {
  background: rgba(255, 250, 245, 0.72);
  border: 1px solid rgba(201, 177, 120, 0.34);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(42, 35, 51, 0.06);
  overflow: hidden;
}

.edg-control-panel summary {
  align-items: center;
  color: var(--eden-dark);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 900;
  justify-content: space-between;
  letter-spacing: 0.08em;
  line-height: 1.1;
  list-style: none;
  min-height: 2.75rem;
  padding: 0.85rem 1rem;
  text-transform: uppercase;
}

.edg-control-panel summary::-webkit-details-marker {
  display: none;
}

.edg-control-panel summary::after {
  color: var(--eden-brown);
  content: "+";
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.edg-control-panel[open] summary::after {
  content: "-";
}

.edg-control-panel summary:focus-visible {
  outline: 3px solid rgba(201, 177, 120, 0.65);
  outline-offset: -3px;
}

.edg-control-content {
  border-top: 1px solid rgba(201, 177, 120, 0.22);
  padding: 0.85rem 1rem 1rem;
}

.edg-search {
  max-width: 520px;
}

.edg-search label {
  color: var(--eden-brown);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 0.42rem;
  text-transform: uppercase;
}

.edg-search input {
  appearance: none;
  background: rgba(255, 250, 245, 0.82);
  border: 1.5px solid rgba(42, 35, 51, 0.2);
  border-radius: 999px;
  color: var(--eden-dark);
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-size: 0.98rem;
  line-height: 1.2;
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
  width: 100%;
}

.edg-search input:focus {
  border-color: var(--eden-dark);
  outline: 3px solid rgba(201, 177, 120, 0.35);
  outline-offset: 2px;
}

.edg-search input::placeholder {
  color: rgba(102, 95, 111, 0.72);
}

.edg-filters {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0;
}

.edg-sort {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0;
}

.edg-filter-group {
  align-items: center;
  display: inline-flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.edg-filter-label {
  color: var(--eden-brown);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-right: 0.1rem;
  text-transform: uppercase;
}

.edg-filters button,
.edg-sort button {
  appearance: none;
  background: rgba(255, 250, 245, 0.5);
  border: 1.5px solid var(--eden-dark);
  border-radius: 999px;
  color: var(--eden-dark);
  cursor: pointer;
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
  min-height: 2.2rem;
  padding: 0.58rem 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.edg-filters button:hover,
.edg-filters button.is-active,
.edg-sort button:hover,
.edg-sort button.is-active {
  background: var(--eden-dark);
  border-color: var(--eden-dark);
  color: #fff;
  transform: translateY(-1px);
}

.edg-filters button:focus-visible,
.edg-sort button:focus-visible,
.edg-favorite:focus-visible,
.edg-card-button:focus-visible {
  outline: 3px solid rgba(201, 177, 120, 0.65);
  outline-offset: 3px;
}

.edg-filter-meta {
  color: var(--eden-muted);
  flex-basis: 100%;
  font-size: 0.86rem;
  font-weight: 700;
  margin-left: 0;
}

.edg-grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.8rem);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.edg-card {
  min-width: 0;
  position: relative;
}

.edg-card[hidden] {
  display: none !important;
}

.edg-card-button {
  appearance: none;
  aspect-ratio: 1;
  background: var(--eden-dark);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 24px 52px rgba(42, 35, 51, 0.15);
  color: #fff;
  cursor: pointer;
  display: block;
  font-family: Inter, Montserrat, Arial, sans-serif;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: left;
  width: 100%;
}

.edg-photo {
  background: #efe8df;
  display: block;
  inset: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.edg-photo::after {
  background: linear-gradient(180deg, rgba(42, 35, 51, 0) 0%, rgba(42, 35, 51, 0) 58%, rgba(42, 35, 51, 0.42) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.edg-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.55s ease;
  width: 100%;
}

.edg-card-button:hover .edg-photo img {
  transform: scale(1.055);
}

.edg-photo-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #fffaf5 0%, #eadfd5 100%);
  color: var(--eden-dark);
  display: flex;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  text-align: center;
  z-index: 1;
}

.edg-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  left: 0.75rem;
  position: absolute;
  right: 3.55rem;
  top: 0.75rem;
  z-index: 2;
}

.edg-favorite {
  align-items: center;
  appearance: none;
  background: rgba(255, 250, 245, 0.18);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.25rem;
  height: 2.25rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  text-shadow: 0 2px 8px rgba(42, 35, 51, 0.45);
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  width: 2.25rem;
  z-index: 3;
}

.edg-favorite:hover {
  background: rgba(42, 35, 51, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.edg-favorite.is-active {
  background: rgba(255, 250, 245, 0.22);
  color: var(--eden-gold);
}

.edg-favorite:disabled {
  cursor: wait;
  opacity: 0.72;
}

.edg-favorite span[aria-hidden] {
  font-size: 0;
}

.edg-favorite span[aria-hidden]::before {
  content: "\2665";
  font-size: 1.25rem;
}

.edg-badge {
  backdrop-filter: blur(12px);
  background: rgba(42, 35, 51, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(42, 35, 51, 0.16);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  padding: 0.48rem 0.64rem;
}

.edg-badge:first-child {
  background: rgba(201, 177, 120, 0.94);
  color: var(--eden-dark);
}

.edg-badge:nth-child(2) {
  background: rgba(92, 64, 51, 0.9);
}

.edg-card-overlay {
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(42, 35, 51, 0) 0%, rgba(42, 35, 51, 0.18) 100%);
  bottom: 0;
  display: flex;
  justify-content: flex-start;
  left: 0;
  padding: 0.78rem;
  position: absolute;
  right: 0;
  text-align: left;
  z-index: 2;
}

.edg-card-title {
  backdrop-filter: blur(10px);
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(201, 177, 120, 0.5);
  border-radius: 999px;
  color: var(--eden-dark);
  display: inline-flex;
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0.34rem 0.5rem;
  text-shadow: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edg-card-hint {
  background: rgba(42, 35, 51, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.48rem 0.72rem;
}

.edg-info-toggle {
  appearance: none;
  background: rgba(42, 35, 51, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  bottom: 1.1rem;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  justify-content: center;
  left: 50%;
  line-height: 1;
  min-height: 0;
  padding: 0.48rem 0.72rem;
  position: absolute;
  transform: translateX(-50%);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  width: auto;
  z-index: 4;
}

.edg-info-toggle:hover,
.edg-info-toggle[aria-expanded="true"] {
  background: var(--eden-dark);
  border-color: var(--eden-dark);
  color: #fff;
  transform: translate(-50%, -1px);
}

.edg-info-toggle:focus-visible {
  outline: 3px solid rgba(201, 177, 120, 0.65);
  outline-offset: 3px;
}

.edg-card-details {
  background: rgba(255, 250, 245, 0.88);
  border: 1px solid rgba(201, 177, 120, 0.35);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(42, 35, 51, 0.08);
  color: var(--eden-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-top: 0.7rem;
  padding: 0.95rem 1rem;
}

.edg-card-details p {
  margin: 0 0 0.55rem;
}

.edg-card-details p:last-child {
  margin-bottom: 0;
}

.edg-description-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.edg-description-list p {
  background: rgba(245, 240, 234, 0.62);
  border: 1px solid rgba(42, 35, 51, 0.1);
  border-radius: 12px;
  margin: 0;
  padding: 0.65rem 0.72rem;
}

.edg-description-list strong {
  color: var(--eden-brown);
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.edg-description-list span {
  color: var(--eden-dark);
  display: block;
}

.edg-booking-help {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.75rem 0;
}

.edg-booking-help span {
  background: rgba(245, 240, 234, 0.74);
  border: 1px solid rgba(42, 35, 51, 0.12);
  border-radius: 14px;
  display: block;
  padding: 0.7rem 0.75rem;
}

.edg-booking-help em {
  color: var(--eden-brown);
  display: block;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.edg-booking-help strong {
  color: var(--eden-dark);
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.edg-booking-help small {
  color: var(--eden-muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.edg-tags {
  color: var(--eden-brown);
  font-size: 0.84rem;
  font-weight: 800;
}

.edg-favorite-count {
  color: var(--eden-brown);
  font-size: 0.82rem;
  font-weight: 800;
}

.edg-empty {
  background: rgba(255, 250, 245, 0.82);
  border: 1px solid var(--eden-line);
  border-radius: 18px;
  color: var(--eden-muted);
  margin: 0;
  padding: 1.2rem;
}

.edg-coming-soon {
  color: var(--eden-muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  margin: clamp(1rem, 2.4vw, 1.5rem) 0 0;
}

.edg-lightbox-open {
  overflow: hidden;
}

.edg-lightbox {
  align-items: center;
  background: rgba(42, 35, 51, 0.88);
  cursor: zoom-out;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: clamp(18px, 4vw, 44px);
  position: fixed;
  z-index: 999999;
}

.edg-lightbox img {
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: block;
  max-height: 92vh;
  max-width: 92vw;
  object-fit: contain;
}

.edg-lightbox-close {
  appearance: none;
  background: rgba(255, 250, 245, 0.95);
  border: 0;
  border-radius: 999px;
  color: var(--eden-dark);
  cursor: pointer;
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.62rem 0.9rem;
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  top: clamp(14px, 3vw, 28px);
}

@media (max-width: 760px) {
  .edg-gallery {
    padding: 0.45rem 0 2.6rem;
  }

  .edg-gallery-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .edg-search {
    max-width: none;
  }

  .edg-controls {
    max-width: none;
  }

  .edg-hero-rules {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .edg-gallery-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .edg-grid {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edg-card-button {
    border-radius: 17px;
  }

  .edg-filters button {
    font-size: 0.78rem;
    min-height: 2rem;
    padding: 0.5rem 0.78rem;
  }

  .edg-sort button {
    font-size: 0.78rem;
    min-height: 2rem;
    padding: 0.5rem 0.78rem;
  }

  .edg-filter-label {
    flex-basis: 100%;
  }

  .edg-badges {
    gap: 0.28rem;
    left: 0.55rem;
    right: 3.05rem;
    top: 0.55rem;
  }

  .edg-favorite {
    height: 2rem;
    right: 0.55rem;
    top: 0.55rem;
    width: 2rem;
  }

  .edg-badge {
    font-size: 0.64rem;
    padding: 0.38rem 0.48rem;
  }

  .edg-card-overlay {
    padding: 0.58rem;
  }

  .edg-card-title {
    font-size: 0.68rem;
    padding: 0.3rem 0.44rem;
  }

  .edg-card-hint {
    display: none;
  }

  .edg-info-toggle {
    font-size: 0.72rem;
    min-height: 1.9rem;
    padding: 0.46rem 0.62rem;
  }

  .edg-booking-help {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .edg-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edg-card-button:hover .edg-photo img,
  .edg-photo img,
  .edg-sort button,
  .edg-favorite,
  .edg-info-toggle,
  .edg-filters button {
    transition: none;
  }
}
