:root {
  /* Базовые шрифты */
  font-family: 'Inter', sans-serif;
  line-height: 1.6;

  /* Делаем светлую тему идентичной темной, чтобы избежать мерцаний */
  --primary: #F0C201;           /* Главный акцентный ЖЕЛТЫЙ */
  --primary-light: #FFD633;     /* Чуть светлее для ховера (наведения) */
  --primary-dark: #C09A00;      /* Темно-желтый для нажатий */
  --accent: #F0C201;            /* Цвет выделения */

  --text-dark: #FFFFFF;         /* Основной текст (белый на темном) */
  --text-light: #A0A0A0;        /* Второстепенный текст (приятный серый) */

  --bg-light: #121212;          /* Основной фон сайта (очень темный серый/черный) */
  --white: #1C1C1C;             /* Фон карточек и блоков (светлее основного фона) */
  --border: #2D2D2D;            /* Цвет рамок и разделителей */
}

[data-theme="dark"] {
  --primary: #F0C201;
  --primary-light: #FFD633;
  --primary-dark: #C09A00;
  --accent: #F0C201;

  --text-dark: #FFFFFF;
  --text-light: #A0A0A0;

  --bg-light: #121212;
  --white: #1C1C1C;
  --border: #2D2D2D;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease; /* Плавное переключение темы */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- HEADER --- */
.header {
  background-color: rgba(var(--white), 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  /*padding: 20px 0; with logo we have to comment*/
  padding-top: 10px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

/*[data-theme="dark"] .header {*/
/*  background-color: rgba(30, 30, 30, 0.95); !* Полупрозрачный фон для темной шапки *!*/
/*}*/

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0px 24px;
}

.logo img {
  width: 95px;
  height: auto;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}



@media (max-width: 760px){
  .logo{
    font-size: 13px;
  }
}



.nav {
  display: flex;
  gap: 2.5rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;

}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-light);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-light);
}

.nav-link:hover::after {
  width: 100%;
}

/* Блок с кнопкой темы и телефоном */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-light);
  transform: scale(1.1);
}

