/* =============================================
   BREAKPOINTS:
   xs: 480px | sm: 640px | md: 768px | lg: 996px | xl: 1200px
   ============================================= */

/* =============================================
   1. CUSTOM PROPERTIES
   ============================================= */

:root {
  --color-main:       #82A642;
  --color-secondary:  #CEEBF4;
  --color-background: #D9F7FA;
  --color-inner:      #D9F7FA;
  --color-icon:       #263B9F;
  --color-doc:        #7D9BC1;
}

/* =============================================
   2. RESET / BASE
   ============================================= */

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

html, body {
  height: 100%;
  min-height: 100%;
}

body {
  background: var(--color-background);
  font-size: 1em;
  font-weight: 400;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  text-decoration: none;
}

/* =============================================
   3. LAYOUT — Container, Section, Grid
   ============================================= */

/* --- Container --- */

.container {
  margin: 0 auto;
  max-width: 1320px;
  width: 100%;
  padding: 0 24px;
}

.container__row {
  display: flex;
  justify-content: space-between;
}

.container__col {
  width: 100%;
}

.container__col--auto {
  width: auto;
}

.container__col--center {
  display: flex;
  justify-content: center;
}

.container__col--right {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 996px) {
  .container__row {
    flex-direction: column;
  }
}

/* --- Section --- */

.section {
  padding: 80px 0;
}

.section-market {
  padding: 40px 0;
}

.section--last {
  padding: 0 0 80px 0;
}

/* --- Grid --- */

