/* ================================
   LESSON PLAN CATEGORY PAGE
   ================================ */

.lesson-category-page {
  padding: 40px 0;
}

.lesson-plan-section {
  margin-bottom: 80px;
  padding-bottom: 40px;
  border-bottom: 2px solid #e0e0e0;
}

.lesson-plan-section:last-of-type {
  border-bottom: none;
}

.lesson-plan-section h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 40px;
  font-weight: 600;
}

/* ================================
   PREVIEW LAYOUT
   ================================ */

.lesson-preview-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Main Preview (Left Side) */
.lesson-preview-main {
  flex: 1;
  min-width: 0;
}

.preview-box {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-content {
  height: 400px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-icon {
  font-size: 120px;
  opacity: 0.3;
}

.preview-label {
  padding: 20px;
  text-align: center;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
}

.preview-label h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

/* Thumbnails (Right Side) */
.lesson-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 280px;
  flex-shrink: 0;
}

.thumbnail-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.thumbnail-item:hover {
  border-color: #fd8706;
  box-shadow: 0 2px 8px rgba(253, 135, 6, 0.2);
  transform: translateX(-3px);
}

.thumbnail-preview {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-icon-small {
  font-size: 28px;
  opacity: 0.4;
}

.thumbnail-label {
  flex: 1;
}

.thumbnail-label span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
  display: block;
}

/* Back Link */
.back-link {
  margin-top: 60px;
  text-align: center;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

.back-link a {
  color: #fd8706;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
}

.back-link a:hover {
  color: #dc6d02;
  text-decoration: underline;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 992px) {
  .lesson-preview-layout {
    flex-direction: column;
  }
  
  .lesson-thumbnails {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .thumbnail-item {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 576px) {
  .lesson-plan-section h2 {
    font-size: 22px;
  }
  
  .preview-content {
    height: 300px;
  }
  
  .pdf-icon {
    font-size: 80px;
  }
  
  .lesson-thumbnails {
    flex-direction: column;
  }
  
  .thumbnail-item {
    min-width: auto;
  }
}

.pdf-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: white;
}

.pdf-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.pdf-nav-btn {
  background-color: #fd8706;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.pdf-nav-btn:hover {
  background-color: #dc6d02;
}

.pdf-nav-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.pdf-page-info {
  font-size: 14px;
  color: #666;
}

.thumbnail-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Thumbnail Layout Updates */
.thumbnail-item {
  display: block;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.thumbnail-item:hover {
  border-color: #fd8706;
  box-shadow: 0 2px 8px rgba(253, 135, 6, 0.2);
}

.thumbnail-preview {
  width: 100%;
  height: 60px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.thumbnail-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.thumbnail-label {
  flex: 1;
}

.thumbnail-label span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
  display: block;
}

.thumbnail-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e53e3e;
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
  flex-shrink: 0;
}

.thumbnail-download-btn:hover {
  background-color: #c53030;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.thumbnail-download-btn svg {
  width: 18px;
  height: 18px;
}

/* Prevent download button from triggering thumbnail click */
.thumbnail-download-btn {
  position: relative;
  z-index: 10;
}