/* ==========================================================================
   VARIÁVEIS GLOBAIS - Padrão Preto/Cinza/Branco
   ========================================================================== */

:root {
  /* Cores - Dark Mode (padrão) */
  --bg-primary: #000000;           /* Preto */
  --bg-secondary: #121212;         /* Cinza muito escuro */
  --bg-tertiary: #1E1E1E;          /* Cinza escuro */
  --text-primary: #FFFFFF;         /* Branco */
  --text-secondary: #B3B3B3;       /* Cinza claro */
  --accent: #FFD700;               /* Dourado (mantido como cor de destaque) */
  --accent-light: #FFE44D;         /* Dourado claro */
  --accent-dark: #D4AF37;          /* Dourado escuro */
  --white: #FFFFFF;
  --black: #000000;
  --gray-100: #F5F5F5;             /* Cinza muito claro */
  --gray-200: #EEEEEE;             /* Cinza claro */
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Gradientes */
  --bg-gradient-start: #000000;
  --bg-gradient-end: #121212;

  /* Tamanhos principais */
  --header-height: 100px;
  --logo-height: 160px;
  --mobile-logo-height: 80px;
  --border-radius: 8px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

/* ==========================================================================
   ESTILOS BASE (herdados de index.css)
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  font-size: 1.2rem;
}

h1 {
  font-size: 3.2rem;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  font-weight: 600;
}

h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.accent {
  color: var(--accent);
}

h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent);
  margin: 15px auto 30px;
}

/* ==========================================================================
   HEADER E NAVEGAÇÃO (herdados de index.css)
   ========================================================================== */

header {
  background-color: var(--bg-secondary);
  height: var(--header-height);
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.header-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.logo img {
  height: var(--logo-height);
  width: auto;
  transition: transform 0.3s;
  object-fit: contain;
}

.logo img:hover {
  height: 175px;
  width: auto;
  transition: transform 0.3s;
  object-fit: contain;
}

nav.desktop-menu ul {
  display: flex;
  gap: 30px;
}

nav.desktop-menu a {
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

nav.desktop-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.1s;
}

nav.desktop-menu a:hover,
nav.desktop-menu a.active {
  color: var(--accent);
}

nav.desktop-menu a:hover::after,
nav.desktop-menu a.active::after {
  width: 100%;
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  transition: var(--transition);
}

.mobile-menu-button:hover {
  color: var(--accent);
}

.mobile-menu-button[aria-expanded="true"] {
  color: var(--accent);
}

nav.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-secondary);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  overflow-y: auto;
}

nav.mobile-menu.active {
  right: 0;
}

nav.mobile-menu ul {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

nav.mobile-menu a {
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  padding: 12px 15px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

nav.mobile-menu a:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent);
}

/* ==========================================================================
   BOTÕES (herdados de index.css)
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--black);
  padding: 5px;
  border-radius: 8px;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent);
  border-radius: 8px;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--black);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 12px 25px;
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--black);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--gray-600);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-card {
  padding: 12px 25px;
  font-size: 1rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ==========================================================================
   SEÇÃO HERO (estilos específicos para ebook.html)
   ========================================================================== */

.ebook-hero {
  padding: calc(var(--header-height) + 80px) 0 100px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%), 
              url('assets/ebook-bg.jpg') no-repeat center/cover;
  position: relative;
  overflow: hidden;
}

.ebook-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.ebook-hero .container {
  position: relative;
  z-index: 1;
}

.ebook-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SEÇÃO EBOOK (estilos específicos para ebook.html)
   ========================================================================== */

.ebook {
  padding: 100px 0;
  background-color: var(--bg-primary);
}

.ebook-content {
  display: flex;
  gap: 60px;
  align-items: center;
}

.ebook-text {
  flex: 1;
}

.ebook-text h2 {
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  text-align: left;
}

.ebook-text h2::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  margin: 10px 0 20px;
}

.ebook-text ul {
  margin: 30px 0;
  list-style: none;
  padding: 0;
}

