/**
 * HOLEP Contact Page Styles
 * Loaded only on contact.php – depends on style.css variables
 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Contact Hero – same full-bleed bg pattern as home.css .home-hero
   ========================================================================== */
.contact-hero {
  --contact-hero-bg-pos-x: 82%;
  --contact-hero-bg-pos-y: 40%;
  --contact-hero-min-height: clamp(720px, 52vh, 880px);

  position: relative;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  min-height: var(--contact-hero-min-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #ffffff;
}

/* Background image layer – separate from gradient */
.contact-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/home/hero-bg.png");
  background-size: cover;
  background-position: var(--contact-hero-bg-pos-x) var(--contact-hero-bg-pos-y);
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* White → transparent gradient across full hero width */
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 25%,
    rgba(255, 255, 255, 0.75) 40%,
    rgba(255, 255, 255, 0.35) 55%,
    rgba(255, 255, 255, 0.15) 65%,
    rgba(255, 255, 255, 0.05) 75%,
    rgba(255, 255, 255, 0) 85%
  );
  z-index: 1;
  pointer-events: none;
}

.contact-hero__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 80px clamp(24px, 5vw, 80px);
  min-height: var(--contact-hero-min-height);
  display: flex;
  align-items: center;
}

.contact-hero__content {
  max-width: 620px;
  width: 100%;
  margin-left: max(0px, calc((100% - 1200px) / 2));
}

.contact-hero__badge {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green);
  background: var(--color-green-light);
  border-radius: 999px;
  margin-bottom: 24px;
}

.contact-hero__title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.contact-hero__text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-paragraph);
  margin-bottom: 36px;
  max-width: 520px;
}

.contact-hero__features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 420px;
}

.contact-hero__feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-hero__feature-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-green-light);
  color: var(--color-green);
}

.contact-hero__feature-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
  line-height: 1.3;
}

.contact-hero__feature-text {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-paragraph);
  margin: 0;
}

/* ==========================================================================
   Contact Form Section
   ========================================================================== */
.contact-section {
  padding: 72px 0 96px;
  background: #ffffff;
}

.contact-section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.contact-card {
  border-radius: 20px;
  padding: 36px 36px 40px;
}

.contact-card--form {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(16, 40, 75, 0.04);
}

.contact-card--info {
  background: #f5fbf2;
  border: 1.5px solid #cfe9b8;
}

.contact-card__title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

.contact-form__alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 22px;
}

.contact-form__alert--success {
  background: #f2fbf2;
  border: 1px solid #cfe9b8;
  color: #3d7a24;
}

.contact-form__alert--error {
  background: #fff5f5;
  border: 1px solid #f5c2c2;
  color: #b42318;
}

.contact-form__error {
  margin: 0;
  font-size: 0.8125rem;
  color: #b42318;
  line-height: 1.4;
}

.contact-form__error--consent {
  margin: -12px 0 18px;
}

.contact-form__field.has-error .contact-form__input,
.contact-form__field.has-error .contact-form__select,
.contact-form__field.has-error .contact-form__textarea {
  border-color: #f04438;
}

.contact-form__consent.has-error {
  color: #b42318;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  margin-bottom: 22px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.contact-form__field--full {
  grid-column: 1 / -1;
}

.contact-form__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.3;
}

.contact-form__req {
  color: var(--color-green);
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-primary);
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__input,
.contact-form__select {
  height: 50px;
  padding: 0 16px;
}

.contact-form__textarea {
  min-height: 150px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.55;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: #9ca3af;
}

.contact-form__input:hover,
.contact-form__select:hover,
.contact-form__textarea:hover {
  border-color: #d1d5db;
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.15);
}

.contact-form__select-wrap {
  position: relative;
}

.contact-form__select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.contact-form__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  color: var(--color-primary);
}

.contact-form__select:invalid {
  color: #9ca3af;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-paragraph);
  cursor: pointer;
}

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

