/* Import fonts: EB Garamond for headings and Roboto for body */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&family=Roboto:wght@400;700&display=swap&display=swap');

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Roboto', sans-serif;
  color: #4a3f35; /* deep earthy brown text */
  background: linear-gradient(135deg, #f8f4e9 0%, #e8dfc9 100%); /* Updated background with a gentle gradient */
  line-height: 1.6;
}

/* Smooth transitions for hover effects globally */
a, .cta-button, .book, .step {
  transition: all 0.3s ease;
}

/* Sidebar Navigation: remove rounding */
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100%;
  background: #3c2f2a; /* dark, warm tone */
  color: #fff;
  padding: 20px;
  overflow-y: auto;
  border-radius: 0;
}
.sidebar-nav h1 {
  font-family: 'EB Garamond', serif;
  font-size: 2rem;
  margin-bottom: 30px;
  padding-top: 10px;
}
.sidebar-nav h1 a {
  color: #d9b382;
  text-decoration: none;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
}
.sidebar-nav ul li {
  margin-bottom: 15px;
}
.sidebar-nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}
.sidebar-nav ul li a:hover {
  color: #d9b382;
}

/* Main Content Wrapper */
.main-content {
  margin-left: 270px; /* leave room for sidebar */
  padding: 20px;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 9999;
}

/* Hide preloader for diagnostics */
.preloader { display: none !important; }

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://via.placeholder.com/1920x600?text=Library+Background') center/cover no-repeat;
  color: #fff;
  padding: 120px 0 80px 0;
  text-align: center;
  position: relative;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  contain: layout style paint;
  content-visibility: auto;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  color: #f8f4e9;
}
.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Hero CTA Wrapper: add spacing to prevent overlapping */
.hero-cta-wrapper {
  margin-top: 25px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

/* Animate the hero content on load */
.hero-content {
  animation: heroEntrance 1s ease-out;
}
@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Headings Animation */
.fadeIn, .fadeInDown, .fadeInUp, .slideInLeft, .slideInRight {
  animation-fill-mode: forwards;
  animation-duration: 1s;
}
.fadeIn { animation-name: fadeIn; }
.fadeInDown { animation-name: fadeInDown; }
.fadeInUp { animation-name: fadeInUp; }
.slideInLeft { animation-name: slideInLeft; }
.slideInRight { animation-name: slideInRight; }

/* Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* Updated CTA Button color scheme for better text contrast */
.cta-button {
  background: linear-gradient(45deg, #b19062, #947140);
  color: #fff;  /* white text for improved contrast */
  padding: 16px 40px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 8px rgba(0,0,0,0.15);
  margin: 0.5em 0;
}
.cta-button:hover {
  background: linear-gradient(45deg, #947140, #8a6c2a);
  box-shadow: 0 7px 12px rgba(0,0,0,0.2);
}
.cta-button, .cta-button.product-btn {
  text-decoration: none;
}
.cta-button.product-btn {
  text-decoration: none !important;
}

/* Bestseller Section */
.bestseller {
  text-align: center;
  padding: 60px 0;
  background: #fff9f2; /* warm off-white */
  margin-bottom: 40px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}
.bestseller h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #4a3f35;
}
.bestseller p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #666;
}
.bestseller-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  margin-bottom: 20px;
}
.bestseller-grid .book {
  flex: 0 0 calc((100% - 60px) / 4); /* 4 items per row for better readability */
  max-width: calc((100% - 60px) / 4);
  background-color: #fffaf5;  /* warm off-white */
  border: 1px solid #e0dccc;  /* softer border */
  border-radius: 6px;
  padding: 12px;              /* slightly increased padding */
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.bestseller-grid .book:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.bestseller-grid .book img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  display: block;
  border-radius: 4px;
  margin-bottom: 8px;
  content-visibility: auto;
}
.bestseller-grid .book p {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;   /* increased font-size for title */
  font-weight: bold;
  margin: 8px 0 4px;
  color: #3c2f2a;
  text-align: center;
}
.bestseller-grid .book small {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem; /* increased slightly */
  color: #555;  /* dark gray for better contrast */
  text-align: center;
  margin-bottom: 4px;
}