.nav-cta {
  background-color: var(--primary-light);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-cta:hover {
  background-color: #7a680b;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* --- HERO SECTION (НОВЫЙ ДИЗАЙН ВО ВЕСЬ ЭКРАН) --- */
.hero {
  min-height: calc(100vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
  position: relative;

  /* ИЗМЕНЕНО: Градиент сверху вниз.
     К низу (100%) он становится плотным цветом #000f1f (var(--primary-dark)) */
  background: linear-gradient(
          to bottom,
          rgba(0, 15, 31, 0.4) 0%,
          rgba(0, 15, 31, 0.8) 75%,
          #000f1f 100%
  ),
  url('./img/main.png') center/cover no-repeat;

  overflow: hidden;
}
.hero-container {
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-wrapper {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-block;
  background-color: rgba(0, 217, 255, 0.15);
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 217, 255, 0.3);
}

/* Текст в Hero всегда белый из-за темного фото-фона */
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-content > p {
  font-size: 1.2rem;
  color: #e0e0e0;
  margin: 0 auto 3rem;
  line-height: 1.8;
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.hero .btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.hero .btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Статистика в Hero (теперь снизу по центру) */
.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: rgba(0, 217, 255, 0.15);
  color: var(--accent);
  border-radius: 12px;
}

.stat div {
  display: flex;
  flex-direction: column;
}

.hero .stat strong {
  font-size: 1rem;
  color: #ffffff;
}

.hero .stat span {
  font-size: 0.85rem;
  color: #cccccc;
}

/* Скрываем старые элементы, чтобы не мешали фону */
.hero-shape,
.hero .roofing1,
.hero .roofing2 {
  display: none;
}

/* Оставшиеся декоративные крыши (если они используются в других блоках) */
.roofing1, .roofing2, .roofing3 {
  position: absolute;
  scale: 1.2;
  z-index: 0;
  /*filter: brightness(0.5);*/
}
.roofing1{
  filter: brightness(0.5);
  right: -70px;
  bottom: 0;
  rotate: -130deg;

}

.roofing2{
  top: 0;
  left: -100px;
  rotate: -130deg;
}
.roofing3{
  top: 100px;
  right: -100px;
  rotate: -110deg;
}

/* --- SERVICES --- */
.services {
  position: relative;
  padding: 7rem 0;
  background-color: var(--white);
  transition: background-color 0.4s ease;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.service-card {
  background-color: var(--white);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  transition: all 0.4s ease;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .service-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

/*.service-card:hover {*/
/*  transform: translateY(-8px);*/
/*  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);*/
/*  border-color: transparent;*/
/*}*/

[data-theme="dark"] .service-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1;
  color: rgba(13, 107, 143, 0.1);
  -webkit-text-stroke: 1px var(--primary-light);

}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-card p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- PORTFOLIO --- */
.portfolio {
  padding: 7rem 0;
  position: relative;
  background-color: var(--bg-light);
  overflow: hidden;
  transition: background-color 0.4s ease;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  z-index: 1;
}

.portfolio-grid {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: max-content;
  will-change: transform;
}

.portfolio-grid iframe {
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  background: var(--white);
  border: 1px solid var(--border) !important;
}

/* --- INFINITE GRID WRAPPER (SERVICES + PORTFOLIO) --- */
.infinite-grid-wrapper {
  position: relative;
  background-color: #000f1f; /* Идеальное продолжение низа Hero */
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Декоративные световые сферы (blur) */
.blur-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}
.blur-sphere-1 { right: -10%; top: 5%; width: 40%; height: 40%; background: rgba(249, 115, 22, 0.15); /* Оранжевый акцент */ }
.blur-sphere-2 { left: -10%; top: 40%; width: 40%; height: 40%; background: rgba(13, 107, 143, 0.2); /* Синий акцент */ }

/* Фоновая тусклая сетка (Слой 1) */
.grid-bg-base {
  position: absolute;
  inset: 0;
  background-image:
          linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
          linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  animation: grid-scroll 15s linear infinite;
}

/* Яркая сетка (Слой 2), которая видна только под курсором */
.grid-bg-active {
  position: absolute;
  inset: 0;
  background-image:
          linear-gradient(to right, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
          linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  animation: grid-scroll 15s linear infinite;
  /* Эффект фонарика */
  mask-image: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), black, transparent 80%);
  -webkit-mask-image: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), black, transparent 80%);
  pointer-events: none;
}

@keyframes grid-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* Сами секции внутри (фон прозрачный, текст светлый) */
.services, .portfolio {
  padding: 7rem 0;
  background-color: transparent;
  color: #ffffff;
  position: relative;
  z-index: 10;
}

.relative.z-10 {
  position: relative;
  z-index: 10;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; color: #ffffff; margin-bottom: 1rem; }
.section-header p { font-size: 1.15rem; color: #cccccc; max-width: 600px; margin: 0 auto; }

/* Карточки Services в стиле полупрозрачного стекла */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background-color: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px); background-color: rgba(255, 255, 255, 0.08); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.service-card:hover::before { transform: scaleX(1); }

.service-number { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2); }
.service-card .service-number { -webkit-text-stroke: 1px var(--accent); }
.service-card h3 { font-size: 1.3rem; color: #ffffff; margin-bottom: 1rem; font-weight: 700; }
.service-card p { color: #aaaaaa; font-size: 1rem; line-height: 1.6; }

/* Карусель Portfolio */
.carousel-wrapper { width: 100%; overflow: hidden; position: relative; padding: 20px 0; }
.portfolio-grid { display: flex; align-items: flex-start; gap: 30px; width: max-content; }
.portfolio-grid iframe { flex-shrink: 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); background: #fff; }

/* --- TESTIMONIALS --- */
.testimonials {
  padding: 7rem 0;
  background-color: var(--primary-dark);
  color: #ffffff;
  position: relative;
}

.testimonials::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  z-index: 0;
}

.testimonials .container {
  position: relative;
  z-index: 1;
}

.testimonials h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4rem;
  color: #ffffff;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 2.5rem;
  border-radius: 16px;
  position: relative;
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.08);
}

.quote-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  fill: var(--primary-light);
  opacity: 0.5;
}

.testimonial-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.testimonial-author {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

/* --- CONTACT --- */
.contact {
  padding: 7rem 0;
  background: linear-gradient(to top, rgba(0, 15, 31, 0.4) 0%, rgba(0, 15, 31, 0.8) 75%, #000f1feb 100%), center / cover no-repeat;
  transition: background-color 0.4s ease;
  position: relative;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

.contact-content h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 2;
}

.contact-content p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.8;
}

.contact-form {
  background-color: var(--bg-light);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

[data-theme="dark"] .contact-form {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

input,
select,
textarea {
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: var(--white);
  color: var(--text-dark);
}

input::placeholder, textarea::placeholder {
  color: #999999;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(13, 107, 143, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}
.linkFbWrapper{
  text-decoration: none;
}
.contact-form .btn-primary {
  width: 100%;
}

/* --- FOOTER --- */
.footer {
  background-color: #000f1f; /* Всегда темный */
  color: #ffffff;
  padding: 5rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-section h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
.burger-menu {
  display: none; /* Скрываем на больших экранах */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 105; /* Чтобы кнопка была поверх открытого меню */
}

.burger-line {
  width: 100%;
  height: 3px;
  background-color: #F3F7F9; /* Используем вашу переменную для цвета, чтобы менялась в темной теме */
  border-radius: 5px;
  transition: all 0.3s ease;
}
@media (max-width: 768px) {
  .roofing1, .roofing2, .roofing3 {
    width: 200px;
  }
  .header-content{gap: 0;
    padding: 0 20px;
  }
  /*.nav {*/
  /*  display: none;*/
  /*}*/

  .hero {
    padding: 3rem 0;
  }

  .hero-buttons {
    flex-direction: column;
  }
  .burger-menu {
    display: flex;
  }

  /* Стили для выпадающего мобильного меню */
  .nav {
    position: absolute;
    top: 0%; /* Позиционируем сразу под шапкой */
    left: 0;
    width: 100%;
    background-color: var(--white); /* Используем вашу переменную (в темной теме станет темной) */
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Скрываем меню за пределами экрана по умолчанию */
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none; /* Чтобы нельзя было кликнуть по скрытому меню */
    transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.4s ease;
    z-index: 100;
  }

  /* Класс, который показывает меню (добавляется через JS) */
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
    background: #0D1927;
    backdrop-filter: blur(10px);
  }

  /* Делаем ссылки крупнее для удобства на телефоне */
  .nav-link {
    font-size: 1.2rem;
  }

  /* Анимация бургера в крестик (X) при открытии меню */
  .burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 7px);
  }
  .burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -8px);
  }
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.5rem;
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .services {
    padding: 4rem 0;
  }
  .form-group input, .form-group select{
    width: 100%;
  }
  .form-group select{
    padding-right: 10px;
  }
}

