/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

/*=============== CSS VARIABLES ===============*/
:root {
  /* Colors */
  --primary-color: #4338CA;
  --primary-color-hover: #6366F1;
  --title-color: #111827;
  --text-color: #374151;
  --body-bg-color: #FFFFFF;
  --container-bg-color: #FFFFFF;
  --secondary-bg-color: #F3F4F6;
  --white-color: #FFFFFF;

  /* Fonts */
  --body-font: 'Inter', sans-serif;
  --title-font: 'Poppins', sans-serif;

  --h1-font-size: 2.5rem;   /* 40px */
  --h2-font-size: 2rem;     /* 32px */
  --h3-font-size: 1.25rem;  /* 20px */
  --normal-font-size: 1rem; /* 16px */
  --small-font-size: 0.875rem; /* 14px */
  
  /* Font weight */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
  
  /* Margins & Paddings */
  --mb-0-5: 0.5rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-3: 3rem;
}

@media screen and (min-width: 992px) {
  :root {
    --h1-font-size: 3.5rem;
    --h2-font-size: 2.5rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.125rem;
    --small-font-size: 1rem;
  }
}

/*=============== BASE STYLES ===============*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3 {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--font-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-2);
  text-align: center;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-bg-color);
  z-index: var(--z-fixed);
  transition: box-shadow 0.3s;
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 6rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--title-font);
  font-weight: var(--font-semibold);
  color: var(--title-color);
  font-size: 1.25rem;
}

.logo__svg {
    width: 36px;
    height: 36px;
}

.nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100%;
  background-color: var(--body-bg-color);
  padding: 6rem 2rem 0;
  transition: right 0.4s ease;
  box-shadow: -2px 0 10px hsla(0, 0%, 0%, 0.1);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color 0.3s;
}

.nav__link:hover {
  color: var(--primary-color);
}

.nav__link--button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.nav__link--button:hover {
    background-color: var(--primary-color-hover);
    color: var(--white-color);
}

.nav__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  cursor: pointer;
  color: var(--title-color);
}

.nav__toggle {
  cursor: pointer;
  color: var(--title-color);
}

/* Show menu */
.nav.show-menu {
  right: 0;
}

/* Header shadow */
.header--scroll {
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.1);
}


/*=============== FOOTER ===============*/
.footer {
    background-color: var(--secondary-bg-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid #e5e7eb;
}

.footer__container {
    display: grid;
    gap: 3rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__column .logo {
    margin-bottom: var(--mb-1);
}

.footer__description {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1-5);
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
    font-weight: var(--font-semibold);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    font-size: var(--small-font-size);
    transition: color 0.3s;
    display: inline-block;
}

.footer__link:hover {
    color: var(--primary-color);
}

.footer__list--contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.footer__bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.footer__copyright {
    font-size: var(--small-font-size);
    color: #6b7280;
}

/*=============== MEDIA QUERIES ===============*/

/* For medium devices */
@media screen and (min-width: 768px) {
  .nav {
    all: unset; /* Сбрасываем все стили мобильного меню */
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
  
  .nav__close,
  .nav__toggle {
    display: none;
  }
  
  .header__container {
    height: calc(6rem + 1rem);
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/*=============== BUTTONS ===============*/
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-2px);
}

.button__icon {
    width: 20px;
    height: 20px;
}

/*=============== HERO SECTION ===============*/
.hero {
    padding-top: 8rem; /* Увеличим отступ сверху из-за фиксированного хедера */
    padding-bottom: 4rem;
    background-color: var(--secondary-bg-color);
}

.hero__container {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.hero__data {
    text-align: center;
}

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1-5);
    line-height: 1.2;
}

.hero__title-animated {
    color: var(--primary-color);
}

/* Blinking cursor animation */
.hero__title-cursor {
    display: inline-block;
    width: 3px;
    height: var(--h1-font-size);
    background-color: var(--primary-color);
    animation: blink 0.8s infinite;
    vertical-align: bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero__description {
    font-size: var(--normal-font-size);
    margin-bottom: var(--mb-2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__image img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px hsla(228, 66%, 25%, 0.1);
}

/*=============== MEDIA QUERIES (add to existing blocks or create new ones) ===============*/
@media screen and (min-width: 768px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .hero__data {
        text-align: left;
    }
    
    .hero__description {
        margin-left: 0;
        margin-right: 0;
    }
}

@media screen and (min-width: 992px) {
    .hero {
        padding-top: 10rem;
    }
    
    .hero__container {
        gap: 2rem;
    }
}

/*=============== REUSABLE (add this new class) ===============*/
.section__subtitle {
    display: block;
    text-align: center;
    font-size: var(--normal-font-size);
    max-width: 600px;
    margin: 0 auto var(--mb-3);
    color: var(--text-color);
}

/*=============== FEATURES SECTION ===============*/
.features {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.features__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.features__item {
    background-color: var(--container-bg-color);
    padding: 2rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.features__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px hsla(228, 66%, 25%, 0.1);
}

.features__icon {
    margin-bottom: var(--mb-1);
}

.features__icon i {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
    color: var(--primary-color);
}

.features__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-semibold);
    margin-bottom: var(--mb-0-5);
}

.features__description {
    font-size: var(--small-font-size);
    line-height: 1.5;
}

/*=============== HOW IT WORKS SECTION ===============*/
.how {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--secondary-bg-color);
}

.how__container {
    display: grid;
    gap: 4rem;
    position: relative;
}

/* Timeline line */
.how__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #d1d5db;
    display: none; /* Hidden by default, shown on desktop */
}

