/*
Theme Name: k.prgdv
Theme URI: https://k-prgdv.ru
Author: Konstantin Peregudov
Author URI: https://k-prgdv.ru
Description: Portfolio theme. Верстка и стили из выгрузки kprgdv-web (assets/kprgdv-web). Адаптив: 991px, 767px, 479px.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: k-prgdv
*/

/* Основная верстка и стили подключаются из выгрузки: assets/kprgdv-web/css/kprgdv-web.webflow.shared.447030dcd.css */
/* Шкала: выгрузка _19px ≈ 1.07rem, _30px ≈ 1.69rem; кнопки hero — из выгрузки; страница проекта — свои. Мобильные переопределения в assets/css/mobile.css */

/* Базовые переопределения для WordPress */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.body {
  margin: 0;
  overflow-x: hidden;
}

/* Кнопка переключения темы (в навбаре выгрузки — без фона) */
.theme_switch.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* Сообщение после отправки формы (AJAX) */
#form-message {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

/* Блок согласия с чекбоксами (ФЗ‑152, актуальное законодательство РФ) */
.form-consent {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.form-consent__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 300;
}
.form-consent__item input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.25rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--blue, #3a4df8);
}
.form-consent__text {
  opacity: 0.85;
  line-height: 1.4;
}
.form-consent__text .link {
  color: var(--blue, #3a4df8);
  text-decoration: underline;
}
.form-consent__text .link:hover {
  opacity: 0.9;
}

/* Блок «Или напишите удобным способом» — ссылки в виде кнопок */
.form .socials {
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.form .social_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid rgba(58, 77, 248, 0.5);
  color: #3a4df8bf;
  font-size: 1.05rem;
  font-weight: 400;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.form .social_link:hover {
  border-color: var(--blue, #3a4df8);
  background-color: rgba(58, 77, 248, 0.1);
  color: var(--blue, #3a4df8);
}

#form-message.success {
  display: block;
  color: #0f0;
  background: rgba(0, 255, 0, 0.1);
}

/* Cookie-баннер (ФЗ‑152): в стилях темы — тёмный фон, синий акцент */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 1.25rem;
  background: var(--dark-blue, #00031c);
  border-top: 1px solid rgba(58, 77, 248, 0.35);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  line-height: 1.45;
}
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner.is-visible {
  display: block;
}
.cookie-banner__inner {
  max-width: 83rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-banner__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}
.cookie-banner__link {
  color: var(--blue, #3a4df8);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.cookie-banner__link:hover {
  color: #6b7cff;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-banner__btn {
  padding: 0.6rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, color 0.2s;
}
.cookie-banner__btn--reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.cookie-banner__btn--reject:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.cookie-banner__btn--accept {
  background: var(--blue, #3a4df8);
  color: #fff;
}
.cookie-banner__btn--accept:hover {
  background: #4a5dff;
}

/* Ссылка на политику в футере */
.footer_sep {
  opacity: 0.7;
}
.footer_policy-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.footer_policy-link:hover {
  opacity: 1;
  text-decoration: underline;
}

#form-message.error {
  display: block;
  color: #f66;
  background: rgba(255, 100, 100, 0.1);
}

/* Скрываем блоки Webflow-формы, т.к. используем свою отправку */
.w-form-done,
.w-form-fail {
  display: none !important;
}

.hero_star {
  margin-left: 61rem;
}

/* --- Страница проекта (single) --- */
.project-single {
  padding-top: 5rem;
  padding-bottom: 4rem;
  background-color: var(--dark-blue, #00031c);
  min-height: 60vh;
}

/* Блок изображения: на всю ширину экрана */
.project-single__figure {
  width: 100%;
  max-width: none;
  margin: 0 0 2rem;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
}

.project-single__cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.project-single__header {
  margin-bottom: 2rem;
}

.project-single__title {
  margin: 0 0 0.5rem;
}

.project-single__tag {
  margin: 0 0 0.5rem;
  opacity: 0.85;
}

.project-single__link-wrap {
  margin: 1rem 0 0;
}

/* Кнопка «Перейти на сайт» — читаемо на тёмном фоне */
.project-single__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--blue, #3a4df8);
  color: #fff !important;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2rem;
  transition: background 0.2s, box-shadow 0.2s;
}

.project-single__btn:hover {
  background: #4a5cf9;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(58, 77, 248, 0.5);
}

.project-single__btn-arrow {
  font-size: 1.15em;
  line-height: 1;
}

/* Контент проекта: крупный читаемый текст, как в кейсах/лендингах */
.project-single__content {
  color: #fff;
  max-width: 52rem;
  font-size: 1.2rem;
  line-height: 1.7;
  padding-left: 1rem;
}

/* Блок «Платформа / Тема» в начале — визуально выделен */
.project-single__content > p:first-of-type,
.project-single__content > p:nth-of-type(2) {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  border-left: 3px solid var(--blue, #3a4df8);
}

.project-single__content > p:first-of-type {
  margin-top: 0;
}

.project-single__content > p:nth-of-type(2) {
  margin-top: -0.25rem;
}

.project-single__content p,
.project-single__content li {
  color: rgba(255, 255, 255, 0.92);
  margin-top: 0;
  margin-bottom: 0.85rem;
}

.project-single__content p:last-child {
  margin-bottom: 0;
}

/* Подзаголовки секций */
.project-single__content h2,
.project-single__content h3,
.project-single__content h4 {
  color: #fff;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project-single__content h2 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.project-single__content h3 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  color: rgba(255, 255, 255, 0.95);
}

.project-single__content h4 { font-size: 1.15rem; }

/* Группа: подзаголовок H3 + список — визуально один блок */
.project-single__content h3 + ul {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 1rem 0 1rem 2.25rem;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0.4rem 0.4rem 0;
}

.project-single__content h3 + ul li {
  margin-bottom: 0.5rem;
}

.project-single__content h3 + ul li:last-child {
  margin-bottom: 0;
}

/* Метки в тексте (Платформа:, Тема:, название пункта в списке) */
.project-single__content strong {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 600;
}

/* Пункт списка: термин до тире выделен */
.project-single__content li strong {
  margin-right: 0.25rem;
}

.project-single__content a {
  color: var(--blue, #3a4df8);
  text-underline-offset: 0.15em;
}

.project-single__content a:hover {
  color: #6b7cff;
}

/* Списки: маркеры правее, текст с выступом (многострочный — по тексту, не блоком) */
.project-single__content ul,
.project-single__content ol {
  padding-left: 3rem;
  margin-left: 0;
  margin-bottom: 1.25rem;
  list-style-position: outside;
}

.project-single__content li {
  margin-bottom: 0.6rem;
  padding-left: 0.35rem;
}

.project-single__content ul ul,
.project-single__content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 2.5rem;
}

.project-single__content blockquote {
  border-left: 4px solid var(--blue, #3a4df8);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
}

.project-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.25rem 0;
}

/* Страница политики конфиденциальности */
.privacy-page {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.privacy-page__title {
  margin-bottom: 2rem;
}

.privacy-content {
  max-width: 52rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.6;
}

.privacy-content__meta {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  border-left: 3px solid var(--blue, #3a4df8);
}

.privacy-content h2 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.privacy-content h2:first-of-type {
  margin-top: 0;
}

.privacy-content p,
.privacy-content li {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.privacy-content p:last-child {
  margin-bottom: 0;
}

.privacy-content ul,
.privacy-content ol {
  padding-left: 2.5rem;
  margin-left: 0;
  margin-bottom: 1.25rem;
  list-style-position: outside;
}

.privacy-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.35rem;
}

.privacy-content a {
  color: var(--blue, #3a4df8);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.privacy-content a:hover {
  color: #6b7cff;
}

/* Десктоп: секция проектов — вид как в выгрузке (swiper-wrapper / swiper-slide), без Swiper */
@media screen and (min-width: 768px) {
  .projects .projects-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-column-gap: 1.8rem;
    grid-row-gap: 4rem;
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .projects .project-card {
    background-color: var(--dark-blue);
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-decoration: none;
    position: relative;
    min-width: 0;
    max-width: none;
  }
  .projects .slide_wrapper {
    border-radius: 1.36rem;
    width: 100%;
    max-width: 100%;
    min-height: 22.5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .projects .slide_wrapper .project_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .projects .slide_txts {
    margin-top: 1.5rem;
    display: flex;
    flex-flow: column;
    grid-column-gap: 0.8rem;
    grid-row-gap: 0.8rem;
  }
}

@media (max-width: 767px) {
  .project-single__figure {
    margin-bottom: 1.5rem;
    aspect-ratio: 16 / 9;
  }
  .project-single__btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    min-height: 2.75rem;
  }
}

/* ========== Мобильный адаптив (вся тема) ========== */
/* Брейкпоинты как в выгрузке: 991px, 767px, 479px */

@media screen and (max-width: 991px) {
  .padding-global {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .hero_star {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media screen and (max-width: 767px) {
  .padding-global {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .padding-global.padding_navbar {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
  /* Мобильное меню: по клику на гамбургер показываем ссылки */
  .navbar .div-block-20 {
    position: relative;
    flex-wrap: wrap;
  }
  .navbar.mobile-menu-open .navbar_menu {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--dark-blue, #00031c);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    z-index: 100;
  }
  .navbar.mobile-menu-open .navbar_menu a {
    display: block;
    padding: 0.25rem 0;
  }
  .nav_hamb {
    cursor: pointer;
  }
  /* Hero */
  .hero_wrapper {
    min-height: 0;
    margin-top: 2rem;
  }
  .hero_back {
    min-height: 0;
    height: auto;
    padding-bottom: 2rem;
  }
  .hero_main {
    margin-top: 1.5rem;
    gap: 1.5rem;
  }
  .hero_h1 {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero .heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
  }
  .hero ._19px-txt {
    font-size: 1rem;
  }
  .hero_buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .hero .contact_me,
  .hero .view_projects {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    min-height: 3rem;
  }
  .hero_star {
    margin-left: 0;
    margin-top: 1.5rem;
  }
  .hero_star .svg-2 {
    width: 2.5rem;
    height: 2.5rem;
  }
  /* Проекты */
  .projects_wrapper {
    gap: 2rem;
  }
  .projects .titles_wrap {
    margin-bottom: 1rem;
  }
  .projects ._30px-text {
    font-size: 1.5rem;
  }
  .projects ._19px-txt {
    font-size: 0.95rem;
  }
  .projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem 1.8rem;
    width: 100%;
  }
  .project-card {
    background-color: var(--dark-blue);
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-decoration: none;
    position: relative;
    min-width: 280px;
    max-width: 85vw;
  }
  .slide_txts {
    margin-top: 1rem;
  }
  /* Обо мне */
  .about {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .about_wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .about_wrap {
    flex-direction: column;
    gap: 1.5rem;
  }
  .about_left {
    width: 100%;
    max-width: 20rem;
  }
  .about_right ._30px-text {
    font-size: 1.25rem;
  }
  .about_right ._19px-txt-copy {
    font-size: 1rem;
  }
  /* Форма */
  .form_wrapper {
    gap: 1.5rem;
    align-items: stretch;
  }
  .form .div-block-21 {
    flex-direction: column;
    gap: 0.75rem;
  }
  .form .text-field,
  .form .textarea {
    width: 100%;
    box-sizing: border-box;
  }
  .form ._30px-text {
    font-size: 1.35rem;
  }
  .form .submit-button {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }
  .form .div-block-24 {
    text-align: center;
  }
  /* Подвал */
  .footer_wrapper {
    padding: 2rem 0;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer .nav_top {
    flex-direction: column;
    gap: 1rem;
  }
  .footer_menu {
    flex-direction: column;
    gap: 0.5rem;
  }
  .footer .nav_bottom {
    flex-direction: column;
    gap: 1rem;
  }
  .footer .navbar_links {
    justify-content: center;
  }
  /* Страница проекта */
  .project-single {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .project-single__header {
    margin-bottom: 1.5rem;
  }
  .project-single__title {
    font-size: 1.5rem;
  }
  .project-single__content {
    font-size: 1.05rem;
    padding-left: 0.5rem;
  }
  .project-single__content > p:first-of-type {
    font-size: 1.1rem;
  }
  .project-single__content h2 {
    font-size: 1.3rem;
  }
  .project-single__content ul,
  .project-single__content ol {
    padding-left: 2rem;
  }
}

@media screen and (max-width: 479px) {
  .padding-global {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .padding-global.padding_navbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero .heading {
    font-size: 2rem !important;
  }
  .hero .contact_me,
  .hero .view_projects {
    max-width: 100%;
  }
  .projects ._30px-text {
    font-size: 1.35rem;
  }
  .project-card {
    min-width: 260px;
  }
  .project-single__title {
    font-size: 1.35rem;
  }
  .project-single__content {
    font-size: 1rem;
  }
}
