@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

:root {
  --font: 'Montserrat', sans-serif;
  --fg: #dcdcdc;
  --bg: #000;
  --main: #9d4edd;
  --main-opacity: rgba(157, 78, 221, 0.1);
  --panel-bg: rgba(26,26,26,0.3);
  --panel-blur: 8px;
  --gap: 5em;
  --line: 2px;
  --line-color: rgba(168, 85, 247, 0.35);
  --transition: 0.3s ease-in-out;
  
  --water-depth: rgba(12, 10, 30, 0.95);
  --water-surface: rgba(30, 27, 75, 0.6);
  --water-highlight: rgba(200, 180, 255, 0.15);
  --water-depth-no-transparent: rgba(12, 10, 30, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container_blog {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 20% -10%, #241a4d 0%, transparent 60%),
                radial-gradient(900px 500px at 90% 10%, #1a1340 0%, transparent 60%),
                var(--bg);
  z-index: 0;
}

.blog-start {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100vh;
  background: url("../img/blog_background.png") center/cover no-repeat;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.blog-start::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.75) 100%
  );
}

.blog-start-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
}

.blog-start-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--main);
  text-shadow: 0 0 18px rgba(157, 78, 221, 0.6);
}

.blog-start-content p {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--fg);
  opacity: 0.9;
}

.arrow-down {
  margin-top: 2rem;
  stroke: var(--fg);
  animation: bounce 2s infinite;
  cursor: pointer;
}

.blog-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 20px;
  margin: 0 auto;
}

/* базовая карточка */
.b-card {
  width: 780px;
  height: 18.75rem;
  display: flex;
  align-items: stretch;
  gap: 20px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #1d1640, var(--bg-soft));
  border: 1px solid #ffffff10;
}

/* для чётных карточек меняем порядок */
.b-card:nth-child(even) {
  flex-direction: row-reverse;
}

/* текстовый блок */
.b-card-text {
  flex: 1;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

/* выравнивание текста у карточек с фото слева */
.b-card:nth-child(even) .b-card-text {
  text-align: right;
  align-items: flex-end;
}

.b-card-text h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #e9d5ff;
}

.b-card-text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

/* кнопки */
.card-actions {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.b-card:nth-child(even) .card-actions {
  justify-content: flex-end;
}

.card-dots {
  cursor: pointer;
  stroke: rgba(233,213,255,0.7);
  transition: stroke 0.3s ease, transform 0.3s ease;
  width: 48px;
  height: 48px;
}

.card-dots:hover {
  stroke: #a855f7;
  transform: scale(1.2);
}


.middle-part .vps-list {
  margin-left: 10px; /* або будь-яке значення, що підходить під ваш дизайн */
}

.vps-list {
  list-style-position: inside; /* щоб маркери були ближче до тексту */
}


/* картинка */
.b-card-img {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b-card-img img {
  width: 429px;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.b-card:hover .b-card-img img {
  transform: scale(1.08);
}

.container_blog_page {
  margin: 0 auto;
  margin-top: 62px;
  max-width: 850px;
  padding: 40px 20px;
  color: #e9d5ff;
  font-family: "Segoe UI", sans-serif;
}

/* верхняя часть */
.top-part {
  margin-top: 3.5%;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 0 18px rgba(157, 78, 221, 0.3);
}

.top-part img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  filter: brightness(70%);
  transition: transform 0.6s ease;
}

.top-part:hover img {
  transform: scale(1.05);
}

.top-part h1 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* средняя часть */
.middle-part {
  background: linear-gradient(180deg, #1d1640, var(--bg-soft));
  box-shadow: 0 20px 50px #00000050;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 28px;
}

.middle-part p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.middle-part ol {
  padding-left: 20px;
  margin: 0;
}

.middle-part li {
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
}

.middle-part a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 600;
}

.middle-part a:hover {
  text-decoration: underline;
}

/* разделитель */
.container_blog_page hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* нижняя часть */
.bottom-part {
  text-align: center;
}

.back-button {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  color: #fff;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
}

a {
  color: #6d28d9;
  text-decoration: none;
}

.blog_bg::before, .container_blog::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(
      800px 400px at 15% 30%,
      rgba(157, 78, 221, 0.18),
      transparent 60%
    ),
    radial-gradient(
      700px 500px at 85% 70%,
      rgba(109, 40, 217, 0.15),
      transparent 65%
    ),
    linear-gradient(
      180deg,
      #05030d 0%,
      #0c0a1e 50%,
      #05030d 100%
    );
}

@media (max-width: 768px) {
  .header {
    position: fixed;
    padding: 1rem 2rem;
    background: none;
    backdrop-filter: none;
    border-bottom: none; 
    box-shadow: none;
    transition: background 0.2s ease,
              backdrop-filter 0.2s ease,
              box-shadow 0.2s ease;
  }

  .container_blog_page {
    margin-top: 0;
  }

  .header.scrolled {
    background: rgba(20, 18, 45, 0.65);
    backdrop-filter: blur(var(--panel-blur));
    border-bottom: 1px solid rgba(157, 78, 221, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .b-card {
    flex-direction: column;
    width: 395px;
    height: 445px;
    margin: 0 12px;
    box-sizing: border-box;
  }

  .b-card:nth-child(even) {
    flex-direction: column;
  }

  .b-card-img {
    order: -1;
    height: 52%;
  }

  .b-card-text {
    height: 48%;
    text-align: center !important;
    align-items: center !important;
    padding: 18px 14px 20px;
    box-sizing: border-box;
  }

  .card-actions {
    justify-content: center !important;
  }

  .top-part {
    margin-top: 10%;
  }

  .top-part img {
    height: 220px;
  }

  .top-part h1 {
    font-size: 1.5rem;
    bottom: 12px;
  }

  .middle-part {
    padding: 20px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .header {
    position: fixed;
    padding: 1rem 2rem;
    background: none;
    backdrop-filter: none;
    border-bottom: none; 
    box-shadow: none;
    transition: background 0.2s ease,
              backdrop-filter 0.2s ease,
              box-shadow 0.2s ease;
  }

  .header.scrolled {
    background: rgba(20, 18, 45, 0.65);
    backdrop-filter: blur(var(--panel-blur));
    border-bottom: 1px solid rgba(157, 78, 221, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}