.ebook-text li {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.ebook-text li:hover {
  background-color: rgba(255, 215, 0, 0.05);
  transform: translateX(5px);
}

.ebook-text i {
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
  font-size: 1.2rem;
}

/* ATUALIZAÇÃO PARA A IMAGEM DO EBOOK - Garante que a imagem seja exibida por completo */
.ebook-image {
  flex: 1;
  position: relative;
  border-radius: var(--border-radius);
  overflow: visible;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(255, 215, 0, 0.2);
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ebook-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.2);
}

.ebook-image img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  object-fit: contain;
}

.ebook-image:hover img {
  transform: scale(1.03);
}

.ebook-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--accent);
  color: var(--black);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
  z-index: 1;
  font-size: 0.9rem;
}

/* ==========================================================================
   SEÇÃO DEPOIMENTOS (estilos específicos para ebook.html)
   ========================================================================== */

.testimonials {
  padding: 100px 0;
  background-color: var(--bg-tertiary);
  position: relative;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/dots-pattern.png') repeat;
  opacity: 0.03;
  z-index: 0;
}

.testimonials .container {
  position: relative;
  z-index: 1;
}

.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.testimonial-card {
  background-color: var(--bg-secondary);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15);
}

.testimonial-card:hover::before {
  opacity: 1;
}

.testimonial-rating {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.testimonial-card p {
  font-style: italic;
  position: relative;
  z-index: 1;
  line-height: 1.7;
  margin-bottom: 25px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 20px;
}

.testimonial-author img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  transition: var(--transition);
}

.testimonial-card:hover .testimonial-author img {
  transform: scale(1.1);
}

.testimonial-author strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.testimonial-author span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SEÇÃO CONTEÚDOS DO EBOOK (estilos específicos para ebook.html)
   ========================================================================== */

.ebook-contents {
  padding: 100px 0;
  background-color: var(--bg-secondary);
  position: relative;
}

.ebook-contents::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.3;
}

.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.chapter {
  background-color: var(--bg-tertiary);
  padding: 30px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  border: 1px solid rgba(255, 215, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.chapter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
}

.chapter:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15);
}

.chapter:hover::before {
  opacity: 1;
}

.chapter h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.chapter h3 i {
  color: var(--accent);
  font-size: 1.5rem;
}

.chapter p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   SEÇÃO FAQ (estilos específicos para ebook.html)
   ========================================================================== */

.faq-contact {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.faq-item {
  background-color: var(--bg-secondary);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--accent);
}

.faq-item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  margin-bottom: 15px;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-faq {
  text-align: center;
  margin-top: 40px;
}

/* ==========================================================================
   SEÇÃO CATÁLOGO DE EBOOKS (estilos específicos para ebook.html)
   ========================================================================== */

.ebook-catalog {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.catalog-filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  color: var(--text-secondary);
}

.filter-select {
  padding: 10px 15px;
  border-radius: var(--border-radius);
  border: 1px solid var(--bg-tertiary);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.ebook-card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
}

.ebook-card.highlight {
  border: 2px solid var(--accent);
}

.ebook-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

