/* Eight Bells Contact Page V2 — clean reset with new classes */

.ebc2-page {
  --eb-bg: #f8f6f3;
  --eb-text: #2f2d2b;
  --eb-muted: #5f5a55;
  --eb-accent: #b79b7d;
  --eb-line: #d8d0c6;
  --eb-input-line: #bfb8b0;
  --eb-image-bg: #ddd7cf;

  background: var(--eb-bg);
  color: var(--eb-text);
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.ebc2-page *,
.ebc2-page *::before,
.ebc2-page *::after {
  box-sizing: border-box;
}

.ebc2-page a {
  color: inherit;
  text-decoration: none;
}

.ebc2-section {
  padding: 5.5rem 1.5rem 5rem;
}

.ebc2-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(560px, 1.18fr);
  gap: clamp(4rem, 7vw, 7rem);
  align-items: start;
}

.ebc2-media {
  align-self: stretch;
}

.ebc2-image {
  width: 100%;
  height: clamp(620px, 72vh, 820px);
  overflow: hidden;
  background: var(--eb-image-bg);
}

.ebc2-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
}

.ebc2-content {
  padding-top: 3.5rem;
  max-width: 760px;
}

.ebc2-eyebrow {
  margin: 0 0 1.7rem;
  color: var(--eb-accent);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ebc2-title {
  max-width: 760px;
  margin: 0;
  font-family: 'Playfair Display', 'Playfair', Georgia, 'Times New Roman', serif;
  font-size: clamp(3.2rem, 4.45vw, 4.65rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.ebc2-lead {
  max-width: 690px;
  margin: 2.1rem 0 0;
  color: var(--eb-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.ebc2-details {
  display: grid;
  gap: 1.15rem;
  max-width: 690px;
  margin-top: 2.7rem;
  padding-top: 2.1rem;
  border-top: 1px solid var(--eb-line);
}

.ebc2-detail {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  gap: 1.2rem;
  align-items: start;
  color: var(--eb-text);
  font-size: 0.94rem;
  line-height: 1.75;
}

.ebc2-icon {
  color: var(--eb-accent);
  font-size: 0.95rem;
  line-height: 1.75;
  text-align: center;
}

.ebc2-form {
  max-width: 690px;
  margin-top: 2.9rem;
}

/* Contact Form 7 base */

.ebc2-page .wpcf7,
.ebc2-page .wpcf7 form {
  margin: 0;
}

.ebc2-page .wpcf7 p {
  margin: 0;
}

/* Recommended CF7 markup:
   <div class="ebc2-form-grid">
     <label class="ebc2-field">YOUR NAME [text* your-name]</label>
     ...
     <label class="ebc2-field ebc2-field-full">TELL ME ABOUT YOUR PLANS [textarea your-message]</label>
     <div class="ebc2-submit-row">[submit "SEND MESSAGE →"]</div>
   </div>
*/

.ebc2-page .ebc2-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}

.ebc2-page .ebc2-field,
.ebc2-page .wpcf7 label {
  display: block;
  color: var(--eb-text);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ebc2-page .ebc2-field-full,
.ebc2-page .ebc2-submit-row {
  grid-column: 1 / -1;
}

.ebc2-page .ebc2-submit-row {
  text-align: right;
}

/* Fallback if you keep the old simple CF7 form without wrappers */
@media (min-width: 901px) {
  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
  }

  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) p {
    margin: 0;
  }

  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) p:nth-last-of-type(2),
  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) p:last-of-type,
  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) p:has(textarea) {
    grid-column: 1 / -1;
  }

  .ebc2-page .wpcf7 form:not(:has(.ebc2-form-grid)) p:last-of-type {
    text-align: left;
  }
}

.ebc2-page .wpcf7 input[type="text"],
.ebc2-page .wpcf7 input[type="email"],
.ebc2-page .wpcf7 input[type="tel"],
.ebc2-page .wpcf7 input[type="date"],
.ebc2-page .wpcf7 textarea,
.ebc2-page .wpcf7 select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--eb-input-line);
  border-radius: 0;
  background: transparent;
  padding: 0.68rem 0 0.45rem;
  color: var(--eb-text);
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  font-size: 0.98rem;
  line-height: 1.45;
  outline: none;
  box-shadow: none;
}

.ebc2-page .wpcf7 textarea {
  min-height: 170px;
  border: 1px solid var(--eb-input-line);
  padding: 1rem;
  margin-top: 0.75rem;
  resize: vertical;
}

.ebc2-page .wpcf7 input:focus,
.ebc2-page .wpcf7 textarea:focus,
.ebc2-page .wpcf7 select:focus {
  border-color: var(--eb-text);
}

.ebc2-page .wpcf7 input[type="submit"] {
  display: inline-block;
  min-width: 240px;
  border: 1px solid var(--eb-text);
  background: var(--eb-text);
  color: #fff;
  padding: 1rem 2rem;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 250ms ease, transform 250ms ease;
  border-radius: 0;
}

.ebc2-page .wpcf7 input[type="submit"]:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.ebc2-page .wpcf7-spinner {
  vertical-align: middle;
}

.ebc2-page .wpcf7-not-valid-tip {
  margin-top: 0.45rem;
  color: #8c4b3f;
  font-size: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.ebc2-page .wpcf7-response-output {
  grid-column: 1 / -1;
  margin: 1.5rem 0 0 !important;
  border-color: var(--eb-line) !important;
  padding: 1rem !important;
  color: var(--eb-muted);
  font-size: 0.9rem;
}

/* Medium screens */

@media (max-width: 1180px) {
  .ebc2-container {
    max-width: 1040px;
    grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
    gap: 4rem;
  }

  .ebc2-content {
    padding-top: 2.2rem;
  }

  .ebc2-title {
    font-size: clamp(3rem, 4.8vw, 4rem);
  }

  .ebc2-image {
    height: 680px;
  }
}

/* Mobile / tablet */

@media (max-width: 900px) {
  .ebc2-section {
    padding: 5rem 1.5rem 4.5rem;
  }

  .ebc2-container {
    display: flex;
    flex-direction: column;
    max-width: 680px;
    gap: 2.7rem;
  }

  .ebc2-content {
    display: contents;
    padding-top: 0;
    max-width: none;
  }

  .ebc2-intro {
    order: 1;
  }

  .ebc2-media {
    order: 2;
    width: 100%;
  }

  .ebc2-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .ebc2-details {
    order: 3;
    margin-top: 0;
    max-width: none;
  }

  .ebc2-form {
    order: 4;
    width: 100%;
    max-width: none;
    margin-top: 0;
  }

  .ebc2-title {
    max-width: 640px;
    font-size: clamp(2.7rem, 8vw, 4rem);
  }

  .ebc2-lead {
    max-width: 620px;
  }

  .ebc2-page .ebc2-form-grid {
    grid-template-columns: 1fr;
  }

  .ebc2-page .ebc2-submit-row {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .ebc2-section {
    padding: 4rem 1.25rem 4rem;
  }

  .ebc2-container {
    gap: 2.4rem;
  }

  .ebc2-eyebrow {
    margin-bottom: 1.25rem;
  }

  .ebc2-title {
    font-size: clamp(2.45rem, 11vw, 3.35rem);
    line-height: 1.02;
  }

  .ebc2-lead {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.75;
  }

  .ebc2-details {
    gap: 1rem;
    padding-top: 1.8rem;
  }

  .ebc2-detail {
    font-size: 0.92rem;
  }

  .ebc2-page .wpcf7 input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}
