﻿.blog-section {
  background-color: var(--background-color-second);
  padding: 2.5rem 0;
}

.blog-container {
  max-width: 80rem;
  margin: 0 auto;
}
	
    .blog-heading {
      color: var(--primary-color);
      font-size: 2rem;
      margin-bottom: 3rem;
      text-align: center;
    }

    .blog-slider {
      position: relative;
      width: 100%;
      min-height: 400px;
    }

    .blog-post-content {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      opacity: 0;
      transform: scale(0.9) translateZ(-100px) rotate(0deg);
      transition:
        transform 0.4s ease-in-out,
        opacity 0.4s ease-in-out,
        z-index 0.4s ease-in-out;
      z-index: 1;
    }

    .blog-post-inner {
      display: grid;
      grid-template-columns: 1fr 1fr; 
      gap: 2rem;
      align-items: start;
    }

    .blog-image-block {
      width: 100%;
      height: 100%;
    }
	
    .blog-post-image-wrapper {
      width: 100%;
      height: 380px;
      border-radius: 1rem;
      overflow: hidden;
    }
	
    .blog-post-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
      user-select: none;
    }

    .blog-text-block {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      position: relative;
    }

    .blog-title {
      margin: 0 0 1rem 0;
      font-size: 1.46rem;
      font-weight: bold;
      color: var(--secondary-color);
    }

    .blog-title-link {
      text-decoration: none;
      color: var(--secondary-color);
    }
    .blog-title-link:hover {
      text-decoration: underline;
    }

    .blog-description {
      margin: 0.5rem 0 1rem 0;
      color: var(--text-color);
      font-size: 1.14rem;
      line-height: 1.6;
      min-height: 80px;
    }

    .blog-post-content.active {
      opacity: 1;
      transform: scale(1) translateZ(0) rotate(0deg);
      z-index: 999;
      animation: blog-bounce 0.4s ease-in-out;
    }

    @keyframes blog-bounce {
      0% {
        transform: translateY(0) scale(1);
      }
      50% {
        transform: translateY(-80px) scale(1);
      }
      100% {
        transform: translateY(0) scale(1);
      }
    }

    .blog-nav {
      position: absolute;
      bottom: 1rem;
      right: 1rem;
      display: flex;
      gap: 1rem;
      z-index: 1000;
    }

    .blog-nav button {
      cursor: pointer;
      padding: 0.6rem 0.8rem;
      border: none;
      border-radius: 50%;
      background: var(--secondary-color);
      color: var(--background-color-second);
      font-size: 1rem;
      transition: transform 0.3s ease;
	  
    }
    .blog-nav button:hover {
      transform: scale(1.1);
    }

@media (max-width: 768px) {
  .blog-slider {
    position: relative;
    min-height: auto;
  }

  .blog-post-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: scale(0.9) translateZ(-100px);
    transition:
      transform 0.4s ease-in-out,
      opacity 0.4s ease-in-out,
      z-index 0.4s ease-in-out;
    z-index: 1;
  }

  .blog-post-content.active {
    opacity: 1;
    transform: scale(1) translateZ(0);
    z-index: 999;
    position: relative;
  }

  .blog-post-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-image-block {
    order: 1;
  }

  .blog-text-block {
    order: 2;
    text-align: center;
  }

  .blog-title {
    order: 1;
  }

  .blog-description {
    order: 2;
  }

  .blog-nav {
    order: 3;
    position: static;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
  }
}