.ebook-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent);
  color: var(--black);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.ebook-image {
  height: auto;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.ebook-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.ebook-card:hover .ebook-image img {
  transform: scale(1.05);
}

.ebook-info {
  padding: 20px;
}

.ebook-category {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.ebook-category.beginner {
  background-color: rgba(0, 128, 0, 0.2);
  color: lightgreen;
}

.ebook-category.intermediate {
  background-color: rgba(255, 165, 0, 0.2);
  color: orange;
}

.ebook-category.advanced {
  background-color: rgba(255, 0, 0, 0.2);
  color: lightcoral;
}

.ebook-category.algorithms {
  background-color: rgba(0, 0, 255, 0.2);
  color: lightblue;
}

.ebook-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.ebook-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.ebook-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ebook-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ebook-actions {
  display: flex;
  gap: 10px;
}

.catalog-cta {
  text-align: center;
  margin-top: 50px;
  padding: 30px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
}

.catalog-cta h3 {
  margin-bottom: 15px;
}

.catalog-cta p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   FOOTER (herdados de index.css)
   ========================================================================== */

.footer-container {
  background: var(--bg-secondary);
  padding-top: 60px;
  color: var(--text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo img {
  margin-bottom: 20px;
  width: 200px;
}

.footer-logo p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: var(--text-primary);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-links h3,
.footer-contact h3,
.footer-newsletter h3 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact i {
  color: var(--accent);
  margin-top: 3px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid var(--bg-tertiary);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ==========================================================================
   COMPONENTES FLUTUANTES (herdados de index.css)
   ========================================================================== */

.theme-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}

#theme-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--black);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

#theme-toggle:hover {
  transform: scale(1.1);
}

#back-to-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  border: 2px solid var(--accent);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: var(--accent);
  color: var(--black);
  transform: translateY(-5px);
}

/* ==========================================================================
   RESPONSIVIDADE (combinando index.css e ebook.css)
   ========================================================================== */

@media (max-width: 1200px) {
  .ebook-hero h1,
  .hero h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.4rem;
  }
}

@media (max-width: 992px) {
  .ebook-content,
  .about-content,
  .contact-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .ebook-image,
  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .form-group {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
    --logo-height: 120px;
  }
  
  nav.desktop-menu {
    display: none;
  }
  
  .mobile-menu-button {
    display: block;
  }
  
  .ebook-hero,
  .hero {
    padding: calc(var(--header-height) + 30px) 0 80px;
  }
  
  .ebook-hero h1,
  .hero h1 {
    font-size: 2.4rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .testimonial-cards {
    grid-template-columns: 1fr;
  }
  
  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-info {
    margin-top: 40px;
    text-align: center;
  }
  
  .info-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .about-cta {
    flex-direction: column;
  }
  
  .ebook-image {
    max-width: 100%;
    padding: 0 20px;
  }
  
  .ebook-image img {
    max-height: 400px;
  }
}

@media (max-width: 576px) {
  :root {
    --header-height: 70px;
    --mobile-logo-height: 70px;
  }
  
  h1 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  
  h3 {
    font-size: 1.4rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  .header-container {
    padding: 0 15px;
  }
  
  .logo img {
    height: var(--mobile-logo-height);
  }
  
  .logo img:hover {
    height: calc(var(--mobile-logo-height) + 10px);
  }
  
  .ebook-hero {
    padding: calc(var(--header-height) + 20px) 0 40px;
    background-position: center;
  }
  
  .ebook-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  
  .ebook {
    padding: 60px 0;
  }
  
  .ebook-content {
    gap: 30px;
  }
  
  .ebook-text li {
    padding: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
  }
  
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonial-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .testimonial-card {
    padding: 25px 20px;
  }
  
  .ebook-contents {
    padding: 60px 0;
  }
  
  .contents-grid {
    gap: 20px;
  }
  
  .chapter {
    padding: 20px;
  }
  
  .faq-contact {
    padding: 60px 0;
  }
  
  .faq-item {
    padding: 20px;
  }
  
  .ebook-catalog {
    padding: 60px 0;
  }
  
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  
  .ebook-card {
    max-width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-logo, 
  .footer-links, 
  .footer-contact, 
  .footer-newsletter {
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  #back-to-top,
  #theme-toggle {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  #back-to-top {
    bottom: 85px;
    right: 15px;
  }
  
  #theme-toggle {
    bottom: 15px;
    right: 15px;
  }
  
  .filter-select,
  .btn {
    padding: 10px 15px;
    font-size: 0.95rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .ebook-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
  
  .ebook-image {
    min-height: 180px;
  }
  
  .ebook-image img {
    max-height: 250px;
  }
}

@media (max-width: 400px) {
  :root {
    --header-height: 60px;
    --mobile-logo-height: 60px;
  }
  
  .container {
    width: 95%;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .ebook-hero {
    padding: calc(var(--header-height) + 15px) 0 30px;
  }
  
  .ebook-text h2::after,
  h2::after {
    margin: 10px auto 20px;
    height: 3px;
  }
  
  .testimonial-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  
  .testimonial-author img {
    width: 50px;
    height: 50px;
  }
  
  .ebook-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .ebook-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
  }
}