/* ====== Top Call Bar (Not currently used, safe to keep) ====== */
.top-call-bar {
  background: #e7ebf3;
  padding: 6px 0;
  text-align: center;
  border-bottom: 1px solid #d2d7df;
}

.top-call-bar a {
  color: #1d3557;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.top-call-bar a:hover {
  color: var(--secondary);
}

/* ===== Call Button in Header ===== */
.call-btn {
  background: #25d366; /* Green */
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.call-btn:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
  color: #ffffff;
}

/* Facebook floating button */
.fb-float {
  background-color: #1877F2;   /* Official Facebook blue */
}
.fb-float svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Smooth scrolling for nav clicks */
html {
  scroll-behavior: smooth;
}

/* Adjust where anchored sections stop so header doesn't cover titles */
.hero,
#about,
#courses,
#staff,
#fees,
#contact {
  scroll-margin-top: 70px;
}

/* ================================
   Sophisticated Quran Center Theme
   ================================ */

/* Theme Variables */
:root {
  --primary: #1d3557;       /* Deep blue */
  --secondary: #e0b45a;     /* Muted gold accent */
  --accent: #457b9d;        /* Steel blue */
  --light-bg: #f5f6fa;      /* Soft light background */
  --text-dark: #1f2933;     /* Neutral dark text */
}

/* ====== Global Styles ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: var(--light-bg);
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ====== Layout ====== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ====== Header & Navigation ====== */
header {
  background: #0f172a; /* very dark navy */
  color: #fff;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;   /* keep logo + nav on same row */
}

.nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;  /* menu + principal aligned to the right */
}

.principal-line {
  width: 100%;
  text-align: center;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #e0b45a;
  text-shadow: 0 0 6px rgba(224, 180, 90, 0.25);
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo span {
  color: var(--secondary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  color: #e5e7eb;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--secondary);
  color: #ffffff;
}

/* ====== Hero Section ====== */
.hero {
  background: radial-gradient(circle at top left, #5b5c18, #ecda82);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  background-blend-mode: overlay;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

/* Hero text wrapper (for ordering on mobile) */
.hero-text {}

/* Hero logo on the right side */
.hero-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-box img {
  max-width: 380px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.15));
}
.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
}

.hero p {
  margin-bottom: 1.25rem;
  color: #e5e7eb;
}

/* Highlights under hero text */
.hero-highlights {
  margin-bottom: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.6rem;
}

.hero-highlights span {
  font-size: 0.82rem;
  background: rgba(73, 75, 41, 0.6);
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ====== Buttons ====== */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease-out;
}

.btn-primary {
  background: #e0ab39;
  color: #000000;
}

.btn-primary:hover {
  background: #f3bf4e;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e0ab39;
  color: #000000;
}

.btn-secondary:hover {
  border-color: #f3bf4e;
  transform: translateY(-1px);
}

/* ====== Hero Card (if you re-enable it) ====== */
.hero-card {
  background: rgba(15, 23, 42, 0.88);
  color: #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.hero-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.hero-card p {
  font-size: 0.88rem;
  margin-bottom: 1rem;
  color: #d1d5db;
}

.hero-list {
  list-style: none;
  font-size: 0.86rem;
}

.hero-list li {
  margin-bottom: 0.35rem;
  display: flex;
  gap: 0.4rem;
}

.hero-list li::before {
  content: "•";
  color: var(--secondary);
}

.badge {
  display: inline-block;
  background: rgba(226, 232, 240, 0.08);
  color: #e5e7eb;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* ====== Sections ====== */
.section {
  padding: 4rem 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.section-title p {
  font-size: 0.9rem;
  color: #4b5563;
}

/* ====== Cards ====== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  border: 1px solid #e5e7eb;
}

.card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.02rem;
  color: var(--primary);
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
}

.card ul {
  margin-top: 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: #4b5563;
}

/* ====== Quran Library Page ====== */
.library-hero {
  background: linear-gradient(135deg, #101b33, #18294a);
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.library-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.library-hero-copy h1 {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}

.library-hero-copy p {
  color: #d9e3ff;
  margin-bottom: 1.3rem;
}

.library-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  min-width: 130px;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.1rem;
}

.metric-label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.library-hero-card {
  background: #0b1223;
  border-radius: 20px;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 45px rgba(8, 15, 40, 0.45);
}

.library-hero-card h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.library-hero-list {
  margin-bottom: 1.5rem;
  list-style: none;
}

.library-hero-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.library-hero-list li:last-child {
  border-bottom: none;
}

.library-wrapper {
  background: linear-gradient(135deg, #0b1223, #18294a);
  color: #e2e8f0;
}

.library-wrapper .container {
  max-width: 1400px;
  width: 96%;
}

.library-layout {
  display: flex;
  justify-content: center;
  width: 100%;
}

.library-panel {
  width: min(960px, 100%);
  background: rgba(7, 13, 30, 0.92);
  padding: 1.8rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px rgba(4, 8, 20, 0.45);
  backdrop-filter: blur(6px);
}

.library-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.library-panel-header h2 {
  margin: 0;
  color: #f8fafc;
}

.library-panel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  max-width: 280px;
  margin-left: auto;
  text-align: right;
}


/* Tidy Digital Shelf header alignment */
.library-panel-header {
  align-items: center;   /* title + right column nicely aligned vertically */
}

.library-panel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.4rem;
}

.library-support-text {
  max-width: 260px;
  margin: 0;
  line-height: 1.4;
}



.library-support-text {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.4;
  text-align: left;
  align-self: flex-end;
  margin: 0;
}

.note-label {
  color: #f87171;
  font-weight: 700;
  margin-right: 0.35rem;
  animation: noteBlink 2.2s ease-in-out infinite;
}

@keyframes noteBlink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}
.btn-whatsapp-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: #25d366;
  color: #0b1324;
  font-weight: 600;
  border: none;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-whatsapp-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 25px rgba(37, 211, 102, 0.35);
}

.library-search label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #cbd5f5;
  display: block;
  margin-bottom: 0.35rem;
}