.grid {
  display: grid;
  gap: 40px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid__item {
  position: relative;
  display: flex;
  align-items: center;
}

.grid__item--right {
  justify-content: flex-end;
}

@media (max-width: 996px) {
  .grid {
    gap: 24px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   4. COMPONENTS
   ============================================= */

/* --- Header --- */

.header {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  padding: 24px 0;
  display: flex;
  align-items: center;
  z-index: 10;
}

.header--inner {
  position: relative;
  background: var(--color-secondary);
}

.header__block {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__action {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 996px) {
  .header__action {
    display: none;
  }
}

@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .header__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
}

/* --- Logo --- */

.logo {
  position: relative;
  display: block;
}

.logo--header img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo--footer img {
  max-width: 140px;
  height: auto;
}

@media (max-width: 768px) {
  .logo--header {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .logo--header img {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .logo--header img {
    height: 36px;
  }
}

/* --- Info header (на фоні cover) --- */

.info-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  list-style: none;
  gap: 6px;
}

.info-header a {
  color: var(--color-inner);
}

.info-header a.phone {
  font-size: 1.125em;
  font-weight: 500;
}

/* --- Info header other (на світлому фоні) --- */

.info-header-other {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
}

.info-header-other a {
  color: var(--color-icon);
}

.info-header-other a.phone {
  font-size: 1.125em;
  font-weight: 500;
}

@media (max-width: 768px) {
  .info-header-other {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .info-header-other a.phone {
    font-size: 1em;
  }
}

/* --- Navigation --- */

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.nav a {
  color: var(--color-icon);
  font-size: 0.875em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

.nav a:hover {
  text-decoration: none;
}

.nav--footer {
  display: flex;
  gap: 24px;
  justify-content: center;
}

@media (max-width: 996px) {
  .nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav--footer {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- Cover / Hero --- */

.cover {
  width: 100%;
  display: flex;
  align-items: center;
  height: 80dvh;
  background: url(../img/cover-background.png) no-repeat center / cover;
}

.cover__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 700px;
}

.cover__content h1 {
  font-size: 2.5em;
  color: var(--color-inner);
  line-height: 1.5;
  font-weight: 700;
}

.cover__content p {
  font-size: 1.25em;
  color: var(--color-inner);
  line-height: 1.5;
}

@media (max-width: 996px) {
  .cover {
    height: 100dvh;
  }

  .cover__content h1 {
    font-size: 2em;
    line-height: 1.25;
  }

  .cover__content p {
    font-size: 1.125em;
  }
}

@media (max-width: 768px) {
  .cover {
    padding-top: calc(100px + 5vh);
  }
}

/* --- Button --- */

.btn {
  position: relative;
  border-radius: 2px;
  border: none;
  height: 48px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s;
  white-space: nowrap;
}

.btn--main {
  background: var(--color-main);
  color: var(--color-inner) !important;
  font-size: 1em !important;
  font-weight: bold;
}

[data-modal="request"]:hover {
  transform: scale(1.05);
}

.btn--secondary {
  border: 1px solid var(--color-inner);
  background: none;
  color: var(--color-inner);
}

.btn--doc {
  border: 1px solid var(--color-doc);
  background: none;
  color: var(--color-doc);
  font-size: 0.87em !important;
  font-weight: bold;
}

@media (max-width: 768px) {
  .btn--main {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0 15px;
  }

  .btn--main {
    height: 44px;
    font-size: 0.8em !important;
  }

  .btn--doc {
    font-size: 0.7em !important;
  }
}

/* --- Content --- */

.content {
  position: relative;
  display: flex;
  flex-direction: column;
}

.content__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.content__head .title {
  font-size: 2em;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  color: var(--color-icon);
}

.content__head .chapter {
  text-transform: uppercase;
  text-align: center;
}

.content__head .subtitle {
  color: #7D9BC1;
  font-weight: 500;
  text-align: center;
}

.content p {
  text-indent: 2em;
  text-align: justify;
  margin-bottom: 16px;
}

.content a {
  color: var(--color-icon);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

.content a:hover {
  text-decoration: none;
}

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
  font-size: 1.5em;
  margin: 24px 0;
}

.content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content ul li {
  position: relative;
  padding-left: 20px;
}

.content ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  line-height: 40%;
  font-size: 2em;
  font-weight: 600;
  color: var(--color-main);
}

.content__components {
  margin-top: 64px;
}

.content__components_head {
  margin-top: 0;
  padding-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.content__components_head_left {
  text-align: left;
}

.content__components_head_right {
  text-align: right;
}

.content__components_headtext {
  margin: auto;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.headtext_left {
  text-align: left;
}

.headtext_right {
  text-align: right;
}

@media (max-width: 996px) {
  .content__head .title {
    font-size: 1.5em;
  }

  .content__components {
    margin-top: 40px;
  }
}

/* --- Card --- */

.card {
  background: #ffffff;
  padding: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
  width: 100%;
}

.card--center {
  align-items: center;
}

.card--inline {
  justify-content: center;
}

.card--market {
  padding: 24px;
  align-items: center;
  text-align: center;
  border-radius: 16px;
}

.card .title {
  font-weight: 600;
  font-size: 1.25em;
  margin: 0;
  color: var(--color-icon);
}

.card .list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--color-icon);
}

.card .list li {
  position: relative;
  padding-left: 20px;
  display: flex;
  align-items: center;
}

.card .list li::before {
  content: "›";
  position: absolute;
  left: 0;
  font-size: 2em;
  font-weight: 600;
  color: #7D9BC1;
}

.card .price {
  display: flex;
  align-items: flex-end;
  line-height: 1;
  gap: 2px;
  color: var(--color-icon);
}

.card .price__value {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-icon);
}

.card .price__currency {
  font-size: 1em;
  font-weight: 500;
}

.card .icon {
  font-size: 5em;
  color: #7D9BC1;
  opacity: 1;
}

.card .description {
  font-size: 1em;
}

.card .description--center {
  text-align: center;
  color: var(--color-icon);
}

@media (max-width: 768px) {
  .card {
    padding: 24px;
  }
}

/* --- How we work --- */

.grid--how-we-work {
  align-items: stretch;
}

.how-card {
  height: 100%;
  text-align: center;
}

.how-card .icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.how-card .title {
  margin: 0;
  font-size: 1.2em;
}

.how-card .description {
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 996px) {
  .grid--how-we-work {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .how-card {
    padding: 24px;
  }

  .how-card .icon {
    font-size: 3rem;
  }
}

/* --- Market grid --- */

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 996px) {
  .market-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .market-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Market card images & buttons --- */

.card--market img {
  max-width: 200px;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
}

.card--market .title {
  margin-bottom: 12px;
}

.card--market .btn {
  width: 100%;
  max-width: 260px;
  text-align: center;
}

.card--market .btn + .btn {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .card--market {
    padding: 20px;
  }

  .card--market img {
    max-width: 160px;
  }
}

/* --- Price (standalone, поза .card) --- */

.price {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* --- Accordion --- */

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::marker { content: none; }

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--color-secondary);
  border-radius: 8px;
  border: 1px solid var(--color-icon);
  font-weight: 700;
  font-size: 1.1rem;
  transition: background .15s ease;
  user-select: none;
}

.accordion__summary h4.title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
  font-family: 'Montserrat', sans-serif;
}

.accordion__summary:hover,
.accordion__summary:focus {
  background: var(--color-secondary);
  outline: none;
}

.accordion__summary::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 10px solid var(--color-icon);
  border-bottom: 10px solid var(--color-icon);
  transform: rotate(-45deg);
  transition: transform .25s ease;
  margin-left: 12px;
}

details[open] > .accordion__summary::after {
  transform: rotate(45deg);
}

.accordion__body {
  overflow: hidden;
  padding: 0 8px;
  border-left: 1px solid rgba(0, 0, 0, 0.04);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 0 0 8px 8px;
  max-height: 0;
  transition: max-height .35s ease, padding .25s ease;
}

details[open] .accordion__body {
  padding: 12px 8px 16px;
  max-height: 100%;
}

.accordion__body .content__components {
  padding: 0;
}

@media (max-width: 640px) {
  .accordion__summary {
    font-size: 1rem;
    padding: 10px;
  }

  .accordion__body {
    padding: 10px 6px 14px;
  }
}

/* --- Contacts --- */

.contacts {
  display: flex;
  justify-content: space-between;
}

.contacts__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25em;
  font-weight: 500;
}

.contacts__item .icon {
  font-size: 1.25em;
  opacity: 1;
  color: var(--color-main);
}

.contacts__item .btn--main {
  font-size: 0.75em !important;
  color: #ffffff;
}

.contacts__item a {
  color: var(--color-icon);
}

@media (max-width: 1200px) {
  .contacts {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .contacts__item {
    font-size: 1em;
  }
}

/* --- Buyer --- */

.buyer {
  display: flex;
  justify-content: space-between;
}

.buyer__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25em;
  font-weight: 500;
}

.buyer__item .icon {
  font-size: 1.25em;
  opacity: 1;
  color: var(--color-main);
}

.buyer__item .btn--main {
  font-size: 0.75em !important;
  color: #ffffff;
  text-decoration: none;
}

.buyer__item .btn--main:hover {
  text-decoration: none;
}

.buyer__item .btn--main::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 7px;
  height: 7px;
  border-right: 7px solid currentColor;
  border-bottom: 7px solid currentColor;
  transform: rotate(135deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.buyer__item .btn--main:hover::before {
  opacity: 1;
}

.buyer__item a {
  color: var(--color-icon);
}

@media (max-width: 1200px) {
  .buyer {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .buyer__item {
    font-size: 1em;
  }
}

/* --- Modal --- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal--open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__box {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  margin: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--color-icon);
  transition: opacity 0.2s;
}

.modal__close:hover {
  opacity: 0.6;
}

.modal__title {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--color-icon);
  margin: 0;
  padding-right: 32px;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal__field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-doc);
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1em;
  outline: none;
  transition: border-color 0.2s;
}

.modal__field input:focus {
  border-color: var(--color-icon);
}

.modal__field-error {
  color: #c0392b;
  font-size: 0.82em;
  margin-top: 6px;
  min-height: 1em;
}

.modal__submit {
  width: 100%;
}

.modal__status {
  font-size: 0.9em;
  text-align: center;
  min-height: 1.2em;
}

.modal__status--success {
  color: var(--color-main);
}

.modal__status--error {
  color: #c0392b;
}

@media (max-width: 480px) {
  .modal__box {
    padding: 24px;
    margin: 16px;
  }
}

/* --- Footer --- */

.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: var(--color-secondary);
  padding: 40px 0;
  width: 100%;
  color: var(--color-icon);
}

.footer__block {
  display: flex;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.company-info {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-size: 0.75em;
}

@media (max-width: 996px) {
  .footer {
    justify-content: center;
  }

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

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__logo {
    display: flex;
    justify-content: center;
  }

  .company-info {
    align-items: center;
  }
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
  }
}