.how__step {
    display: grid;
    gap: 1.5rem;
    text-align: center;
}

.how__step-number {
    font-size: 3rem;
    font-weight: var(--font-bold);
    color: #e5e7eb;
    margin-bottom: var(--mb-0-5);
}

.how__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1);
}

.how__link {
    color: var(--primary-color);
    font-weight: var(--font-medium);
    text-decoration: underline;
}

.how__image img {
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px hsla(228, 66%, 25%, 0.1);
}

@media screen and (min-width: 768px) {
    .how__container::before {
        display: block;
    }

    .how__step {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 3rem;
        position: relative;
    }

    .how__step:nth-child(even) {
        grid-template-areas: "image data";
    }

    .how__step:nth-child(odd) {
        grid-template-areas: "data image";
    }
    
    .how__step:nth-child(even) .how__data {
        grid-area: data;
    }
    .how__step:nth-child(even) .how__image {
        grid-area: image;
    }
    .how__step:nth-child(odd) .how__data {
        grid-area: data;
    }
    .how__step:nth-child(odd) .how__image {
        grid-area: image;
    }
    
    .how__data {
        text-align: left;
    }

    /* Timeline circle */
    .how__step::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 16px;
        height: 16px;
        background-color: var(--primary-color);
        border: 3px solid var(--secondary-bg-color);
        border-radius: 50%;
        z-index: 1;
    }
}

/*=============== PRICING SECTION ===============*/
.pricing {
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.pricing__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    align-items: center; /* Центрируем карточки по вертикали */
}

.pricing__card {
    background-color: var(--container-bg-color);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing__card--popular {
    border-color: var(--primary-color);
    border-width: 2px;
    transform: scale(1.05); /* Делаем популярную карточку чуть больше */
}

.pricing__popular-badge {
    position: absolute;
    top: 1.5rem;
    right: -45px;
    transform: rotate(45deg);
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    padding: 0.5rem 3rem;
    width: 180px;
    text-align: center;
}

.pricing__header {
    margin-bottom: var(--mb-2);
}

.pricing__plan-name {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.pricing__plan-description {
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-1-5);
    min-height: 40px; /* Чтобы карточки были одной высоты */
}

.pricing__price {
    display: flex;
    align-items: flex-end;
    margin-bottom: var(--mb-2);
}

.pricing__price-amount {
    font-size: var(--h1-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
    line-height: 1;
}

.pricing__price-currency {
    font-size: 1.5rem;
    margin-right: 0.25rem;
}

.pricing__price-period {
    margin-left: 0.5rem;
    font-weight: var(--font-medium);
}

.pricing__price-custom {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

.pricing__features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: var(--mb-2);
    flex-grow: 1; /* Растягиваем список, чтобы кнопка была внизу */
}

.pricing__feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--small-font-size);
}

.pricing__feature-item--disabled {
    color: #9ca3af;
    text-decoration: line-through;
}

