/* --- Logo Cloud Section (ENHANCED PREMIUM) --- */
.logo-cloud-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f0f9ff 100%);
  border-bottom: 1px solid #e0e7ff;
  position: relative;
  z-index: 5;
  overflow: hidden;
}

.logo-cloud-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.logo-cloud-title {
  text-align: center;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.logo-cloud {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.exam-tag {
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  background: white;
  padding: 0.65rem 1.5rem;
  border-radius: 99px;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.04),
    0 0 0 1px rgba(0,0,0,0.02);
  position: relative;
  overflow: hidden;
}

.exam-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.exam-tag:hover::before {
  opacity: 1;
}

.exam-tag:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 16px -4px rgba(0,0,0,0.1),
    0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* Color Variants */
.exam-tag-primary {
  border-color: rgba(79, 70, 229, 0.2);
  background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
}

.exam-tag-primary:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 
    0 8px 16px -4px rgba(79, 70, 229, 0.3),
    0 0 0 2px rgba(79, 70, 229, 0.2);
}

.exam-tag-secondary {
  border-color: rgba(14, 165, 233, 0.2);
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.exam-tag-secondary:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
  box-shadow: 
    0 8px 16px -4px rgba(14, 165, 233, 0.3),
    0 0 0 2px rgba(14, 165, 233, 0.2);
}

.exam-tag-accent {
  border-color: rgba(236, 72, 153, 0.2);
  background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 100%);
}

.exam-tag-accent:hover {
  border-color: #ec4899;
  color: #ec4899;
  box-shadow: 
    0 8px 16px -4px rgba(236, 72, 153, 0.3),
    0 0 0 2px rgba(236, 72, 153, 0.2);
}

.exam-tag-success {
  border-color: rgba(16, 185, 129, 0.2);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.exam-tag-success:hover {
  border-color: #10b981;
  color: #10b981;
  box-shadow: 
    0 8px 16px -4px rgba(16, 185, 129, 0.3),
    0 0 0 2px rgba(16, 185, 129, 0.2);
}


/* --- Categories Section --- */
.section-categories {
  padding: 5rem 0 6rem;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.section-categories .section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3.5rem;
  padding: 0 1rem;
}

.section-categories .section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.section-categories .section-header p {
  font-size: 1.15rem;
  color: #64748b;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.category-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: left;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.category-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

.category-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.cat-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 20px;
  transition: transform 0.4s ease;
}

.category-card:hover .cat-icon {
  transform: scale(1.1) rotate(6deg);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.category-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #1e293b;
}

.category-card p {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
}

/* --- Features Section --- */
.features-section {
  padding: 5rem 0;
  background: #f8fafc;
  position: relative;
}

.features-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.features-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 0 1rem;
}

.feature-card {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.5rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.feature-card p {
  color: #64748b;
  line-height: 1.7;
}

/* --- Tools Section (ENHANCED PREMIUM) --- */
.section-features {
    padding: 6rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative Background Elements */
.section-features::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.section-features::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.section-features .container {
    position: relative;
    z-index: 1;
}

.section-features .section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-features .section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-features .section-header p {
    font-size: 1.15rem;
    color: #64748b;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.features-grid .feature-card {
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    background: white;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
}

/* Gradient border effect on hover */
.features-grid .feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.features-grid .feature-card:hover::before {
    opacity: 1;
}

.features-grid .feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(79, 70, 229, 0.05);
    border-color: transparent;
}

.features-grid .feature-icon {
    margin: 0 auto 1.75rem;
    font-size: 1.75rem;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.features-grid .feature-icon i {
    font-size: 1.75rem;
    display: block;
}

/* Icon glow effect on hover */
.features-grid .feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 
        0 15px 30px -10px rgba(79, 70, 229, 0.3),
        inset 0 0 20px rgba(255,255,255,0.5);
}

.features-grid .feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #0f172a;
    transition: color 0.3s ease;
}

.features-grid .feature-card:hover h3 {
    color: #4f46e5;
}

.features-grid .feature-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* Enhanced CTA button for tools section */
.section-features .btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.3);
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}

.section-features .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-features .btn-primary:hover::before {
    opacity: 1;
}

