/* ============================================================
   FlashArmy — Landing "Координація та співпраця" (landing_cooperation)
   Inline form → octemplates/module/oct_cooperation_request/send.
   Hero typography: Roboto. Form typography: Noto Sans.
   Tokens from Figma (desktop 13552:20, mobile 13549:3156).
   ============================================================ */
:root {
  --fa-coop-orange: #FF8307;          /* accent: hero title, CTA, submit (Figma оранж) */
  --fa-coop-orange-hover: #E87500;
  --fa-coop-orange-accent: #FF9933;   /* required "*" (Figma color/orange/300) */
  --fa-coop-orange-soft-bg: #FFF5E8;  /* disabled submit bg (Figma color/orange/600) */
  --fa-coop-orange-soft-fg: #FFD199;  /* disabled submit text (Figma color/orange/500) */
  --fa-coop-surface-dark: #0C0B0F;    /* labels / mobile title (Figma color/surface/600) */
  --fa-coop-card-bg: #EBEBEB;         /* form card (Figma color/surface/200) */
  --fa-coop-input-bg: #FFFFFF;
  --fa-coop-input-border: #C4C4C4;    /* (Figma color/surface/300) */
  --fa-coop-placeholder: #9E9E9E;     /* (Figma color/surface/350) */
  --fa-coop-page-bg: #FFFFFF;
  --fa-coop-error: #D9534F;
  --fa-coop-container: 1240px;        /* content column (Figma 1240 @ 1440) */
  --fa-coop-side-pad: 20px;
  --fa-coop-radius-input: 16px;       /* input radius (Figma rounded-[16px]) */
  --fa-coop-radius-card: 12px;        /* card radius (Figma rounded-[12px]) */
  --fa-coop-radius-submit: 2px;       /* submit radius (Figma rounded-[2px]) */
}

/* ---------- Base ---------- */
.fa-coop {
  font-family: 'Noto Sans', 'Open Sans', Arial, sans-serif;
  color: var(--fa-coop-surface-dark);
  background-color: var(--fa-coop-page-bg);
  line-height: 1.3;
  overflow-x: hidden;
}

.fa-coop *,
.fa-coop *::before,
.fa-coop *::after {
  box-sizing: border-box;
}

.fa-coop + footer {
  margin-top: 0 !important;
}

.fa-coop img {
  max-width: 100%;
  height: auto;
}

.fa-coop__container {
  width: 100%;
  max-width: calc(var(--fa-coop-container) + var(--fa-coop-side-pad) * 2);
  margin: 0 auto;
  padding-left: var(--fa-coop-side-pad);
  padding-right: var(--fa-coop-side-pad);
}

/* ============================================================
   Section 1: HERO (Figma node 13552:80)
   Desktop: photo fills the section, text overlays bottom-left (white).
   Mobile : photo becomes a top band, text sits below on white (dark).
   ============================================================ */
.fa-coop__hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 625px;
  padding: 80px 0;
  background-color: var(--fa-coop-surface-dark);
  overflow: hidden;
}

.fa-coop__hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* The hero JPEG already carries a soft baked gradient; this light overlay
   only insures text legibility across crops/viewports (Figma double gradient). */
.fa-coop__hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(270deg, rgba(12, 11, 15, 0) 65%, rgba(12, 11, 15, 0.55) 100%),
    linear-gradient(0deg, rgba(12, 11, 15, 0.45) 0%, rgba(12, 11, 15, 0) 45%);
}

.fa-coop__hero .fa-coop__container {
  position: relative;
  z-index: 2;
}

.fa-coop__hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 556px;
}

.fa-coop__hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  word-break: break-word;
}

.fa-coop__hero-title {
  margin: 0;
  font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.1;
  color: #FFFFFF;
}

.fa-coop__hero-title--orange {
  color: var(--fa-coop-orange);
}

.fa-coop__hero-subtitle {
  margin: 0;
  font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
}

/* ---------- Shared CTA Button (Figma: bg #FF8307, h76, Roboto Bold 18px
   white uppercase, square corners) ---------- */
.fa-coop__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  padding: 26px 64px;
  background-color: var(--fa-coop-orange);
  color: #FFFFFF;
  font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.fa-coop__cta-btn:hover,
.fa-coop__cta-btn:focus {
  background-color: var(--fa-coop-orange-hover);
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============================================================
   Section 2: Форма (Figma node 13552:88)
   ============================================================ */
.fa-coop__form-section {
  padding: 60px 0;
  scroll-margin-top: 20px;
}

.fa-coop__card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 24px;
  background: var(--fa-coop-card-bg);
  border-radius: var(--fa-coop-radius-card);
}

.fa-coop__card-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #000000;
  text-align: center;
}

.fa-coop__divider {
  width: 100%;
  height: 1px;
  background: rgba(12, 11, 15, 0.18);
}

.fa-coop__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fa-coop__row {
  display: flex;
  gap: 24px;
}

.fa-coop__row > .fa-coop__field {
  flex: 1 1 0;
  min-width: 0;
}

.fa-coop__field {
  display: flex;
  flex-direction: column;
}

.fa-coop__field--full {
  width: 100%;
}

.fa-coop__label,
.fa-coop__label-row {
  margin-bottom: 16px;
}

.fa-coop__label {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fa-coop-surface-dark);
}

.fa-coop__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fa-coop__label-row .fa-coop__label {
  margin-bottom: 0;
}

.fa-coop__req {
  color: var(--fa-coop-orange-accent);
  margin-right: 2px;
}

