/* ––––––––––––––– HERO –––––––––––––– */

section.hero {
  padding-top: calc(var(--section-padding) + var(--header-height));
  padding-bottom: 0;
  height: 95dvh;
}

section.hero > div:has(h1) {
  padding-bottom: var(--section-padding);
}

section.hero > div h1 {
  font-family: var(--font-unbounded);
  font-size: var(--text-3xl);
  color: var(--color-secondary);
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

section.hero > div > span {
  font-size: var(--text-lg);
  color: var(--color-black);
  line-height: 1;
  font-weight: 400;
}

section.hero > div > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;

  margin-top: 2rem;
}

section.hero > div:has(img) {
  display: none;
  user-select: none;
}

@media screen and (min-width: 768px) {
  section.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  section.hero > div:has(img) {
    position: relative;
    display: block;
    z-index: -1;
  }

  section.hero > div img {
    max-width: unset;
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    scale: 1.2;
    transform-origin: center;
  }

  section.hero > div .hero {
    width: 40vw;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: unset;
    bottom: 0;
    transform: translate(50%, 0);
  }
}

/* ––––––––––––––– ABOUT –––––––––––––– */

section.about {
  background-color: #fbfbfb;
  padding-bottom: 0;
}

section.about .container {
  display: grid;
  gap: 1rem;
}

section.about .container > div h2 {
  font-family: var(--font-unbounded);
  font-size: var(--text-xl);
  color: var(--color-secondary);
  line-height: 1;
  text-transform: uppercase;

  margin-bottom: 3rem;
}
section.about .container > div span {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  font-size: var(--text-base);
  color: var(--color-black);

  letter-spacing: 0.03em;
  line-height: 1.8;
}
section.about .container > div:has(img) {
  overflow: hidden;
}
section.about .container > div img {
  /* transform: translateY(4rem); */
  user-select: none;
}

@media screen and (min-width: 1024px) {
  section.about .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
  }
  section.about .container > div:has(img) {
    grid-column: 1;
    grid-row: 1;

    display: flex;
    align-items: end;
  }
  section.about .container > div:has(h2) {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ––––––––––––––– STATS –––––––––––––– */

section.stats > span {
  font-family: var(--font-unbounded);
  font-size: var(--text-xl);
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-secondary);
}
section.stats ul {
  display: grid;
  grid-template-rows: 1fr;
  gap: 3rem;
  margin-top: 5rem;
}
section.stats ul li {
  display: grid;
  gap: 1rem;
  width: 100%;
  justify-items: center;
  position: relative;
}
section.stats ul li::after {
  content: "";
  position: absolute;
  bottom: -1.5rem;
  right: 0;

  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}
section.stats ul li:last-child:after {
  content: none;
}
section.stats ul li > span {
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1298rem + 0.3846vw, 1.4375rem);
  color: var(--color-black);
}
section.stats ul li .number {
  display: flex;
  font-family: var(--font-unbounded);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
}

@media screen and (min-width: 1024px) {
  section.stats ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4rem;
  }
  section.stats ul li {
    grid-template-rows: subgrid;
    align-items: start;
    justify-items: start;
    grid-row: span 2;
  }
  section.stats ul li::after {
    width: 2px;
    height: 100%;
    bottom: unset;
    right: -3rem;
  }

  section.stats ul li .number {
    font-size: var(--text-xl);
  }
}
@media screen and (min-width: 1280px) {
  section.stats ul li .number {
    font-size: var(--text-2xl);
  }
}

/* ––––––––––––––– ABOUT –––––––––––––– */

section.services {
  background-color: #fbfbfb;
  padding-bottom: 0;
}
section.services .container > span {
  font-family: var(--font-unbounded);
  font-size: var(--text-xl);
  color: var(--color-secondary);
  line-height: 1;
  text-transform: uppercase;
}

section.services .container > .citizens {
  padding-bottom: 0;
}
section.services .container > .service span {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-2xl);
  color: var(--color-secondary);
  text-transform: uppercase;

  margin-top: 3rem;
}