.section-features .btn-primary span,
.section-features .btn-primary i {
    position: relative;
    z-index: 1;
}

/* --- Testimonials Section (FIXED) --- */
.testimonials-section {
  padding: 5rem 0;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 0 1rem;
}

.testimonial-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
}

.stars {
  color: #f59e0b;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.review {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-style: italic;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1.5rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: #e0e7ff;
  color: #4f46e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.user-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.1rem;
}

.user-info p {
  font-size: 0.85rem;
  color: #64748b;
}

/* --- SEO Content Section (ENHANCED PREMIUM) --- */
.seo-content-section {
    padding: 6rem 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Premium background pattern */
.seo-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.03) 0%, transparent 50%);
    z-index: 0;
}

/* Subtle grid pattern */
.seo-content-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(226, 232, 240, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    z-index: 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 3.5rem;
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 32px;
    box-shadow: 
        0 20px 50px -10px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Premium accent gradient on left edge */
.content-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 5px;
    background: linear-gradient(180deg, #4f46e5 0%, #06b6d4 100%);
    border-radius: 0 4px 4px 0;
}

.seo-content-section h2 {
    color: #0f172a;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    padding-bottom: 1rem;
}

/* Underline accent for main heading */
.seo-content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    border-radius: 2px;
}

.seo-content-section h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Icon before h3 headings */
.seo-content-section h3::before {
    content: '→';
    color: #4f46e5;
    font-weight: 800;
    font-size: 1.75rem;
}

.seo-content-section p {
    color: #475569;
    line-height: 1.9;
    margin-bottom: 1.75rem;
    font-size: 1.05rem;
}

.seo-content-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
    color: #475569;
}

.seo-content-section li {
    margin-bottom: 1rem;
    line-height: 1.8;
    position: relative;
    padding-left: 2rem;
}

/* Custom bullet points with gradient */
.seo-content-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.seo-content-section strong {
    color: #0f172a;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Highlight important sentences */
.seo-content-section p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 800;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- CTA Section --- */
.cta-box {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 32px;
  padding: 5rem 2rem;
  text-align: center;
  color: white;
  margin: 4rem 0 6rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.4);
}

/* Background Pattern */
.cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 20%
    );
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
}

.cta-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
}

.cta-btn-primary {
  background: white;
  color: #4f46e5;
  border: 2px solid white;
}
.cta-btn-primary:hover {
  background: transparent;
  color: white;
}

.cta-btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.cta-btn-outline:hover {
  background: white;
  color: #4f46e5;
  border-color: white;
}

/* ===========================
   MOBILE RESPONSIVENESS
   =========================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    padding-right: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 2rem;
  }

  .hero-image-container {
    max-width: 600px;
    margin: 0 auto;
  }

  .fb-2 {
    left: -20px;
  }
  .fb-4 {
    right: -20px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0 3rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .sub-headline {
    font-size: 1rem;
  }

  .cta-group {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .cta-group .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-item h4 {
    font-size: 1.8rem;
  }


  .cta-content h2 {
    font-size: 1.8rem;
  }

  /* Mobile Badges simplified */
  .floating-badge {
    padding: 0.5rem 1rem;
    background: white; /* No blur on mobile */
  }

  .fb-1,
  .fb-3 {
    display: none;
  } /* Hide some to declutter */
  .fb-2 {
    bottom: 10px;
    left: 0;
  }
  .fb-4 {
    bottom: -10px;
    right: 0;
  }

  /* Mobile Tools Section */
  .section-features {
    padding: 4rem 0;
  }

  .section-features .section-header h2 {
    font-size: 2rem;
  }

  .features-grid .feature-card {
    padding: 2.5rem 1.5rem;
  }

  .features-grid .feature-icon {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }

  /* Mobile SEO Section */
  .seo-content-section {
    padding: 4rem 0;
  }

  .content-wrapper {
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }

  .seo-content-section h2 {
    font-size: 1.75rem;
  }

  .seo-content-section h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
  }

  .seo-content-section h3::before {
    font-size: 1.5rem;
  }

  /* Disable drop cap on mobile for better readability */
  .seo-content-section p:first-of-type::first-letter {
    font-size: inherit;
    float: none;
    margin: 0;
    background: none;
    -webkit-text-fill-color: inherit;
  }

  .seo-content-section li::before {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  .seo-content-section li {
    padding-left: 1.75rem;
  }
}

