@font-face {
  font-family: "Unbounded";
  src: url("/wp-content/themes/officelawth/assets/fonts/unbounded/Unbounded-Regular.woff2") format("woff2"); /* */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Unbounded";
  src: url("/wp-content/themes/officelawth/assets/fonts/unbounded/Unbounded-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fixel Display";
  src: url("/wp-content/themes/officelawth/assets/fonts/fixel/FixelDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Display";
  src: url("/wp-content/themes/officelawth/assets/fonts/fixel/FixelDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Fixel Display", sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

main {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style-type: none;
}

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

button {
  cursor: pointer;
}

:root {
  --color-primary: #668c83;
  --hover-primary: #5a7f76;
  --active-primary: #4e726a;

  --color-secondary: #3a3a38;
  --hover-secondary: #2f2f2d;
  --active-secondary: #242423;

  --color-black: #171717;
  --color-white: #ffffff;

  --color-gray: #ecf0f3;

  --error: #ff0000;

  --text-sm: 12px;

  --text-base: clamp(0.875rem, 0.831rem + 0.1408vw, 1rem); /* 14-16px */
  --text-md: clamp(0.9375rem, 0.8715rem + 0.2113vw, 1.125rem); /* 15-18px */
  --text-lg: clamp(1.25rem, 1.0897rem + 0.5128vw, 1.5rem); /* 20-24px */
  --text-xl: clamp(1.875rem, 1.743rem + 0.4225vw, 2.25rem); /* 30-36px */
  --text-2xl: clamp(3rem, 2.359rem + 2.0513vw, 4rem); /* 48-64px */
  --text-3xl: clamp(2.5rem, 0.0962rem + 7.6923vw, 6.25rem); /* 40-100px */

  --leading-base: 30px;
  --leading-button: auto;

  --leading-2xl: auto;

  --header-height: 124.5px;

  --font-fixel: "Fixel Display", sans-serif;
  --font-unbounded: "Unbounded", sans-serif;

  --section-padding: clamp(3.125rem, 2.3026rem + 3.2895vw, 6.25rem);

  --auto-fill: repeat(auto-fill, minmax(min(275px, 100%), 1fr));
  --auto-fit: repeat(auto-fit, minmax(min(275px, 100%), 1fr));

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

section {
  padding-block: var(--section-padding);
  transition: 0.3s ease;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding-inline: 1rem !important;
}

@media (min-width: 480px) {
  .container {
    max-width: 480px;
  }
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

.btn {
  display: block;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1;
  text-align: center;
  width: fit-content;

  border: 1px solid;
  border-radius: 10px;
}
.btn.primary {
  color: var(--color-white);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn.secondary {
  border-color: var(--color-primary);
  background-color: transparent;
  color: var(--color-primary);
}

@media (hover) {
  .btn.primary:hover {
    background-color: var(--hover-primary);
    border-color: var(--hover-primary);
  }

  .btn.secondary:hover {
    border-color: var(--hover-primary);
    color: var(--hover-primary);
  }
}

.btn.primary:active {
  background-color: var(--active-primary);
  border-color: var(--active-primary);
}

.btn.secondary:active {
  border-color: var(--active-primary);
  color: var(--active-primary);
}

.underline {
  position: relative;
}
.underline.container::after {
  left: 1rem;
}
.underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -13px;

  display: block;
  width: 200px;
  height: 1px;
  background-color: var(--color-primary);
}

.swiper-container {
  position: relative;
}

@media screen and (min-width: 1280px) {
  .swiper-container {
    max-width: 1280px;
    padding-inline: 1rem;
    margin-inline: auto;
  }

  .swiper-container .swiper-button-prev {
    left: -1rem;
  }
  .swiper-container .swiper-button-next {
    right: -1rem;
  }
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--color-primary);
  border: none;
  background-color: transparent;
  padding: 12px;

  position: absolute;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);

  cursor: pointer;

  transition: color 0.3s var(--ease);
}
.swiper-button-next {
  right: 1rem;
}
.swiper-button-prev {
  left: 1rem;
}

.swiper-button-disabled {
  opacity: 0.5;
}

.swiper-pagination {
  --_dot-size: 45px;

  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  margin-inline: auto;
  margin-top: 2.4rem;
  position: static !important;
}

.swiper-pagination .swiper-pagination-bullet {
  width: var(--_dot-size);
  height: 4px;
  opacity: 1;
  border: none;
  /* border-radius: 2px; */
  vertical-align: middle;
  background-color: #d9d9d9;
  cursor: pointer;

  transition: transform 0.3s ease;
}
.swiper-pagination .swiper-pagination-bullet-active {
  background-color: var(--color-primary);
  transform: scaleY(2);
}

.swiper-slide {
  user-select: none;
}

/* MODAL POPUP - Mobile First */

.popup {
  position: fixed;
  inset: 0;
  z-index: 1100;

  display: none;
  justify-content: center;
  align-items: center;

  backdrop-filter: brightness(0.4);
}
.popup.active {
  display: flex;
  animation: popup 0.3s ease forwards;
}

@keyframes popup {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes popupScale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.popup .popup__content {
  --grid-gap: 1rem;
  --padding: 1.5rem;

  position: relative;

  display: grid;
  grid-template-rows: 1fr;
  gap: var(--grid-gap);
  background-color: var(--color-secondary);
  padding: var(--padding);
  width: 90%;
  max-height: 90%;
  overflow: hidden;
  border-radius: 20px;
}
.popup .popup__content:has(.popup__content-body .shown) {
  padding: 0;
}

.popup.active .popup__content {
  animation: popupScale 0.3s ease forwards;
}

.popup .popup__content .popup__close {
  position: absolute;
  right: calc(var(--padding) / 2);
  top: calc(var(--padding) / 2);
  cursor: pointer;
  padding: 10px;
  border: none;
  display: grid;
  background-color: transparent;
}
.popup .popup__content .popup__close::before,
.popup .popup__content .popup__close::after {
  content: "";
  grid-area: 1/1;
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--color-white);
  transform-origin: center;
}
.popup .popup__content .popup__close::before {
  transform: rotate(45deg);
}
.popup .popup__content .popup__close::after {
  transform: rotate(-45deg);
}

.popup .popup__content-header strong {
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-white);
}

.popup .popup__content-body {
  display: grid;
  overflow: hidden;
  color: var(--text-body);
}

.popup .popup__content-body > div {
  display: grid;
  gap: 12px;
  padding-right: 15px;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}

.popup .popup__content-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border-radius: 60px;
  background-color: var(--brand-800);
  padding: 12px 20px;

  color: var(--bg-primary);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Tablet and above */
@media (min-width: 640px) {
  .popup .popup__content {
    --padding: 2rem;
    max-width: 600px;
  }

  .popup .popup__content-footer a {
    width: 50%;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .popup .popup__content {
    min-width: 440px;
    max-width: 740px;
  }

  .popup .popup__content .popup__close {
    right: calc(2rem + 5px);
    top: calc(2rem + 5px);
  }
}

.scroll-lock {
  overflow: hidden;
}

label {
  display: flex;
  flex-direction: column-reverse;
}
label > span {
  width: fit-content;
  transition: all 0.2s;
  transform-origin: top left;
}
section.form form label > input:not([type="checkbox"]):has(+ span):focus + span,
section.form form label > textarea:not([type="checkbox"]):has(+ span):focus + span {
  transform: translateY(2em) translateX(1em) scale(1.25);
  pointer-events: none;
  opacity: 0.5;
}

.breadcrumb {
  margin-bottom: 3rem;
}
.breadcrumb ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb ul li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb ul li::after {
  content: "|";
  color: var(--color-primary);
  font-size: 14px;
  line-height: 30px;
  letter-spacing: 0.3px;

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

.breadcrumb ul li a {
  width: fit-content;

  font-family: var(--font-fixel);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 30px;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}

.breadcrumb ul li:last-child::after {
  content: none;
}

.breadcrumb ul li p {
  font-family: var(--font-fixel);
  color: var(--color-black);
  font-size: 14px;
  line-height: 30px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}

/* –––––––– TOAST ––––––– */

.toast {
  position: fixed;
  top: var(--header-height);
  left: 2rem;
  right: 2rem;
  z-index: 10000;
  text-align: center;

  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  padding: 12px 20px;

  background-color: var(--color-black);
  border: var(--color-primary) 1px solid;
  border-radius: 60px;

  transform: translateY(-100%);
  animation: showMobile 0.3s ease-out forwards;
}

.toast.willUnmount {
  transform: translateY(0);
  animation: hideMobile 0.3s ease-out forwards;
}

@media screen and (min-width: 1024px) {
  .toast {
    text-align: left;
    left: unset;
    right: 3rem;
    transform: unset;
    transform: translateX(100%);
    animation: showDesktop 0.3s ease-out forwards;
  }

  .toast.willUnmount {
    transform: translateX(0);
    animation: hideDesktop 0.3s ease-out forwards;
  }
}

@keyframes showMobile {
  to {
    transform: translateY(0);
  }
}

@keyframes showDesktop {
  to {
    transform: translateX(0);
  }
}

@keyframes hideMobile {
  to {
    transform: translateY(-100%);
  }
}

@keyframes hideDesktop {
  to {
    transform: translateX(100%);
  }
}

.scroll-lock {
  overflow: hidden;
}

#burger-button {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  width: 44px;
  cursor: pointer;
  border: none;
  background-color: transparent;
}
#burger-button > span {
  --thick: 4px;
  display: block;
  height: 2px;
  width: 100%;

  border-radius: calc(var(--thick) / 2);
  background-color: var(--color-black);
}
#burger-button > p {
  font-weight: 400;
  font-size: var(--text-l3);
  line-height: 1;
  color: var(--color-black);
}

.drawer {
  --drawer-width: 40%;

  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
}

.drawer__content {
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;

  width: var(--drawer-width);
  height: 100%;
  /* margin-top: 186px; */
  background-color: var(--color-white);
  transform: translateX(-100%);
  padding-bottom: 2rem;
}
.drawer__content::-webkit-scrollbar {
  display: none;
}
.drawer.open .drawer__content {
  animation: drawerOpen 0.3s ease-in-out forwards;
  display: block;
}
.drawer.close .drawer__content {
  display: none;
  animation: drawerClose 0.3s ease-in-out forwards;
}

.drawer.open {
  pointer-events: auto;
  user-select: auto;
}
.drawer.close {
  pointer-events: none;
  user-select: none;
}

.drawer__content .drawer__nav {
  margin-left: 1.5rem;
}
.drawer__content .drawer__nav .drawer__nav-list {
  display: flex;
  align-items: start;
  flex-direction: column;
  list-style: none;
  width: 100%;

  gap: 2rem;

  margin-top: 30px;
}

.drawer__content .drawer__nav .drawer__nav-list .drawer__nav-item {
  font-size: var(--text-base);
  color: var(--color-black);
  text-transform: capitalize;

  transition: var(--transition-all);
}
.drawer__content .drawer__nav .drawer__nav-list .drawer__nav-item > a {
  padding-block: 10px;
}
.drawer__content .drawer__nav .drawer__nav-list .drawer__nav-item.current {
  font-weight: 700;
  color: var(--color-primary);
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
}
.drawer.open .drawer__overlay {
  display: block;
}
.drawer.close .drawer__overlay {
  display: none;
}

@keyframes drawerOpen {
  from {
    transform: translateX(-100%);
    display: none;
  }
  to {
    display: block;
    transform: translateX(0);
  }
}

@keyframes drawerClose {
  from {
    display: block;
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
    display: none;
  }
}

/* ––––––– MEDIA QUERIES –––––– */

@media screen and (max-width: 790px) {
  .drawer {
    --drawer-width: 60%;
  }
}

@media screen and (max-width: 640px) {
  .drawer {
    --drawer-width: 90%;
  }
}

@media screen and (max-width: 520px) {
  .drawer__content .drawer__nav {
    margin-inline: 20px;
  }
}

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

.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 */
.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) */
.marquee__content {
  display: inline-flex;
  flex-shrink: 0; /* Prevents shrinking */
}

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

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

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

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

/* ––––––––––––– FORM –––––––––––––– */
form {
  display: grid;
  gap: 1rem;
}
form label input,
form label textarea {
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-white);
  outline: none;

  font-family: var(--font-fixel);
  font-size: var(--text-base);
  color: var(--color-white);
}
form label input:focus-within,
form label textarea:focus-within {
  border-color: var(--active-primary);
}

