/* 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;
}

/* PDF.js Text Layer for text selection */
.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.2;
  line-height: 1.0;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.textLayer > span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.textLayer .highlight {
  margin: -1px;
  padding: 1px;
  background-color: rgba(180, 0, 170, 0.2);
  border-radius: 4px;
}

.textLayer .highlight.selected {
  background-color: rgba(0, 100, 0, 0.2);
}

/* PDF.js Annotation Layer for clickable links */
.annotationLayer section {
  position: absolute;
  text-align: initial;
}

.annotationLayer .buttonWidgetAnnotation.pushButton > a,
.annotationLayer .linkAnnotation > a,
.annotationLayer .buttonWidgetAnnotation.pushButton:hover,
.annotationLayer .linkAnnotation:hover {
  opacity: 0.2;
  background: rgba(255, 255, 0, 1);
  box-shadow: 0px 2px 10px rgba(255, 255, 0, 1);
  border-radius: 2px;
}

.annotationLayer .textAnnotation img {
  position: absolute;
  cursor: pointer;
}

.annotationLayer .textWidgetAnnotation input,
.annotationLayer .textWidgetAnnotation textarea,
.annotationLayer .choiceWidgetAnnotation select,
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
  background: rgba(0, 54, 255, 0.13);
  border: 1px solid transparent;
  box-sizing: border-box;
  font-size: 9px;
  height: 100%;
  margin: 0;
  padding: 0 3px;
  vertical-align: top;
  width: 100%;
}

.annotationLayer .linkAnnotation > a:hover,
.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
  opacity: 0.4;
  background: rgba(255, 255, 0, 1);
  color: rgba(0, 0, 0, 1);
}

/* 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 - bottom horizontal */
@media (max-width: 768px) {
  .zoom-controls {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: auto;
    flex-direction: row;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Larger touch-friendly zoom buttons on mobile */
  .zoom-controls .zoom-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
  }
  
  .zoom-controls #zoom-reset {
    width: auto;
    min-width: 3rem;
    padding: 0 0.75rem;
    border-radius: 1.25rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
  }
}

.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;
  align-items: center;
  justify-content: center;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-content .logo {
  margin-bottom: 1rem;
}

.home-content .logo svg {
  width: 400px;
  height: auto;
} 

.home-content h1 {
  font-size: 1.5rem;
  font-weight: 200;
  color: #333;
}