.search-field {
  position: relative;
}

.search-field input {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  outline: none;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.search-field input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(224, 180, 90, 0.25);
}

.search-field input::placeholder {
  color: rgba(226, 232, 240, 0.5);
}

.search-field svg {
  width: 18px;
  height: 18px;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  fill: #e2e8f0;
}

.table-scroll {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.table-scroll.has-scroll {
  max-height: 520px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 180, 90, 0.5) rgba(15, 23, 42, 0.6);
}

.table-scroll.has-scroll::-webkit-scrollbar {
  width: 6px;
}

.table-scroll.has-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.table-scroll.has-scroll::-webkit-scrollbar-thumb {
  background: rgba(224, 180, 90, 0.6);
  border-radius: 8px;
}

.books-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  border-radius: 16px;
  overflow: hidden;
  color: #e2e8f0;
  background: rgba(8, 12, 24, 0.6);
}

.books-table thead {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
}

.books-table th,
.books-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.books-table tbody tr {
  transition: background 0.15s ease-out;
  background: transparent;
}

.books-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.12);
}

.book-name {
  display: block;
  font-weight: 600;
  color: #f1f5f9;
}

.book-meta {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.table-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(224, 180, 90, 0.2);
  color: #fef9c3;
  font-weight: 600;
  font-size: 0.8rem;
}

.table-pill.subtle {
  background: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.action-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.empty-row td {
  text-align: center;
  font-size: 0.9rem;
  color: #cbd5f5;
}


/* ====== PDF Viewer ====== */
.pdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.pdf-modal.open {
  display: flex !important;
}

.pdf-modal-inner {
  width: 100vw;
  height: 100vh;
  background: #111827;
  display: flex;
  flex-direction: column;
}

.pdf-modal-header {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1f2937;
}

.pdf-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
}

.pdf-viewer-container {
  display: flex;
  height: calc(100vh - 70px);
}

.pdf-thumbnail-sidebar {
  width: 150px;
  background: #0f172a;
  border-right: 1px solid #1f2937;
  overflow-y: auto;
  padding: 12px 8px;
}

#thumbnailList canvas {
  width: 100%;
  cursor: pointer;
  margin-bottom: 10px;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color 0.15s ease;
}

#thumbnailList canvas.active-page {
  border-color: var(--secondary);
}