/* Remove underline and default border from product buttons within .book elements */
.bestseller-grid .book .product-btn {
  text-decoration: none !important;
  border: none;
  outline: none;
}

.bestseller-grid .book,
.book-grid .book {
  text-decoration: none;
}

/* Updated New Arrivals Section */
.new-arrivals {
    background: #fff9f2;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
    border-radius: 20px;
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

.new-arrivals h2 {
    font-family: 'EB Garamond', serif;
    font-size: 2.4rem;
    margin-bottom: 20px;
    color: #3c2f2a;
}

.new-arrivals p {
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.book-grid .book {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(217,179,130,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-grid .book:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.book-grid .book img {
    width: 140px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.book-grid .book h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    margin: 10px 0;
    color: #3c2f2a;
}

.book-grid .book p {
    font-size: 1rem;
    color: #666;
    margin: 0 0 15px;
}

.book-grid .book .price {
    font-weight: bold;
    color: #947140;
    font-size: 1.1rem;
    margin-top: auto;
}

/* Updated Featured Author styles */
.featured-author {
    background: #fff9f2;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
    border-radius: 20px;
}

.author-profile {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
    text-align: left;
    padding: 20px;
}

.author-profile img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.author-info {
    padding: 20px;
}

.author-info h3 {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #3c2f2a;
}

.author-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.author-info .cta-button {
    display: inline-block;
    margin-top: 20px;
}


/* Webinare & Video-Kurse Section */
.webinare {
  text-align: center;
  padding: 60px 0;
  background: #fff9f2; /* match bestseller section background */
  margin-bottom: 40px;
  border-radius: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}
.webinare h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #4a3f35;
}
.webinare p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #666;
}
.webinar-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-top: 2rem;
}
.webinar-item {
  width: calc((100% - 60px) / 4);
  background: #fff;
  padding: 20px;
  border-radius: 6px; /* Reduced rounding */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: left;
  transition: box-shadow 0.3s;
}
.webinar-item:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.webinar-item h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* Testimonials Section */
.testimonials {
  padding: 60px 0;
  text-align: center;
  background: #fffaf5; /* subtle warm tint */
}
.testimonials h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.testimonial-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 2rem;
}
.testimonial {
  width: 300px;
  background: #fff;
  border-radius: 6px; /* Reduced rounding */
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: left;
}
.testimonial p {
  margin-bottom: 10px;
  font-style: italic;
}
.testimonial .name {
  font-weight: bold;
  margin-top: 10px;
  color: #555;
}