form label span {
  color: var(--color-white);
}

form .btn {
  margin-top: 2rem;
  background-color: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-primary);
  transition: 0.3s var(--ease);
}
@media (hover: hover) {
  form .btn:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
  }
}

form .btn:active {
  background-color: var(--active-primary);
  border-color: var(--active-primary);
  color: var(--color-white);
}

@media screen and (min-width: 768px) {
  form .btn {
    width: fit-content;
  }
}

.checkbox-consent label {
  display: flex;
  align-items: baseline;
  flex-direction: row;
  gap: 1rem;
}

.checkbox-consent label span {
  font-size: inherit;
}
.checkbox-consent label .checkbox {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background-color: var(--color-white);

  position: relative;
  overflow: hidden;
}

.checkbox-consent label .checkbox::before,
.checkbox-consent label .checkbox::after {
  content: none;
  position: absolute;
  top: 50%;
  left: 50%;

  display: block;
  width: 12px;
  height: 2px;

  background-color: var(--color-primary);
}
.checkbox-consent label .checkbox::before {
  width: 4px;
  left: 4px;
  top: 8px;
  transform: translate(-50%, -50%) rotate(55deg);
}
.checkbox-consent label .checkbox::after {
  width: 10px;
  top: 7px;
  left: 8px;
  transform: translate(-50%, -50%) rotate(306deg);
}
.checkbox-consent label:has(input:checked) .checkbox::after,
.checkbox-consent label:has(input:checked) .checkbox::before {
  content: "";
}

