* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Baloo 2', cursive;
  background-color: #f8fff0;
  color: #333;
}

header {
  background: linear-gradient(90deg, #c3f5f5, #fcb0b3);
  text-align: center;
}

header img {
  max-height: 180px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.posts-wrapper h2 {
  text-align: center;
  margin: 20px 0;
  font-size: 2em;
  color: #d6336c;
}

nav {
  background-color: #f8fff0;
  padding: 10px;
  text-align: center;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: rgba(237, 84, 76, 0.996);
  font-weight: bold;
  font-size: 1.2em;
}

nav > ul > li > a:hover,
nav ul ul a:hover {
  background-color: rgba(237, 84, 76, 0.1);
  color: rgba(237, 84, 76, 0.996);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav > ul {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

nav > ul > li {
  position: relative;
}

nav ul ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #f8fff0;
  border: 1px solid rgba(237, 84, 76, 0.2);
  min-width: 200px;
  box-shadow: 0 2px 6px rgba(237, 84, 76, 0.1);
  z-index: 1000;
  padding: 0;
}

nav ul li:hover > ul {
  display: block;
}

nav ul ul li {
  width: 100%;
}

nav ul ul a {
  display: block;
  padding: 10px 15px;
  font-size: 1em;
  color: rgba(237, 84, 76, 0.996);
}

.hamburger {
  display: none;
  font-size: 2em;
  cursor: pointer;
  padding: 10px 15px;
  color: rgba(237, 84, 76, 0.996);
}

.hamburger-label {
  font-size: 1em;
  margin-left: 5px;
  vertical-align: middle;
  font-weight: bold;
}

.hero {
  background-image: url('img/backgroung.jpg');
  background-size: cover;
  background-position: center;
  max-width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8em;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content {
  text-align: center;
  background-color: rgba(102, 100, 100, 0.4);
  padding: 20px;
  border-radius: 8px;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1300px;
  margin: 30px auto;
  padding: 0 10px;
}

.post {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.post:hover {
  transform: translateY(-5px);
}

.post img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.post-content {
  padding: 15px;
}

.post-content h2 {
  font-size: 1.4em;
  color: #d6336c;
  margin-bottom: 10px;
}

.post-content p {
  font-size: 1em;
  color: #555;
}

.posts-wrapper {
  position: relative;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 10px;
}

.prev-button, .next-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.8em;
  background-color: rgba(214, 51, 108, 0.7);
}
.prev-button { left: -40px; }
.next-button { right: -40px; }

.next-button:hover,
.prev-button:hover {
  background-color: #b02556;
}

.prev-button:disabled,
.next-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}


footer {
  background: linear-gradient(90deg, #c3f5f5, #fcb0b3);
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  margin-top: 40px;
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }

  .hero {
    font-size: 1.2em;
    height: auto;
    padding: 20px 10px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    margin: 5px;
    font-size: 1em;
  }

  .hamburger {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: #f8fff0;
    width: 100%;
  }

  nav ul.active {
    display: flex;
  }

  nav > ul > li {
    width: 100%;
  }

  nav ul ul {
    position: static;
    border: none;
    box-shadow: none;
  }

  nav ul ul a {
    padding-left: 30px;
  }

  nav > ul > li.expanded > ul {
  display: block;
}


  .next-button,
  .prev-button {
    position: static;
    display: block;
    margin: 10px auto;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #f8fff0;
    width: 100%;
  }

  nav ul.active {
    display: flex;
  }

  nav > ul > li {
    width: 100%;
  }

  nav > ul > li > a {
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #eee;
  }

  nav ul ul {
    position: static;
    background: #fefefe;
    border: none;
    box-shadow: none;
  }

  nav ul ul a {
    padding: 12px 40px;
    font-size: 0.95em;
    background-color: #fffaf9;
    border-left: 4px solid #fcb0b3;
  }

  nav ul ul a::before {
    content: "↳ ";
    color: #d6336c;
    font-weight: bold;
  }

  nav > ul > li.expanded > ul {
    display: block;
  }
}


.seo-intro {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  font-family: 'Baloo 2', cursive;
}

.seo-intro h1 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 20px;
  color: #d6336c;
}

.seo-intro .intro-blocks {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.seo-intro .intro-block {
  padding: 20px;
  border-radius: 8px;
  background-color: #f9f9f9;
  border-left: 5px solid #ccc;
}

.seo-intro .intro-block h2 {
  margin-top: 0;
  font-size: 1.2em;
}

.seo-intro p {
  font-size: 1.05em;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
}

.seo-intro .block-1 { background-color: #fff6f6; border-left-color: #ff8ea0; }
.seo-intro .block-2 { background-color: #f7fef7; border-left-color: #8fd18f; }
.seo-intro .block-3 { background-color: #f5f5ff; border-left-color: #a295ff; }
.seo-intro .block-4 { background-color: #fff8ec; border-left-color: #f4b400; }

@media (max-width: 600px) {
  .seo-intro h1 {
    font-size: 1.5em;
  }

  .seo-intro p {
    font-size: 1em;
  }

  .seo-intro .intro-blocks {
    grid-template-columns: 1fr;
  }
}