/* Mobile Performance Optimizations */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimize animations on mobile */
@media (max-width: 768px) {


  /* Simplify floating badges */
  .floating-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
  }

  .wobble-ver,
  .wobble-hor {
    animation: none !important;
  }

  /* Simplify hero image effects */
  .hero-img-wrapper {
    transform: none !important;
    backdrop-filter: none !important;
  }

  .hero-img-wrapper:hover {
    transform: none !important;
  }


  /* Optimize badge pill */
  .badge-pill {
    backdrop-filter: none !important;
    animation: none !important;
  }

  /* Simplify exam tags */
  .exam-tag::before {
    display: none !important;
  }


}

/* Touch target optimization for mobile */
@media (max-width: 768px) {
  .btn,
  .nav-item,
  .tool-card,
  .feature-card,
  .category-card {
    min-height: 44px;
  }

  /* Ensure proper tap targets */
  a,
  button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Contain layout shifts */
img {
  max-width: 100%;
  height: auto;
}

/* Optimize will-change usage */
.hero-img-wrapper,
.floating-badge,
.feature-card,
.category-card {
  will-change: auto;
}

/* Only use will-change on hover/interaction */
.feature-card:hover,
.category-card:hover {
  will-change: transform;
}

/* --- Bestselling Books Section --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.book-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.book-media {
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-placeholder {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
    transform: rotate(-3deg);
    transition: transform 0.4s ease;
}

.book-card:hover .book-placeholder {
    transform: rotate(0) scale(1.05);
}

.book-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.book-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4338ca; /* Indigo 700 - Accessible on Indigo 100 */
    background: #e0e7ff;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.book-lang {
    background: #f1f5f9;
    color: #475569; /* Slate 600 - Accessible on Slate 100 */
    border-radius: 6px;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

.book-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.book-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #1e293b;
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.book-btn:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-2px);
}

/* --- Content Visibility Optimization --- */
/* Skip rendering off-screen sections until needed */
.section-categories,
.logo-cloud-section,
.features-section,
.feature-grid,
.section-features,
.testimonials-section,
.seo-content-section,
.cta-section,
footer {
    content-visibility: auto;
    contain-intrinsic-size: 1000px; /* Estimate height to prevent scroll bar jumping */
}

/* --- Mobile Overrides for Deferred Sections (Moved from Index) --- */
@media (max-width: 768px) {
  /* Mobile Tools Section */
  .section-features { padding: 4rem 0; }
  .section-features .section-header h2 { font-size: 2rem; }
  .features-grid .feature-card { padding: 2.5rem 1.5rem; }
  .features-grid .feature-icon { width: 70px; height: 70px; font-size: 1.5rem; }
  
  /* Mobile SEO Section */
  .seo-content-section { padding: 4rem 0; }
  .content-wrapper { padding: 2rem 1.5rem; border-radius: 24px; }
  .seo-content-section h2 { font-size: 1.75rem; }
  .seo-content-section h3 { font-size: 1.3rem; margin-top: 2rem; }
  .seo-content-section h3::before { font-size: 1.5rem; }
  
  /* Disable drop cap on mobile for better readability */
  .seo-content-section p:first-of-type::first-letter {
    font-size: inherit;
    float: none;
    margin: 0;
    background: none;
    -webkit-text-fill-color: inherit;
  }
  
  .seo-content-section li::before { width: 20px; height: 20px; font-size: 0.75rem; }
  .seo-content-section li { padding-left: 1.75rem; }
}

/* --- Cookie Banner & Back to Top (Premium UI) --- */

/* 1. Cookie Banner - Glassmorphism */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: slideUpFade 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform: translateY(20px);
    opacity: 0;
}

.cookie-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        padding: 1.25rem;
        max-width: none;
    }
    .cookie-content h4 { font-size: 1rem; }
    .cookie-content p { font-size: 0.85rem; }
}

/* 2. Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.3, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 5.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}