.contact-form__consent a {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: none;
}

.contact-form__consent a:hover {
  text-decoration: underline;
}

.contact-form__submit {
  min-height: 50px;
  padding: 14px 26px;
  position: relative;
  min-width: 200px;
}

.contact-form__submit-idle,
.contact-form__submit-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-form__submit.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.85;
}

.contact-form__submit.is-loading .contact-form__submit-idle {
  display: none;
}

.contact-form__submit.is-loading .contact-form__submit-loading {
  display: inline-flex;
}

.contact-form__submit-loading[hidden] {
  display: none !important;
}

.contact-form__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: contact-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes contact-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form__spinner {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.35);
    border-right-color: #ffffff;
  }
}

/* Contact info sidebar */
.contact-info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-green);
  border: 1px solid #dff0d0;
}

.contact-info__copy {
  min-width: 0;
}

.contact-info__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin: 0 0 6px;
}

.contact-info__value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.35;
  margin: 0 0 6px;
  text-decoration: none;
}

a.contact-info__value:hover {
  color: var(--color-green);
}

.contact-info__note {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-paragraph);
  margin: 0;
}

.contact-info__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-green);
  text-decoration: none;
}

.contact-info__link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Responsive – hero bg breakpoints mirrored from home.css
   ========================================================================== */
@media (min-width: 1440px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 84%;
    --contact-hero-bg-pos-y: 38%;
    --contact-hero-min-height: clamp(760px, 54vh, 920px);
  }
}

@media (min-width: 1680px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 86%;
    --contact-hero-bg-pos-y: 36%;
    --contact-hero-min-height: clamp(800px, 56vh, 960px);
  }
}

@media (min-width: 1920px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 88%;
    --contact-hero-bg-pos-y: 34%;
    --contact-hero-min-height: clamp(840px, 58vh, 1000px);
  }
}

@media (min-width: 2560px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 90%;
    --contact-hero-bg-pos-y: 32%;
    --contact-hero-min-height: clamp(880px, 60vh, 1080px);
  }
}

@media (max-width: 1440px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 80%;
    --contact-hero-bg-pos-y: 40%;
  }

  .contact-hero__container {
    padding: 72px clamp(32px, 4vw, 64px);
  }
}

@media (max-width: 1280px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 78%;
    --contact-hero-bg-pos-y: 42%;
    --contact-hero-min-height: 680px;
  }
}

@media (max-width: 1200px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 75%;
    --contact-hero-bg-pos-y: 42%;
    --contact-hero-min-height: 640px;
  }

  .contact-hero__container {
    padding: 60px clamp(24px, 3vw, 40px);
  }

  .contact-hero__content {
    margin-left: 0;
  }

  .contact-section__grid {
    grid-template-columns: 1fr 320px;
    gap: 24px;
  }

  .contact-card {
    padding: 28px 24px 32px;
  }
}

@media (max-width: 1024px) {
  .contact-hero {
    --contact-hero-bg-pos-x: 70%;
    --contact-hero-bg-pos-y: 45%;
    --contact-hero-min-height: 600px;
  }

  .contact-section__grid {
    grid-template-columns: 1fr;
  }

  .contact-card--info {
    order: 2;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    --contact-hero-min-height: auto;
  }

  .contact-hero::after {
    display: none;
  }

  .contact-hero::before {
    display: none;
  }

  .contact-hero__container {
    padding: 48px 20px 56px;
    min-height: auto;
  }

  .contact-hero__content {
    margin-left: 0;
    max-width: 100%;
  }

  .contact-hero__title {
    font-size: 2rem;
  }

  .contact-hero__text {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .contact-section {
    padding: 48px 0 64px;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form__submit {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .contact-hero__title {
    font-size: 1.75rem;
  }

  .contact-card {
    padding: 24px 18px 28px;
    border-radius: 16px;
  }

  .contact-hero__feature-icon {
    width: 44px;
    height: 44px;
  }
}
