/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

/* Layout */
.document-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #eaeaea;
  background-color: white;
}

/* Mobile header with reduced height */
@media (max-width: 768px) {
  .header {
    padding: 0.5rem 1rem;
    height: 60px;
  }
}

.logo {
  flex: 1;
}

.page-counter {
  flex: 1;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
}

.cta-button-container {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.main-content {
  flex: 1;
  padding: 0;
  padding-top: 5rem; /* Account for fixed header height */
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100vh - 5rem); /* Full height minus header */
  overflow: hidden; /* Prevent page scroll */
}

/* Mobile main content adjustments */
@media (max-width: 768px) {
  .main-content {
    padding-top: 60px; /* Reduced header height */
    height: calc(100vh - 60px);
    justify-content: center; /* Center content vertically */
  }
}

/* PDF Viewer */
.pdf-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center initially */
  position: relative;
  overflow: hidden;
}

.pdf-viewer {
  width: 100%;
  border: none;
  margin: 0;
  box-shadow: none;
  transition: transform 0.1s ease;
}

.pdf-viewer.blurred {
  filter: blur(10px);
  pointer-events: none;
}

/* Navigation Controls - Positioned on sides */
.nav-btn-left,
.nav-btn-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #000; /* Ensure text color is black */
  text-decoration: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Mobile navigation button fixes */
@media (max-width: 768px) {
  .nav-btn-left,
  .nav-btn-right {
    color: #000 !important; /* Force black color on mobile */
    background-color: white !important;
    border: 1px solid #ddd !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    font-family: inherit !important;
  }
  
  .nav-btn-left:hover:not(:disabled),
  .nav-btn-right:hover:not(:disabled),
  .nav-btn-left:active:not(:disabled),
  .nav-btn-right:active:not(:disabled),
  .nav-btn-left:focus:not(:disabled),
  .nav-btn-right:focus:not(:disabled) {
    color: #000 !important;
    background-color: #f8f8f8 !important;
    border: 1px solid #999 !important;
    outline: none !important;
  }
}

.nav-btn-left {
  left: 1rem;
}

.nav-btn-right {
  right: 1rem;
}

.nav-btn-left:hover:not(:disabled),
.nav-btn-right:hover:not(:disabled) {
  background-color: #f8f8f8;
  border-color: #999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn-left:disabled,
.nav-btn-right:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Hide old navigation controls */
.navigation-controls {
  display: none;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Mobile zoom controls positioning */
@media (max-width: 768px) {
  .zoom-controls {
    right: 0.5rem; /* Closer to right edge on mobile */
  }
}

.zoom-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  background-color: white !important; /* Force white opaque background */
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Special styling for reset button */
#zoom-reset {
  width: auto;
  min-width: 2.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.zoom-btn:hover:not(:disabled) {
  background-color: #f5f5f5;
  border-color: #999;
}

.zoom-indicator {
  background-color: white !important; /* Force white opaque background */
  color: #333;
  padding: 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-align: center;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.primary {
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

.button.primary:hover:not(:disabled) {
  background-color: #333;
}

.button.outline {
  background-color: transparent;
  color: #000;
  border: 1px solid #000;
}

.button.outline:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  margin-right: 0.5rem;
  accent-color: #666;
}

.checkbox-group label {
  margin-bottom: 0;
}

.checkbox-group a {
  color: #666;
  text-decoration: none;
}

.checkbox-group a:hover {
  color: #333;
  text-decoration: underline;
}

.error-message {
  color: #e53e3e;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

/* Home Page */
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-container .logo {
  margin-bottom: 2rem;
}

.home-container h1 {
  font-size: 2rem;
  font-weight: 600;
}