section.services .container > .service > div {
  margin-top: 2rem;
}
section.services .container > .service > div ul {
  display: grid;
  gap: 3rem;
  list-style-image: url("/wp-content/themes/officelawth/assets/img/main/services/dot.png");
  padding-left: 2rem;
  margin-block: 3rem;
}
section.services .container > .citizens > div > div:first-child {
  padding-bottom: var(--section-padding);
}
section.services .container > .service > div ul li {
  font-family: var(--font-unbounded);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--color-primary);
}
section.services .container > .service > div ul li strong {
  display: block;
  margin-left: 0.5rem;
}
section.services .container > .service > div .btn {
  padding: 0.8rem 2rem;
  display: block;
  width: 100%;
}

section.services .container > .service > div div {
  position: relative;
  isolation: isolate;
}
section.services .container > .service > div div:has(img) {
  display: none;
}
section.services .container > .service > div div img[alt*="image"] {
  object-fit: contain;
  object-position: bottom;
  user-select: none;
}
section.services .container > .service > div div img[alt*="decoration"] {
  position: absolute;
  top: 0;
  left: calc((50vw - 50%) * -1);
  transform: translateX(50%);
  width: 120%;
  height: 100%;
  z-index: -1;

  pointer-events: none;
  user-select: none;
}

section.services .container .marquee {
  position: relative;
  width: 100vw;
  padding-block: 1rem;
  margin-block: 2rem;
  border: 1px solid #cccccc;
  border-left: none;
  border-right: none;

  margin-left: calc((50vw - 50%) * -1);
  margin-right: calc((50vw - 50%) * -1);
  display: flex;
  align-items: center;
}

/* The moving "track" that slides left to right */
section.services .container .marquee__track {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: marquee-scroll 20s linear infinite;
}

/* Animation: moves the track smoothly across the screen */
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Each block of repeated content (we duplicate it in HTML) */
section.services .container .marquee__content {
  display: inline-flex;
  flex-shrink: 0; /* Prevents shrinking */
}

/* The list and items inside the marquee */
section.services .container .marquee__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

section.services .container .marquee__item {
  padding-inline: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image-specific item */
section.services .container .marquee__item--image {
  width: 200px;
}

/* на случай пользователей с reduced motion */
@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}

@media screen and (min-width: 1024px) {
  section.services .container > .service > div {
    display: grid;
    gap: 3rem;
    grid-template-columns: repeat(2, 1fr);
  }
  section.services .container > .service.citizens span {
    text-align: right;
  }

  section.services .container > .service > div div:has(img) {
    display: flex;
  }
}

/* ––––––––––––––– CTA –––––––––––––– */

section.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

section.cta > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
section.cta > div h2 {
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1;
  color: #000000;
  text-transform: uppercase;
  margin-bottom: 3rem;
}
section.cta > div p {
  font-size: var(--text-base);
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: #000000;
  margin-bottom: 3rem;
  max-width: 465px;
  text-align: center;
}

@media screen and (min-width: 1024px) {
  section.cta {
    flex-direction: row;
    justify-content: space-between;
  }
  section.cta > div {
    display: block;
  }

  section.cta > div p {
    text-align: left;
  }
}

/* ––––––––––––––– TEAM –––––––––––––– */

section.team h2 {
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-xl);
  text-transform: uppercase;
  color: var(--color-secondary);
  line-height: 1;
  margin-bottom: 3rem;
}

section.team .swiper .swiper-wrapper {
  --gap: 2rem;
  --slides: 1;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--gap) * (var(--slides) - 1))) / var(--slides));
  gap: var(--gap);
}
section.team .swiper .swiper-wrapper .swiper-slide {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 1rem;

  cursor: pointer;
}
section.team .swiper .swiper-wrapper .swiper-slide img {
  height: 530px;
  width: 100%;
  object-fit: contain;
  object-position: bottom;

  user-select: none;
}
section.team .swiper .swiper-wrapper .swiper-slide span {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-black);
}
section.team .swiper .swiper-wrapper .swiper-slide .name {
  font-family: var(--font-unbounded);
  font-size: var(--text-xl);
  color: var(--color-primary);
}

