/* ==========================================================================
   CODUR — additions for the PHP version (gallery, form feedback, anti-spam)
   ========================================================================== */

/* Project cards are clickable (open the gallery) */
.project-card { cursor: pointer; }
.project-card:focus-visible {
  outline: 2px solid var(--color-brand-copper-accent);
  outline-offset: 3px;
}
.project-card-overlay {
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  pointer-events: none;
}
.project-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(var(--brand-dark-rgb), 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}
.projects-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem 0 1rem;
}

/* Honeypot: invisible for people, visible for bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Contact form feedback */
.form-feedback {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  min-height: 1.2em;
  margin-top: 0.9rem;
}
.form-feedback:empty { margin-top: 0; }
.form-feedback.is-success { color: var(--color-brand-green); }
.form-feedback.is-error   { color: #b43232; }
.btn-submit[disabled] { opacity: 0.65; cursor: progress; }

/* Lightbox gallery */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(var(--brand-dark-rgb), 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: lb-in 0.25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  margin: 0;
  max-width: min(1400px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100svh - 9rem);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  user-select: none;
}
.lightbox-caption {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: #ffffff;
  font-size: 0.95rem;
  text-align: center;
}
.lightbox-title { font-weight: 600; }
.lightbox-counter { color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox-nav,
.lightbox.is-single .lightbox-counter { display: none; }

@media (max-width: 640px) {
  .lightbox-nav { top: auto; bottom: 1rem; transform: none; }
  .lightbox-img { max-height: calc(100svh - 11rem); }
}

/* Privacy notice under the contact form */
.form-privacy { margin-top: 0.9rem; font-size: 0.8rem; line-height: 1.5; color: var(--color-text-muted); }
.form-privacy a { color: var(--color-brand-green); font-weight: 600; }

/* Agency credit */
.footer-credit { margin-top: 1rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); text-align: center; }
.footer-credit a { color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.footer-credit a:hover { color: #fff; }

/* WhatsApp floating button */
.wa-float {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wa-float:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32); }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
body:has(.mobile-drawer.is-open) .wa-float,
body:has(.lightbox:not([hidden])) .wa-float { display: none; }
@media (max-width: 640px) { .wa-float { width: 54px; height: 54px; } }
/* keep the last footer line clear of the floating WhatsApp button */
.site-footer { padding-bottom: calc(2rem + 64px); }

/* Language switcher links (crawlable <a> instead of buttons) */
a.lang-btn { display: inline-block; text-decoration: none; line-height: inherit; }