.pdf-main-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pdf-toolbar {
  padding: 10px 12px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #1f2937;
  flex-wrap: wrap;
}

.pdf-toolbar button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.pdf-close-inline {
  margin-left: auto;
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 1rem !important;
}

.pdf-close-inline:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}
#pdfPageJump {
  width: 110px;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
}

#pdfCanvasWrapper {
  flex: 1;
  overflow-y: auto;
  background: #111827;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

#pdfCanvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  border-radius: 8px;
}

.pdf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(17, 24, 39, 0.85);
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.pdf-loading.visible {
  opacity: 1;
  pointer-events: auto;
}

.pdf-loading-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--secondary);
  animation: pdfSpin 0.8s linear infinite;
}

.pdf-loading-brand {
  font-size: 0.95rem;
  color: #f9d084;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: pdfGlow 1.6s ease-in-out infinite;
}

.pdf-loading-brand .brand-highlight {
  color: #ffffff;
}

@keyframes pdfGlow {
  0% { text-shadow: 0 0 4px rgba(249, 208, 132, 0.4); }
  50% { text-shadow: 0 0 16px rgba(249, 208, 132, 0.8); }
  100% { text-shadow: 0 0 4px rgba(249, 208, 132, 0.4); }
}

@keyframes pdfSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ====== Two-Column Layout ====== */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* ====== Testimonials (if used) ====== */
.testimonials {
  background: #0f172a;
  color: #e5e7eb;
}

.testimonial-cards .card {
  background: #111827;
  border-color: #1f2937;
  box-shadow: none;
}

.testimonial-author {
  margin-top: 0.75rem;
  font-size: 0.84rem;
  color: var(--secondary);
}

/* ====== Forms / Contact ====== */
form {
  display: grid;
  gap: 0.9rem;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ====== Footer ====== */
footer {
  background: #0f172a;
  color: #9ca3af;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-inner a {
  color: var(--secondary);
}

/* ===== Floating Call + WhatsApp + Facebook Buttons (middle right) ===== */
.floating-contact {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

/* base style for floating buttons */
.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
  border: 2px solid #ffffff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, opacity 0.15s ease-out;
}

/* Call button style */
.call-float {
  background-color: #9bb6dd;
}

/* WhatsApp button style */
.whatsapp-float {
  background-color: #25d366;
}

/* Hover effects */
.floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.45);
}

/* Optional: smaller / hide on very small screens */
@media (max-width: 600px) {
  .floating-contact {
    right: 12px;
  }
  .floating-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ========== Back to Top Button ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #1d3557;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: bold;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: #16304d;
}

/* ======= PDF Library Small Helpers (if used) ======= */
/* Center the Digital Shelf panel on the page */
.library-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.pdf-frame {
  width: 100%;
  height: 480px;
  border: none;
  border-radius: 8px;
  background: #f3f4f6;
}


/* ===== Simple Chatbot ===== */
.qa-chatbot {
  position: fixed;
  bottom: 20px;
  right: 80px;  /* moved left a bit */
  z-index: 9998;
}


/* Toggle button */
.qa-chat-toggle {
  background: #1d3557;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Chat window */
.qa-chat-window {
  position: fixed;
  bottom: 80px;
  right: 80px;  /* moved left a bit */
  width: 320px;
  max-height: 420px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.35);
  overflow: hidden;
  z-index: 9999;
  display: none;
}