@media screen and (min-width: 640px) {
  section.team .swiper .swiper-wrapper {
    --slides: 2;
  }
}
@media screen and (min-width: 1024px) {
  section.team .swiper .swiper-wrapper {
    --slides: 3;
  }
}

.team-popup .popup__content {
  min-width: unset;
  max-width: 100%;
  min-height: unset;
  max-height: 100%;
  width: 100%;
  height: 100%;
  padding-bottom: 0;
  border-radius: 0;

  background-color: var(--color-white);
}
.team-popup .popup__content .container {
  display: grid;
}
.team-popup .popup__content .container > div {
  padding-bottom: var(--padding);
  align-self: center;
}
.team-popup .popup__content .container > div > strong {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.team-popup .popup__content .container > div > span {
  display: block;
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.25;
  color: var(--color-black);
  margin-bottom: 2rem;
}
.team-popup .popup__content .container > div > ul {
  display: grid;

  color: var(--color-black);
  font-size: var(--text-base);
}
.team-popup .popup__content .container > div > ul > li {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: 1rem;

  font-size: var(--text-base);
  position: relative;
}
.team-popup .popup__content .container > div > ul li span {
  font-weight: 700;
}

.team-popup .popup__content .container > div > ul li::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  display: block;
  width: 100%;
  height: 1px;

  background-color: #d9d9d9;
}
.team-popup .popup__content .container > div > ul li:first-of-type::before {
  content: none;
}

.team-popup .popup__content .container > div > ul li ul {
  display: grid;
  grid-template-columns: var(--auto-fill);
  gap: 1rem;
}
.team-popup .popup__content .container > div > ul li ul li a {
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--color-primary);
  color: var(--color-white);
  width: 40px;
  height: 40px;
  aspect-ratio: 1/1;
  border-radius: 50%;

  transition: background 0.3s var(--ease);
}
@media (hover: hover) {
  .team-popup .popup__content .container > div > ul li ul li a:hover {
    background-color: var(--hover-primary);
  }
}
.team-popup .popup__content .container > div > ul li ul li a:active {
  background-color: var(--active-primary);
}

.team-popup .popup__content .popup__close::before,
.team-popup .popup__content .popup__close::after {
  background-color: var(--color-black);
}

@media screen and (min-width: 768px) {
  .team-popup .popup__content .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ––––––––––––––– BANNER –––––––––––––– */

section.banner {
  background-color: #f6f7f9;
  position: relative;
  isolation: isolate;
}

section.banner .container {
  display: grid;
  gap: 3rem;
}
section.banner .container > p {
  margin-left: 40px;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.0449rem + 0.2564vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-black);
  padding-bottom: 40px;
  border-bottom: 1px solid #cacaca;
}

section.banner .container svg {
  position: absolute;
  left: -3rem;
  top: 0;
  transform: scale(0.5);
  color: var(--color-primary);
  z-index: -1;
  opacity: 0.3;
}

@media screen and (min-width: 1024px) {
  section.banner .container {
    grid-template-columns: repeat(2, 1fr);
  }

  section.banner .container svg {
    position: static;
    justify-self: end;
    align-self: center;
    opacity: 1;
    transform: none;
  }
}

/* ––––––––––––––– CLIENTS –––––––––––––– */

section.clients {
  background-color: var(--color-secondary);
}

section.clients > span {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-xl);
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3rem;
}

section.clients .swiper .swiper-wrapper {
  --gap: 2rem;
  --slides: 1;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--gap) * (var(--slides) - 1))) / var(--slides));
  gap: var(--gap);
}
section.clients .swiper .swiper-wrapper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

section.clients .swiper-button-next,
section.clients .swiper-button-prev {
  color: var(--color-white);
}

@media screen and (min-width: 640px) {
  section.clients .swiper .swiper-wrapper {
    --slides: 2;
  }
}

@media screen and (min-width: 768px) {
  section.clients .swiper-button-next,
  section.clients .swiper-button-prev {
    display: none;
  }

  section.clients .swiper .swiper-wrapper {
    grid-auto-flow: unset;
    grid-template-columns: var(--auto-fill);
  }
}

/* ––––––––––––––– MARQUEE –––––––––––––– */

