/**
 * Estação das Motos Core — Formulário de Contato & Galeria Lightbox
 */

/* Formulário de Contato */
.edm-contact-form,
.edm-contact-success {
  border: 1px solid #e3e8ef;
  background-color: #ffffff;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .edm-contact-form,
  .edm-contact-success {
    padding: 2rem;
  }
}

.edm-form-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .edm-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .edm-field-full {
    grid-column: span 2 / span 2;
  }
}

.edm-field {
  display: block;
}

.edm-field-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(11, 27, 51, 0.5);
}

.edm-req {
  color: #e31e24;
}

.edm-input {
  margin-top: 0.375rem;
  width: 100%;
  border: 1px solid #e3e8ef;
  background-color: #ffffff;
  padding: 0.75rem 1rem;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: #0b1b33;
  outline: none;
  transition: border-color 0.2s ease;
  border-radius: 0;
}

.edm-input::placeholder {
  color: rgba(11, 27, 51, 0.3);
}

.edm-input:focus {
  border-color: #002855;
}

.edm-input.is-error {
  border-color: #e31e24;
}

.edm-textarea {
  resize: vertical;
  min-height: 130px;
}

.edm-field-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 12px;
  color: #e31e24;
}

.edm-field-error.is-visible {
  display: block;
}

.edm-form-alert {
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid rgba(227, 30, 36, 0.25);
  background-color: rgba(227, 30, 36, 0.05);
  padding: 1rem;
}

.edm-form-alert[hidden] {
  display: none;
}

.edm-form-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #e31e24;
}

.edm-form-alert p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e31e24;
}

.edm-form-footer {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .edm-form-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.edm-form-note {
  margin: 0;
  max-width: 20rem;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(11, 27, 51, 0.45);
}

.edm-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: #e31e24;
  border: 0;
  padding: 1rem 1.75rem;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.edm-submit-btn:hover {
  background-color: #c4161c;
}

.edm-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.edm-submit-btn svg {
  width: 16px;
  height: 16px;
}

/* Sucesso */
.edm-contact-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.edm-contact-success[hidden] {
  display: none;
}

.edm-success-icon {
  width: 36px;
  height: 36px;
  color: #1fa855;
}

.edm-contact-success h3 {
  margin: 0;
  font-family: "Archivo", sans-serif;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #002855;
}

.edm-contact-success p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(11, 27, 51, 0.65);
}

.edm-btn-new-msg {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: "Archivo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #e31e24;
  cursor: pointer;
}

.edm-btn-new-msg svg {
  width: 16px;
  height: 16px;
}

/* Galeria & Lightbox */
.edm-gallery-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .edm-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .edm-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.edm-gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #f4f7fa;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  width: 100%;
}

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

.edm-gallery-card:hover img {
  transform: scale(1.05);
}

.edm-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 27, 61, 0.85), rgba(0, 27, 61, 0.1), transparent);
}

.edm-gallery-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
}

.edm-gallery-cat {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
}

.edm-gallery-title {
  display: block;
  margin-top: 0.25rem;
  font-family: "Archivo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #ffffff;
}

.edm-gallery-expand {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.edm-gallery-card:hover .edm-gallery-expand {
  color: #ffffff;
}

.edm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 27, 61, 0.95);
  padding: 1rem;
}

.edm-lightbox[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .edm-lightbox {
    padding: 2rem;
  }
}

.edm-lightbox-close {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edm-lightbox-close:hover {
  background-color: #ffffff;
  color: #002855;
}

.edm-lightbox-close svg {
  width: 20px;
  height: 20px;
}

.edm-lightbox-figure {
  margin: 0;
  width: 100%;
  max-width: 56rem;
}

.edm-lightbox-figure img {
  display: block;
  max-height: 76vh;
  width: 100%;
  object-fit: contain;
}

.edm-lightbox-caption {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.edm-lightbox-title {
  font-family: "Archivo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #ffffff;
}

.edm-lightbox-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
}