.qa-chat-header {
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.qa-chat-header button {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 1.1rem;
  cursor: pointer;
}

.qa-chat-body {
  padding: 10px 12px;
  max-height: 280px;
  overflow-y: auto;
  background: #f9fafb;
  font-size: 0.88rem;
}

.qa-chat-message {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 90%;
}

.qa-chat-message.bot {
  background: #e5e7eb;
  align-self: flex-start;
}

.qa-chat-message.user {
  background: #e0b45a;
  color: #111827;
  margin-left: auto;
  text-align: right;
}

.qa-chat-footer {
  display: flex;
  border-top: 1px solid #e5e7eb;
}

.qa-chat-footer input {
  flex: 1;
  border: none;
  padding: 8px 10px;
  font-size: 0.88rem;
  outline: none;
}

.qa-chat-footer button {
  background: #1d3557;
  color: #fff;
  border: none;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Quick reply buttons */
.qa-quick-replies {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.qa-quick-replies button {
  border: none;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid #d1d5db;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .qa-chat-window {
    width: 90%;
    right: 5%;
    bottom: 90px;
  }
}






/* ===================== */
/*   MOBILE LAYOUT FIX   */
/* ===================== */
@media (max-width: 768px) {

  /* Header & nav */
  header {
    position: static;
  }

   /* Hide Library on mobile 
  .nav-library {
    display: none !important;
  }*/
  
  /* Hide desktop call button on mobile */
  .call-header {
    display: none !important;
  }


/* ... your other mobile styles ... */

  /* Chat toggle button */
  .qa-chatbot {
    bottom: 110px;   /* moved slightly DOWN */
    right: 16px;     /* keep it on the right */
  }

  /* Chat window above the chat button */
  .qa-chat-window {
    bottom: 170px;   /* moved slightly DOWN */
    right: 5%;       /* fits nicely on mobile width */
  }


  /* Right side (menu) should not be pushed right on mobile */
  .nav-right {
    margin-left: 0;
    align-items: center;
    width: 100%;
  }


   /* Make header stack vertically on mobile */
  .navbar {
    flex-direction: column;
    align-items: center;
  }
  /* Center logo on its own line */
  .navbar .logo {
    width: 100%;
    text-align: center;
    margin-bottom: 0.6rem;
  }

  /* Menu centered and wrapping nicely */
  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }


  .nav-links li {
    list-style: none;
    margin: 0;
  }

 .nav-links a {
    font-size: 0.9rem;
  }

  /* Principal line already centered, just keep it neat */
  .principal-line {
    text-align: center;
    margin-top: 6px;
    font-size: 0.85rem;
    font-size: 0.9rem;
  }

  /* Hero fills screen & content starts a bit higher */
  .hero {
    min-height: 100vh;
    padding: 1.2rem 0 1.8rem;
    display: flex;
    align-items: flex-start;
  }

  /* Stack logo → text → buttons, all centered */
  .hero-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100%;
    margin-top: 0;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  /* Hide highlight pills on mobile */
  .hero-highlights {
    display: none;
  }

  .hero-buttons {
    order: 3;
    margin: 0;
    flex-direction: column;
    align-items: center;
  }

  .hero-logo-box {
    order: 1;
    margin: 0 0 8px 0;
    text-align: center;
  }

  .hero-text {
    order: 2;
    text-align: center;
    margin: 0 0 8px 0;
  }

  /* Keep logo size nice on mobile */
  .hero-logo-box img {
    max-width: 150px;
  }

  /* Sections – stop forcing full-screen per section */
  .section {
    min-height: auto;
    padding: 2.4rem 0;
    display: block;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* PDF library layout */
  .library-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .library-hero-card {
    order: 2;
  }

  .library-hero-copy {
    order: 1;
  }

  .library-wrapper .container {
    width: 100%;
    padding: 0 1rem;
  }

  .library-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .library-panel {
    padding: 1.2rem;
    width: 100%;
  }

  .library-panel-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .library-panel-header > div:first-child {
    flex: 1 1 auto;
  }

  .library-panel-right {
    margin-left: auto;
    align-items: flex-end;
    text-align: right;
    width: auto;
    max-width: 180px;
    gap: 0.3rem;
  }

  .library-support-text {
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: left;
    width: 100%;
  }

  .btn-whatsapp-inline {
    padding: 0.32rem 0.8rem;
    font-size: 0.78rem;
  }

  .library-search label {
    font-size: 0.8rem;
  }

  .search-field input {
    font-size: 0.85rem;
  }

  .table-scroll {
    margin-top: 1rem;
  }

  .books-table th,
  .books-table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.82rem;
  }

  .action-btn {
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
  }

  .pdf-thumbnail-sidebar {
    display: none;
  }

  .pdf-viewer-container {
    flex-direction: column;
  }

  /* Move floating buttons to bottom center */
  .floating-contact {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 24px !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    flex-direction: row !important;
    gap: 18px !important;
    z-index: 9999 !important;
  }

  /* Bigger, properly round buttons */
  .floating-btn {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    font-size: 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  /* Back to top button – keep at bottom-right */
  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}