section.marquee {
  margin-block: 0.5rem;
}

/* ––––––––––––––– LEADS –––––––––––––– */

section.leads {
  background-color: var(--color-secondary);
  position: relative;
  isolation: isolate;
}
section.leads > img {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 50%;
  aspect-ratio: 1/1;
  object-fit: contain;
  object-position: bottom;
  z-index: -1;

  pointer-events: none;
  user-select: none;
}
section.leads .container > img {
  display: none;
  align-self: end;
  user-select: none;
}

section.leads .container .form {
  padding-bottom: var(--section-padding);
}
section.leads .container .form strong {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-xl);
  color: var(--color-white);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2rem;
}
section.leads .container .form > img {
  margin-bottom: 1rem;
  user-select: none;
}
section.leads .container .form > span {
  display: block;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-white);
  margin-bottom: 3rem;
}

@media screen and (min-width: 1024px) {
  section.leads {
    padding-bottom: 0;
  }
  section.leads > img {
    top: 0;
    right: 0;
  }
  section.leads .container {
    display: grid;
    gap: 3rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  section.leads .container > img {
    display: block;
  }
}

/* ––––––––––––––– BLOG –––––––––––––– */

section.blog > span {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-xl);
  text-transform: uppercase;
  color: var(--color-secondary);
  line-height: 1;
  margin-bottom: 3rem;
}

section.blog .swiper .swiper-wrapper {
  --gap: 2rem;
  --slides: 1;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--gap) * (var(--slides) - 1))) / var(--slides));
  grid-template-rows: repeat(5, auto);
  gap: var(--gap);
}
section.blog .swiper .swiper-wrapper .swiper-slide {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
}

@media (hover: hover) {
  section.blog .swiper .swiper-wrapper .swiper-slide:hover {
    background-color: #d9d9d9;

    transition: background 0.4s var(--ease);
  }
  section.blog .swiper .swiper-wrapper .swiper-slide:hover .info {
    color: var(--color-black);
  }
  section.blog .swiper .swiper-wrapper .swiper-slide:hover .info .author::before {
    background-color: var(--active-primary);
  }
}

section.blog .btn {
  margin-top: 3rem;
}

@media screen and (min-width: 640px) {
  section.blog .swiper .swiper-wrapper {
    --slides: 2;
  }
}
@media screen and (min-width: 1024px) {
  section.blog .swiper .swiper-wrapper {
    --slides: 3;
  }
}

/* ––––––––––––––– CONTACTS –––––––––––––– */

section.contacts {
  background-color: #f6f7f9;
}

section.contacts .container {
  display: grid;
  gap: 3rem;
}

section.contacts .container div .underline {
  display: block;
  font-family: var(--font-unbounded);
  font-weight: 400;
  font-size: var(--text-2xl);
  text-transform: uppercase;
  color: var(--color-secondary);
  line-height: 1;
  margin-bottom: 3rem;
}

section.contacts .container div ul {
  margin-top: 3rem;

  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 1rem;
}
section.contacts .container div ul li {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 2;
}
section.contacts .container div ul li > * {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 2;
}

section.contacts .container div ul li > * span {
  font-size: clamp(1.125rem, 1.0449rem + 0.2564vw, 1.25rem);
  font-weight: 400;
  color: var(--color-black);

  transition: color 0.3s var(--ease);
}
section.contacts .container div ul li > * svg {
  color: var(--color-black);
  justify-self: center;

  transition: color 0.3s var(--ease);
}

@media (hover: hover) {
  section.contacts .container div ul li a:hover span {
    color: var(--hover-primary);
  }
  section.contacts .container div ul li a:hover svg {
    color: var(--hover-primary);
  }
}
section.contacts .container div ul li a:active span {
  color: var(--active-primary);
}
section.contacts .container div ul li a:active svg {
  color: var(--active-primary);
}

section.contacts .container div div {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
section.contacts .container div div span {
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.25;
  color: var(--color-black);
}

section.contacts .container iframe {
  width: 100%;
}

@media screen and (min-width: 1024px) {
  section.contacts .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  section.contacts .container iframe {
    height: 100%;
  }
}
