/* =========================================
   LIBRARY PAGE SPECIFIC STYLES
   ========================================= */
h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #2d3748;
}
h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #4a5568;
}
h3 {
  color: #2d3748;
  font-weight: 600;
  font-size: 2.25rem;
  margin: 2rem 0 1rem 0;
  border-bottom: 2px solid #fcfdfe;
  padding-bottom: 0.5rem;
}

h4 {
  color: #4a5568;
  font-weight: 600;
  font-size: 2rem;
  margin: 2rem 0 0.8rem 0;
  text-transform: capitalize;
}
h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4a5568;
}
h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
}
header {
    border-bottom: 2px solid #393939;
    text-align: center;
}
footer {
    padding: 2rem 0 .8rem 0;
    border-top: 2px solid #393939;
    text-align: center;
    font-size: .9rem;
}
.library-page {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem 3rem 3rem 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 1000px;
}
.text-center {
    text-align: center;
}
.library-notes {
    background:#a9e2d8;
    padding: 1rem;
    border-radius: 8px;
    margin: 2rem;
}

a {
    color: #455e89;
    text-decoration: none;
}
ul, ol {
    padding-left: 1.5rem;
}
li {
  font-size: 1rem;
}

.library-page img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  display: block;
}

.library-page code {
  background: #f7fafc;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9em;
  color: #2d3748;
}

.library-page pre {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  border-left: 4px solid #4299e1;
}

.library-page blockquote {
  border-left: 4px solid #4299e1;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #718096;
}