.fa-coop__optional {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--fa-coop-placeholder);
}

.fa-coop__input {
  width: 100%;
  height: 60px;
  padding: 16px 20px;
  background: var(--fa-coop-input-bg);
  border: 1px solid var(--fa-coop-input-border);
  border-radius: var(--fa-coop-radius-input);
  font-family: 'Noto Sans', 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--fa-coop-surface-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

.fa-coop__input::placeholder {
  color: var(--fa-coop-placeholder);
  opacity: 1;
}

.fa-coop__input:focus {
  border-color: var(--fa-coop-orange);
}

.fa-coop__textarea {
  height: 200px;
  padding: 20px;
  resize: vertical;
  line-height: 1.4;
}

/* Subject dropdown: reuses .fa-coop__input box, strips the native chrome and
   draws a custom chevron so it matches the text fields. */
.fa-coop__select {
  padding-right: 48px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230C0B0F' stroke-width='1.5' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}

/* Show the unselected placeholder option in the muted input colour, but keep
   the expanded list and real choices in the dark surface colour. */
.fa-coop__select:has(option[value=""]:checked) {
  color: var(--fa-coop-placeholder);
}

.fa-coop__select option {
  color: var(--fa-coop-surface-dark);
}

.fa-coop__input--error {
  border-color: var(--fa-coop-error);
}

.fa-coop__error {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--fa-coop-error);
}

.fa-coop__error:empty {
  display: none;
}

/* ---------- Submit (Figma: 220×55, radius 2px, Noto Bold 14px uppercase) ---------- */
.fa-coop__actions {
  display: flex;
}

.fa-coop__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 55px;
  padding: 12px 24px;
  background: var(--fa-coop-orange);
  color: #FFFFFF;
  font-family: 'Noto Sans', 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--fa-coop-radius-submit);
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.fa-coop__submit:hover,
.fa-coop__submit:focus {
  background: var(--fa-coop-orange-hover);
}

.fa-coop__submit:disabled {
  background: var(--fa-coop-orange-soft-bg);
  color: var(--fa-coop-orange-soft-fg);
  cursor: not-allowed;
}

.fa-coop__submit--outline {
  width: auto;
  background: transparent;
  color: var(--fa-coop-orange);
  border: 1px solid var(--fa-coop-orange);
}

.fa-coop__submit--outline:hover,
.fa-coop__submit--outline:focus {
  background: var(--fa-coop-orange);
  color: #FFFFFF;
}

.fa-coop__form-error {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--fa-coop-error);
}

.fa-coop__form-error:empty {
  display: none;
}

/* ---------- Success state ---------- */
/* Class selectors set display:flex (author origin), which would otherwise beat
   the UA [hidden]{display:none} rule — restore hiding when the attr is present. */
.fa-coop__form[hidden],
.fa-coop__success[hidden] {
  display: none;
}

.fa-coop__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  text-align: center;
}

.fa-coop__success-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--fa-coop-orange);
}

.fa-coop__success-icon::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 23px;
  width: 16px;
  height: 28px;
  border: solid #FFFFFF;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

.fa-coop__success-text {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fa-coop-surface-dark);
}

/* ============================================================
   Responsive — tablet
   ============================================================ */
@media (max-width: 991px) {
  .fa-coop__hero {
    min-height: 520px;
  }

  .fa-coop__hero-title {
    font-size: 36px;
  }

  .fa-coop__card-title {
    font-size: 24px;
  }
}

/* ============================================================
   Responsive — mobile (Figma node 13549:3156)
   Hero photo becomes a top band; text + CTA sit below on white.
   Form rows collapse to a single column; submit goes full-width.
   ============================================================ */
@media (max-width: 767px) {
  .fa-coop__hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
    background-color: var(--fa-coop-page-bg);
  }

  .fa-coop__hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: 222px;
    flex: 0 0 222px;
  }

  .fa-coop__hero .fa-coop__container {
    padding-top: 24px;
    padding-bottom: 8px;
  }

  .fa-coop__hero-content {
    max-width: 100%;
    gap: 24px;
  }

  /* Figma mobile: title↔subtitle gap is 4px (vs 16px on desktop). */
  .fa-coop__hero-text {
    gap: 4px;
  }

  .fa-coop__hero-title {
    font-size: 26px;
    color: var(--fa-coop-surface-dark);
  }

  .fa-coop__hero-subtitle {
    font-size: 14px;
    color: rgba(17, 13, 10, 0.8);
  }

  .fa-coop__cta-btn {
    width: 100%;
    height: 60px;
    padding: 18px 24px;
    font-size: 14px;
  }

  .fa-coop__form-section {
    padding: 40px 0 48px;
  }

  /* Figma mobile card: bg #e5e5e5, radius 8px, padding 40/16. */
  .fa-coop__card {
    padding: 40px 16px;
    border-radius: 8px;
    background: #e5e5e5;
  }

  .fa-coop__card-title {
    font-size: 20px;
  }

  /* Stacked rows keep a 16px internal gap; 24px between rows comes from
     .fa-coop__form's own gap. */
  .fa-coop__row {
    flex-direction: column;
    gap: 16px;
  }

  .fa-coop__label {
    font-size: 16px;
  }

  /* Figma mobile: 40px between the last field and the submit
     (form gap 24px + 16px). */
  .fa-coop__actions {
    width: 100%;
    margin-top: 16px;
  }

  .fa-coop__submit {
    width: 100%;
  }
}