/*facebook styles*/

/* Контейнер поста */
.fb-post {
  width: 100%;
  max-width: 500px; /* Максимальная ширина, как на десктопах */
  margin: 0 auto;
  background-color: rgb(64 77 93 / 34%);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #050505;
  overflow: hidden; /* Чтобы углы фото не вылезали за скругления (если нужно) */
}

/* Шапка */
.fb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.fb-header-info {
  display: flex;
  align-items: center;
}

.fb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  border: 1px solid rgba(0,0,0,0.1);
}

.fb-author {
  font-weight: 600;
  font-size: 15px;
}

/* Текст */
.fb-text {
  padding: 0 16px 12px 16px;
  font-size: 15px;
  line-height: 1.4;
}

/* Контейнер для фото */
.fb-image-container {
  width: 100%;
  display: flex;
  background-color: #f0f2f5; /* Цвет фона, если фото не загрузилось */
}

.fb-main-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Ограничитель высоты для очень длинных фото */
}

/* Блок действий (футер) */
.fb-actions-wrapper {
  padding: 0 16px;
}

.fb-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ced0d4; /* Тонкая серая линия сверху */
  padding: 4px 0;
  margin-top: 4px;
}

/* Кнопки действий */
.fb-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #65676B;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.fb-action-btn:hover {
  background-color: #F0F2F5; /* Серый фон при наведении, как в FB */
}

.fb-action-btn svg {
  color: #65676B;
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 350px) {
  .fb-action-btn span {
    display: none; /* Скрываем текст кнопок, оставляем только иконки на микро-экранах */
  }
}

/*Тёмнаная тема*/
/* =========================================
   ТЕМНАЯ ТЕМА (Включается классом .fb-theme-dark)
   ========================================= */

.fb-post.fb-theme-dark {
  color: #E4E6EB; /* Светло-серый текст */
  /* From https://css.glass */
  background: rgb(16 30 47 / 34%);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(1.7px);
  -webkit-backdrop-filter: blur(1.7px);
  border: 1px solid rgba(255, 255, 255, 0.33);
}

/* Фон под картинкой (если она грузится) */
.fb-theme-dark .fb-image-container {
  background-color: #18191A;
}

/* Цвет линии над кнопками */
.fb-theme-dark .fb-actions {
  border-top-color: #3E4042;
}

/* Цвет кнопок (Лайк, Коммент, Репост) и иконок */
.fb-theme-dark .fb-action-btn {
  color: #B0B3B8;
}

.fb-theme-dark .fb-action-btn svg {
  color: #B0B3B8;
}

/* Цвет кнопок при наведении мыши */
.fb-theme-dark .fb-action-btn:hover {
  background-color: #3A3B3C;
}

/* Убираем белую обводку у аватарки в темной теме и делаем темную */
.fb-theme-dark .fb-avatar {
  border-color: rgba(255, 255, 255, 0.1);
}





@media (max-width: 760px){
  .hero-wrapper{
    padding-top: 100px;
  }
  .fb-post{
    max-width: 330px;
  }
  header{
    padding:  0;
    padding-top: 0;
  }
  .header{
    padding-top: 0;
  }
  .logo img{
    width: 64px;
    position: relative;
    top: 7px;
  }
  .nav-cta{
    padding: 10px 10px;
    font-size: 12px;
  }
  .removePaddingMobile{
    padding: 0;
  }
}

/* Убедитесь, что грид растягивается по ширине всего контента */
#portfolioGrid {
  display: flex;
  width: max-content;
  /* Аппаратное ускорение */
  will-change: transform;
}

/* Сам класс анимации, который мы вешаем из JS */
.animate-carousel {
  /* 30s - это скорость полного прохода. Сделайте больше для замедления (например 40s) или меньше для ускорения */
  animation: scroll-infinite 50s linear infinite;
}

/* Ключевые кадры: смещаем ровно на 50% (так как мы продублировали карточки в 2 раза) */
@keyframes scroll-infinite {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}