/*
  All English Study — About page test layout
  Final Bitrix version: PHP page will use the site header/footer; this CSS is scoped.
*/

:root {
  --aes-yellow: #f4cf63;
  --aes-peach: #f3b07d;
  --aes-pink: #e7a7df;
  --aes-green: #98d978;
  --aes-teal: #79d7d1;
  --aes-text: #111111;
  --aes-line-strong: #b7d9a1;
  --aes-page: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--aes-page);
  color: var(--aes-text);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

.aes-about-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 28px 52px;
  direction: rtl;
  text-align: right;
  font-size: 18px;
  line-height: 1.72;
}

.aes-about-page h1,
.aes-about-page h2,
.aes-about-paragraph {
  margin-top: 0;
}

.aes-about-page h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.aes-about-page h2 {
  margin-bottom: 16px;
  font-size: clamp(25px, 2.8vw, 33px);
  line-height: 1.25;
  font-weight: 700;
}

.aes-about-paragraph {
  margin-bottom: 10px;
  font-size: inherit;
  line-height: inherit;
}

.aes-about-paragraph:last-child {
  margin-bottom: 0;
}

.aes-about-page strong {
  font-weight: 700;
}

.aes-about-brand {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: Georgia, "Times New Roman", serif;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap;
  word-spacing: 0;
}

.aes-brand-all {
  color: #ff9a00;
}

.aes-brand-english {
  color: #43ad36;
}

.aes-brand-study {
  color: #d46c56;
}

.aes-about-lead {
  font-size: inherit;
  line-height: inherit;
}

.aes-about-opening,
.aes-about-text,
.aes-founder {
  position: relative;
  margin: 0 0 26px;
  padding: 20px 26px;
}

.aes-about-opening {
  padding-top: 22px;
}

.aes-outline::before,
.aes-outline::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

/* Partial contour: top + left */
.aes-outline-top-left::before {
  top: 0;
  left: 0;
  width: 42%;
  border-top: 3px solid var(--aes-teal);
}

.aes-outline-top-left::after {
  top: 0;
  left: 0;
  height: 72%;
  border-left: 3px solid var(--aes-teal);
}

/* Partial contour: bottom + right */
.aes-outline-bottom-right::before {
  right: 0;
  bottom: 0;
  width: 42%;
  border-bottom: 3px solid var(--aes-green);
}

.aes-outline-bottom-right::after {
  right: 0;
  bottom: 0;
  height: 72%;
  border-right: 3px solid var(--aes-green);
}

.aes-about-text strong:first-of-type {
  text-decoration: underline;
  text-decoration-color: var(--aes-yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}

.aes-about-text strong:nth-of-type(2) {
  text-decoration: underline;
  text-decoration-color: var(--aes-pink);
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}

.aes-founder {
  min-height: 220px;
  overflow: auto;
}

.aes-founder::after {
  clear: both;
}

.aes-founder-photo {
  float: right;
  width: 180px;
  height: 180px;
  margin: 6px 0 12px 20px;
  padding: 6px;
  border: 3px solid var(--aes-line-strong);
  object-fit: cover;
  object-position: center;
  background: #fff;
}

.aes-founder-alexander .aes-founder-photo {
  border-color: var(--aes-teal);
}

.aes-founder-anna .aes-founder-photo {
  border-color: var(--aes-pink);
}

.aes-founder-alexander.aes-outline-top-left::before,
.aes-founder-alexander.aes-outline-top-left::after {
  border-color: var(--aes-yellow);
}

.aes-founder-anna.aes-outline-bottom-right::before,
.aes-founder-anna.aes-outline-bottom-right::after {
  border-color: var(--aes-pink);
}

@media (max-width: 760px) {

  .aes-about-page {
    padding: 28px 18px 42px;
    font-size: 17px;
    line-height: 1.66;
  }

  .aes-about-opening,
  .aes-about-text,
  .aes-founder {
    margin-bottom: 24px;
    padding: 18px 16px;
  }

  .aes-outline-top-left::before,
  .aes-outline-bottom-right::before {
    width: 58%;
  }

  .aes-outline-top-left::after,
  .aes-outline-bottom-right::after {
    height: 56%;
  }

  .aes-founder-photo {
    float: none;
    display: block;
    width: min(240px, 82vw);
    height: min(240px, 82vw);
    margin: 0 auto 18px;
  }
}

@media (max-width: 430px) {
  .aes-about-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .aes-about-opening,
  .aes-about-text,
  .aes-founder {
    padding: 16px 12px;
  }

  .aes-about-page h1 {
    font-size: 32px;
  }

  .aes-about-page h2 {
    font-size: 25px;
  }
}
