:root {
  --primary-blue: #004a99;
  --secondary-red: #e31d1a;
  --bg-light: #f3f4f6;

  /* Remove all text-decoration from all elements */
  * {
    text-decoration: none !important;
  }
  --surface-white: #ffffff;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  background-color: var(--surface-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  display: flex;
  align-items: center;
}
.header-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.header-info {
  display: none;
}
.header-contact-link {
  display: flex;
  align-items: center;
  color: var(--text-gray);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-contact-link:hover {
  color: var(--primary-blue);
}
.header-contact-link .material-symbols-outlined {
  margin-right: 0.5rem;
  color: var(--secondary-red);
  font-size: 1.25rem;
}
.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-gray);
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}
.toolbar {
  width: 100%;
  max-width: 1024px;
  background-color: var(--surface-white);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toolbar-divider {
  height: 1.5rem;
  width: 1px;
  background-color: var(--border-color);
  margin: 0 0.5rem;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover {
  background-color: #eff6ff;
  color: var(--primary-blue);
}
.page-indicator {
  font-size: 0.875rem;
  color: var(--text-gray);
  font-weight: 500;
}
.page-indicator span {
  color: var(--primary-blue);
  font-weight: 700;
}
/* Botões padronizados - mesma altura e estilo */
.download-btn,
.share-btn {
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  height: 2.5rem;
  min-height: 2.5rem;
  white-space: nowrap;
}

/* Tamanhos de ícone globais (Desktop grande) */
.material-symbols-outlined {
  font-size: 24px;
}

/* Breakpoints específicos para material-symbols-outlined conforme pedido */
@media (min-width: 1200px) {
  .material-symbols-outlined {
    font-size: 24px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .material-symbols-outlined {
    font-size: 22px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .material-symbols-outlined {
    font-size: 20px;
  }
}

@media (min-width: 577px) and (max-width: 767px) {
  .material-symbols-outlined {
    font-size: 18px;
  }
}

@media (max-width: 576px) {
    .toolbar {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .toolbar-group:last-child {
        margin-left: auto;
    }
}

@media (min-width: 321px) and (max-width: 576px) {
    .material-symbols-outlined { font-size: 16px; }
    .download-btn, .share-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        height: 2.25rem;
        min-height: 2.25rem;
        gap: 0.25rem;
    }
    .toolbar-group {
        gap: 0.2rem;
    }
    .icon-btn {
        padding: 0.2rem;
    }
}

@media (max-width: 320px) {
    .material-symbols-outlined { font-size: 14px; }
    .download-btn, .share-btn {
        padding: 0 0.5rem;
        height: 2rem;
        min-height: 2rem;
        width: 2.5rem;
        justify-content: center;
    }
    .download-btn span:not(.material-symbols-outlined),
    .share-btn span:not(.material-symbols-outlined) {
        display: none;
    }
    .toolbar {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    .toolbar-group {
        gap: 0.2rem;
    }
    .icon-btn {
        padding: 0.2rem;
    }
}

.download-btn {
  background-color: var(--primary-blue);
}

.download-btn:hover {
  background-color: #003a7a;
  transform: translateY(-1px);
}

.share-btn {
  background-color: var(--secondary-red);
}

.share-btn:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

/* Remover regras redundantes que acabamos de substituir/refinar */
.viewer-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
}
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  color: var(--primary-blue);
  transition: all 0.2s;
}
.nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background-color: white;
}
.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-gray);
  transform: translateY(-50%);
}
.nav-prev {
  left: 0;
}
.nav-next {
  right: 0;
}
.book-spread {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  max-width: 100%;
}
.page {
  width: 450px;
  aspect-ratio: 1/1.414;
  background-color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page.single {
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.page.left {
  border-radius: 4px 0 0 4px;
  border-right: 1px solid #eee;
}
.page.right {
  border-radius: 0 4px 4px 0;
}
.page-content {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.internal-page-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px dashed #e5e7eb;
  padding: 1rem;
  background-color: #fff;
}
.grid-lines {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 1rem;
}
.line {
  background-color: #f3f4f6;
  border-radius: 4px;
  width: 100%;
}
.line.header-line {
  height: 2rem;
  background-color: #e5e7eb;
  width: 60%;
  margin-bottom: 1rem;
}
.img-placeholder {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  height: 120px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  margin-bottom: 1rem;
}
.thumbs-container {
  width: 100%;
  max-width: 1200px;
  margin-top: 2rem;
  padding: 1rem 0;
  overflow-x: auto;
  display: flex;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.thumbs-container::-webkit-scrollbar {
  height: 8px;
}
.thumbs-container::-webkit-scrollbar-track {
  background: transparent;
}
.thumbs-container::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 20px;
}
.thumb {
  flex-shrink: 0;
  width: 80px;
  height: 112px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-gray);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.thumb:hover {
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}
.thumb.active {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  font-weight: 700;
}
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  transition: transform 0.3s;
}
.whatsapp-float:hover {
  background-color: #20bd5a;
  transform: scale(1.1);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

footer {
  background-color: var(--surface-white);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: auto;
} /* Mobile pequeno: ≤320px */
@media (max-width: 320px) {
  .page {
    width: 95vw;
    max-width: 300px;
  }
  .nav-btn {
    width: 35px;
    height: 35px;
  }
  .toolbar-group {
    gap: 0.5rem;
  }
}

/* Mobile: ≤576px */
@media (max-width: 576px) {
  .page {
    width: 90vw;
    max-width: 400px;
  }
  .book-spread {
    flex-direction: column;
  }
  .page.left,
  .page.right {
    border-radius: 4px;
    border: none;
    margin-bottom: 1rem;
  }
  .nav-btn {
    width: 40px;
    height: 40px;
  }
}

/* Mobile/tablets médios: 577px-767px */
@media (min-width: 577px) and (max-width: 767px) {
  .page {
    width: 350px;
  }
  .book-spread {
    flex-direction: column;
  }
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Tablets: 768px-991px */
@media (min-width: 768px) and (max-width: 991px) {
  .header-info {
    display: flex;
    gap: 2rem;
  }
  .mobile-menu-btn {
    display: none;
  }
  .nav-prev {
    left: -2rem;
  }
  .nav-next {
    right: -2rem;
  }
  .page {
    width: 400px;
  }
}

/* Desktop pequeno: 992px-1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .header-info {
    display: flex;
    gap: 2rem;
  }
  .mobile-menu-btn {
    display: none;
  }
  .nav-prev {
    left: -2rem;
  }
  .nav-next {
    right: -2rem;
  }
  .page {
    width: 450px;
  }
}

/* Desktop grande: ≥1200px */
@media (min-width: 1200px) {
  .header-info {
    display: flex;
    gap: 2rem;
  }
  .mobile-menu-btn {
    display: none;
  }
  .nav-prev {
    left: -2rem;
  }
  .nav-next {
    right: -2rem;
  }
  .page {
    width: 500px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-body {
  padding: 20px 0;
  line-height: 1.6;
}

.modal-content h2 {
  color: var(--primary-blue);
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  margin: 10px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
}

/* Footer Styles - Cada seção ocupa 100% da largura e uma por linha */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-section {
  width: 100%;
  margin-bottom: 1rem;
  display: block;
}

.footer-section:last-child {
  margin-bottom: 0;
}

.copyright {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.copyright a {
  color: #6b7280;
}

.footer-link {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
  margin: 0 0.25rem;
}

.footer-link:hover {
  color: #374151;
}

.company-info {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
}

.company-info strong {
  color: #374151;
}

/* CSS Classes para substituir inline styles */
.mobile-menu-icon {
  font-size: 24px;
}

.download-icon {
  font-size: 18px;
}

.logo-small {
  height: 40px;
  opacity: 0.8;
}

.page-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-back {
  background: #f0f0f0;
}

.page-content-center {
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
}

.blank-page {
  background: #f9fafb;
}

/* Mobile Menu Styles */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.mobile-menu-title {
  font-weight: 600;
  color: #374151;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.mobile-menu-close:hover {
  background-color: #e5e7eb;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.mobile-menu-link:hover {
  background-color: #f9fafb;
}

.mobile-menu-link .material-symbols-outlined {
  color: var(--primary-blue);
  font-size: 1.25rem;
}