label {
  display: flex;
  flex-direction: column-reverse;
}
label > span {
  width: fit-content;
  transition: all 0.2s;
  transform-origin: top left;
}
label > span i {
  color: var(--color-primary);
  vertical-align: top;
  font-style: normal;
}
label > textarea {
  field-sizing: content;
  resize: none;
}
label > input:not([type="checkbox"]):has(+ span)::placeholder,
label > textarea:not([type="checkbox"]):has(+ span)::placeholder {
  transition: opacity 0.2s ease;
  opacity: 0;
}
label > input:not([type="checkbox"]):has(+ span):focus::placeholder,
label > textarea:not([type="checkbox"]):has(+ span):focus::placeholder {
  opacity: 1;
}
label > input:not([type="checkbox"]):has(+ span):not(:focus):placeholder-shown + span,
label > textarea:not([type="checkbox"]):has(+ span):not(:focus):placeholder-shown + span {
  transform: translateY(1.5em) translateX(1.5em) scale(1.15);
  pointer-events: none;
  opacity: 0.5;
}

/* ––––––––––– CARD –––––––––– */

.card {
  border-radius: 20px;
  background-color: transparent;
  padding: 1rem;

  display: grid;
  gap: 1rem;

  cursor: pointer;
}

.card > img {
  border-radius: 10px;
  width: 100%;
  /* height: 280px; */

  object-fit: cover;
  object-position: center;
}
.card .info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  
  font-size: 14px;
  line-height: 2;
  color: #888;
}
.card .info > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 0.5rem;
}
.card .info .author {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 2;
  align-items: center;
  gap: 0.5rem;

  margin-right: 0.5rem;
}
.card .info .author > img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  object-fit: cover;
  object-position: center;
}
.card .info .author > span {
  grid-column: 2;
}
.card .info > span {
  grid-column: span 2;
  align-self: start;
}

.card .title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;

  /* min-height: calc(var(--text-lg) * 3.5); */
  font-family: var(--font-unbounded);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-primary);

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

.card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;

  /* min-height: 63px; */
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--color-black);
}

.card .more {
  font-weight: 700;
  font-size: var(--text-md);

  color: var(--color-primary);

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

@media (hover: hover) {
  .card:hover .title {
    color: var(--hover-primary);
  }
  .card:hover > span {
    color: var(--hover-primary);
  }
}
.card:active .title {
  color: var(--active-primary);
}
.card:active > span {
  color: var(--active-primary);
}