/* Process Section */
.process {
  background: #f9f9f9;
  padding: 60px 0;
  text-align: center;
}
.process h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.process-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 2rem;
}
.step {
  width: 200px;
  background: #fff;
  padding: 20px;
  border-radius: 6px; /* Reduced rounding */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.step:hover {
  transform: translateY(-5px);
}
.step h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* Updated FAQ Section */
.faq {
  padding: 60px 40px;
  text-align: center;
  background: #fff9f2;
  margin: 40px 0;
  border-radius: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

.faq-list {
  max-width: 900px;
  margin: 40px auto;
  text-align: left;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid rgba(217,179,130,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.faq-item h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #3c2f2a;
}

.faq-item p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* Updated Kundenmeinungen Section */
.kundenmeinungen {
    background: #fff9f2;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
    border-radius: 20px;
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

.kundenmeinungen h2 {
    font-family: 'EB Garamond', serif;
    font-size: 2.4rem;
    margin-bottom: 40px;
    color: #3c2f2a;
}

.bubbles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bubble {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(217,179,130,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.bubble:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bubble .customer-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 3px solid #d9b382;
}

.bubble .quote {
    font-size: 1.1rem;
    color: #4a3f35;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.bubble .customer-info {
    text-align: center;
    margin-top: auto;
}

.bubble .name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #3c2f2a;
    margin-bottom: 5px;
}

.bubble .title {
    font-size: 0.9rem;
    color: #666;
}

/* Footer */
footer {
  background: #fffef7; /* match FAQ background */
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #777;
}

/* Remove the old footer styles and replace with these */
.site-footer {
  background: #3c2f2a;
  color: #fff;
  padding: 60px 0 20px;
  margin-top: 60px;
  border-radius: 20px;  /* This will add rounded corners to all sides */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-section h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #d9b382;
}

.footer-section p {
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.6;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.contact-info li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info a {
  color: #d9b382;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  color: #d9b382;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-link:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  color: rgba(255,255,255,0.7);
}

.footer-bottom a {
  color: #d9b382;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Animations (using keyframes from inline definitions) */
.fadeIn { animation: fadeIn 1s forwards; }
.fadeInUp { animation: fadeInUp 1s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Simplify More Products Wrapper animation */
.more-products-wrapper {
  display: none;  /* Hide by default */
}
.more-products-wrapper.open {
  display: block;  /* Show when open */
}

/* Remove any conflicting rules */
.more-products-wrapper.active,
.more-products.active {
  /* Remove all previous animation rules */
}

/* More Products Wrapper - simplified */
.more-products-wrapper {
  display: none; /* Hidden by default */
}

.bestseller-grid {
  margin-bottom: 20px;
}

/* Remove any conflicting styles */
.more-products,
.more-products-wrapper.active,
.more-products-wrapper.open {
  /* Remove all animation/transition related styles */
}

/* Product Detail Section adjustments */
.product-detail-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}
.product-image,
.product-info {
  flex: 1;
  min-width: 280px;
}
.cta-wrapper {
  margin-top: 20px;
}

/* Ensure the CTA button here uses the same styling as elsewhere */
.cta-button.product-btn {
  text-decoration: none !important;
}

/* Remove all previous more-products styles and replace with these simple rules */
.more-products-wrapper {
  width: 100%;
  margin-top: 20px;
}

.more-products-wrapper .bestseller-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Updated More Products Wrapper styles */
.more-products-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    width: 100%;
}

.more-products-wrapper.active {
    max-height: 7000px; /* Adjust this value based on your content height */
    opacity: 1;
}

.more-products-wrapper .bestseller-grid {
    transform: translateY(20px);
    transition: transform 0.4s ease-out;
}

.more-products-wrapper.active .bestseller-grid {
    transform: translateY(0);
}

/* Add E-Books section styling */
.ebooks {
  text-align: center;
  padding: 60px 0;
  background: #fff9f2;
  margin-bottom: 40px;
  border-radius: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

.ebooks h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #4a3f35;
}

.ebooks p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #666;
}

/* Add styling for the price block */
.price-block {
    text-align: center;
    margin: 10px 0;
    padding: 5px;
}

.old-price {
    display: block;
    color: #999;
    text-decoration: line-through;
    font-size: 0.9em;
}

.new-price {
    display: block;
    color: #2ecc71;
    font-size: 1.2em;
    font-weight: bold;
    margin: 5px 0;
}

.shipping {
    display: block;
    color: #666;
    font-size: 0.8em;
    font-style: italic;
}

.footer-grid {
    max-width: 800px;  /* Reduced max-width for single column */
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid.single-column {
    display: block;  /* Change from grid to block */
}

.about-section {
    text-align: center;  /* Center the content */
}

.legal-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.legal-section h1 {
    margin-bottom: 30px;
    color: #333;
}

.legal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.legal-content h2 {
    margin: 25px 0 15px;
    color: #444;
}

.legal-content p {
    margin-bottom: 15px;
}

.legal-content h3 {
    color: #555;
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

.legal-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.legal-content ul li {
    margin-bottom: 8px;
}

.legal-notice {
    margin-top: 40px;
    color: #666;
    font-style: italic;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        min-height: 2.4rem;
    }

    .hero-description {
        font-size: 1rem;
        min-height: 4rem;
        padding: 0 15px;
    }

    /* Reduce image sizes on mobile */
    .bestseller-grid .book img {
        max-height: 200px;
        width: auto;
    }
}

/* Add specific image dimension for different screen sizes */
@media (min-width: 769px) and (max-width: 1024px) {
    .bestseller-grid .book img {
        max-height: 250px;
    }
}

/* Mobile menu overlap fix */
@media (max-width: 768px) {
    .sidebar-nav h1 {
        padding-left: 55px;
        margin-top: 5px;
    }
    
    .sidebar-nav.active {
        padding-top: 20px;
    }
}

