* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Montserrat', sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.5;
}
a {
  color: #111;
  text-decoration: none;
}
h2.section-title {
  font-size: 1.5em;
  font-weight: 700;
  border-bottom: 3px solid #000;
  padding-bottom: 0.3em;
  margin-bottom: 1em;
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-header{
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  font-family: 'Montserrat', sans-serif;
  position: relative;
  z-index: 5;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.author-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  text-align: center;
}
.author-subtitle {
  font-size: 0.8rem;
  color: #666;
  font-weight: 300;
  margin-top: 0.3rem;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  text-align: center;
}
.logo {
  height: 50px; 
}
@keyframes rollInLogo {
  0% {
    transform: translateX(-150px) rotate(-720deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
}
.logo-img {
  animation: rollInLogo 1.2s ease-out forwards;
  opacity: 0;
}
.author-name {
 font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  text-decoration: none;
  margin-left: 1rem;
  transition: color 0.3s;
}

.author-name:hover {
  color: #d12020;
}

.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list a {
  position: relative;
  color: #222;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #007acc; 
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  border-radius: 2px;
}
.nav-list a:hover,
.nav-list a:focus {
  color: #007acc;
}

.nav-list a:hover::after,
.nav-list a:focus::after {
  transform: scaleX(1);
  transform-origin: left;
  }
details ul {
  display: none;
  padding-left: 1rem; 
  margin-top: 0.5rem;
   max-width: 100%;
  overflow-wrap: break-word; 
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal; 
}
details[open] ul {
  display: block;
}
details {
  position: relative;
}
.dropdown-menu,
.dropdown-submenu {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #ddd;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  list-style: none;
  padding-left: 0;
}
.dropdown:hover > .dropdown-menu {
  display: block;
  top: 100%;
  left: 0;
}
.sub-dropdown:hover > .dropdown-submenu {
  display: block;
  top: 0;
  left: 100%;
}

.dropdown-menu li,
.dropdown-submenu li {
  position: relative;
}
.dropdown-menu a,
.dropdown-submenu a {
  white-space: normal;      
  word-break: break-word;
  max-width: 280px;
  font-weight: 400;
  display: block;
  padding: 0.5rem 1rem;
}
.dropdown-menu a:hover,
.dropdown-submenu a:hover {
  background-color: #f7f7f7;
}
.hamburger {
  display: none;
}
.mobile-menu {
  display: none;
}
.recommend-and-sidebar {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.recommend {
  flex: 2;
}

.recommend-grid, .book-grid, .cycles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.book-card, .cycle-card {
  text-align: center;
}
.carousel-section {
  max-width: 1200px;
  margin: 0 auto;
}

.swiper {
  width: 100%;
  height: 400px;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-img, .cycle-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #d12020;
}

.section-divider {
  border: none;
  height: 3px;
  background: #000;
  margin: 1em 0;
}

.carousel {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.carousel-container a {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.carousel-container img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  margin-top: 5px;
}

.carousel-dots {
  text-align: center;
  margin-top: 10px;
}

.carousel-dots .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #aaa;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.carousel-dots .dot.active {
  background: #000;
}

.content-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 2em auto;
  gap: 2em;
}

.left-column {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1em;
}

.book-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  height: 100%; 
  border: 1px solid #ddd;
  padding: 1em;
  background: #f9f9f9;
  text-align: center;
}
.book-image {
  width: 130px;
  max-width: 100%;
  margin: 0 auto 12px auto;
}

.book-image img {
  width: 130px;    
  height: auto;   
  object-fit: contain; 
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.book-item h3 {
  margin-top: 0.5em;
   min-height: 70px;
  font-size: 0.85em;
}

.book-item .button {
  display: inline-block;
  margin-top: auto;
  padding: 0.5em 1em;
  background-color: #007acc;
  color: #ffffff;
  text-transform: uppercase;
  font-size: 0.9em;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 122, 204, 0.4);
}

.book-item .button:hover {
  background-color: #005fa3;
  box-shadow: 0 4px 12px rgba(0, 95, 163, 0.6);
}
.cycle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1em;
  margin-bottom: 40px;
  
}

.cycle-item {
  text-align: center;
   padding: 20px;
  background-color: #f9f9f9; 
  border: 1px solid #ccc; 
  border-radius: 10px; 
}

.cycle-item img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

.cycle-item h3 {
  margin-top: 0.5em;
}

.right-column .list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.right-column .list li a {
  color: #111;
  font-size: 1em;
}

.right-column .list li a:hover {
  text-decoration: underline;
}
.news-list, .cycles-list {
  background-color: #ffffff;
  padding: 1.5em;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 0.95em;
  margin-bottom: 2em;
}

/* Заголовки блоков */
.news-list .section-title,
.cycles-list .section-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #000;
  border-bottom: 2px solid #000;
  padding-bottom: 0.3em;
  margin-bottom: 1em;
}

/* Список */
.news-list .list,
.cycles-list .list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list .list li,
.cycles-list .list li {
  margin-bottom: 1.5em;
}

/* Стилизация ссылок — как в меню */
.news-list .list li a,
.cycles-list .list li a {
  position: relative;
  color: #000;
  text-decoration: none;
  display: block;
  transition: color 0.3s ease;
  padding-bottom: 2px;
}

.news-list .list li a::after,
.cycles-list .list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: #007acc;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  border-radius: 2px;
}

.news-list .list li a:hover,
.cycles-list .list li a:hover {
  color: #007acc;
}

.news-list .list li a:hover::after,
.cycles-list .list li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.news-list .list h3,
.cycles-list .list h3 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  color: inherit;
}

.news-list .list p,
.cycles-list .list p {
  margin: 0.2em 0 0;
  font-style: italic;
  color: #444;
}
.more-news-button {
  color: #007acc;
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  display: inline-block;
}

.more-news-button:hover {
  color: white;
  background-color: #007acc;
  text-decoration: none;
}
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

.header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo-link {
    display: block;
    margin-bottom: 10px;
  }

  .author-block {
    align-items: center;
    text-align: center;
  }

  .hamburger {
    display: block;
    font-size: 28px;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
  }

  .site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-header {
    padding-bottom: 10px;
  }

  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 999;
  }

  .mobile-menu.active {
    display: block;
  }

  .mobile-nav {
    list-style: none;
    padding: 2rem;
    margin: 0;
  }

  .mobile-nav li {
    padding: 0.5rem 0;
  }

  .mobile-nav a {
    text-decoration: none;
    color: #222;
  }
h2.section-title {
    text-align: center;
  }
  .author-name {
    font-size: 1.8rem;
  }

  .content-wrapper {
    flex-direction: column;
    gap: 1.5em;
    padding: 0 1em;
  }

  .carousel-container img {
    max-height: 250px;
  }

  .book-grid,
  .cycle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 1.3em;
  }

  .right-column {
    order: 2;
  }
  .book-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }
  .book-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  .left-column {
    order: 1;
  }
  .cycles-list {
    display: none;
  }
  .carousel-dots .dot {
    width: 10px;
    height: 10px;
  }
}
@media (max-width: 480px) {
  .book-grid, .cycle-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
 .recommend,
  .sales,
  .all-cycles {
    padding-left: 16px;
    padding-right: 16px;
  }

  .recommend .section-title,
  .sales .section-title,
  .all-cycles .section-title {
    margin-left: 0;
  }

  .recommend .book-grid,
  .sales .book-grid,
  .all-cycles .cycle-grid {
    gap: 16px;
  }
}