/* ============================================================
   📚 Library Page Base Styles
   ============================================================ */
body {
  background: url('../images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

.library-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #0258E6;
  font-size: 2rem;
  font-weight: 700;
}

.library-description {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: #333;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Directory ===== */
.directory-container {
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
}
.directory-container h2 {
  margin-bottom: 0.8rem;
  color: #0258E6;
  font-size: 1.4rem;
}
.directory-list {
  list-style: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}
.directory-list li {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s ease;
}
.directory-list li:hover {
  background: #f0f4ff;
}
.directory-list li:last-child {
  border-bottom: none;
}

/* ============================================================
   🖼 Fullscreen / Modal Iframe
   ============================================================ */

/* Fullscreen wrapper */
.iframe-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;  /* ✅ use dynamic viewport height for better mobile behavior */
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
}

/* Active state */
.iframe-wrapper.active {
  display: flex;
}



/* Fullscreen iframe */
.iframe-wrapper iframe {
  width: 100%;
  height: 100dvh;   /* ✅ fills the screen */
  border: none;
  display: block;
  background: #fff;
}

/* Close button styling */
.close-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10000;
  backdrop-filter: blur(5px);
}


/* ============================================================
   🏠 Home Button at Bottom
   ============================================================ */
.home-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.home-btn {
  background: linear-gradient(135deg, #0258E6, #ff3ea5);
  color: #fff;
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, background 0.3s ease;
}

.home-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ff3ea5, #0258E6);
}

/* ============================================================
   📱 Responsive
   ============================================================ */
@media (max-width: 768px) {
  .iframe-wrapper {
    padding: 0; /* ✅ remove padding for true fullscreen on mobile */
  }
  iframe {
    height: 100vh;
    border-radius: 0;
  }
  .close-btn {
    bottom: 15px;
    font-size: 1.2rem;
    padding: 8px 20px;
  }
}

@media (max-width: 480px) {
  .close-btn {
    font-size: 1rem;
    padding: 6px 16px;
  }
}
