/* =============================================
   GALLERY PAGE — Countryside Editorial
   ============================================= */

/* ── Lightbox ────────────────────────────────── */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 5, 0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lb-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 160px);
  max-height: 90vh;
}

.lb-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transition: opacity 0.15s ease;
}

.lb-video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: none;
  transition: opacity 0.15s ease;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-prev,
.lb-next {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.4rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.lb-prev:hover { background: rgba(255,255,255,0.22); transform: translateX(-2px); }
.lb-next:hover { background: rgba(255,255,255,0.22); transform: translateX(2px); }

.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin: 0;
}

@media (max-width: 600px) {
  .lb-img-wrap { max-width: calc(100vw - 100px); }
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 1.1rem; }
}

.gallery-section { background: var(--cream); }

/* ── Coming soon ─────────────────────────────── */
.gallery-coming-soon {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 72px;
  padding: 64px 40px;
  background: var(--forest);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.gallery-coming-soon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 100%, rgba(184,115,51,0.1), transparent 70%);
}

.gcs-icon {
  font-size: 3.2rem;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(184,115,51,0.3));
  position: relative;
  z-index: 1;
}

.gallery-coming-soon h2 {
  color: var(--cream);
  font-style: italic;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.gallery-coming-soon p {
  color: rgba(245,233,216,0.72);
  font-weight: 300;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.social-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ── Real gallery grid ───────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.gallery-figure--wide { grid-column: span 2; }

.gallery-item--span2 { grid-column: span 2; }
.gallery-item--span3 { grid-column: span 3; }

.gallery-item--span2:not(.gallery-item--video) {
  aspect-ratio: 9/8;
  min-height: unset;
}

.gallery-item--span3:not(.gallery-item--video) {
  aspect-ratio: 16/6;
  min-height: unset;
}

.gallery-caption {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 300;
  font-style: italic;
  margin: 0;
  padding: 0 4px;
  letter-spacing: 0.01em;
}


.gallery-item:not(.gallery-item--video) {
  aspect-ratio: unset;
  min-height: 200px;
}

.gallery-item.gallery-item--video {
  aspect-ratio: 9/16;
  cursor: pointer;
  background: #111;
}

.gallery-item.gallery-item--video::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  color: #1C3D28;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  z-index: 2;
  pointer-events: none;
  transition: background 0.2s, transform 0.2s;
}

.gallery-item.gallery-item--video:hover::before {
  background: rgba(255,255,255,1);
  transform: translate(-50%, -50%) scale(1.08);
}

.gallery-item video {
  display: none;
}

.gallery-item {
  aspect-ratio: unset;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  position: relative;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28,61,40,0);
  transition: background 0.3s;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.gallery-item:hover::after {
  background: rgba(28,61,40,0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}

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

/* ── Instagram section ───────────────────────── */
.instagram-section {
  background: var(--parchment);
  border-top: 1px solid var(--border);
  text-align: center;
}

.instagram-section h2 { font-style: italic; }
.instagram-section p  { color: var(--text-mid); font-weight: 300; }

.insta-handle {
  color: var(--amber);
  font-style: italic;
}
.insta-handle:hover { text-decoration: underline; }

.insta-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 36px;
}

.insta-placeholder {
  aspect-ratio: 1;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  transition: border-color 0.2s;
}

.insta-placeholder:hover { border-color: var(--amber); }

/* ── Social section (shared — also used on home) */
.social-section {
  background: var(--forest);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.social-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(184,115,51,0.07), transparent 60%);
  pointer-events: none;
}

.social-section .container { position: relative; z-index: 1; }

.social-section h2 {
  color: var(--cream);
  font-style: italic;
}

.social-section p { color: rgba(245,233,216,0.6); }

.social-follow-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Photo submission section ────────────────── */
.submit-section {
  background: var(--parchment);
  border-top: 1px solid var(--border);
}

.submit-section--simple {
  padding: 56px 0;
}

.submit-simple-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.submit-simple-inner h2 {
  font-style: italic;
  margin-bottom: 12px;
}

.submit-simple-inner p {
  margin-bottom: 28px;
  color: var(--text-mid);
  font-weight: 300;
}

.submit-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: start;
}

.submit-intro h2 {
  font-style: italic;
  margin-bottom: 16px;
}

.submit-note {
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
}

.submit-note strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.submit-note ol {
  padding-left: 1.2em;
  margin: 0;
}

.submit-note ol li {
  color: var(--text-mid);
  font-size: 0.92rem;
  font-weight: 300;
  margin-bottom: 6px;
  border: none;
  padding: 0;
}

.submit-note ol li::before { display: none; }

/* ── Form ────────────────────────────────────── */
.submit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
  display: block;
  font-weight: 300;
}

.submit-form input[type="text"],
.submit-form input[type="email"] {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--text-dark);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.submit-form input[type="text"]:focus,
.submit-form input[type="email"]:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(28,61,40,0.08);
}

.submit-form input[type="file"] {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-mid);
  background: var(--off-white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s;
}

.submit-form input[type="file"]:hover {
  border-color: var(--amber);
}

/* ── Consent block ───────────────────────────── */
.consent-block {
  background: var(--sage-pale);
  border: 1px solid var(--border-sage);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consent-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--forest);
  cursor: pointer;
}

.consent-check span {
  font-size: 0.88rem;
  color: var(--text-mid);
  font-weight: 300;
  line-height: 1.6;
}

.consent-check a {
  color: var(--forest);
  text-decoration: underline;
}

.submit-legal {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 300;
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

.submit-legal a { color: var(--forest); text-decoration: underline; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .submit-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--span2 { grid-column: span 2; }
  .gallery-item--span3 { grid-column: span 2; }
  .insta-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--span2,
  .gallery-item--span3 { grid-column: span 1; }
.insta-grid   { grid-template-columns: repeat(2, 1fr); }
  .gallery-coming-soon { padding: 48px 28px; }
}