.pricing__feature-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.pricing__feature-item--disabled .pricing__feature-icon {
    color: #9ca3af;
}

.button--outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.button--outline:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

@media screen and (min-width: 768px) {
    .pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 992px) {
    .pricing__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*=============== REVIEWS SECTION ===============*/
.reviews {
    padding-top: 4rem;
    padding-bottom: 6rem;
    background-color: var(--secondary-bg-color);
}

.reviews__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.reviews__card {
    background-color: var(--container-bg-color);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.reviews__author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--mb-1-5);
}

.reviews__author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.reviews__author-name {
    font-size: 1.125rem; /* ~18px */
    font-weight: var(--font-semibold);
    color: var(--title-color);
}

.reviews__author-position {
    font-size: var(--small-font-size);
}

.reviews__text {
    font-size: var(--normal-font-size);
    line-height: 1.7;
    color: var(--text-color);
}

@media screen and (min-width: 768px) {
    .reviews__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 992px) {
    .reviews__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*=============== CONTACT SECTION ===============*/
.contact {
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.contact__container {
    display: grid;
    gap: 3rem;
}

.contact__title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1);
}

.contact__description {
    margin-bottom: var(--mb-2);
}

.contact__form-group {
    position: relative;
    margin-bottom: 2rem;
    height: 4rem;
}

.contact__form-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #d1d5db;
    background: none;
    color: var(--text-color);
    outline: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
    z-index: 1;
}

.contact__form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0 0.25rem;
    background-color: var(--body-bg-color);
    color: #9ca3af;
    font-size: var(--normal-font-size);
    transition: 0.3s;
}

/* Move label up when typing or input has value */
.contact__form-input:focus + .contact__form-label,
.contact__form-input:not(:placeholder-shown).contact__form-input:not(:focus) + .contact__form-label {
    top: -0.75rem;
    left: 0.8rem;
    font-size: var(--small-font-size);
    font-weight: 500;
    z-index: 10;
}

.contact__form-input:focus {
    border-color: var(--primary-color);
}

.contact__form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact__form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

.contact__form-checkbox-label {
    font-size: var(--small-font-size);
}

.contact__form-checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact__message {
    font-size: var(--small-font-size);
    margin-bottom: 1rem;
    text-align: center;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.contact__message.visible {
    opacity: 1;
}

.contact__button {
    width: 100%;
}

@media screen and (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }
}

/*=============== COOKIE POP-UP ===============*/
.cookie {
    position: fixed;
    bottom: -100%; /* Start hidden */
    left: 0;
    width: 100%;
    background-color: var(--title-color);
    color: var(--white-color);
    padding: 1.5rem 0;
    z-index: var(--z-modal);
    transition: bottom 0.5s ease-in-out;
}

.cookie.show {
    bottom: 0; /* Show popup */
}

.cookie__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.cookie__text {
    font-size: var(--small-font-size);
    text-align: center;
}

.cookie__link {
    color: var(--white-color);
    text-decoration: underline;
    font-weight: var(--font-medium);
}

.cookie__button {
    padding: 0.75rem 1.5rem;
    background-color: var(--white-color);
    color: var(--title-color);
}

.cookie__button:hover {
    background-color: #e5e7eb;
    color: var(--title-color);
}

@media screen and (min-width: 768px) {
    .cookie__container {
        flex-direction: row;
    }
    .cookie__text {
        text-align: left;
    }
}

/*=============== STYLES FOR POLICY PAGES ===============*/
.pages .container {
    max-width: 800px;
    padding-top: 10rem;
    padding-bottom: 6rem;
}

.pages h1 {
    font-size: 1.5rem;
    margin-bottom: var(--mb-2);
}

.pages h2 {
    font-size: 1.5rem;
    margin-top: var(--mb-2);
    margin-bottom: var(--mb-1);
}

.pages p {
    margin-bottom: var(--mb-1-5);
    line-height: 1.8;
}

.pages ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: var(--mb-1-5);
}

.pages li {
    margin-bottom: var(--mb-0-5);
}

.pages a {
    color: var(--primary-color);
    text-decoration: underline;
}

.pages strong {
    font-weight: var(--font-bold);
    color: var(--title-color);
}