.library-page .features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.feature-card {
  color: #2d3748;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* Navigation buttons in library pages */
.justify-content-center {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.library-page .button {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.library-page .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

/* Documentation grid layout for tbook-docs.html */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.docs-column {
  background: rgba(255, 255, 255, 0.6);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.docs-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.docs-section-title {
  color: #2d3748;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: 2px solid #4299e1;
  padding-bottom: 0.5rem;
}
.docs-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}
.docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-list li {
  margin-bottom: 0.8rem;
}

.docs-list a {
  display: block;
  padding: 0.8rem 1rem;
  background: #f7fafc;
  border-radius: 6px;
  text-decoration: none;
  color: #2d3748;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.docs-list a:hover {
  background: #4299e1;
  color: white;
  border-left-color: #2b6cb0;
  transform: translateX(5px);
}

.docs-list a:active {
  background: rgba(66, 153, 225, 0.12);
}
.section-description {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: left;
}
@media (max-width: 768px) {
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .docs-section {
    padding: 1.5rem;
  }
}
/* Responsive adjustments for library pages */
@media (max-width: 768px) {
  /* Responsive typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
  
  h5 {
    font-size: 1.1rem;
  }
  
  h6 {
    font-size: 0.95rem;
  }
  
  p, li {
    font-size: 1rem;
  }
  
  /* Responsive drop cap - only for first paragraph */
  .library-page > p:first-of-type::first-letter,
  .library-page h1 + p::first-letter,
  .library-page h2 + p::first-letter {
    font-size: 3.5rem;
    line-height: 2.5rem;
  }
  
  /* Ensure no drop cap on h3/h4/h5/h6 sections */
  .library-page h3 + p::first-letter,
  .library-page h4 + p::first-letter,
  .library-page h5 + p::first-letter,
  .library-page h6 + p::first-letter {
    float: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    font-weight: inherit !important;
  }

  .library-page {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .library-page .features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .library-page .feature-card {
    padding: 1.5rem;
  }

  .library-page .justify-content-center {
    flex-direction: column;
    align-items: center;
  }

  .library-page .button {
    width: 100%;
    max-width: 300px;
  }

  /* Documentation grid responsive */
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
  }
  .docs-column {
    padding: 1.5rem;
  }

  .docs-section-title {
    font-size: 1.2rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.35rem;
  }
  
  h4 {
    font-size: 1.15rem;
  }
  
  h5 {
    font-size: 1rem;
  }
  
  h6 {
    font-size: 0.9rem;
  }
  
  p, li {
    font-size: 0.95rem;
  }
  
  /* Responsive drop cap - only for first paragraph */
  .library-page > p:first-of-type::first-letter,
  .library-page h1 + p::first-letter,
  .library-page h2 + p::first-letter {
    font-size: 3rem;
    line-height: 2rem;
  }
  
  /* Ensure no drop cap on h3/h4/h5/h6 sections */
  .library-page h3 + p::first-letter,
  .library-page h4 + p::first-letter,
  .library-page h5 + p::first-letter,
  .library-page h6 + p::first-letter {
    float: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    font-weight: inherit !important;
  }
  
  .library-page {
    padding: 1.5rem 1rem;
  }
}
/* First paragraph - Drop cap styling */
/* Only apply drop cap to the very first paragraph after h1 or h2 */
.library-page > p:first-of-type,
.library-page h1 + p,
.library-page h2 + p {
  margin-top: 1.5rem;
}

/* Default drop cap for first paragraph only */
.library-page > p:first-of-type::first-letter,
.library-page h1 + p::first-letter,
.library-page h2 + p::first-letter {
  float: left;
  font-family: "Open Sans", sans-serif;
  font-size: 4.5rem;
  line-height: 3.2rem;
  margin: 0.2rem 0.4rem 0 0;
  color: #000000;
  font-weight: 700;
}

/* Prevent drop cap on h3 and h4 sections */
.library-page h3 + p::first-letter,
.library-page h4 + p::first-letter,
.library-page h5 + p::first-letter,
.library-page h6 + p::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  font-weight: inherit;
}

p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #4a5568;
  margin-bottom: 1.5rem;
}

/* =========================================
   LIBRARY NAVIGATION STYLES
   (Fixed button-style menu)
   ========================================= */

/* Fixed navigation bar at top - similar to book_form.html */
.library-fixed-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(to bottom, #f8f9fa 0%, #9cbad8 100%);
  padding: 1rem 0 1rem 0;
  border-bottom: 2px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.library-breadcrumbs-bar {
  background: #fff3cd;
  padding: 8px 20px;
  border-bottom: 1px solid #ffc107;
  font-size: 14px;
}

.library-breadcrumbs-bar a {
  color: #856404;
  text-decoration: none;
  font-weight: 500;
}

.library-breadcrumbs-bar a:hover {
  text-decoration: underline;
}

.library-breadcrumbs-bar span {
  color: #856404;
}

.library-content-wrapper {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation buttons - styled like book_form.html fixed buttons */
.library-nav-btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.library-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.library-nav-btn.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  font-weight: bold;
}

.library-nav-btn.home {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.library-nav-btn.category-btn {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
  font-weight: 600;
  cursor: default;
  position: relative;
}

.library-nav-btn.category-btn:hover {
  transform: none;
}

/* Category dropdown container */
.library-category {
  position: relative;
  display: inline-block;
}

.library-category-label {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #333;
  font-weight: 600;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.library-category-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.library-category-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 5px;
  min-width: 200px;
  max-width: 300px;
  z-index: 1001;
}

.library-category:hover .library-category-dropdown {
  display: block;
}

.library-category-dropdown a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  transition: background 0.2s ease;
}

.library-category-dropdown a:last-child {
  border-bottom: none;
}

.library-category-dropdown a:hover {
  background: #f8f9fa;
}

.library-category-dropdown a.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .library-fixed-nav {
    padding: 8px 10px;
    gap: 6px;
  }

  .library-nav-btn,
  .library-category-label {
    padding: 6px 12px;
    font-size: 13px;
  }

  .library-breadcrumbs-bar {
    padding: 6px 10px;
    font-size: 12px;
  }

  .library-content-wrapper {
    padding: 10px;
  }

  .library-category-dropdown {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    max-width: none;
  }
}
