
:root{ --paper:#d7b98a; --ink:#2f2013; --ink2:#52351f; --accent:#b38955; --maxw:1200px }
*{ box-sizing:border-box }
body{ margin:0; background:#efe7d7; color:var(--ink); font-family:"Cinzel", serif }
header.top{ display:flex; gap:12px; align-items:center; justify-content:center; padding:14px; border-bottom:2px solid rgba(0,0,0,.12); background:linear-gradient(#e6cfaa,#d7b98a) }
header.top img{ height:64px; width:64px; object-fit:cover; border-radius:50%; box-shadow:0 8px 18px rgba(0,0,0,.25) }
header.top h1{ margin:0; font-size:22px; letter-spacing:.6px }
.scroll{ position:relative; max-width:var(--maxw); margin:clamp(10px,2vw,22px) auto; background:radial-gradient(150% 100% at 50% 18%, rgba(0,0,0,.06), transparent 48%),radial-gradient(150% 100% at 50% 80%, rgba(0,0,0,.06), transparent 48%),var(--paper); border-radius:16px; box-shadow:0 18px 40px rgba(0,0,0,.25),inset 0 0 0 2px rgba(0,0,0,.05) }
.scroll::before,.scroll::after{ content:""; display:block; height:70px; background:linear-gradient(#c79a61,#af7f47); border-bottom:3px solid rgba(0,0,0,.35); box-shadow:inset 0 -18px 24px rgba(0,0,0,.25) }
.scroll::after{ height:74px; border-top:3px solid rgba(0,0,0,.35); border-bottom:none; transform:translateY(20px); background:linear-gradient(#a0703f,#ba8a55); box-shadow:inset 0 18px 24px rgba(0,0,0,.25),0 -8px 0 rgba(0,0,0,.05) }
.brand{ display:flex; gap:18px; align-items:center; padding:12px 18px 6px 18px }
.crest{ width:86px; height:86px; border-radius:50%; object-fit:cover; border:2px solid rgba(0,0,0,.2); box-shadow:0 8px 18px rgba(0,0,0,.25) }
.titles{ display:flex; flex-direction:column }
.hebrew{ font-family:"Noto Serif Hebrew", serif; font-weight:700; letter-spacing:2px; font-size:clamp(28px,4vw,40px); color:var(--ink) }
.latin{ font-weight:700; letter-spacing:1.6px; font-size:clamp(18px,2.1vw,26px); color:var(--ink2) }
nav.tabs{ border-top:2px solid rgba(0,0,0,.12); border-bottom:2px solid rgba(0,0,0,.12); background:linear-gradient(#d9bc8f,#caa872) }
nav.tabs ul{ list-style:none; display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin:0; padding:8px }
nav.tabs a{ display:block; padding:10px 14px; border-radius:10px; border:1px solid rgba(0,0,0,.12); text-decoration:none; color:var(--ink); background:rgba(255,255,255,.18) }
nav.tabs a:hover{ background:rgba(255,255,255,.3) }
.sheet{ padding:22px 18px 36px }
.section{ max-width:1000px; margin:16px auto; background:rgba(255,255,255,.08); border:2px solid rgba(0,0,0,.1); border-radius:12px; padding:18px; box-shadow:inset 0 10px 28px rgba(0,0,0,.08) }

/* PDF Blocks */
.pdf-section { background: #f5f0e6; border: 2px solid #b89b68; border-radius: 12px; padding: 1.5rem; margin: 2rem 0; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.pdf-header { font-family: 'Cinzel Decorative', serif; color: #3e2f1c; text-align: center; font-size: 1.3rem; margin-bottom: 1rem; }
.pdf-viewer { width: 100%; height: 720px; border: none; border-radius: 8px; }
.pdf-download { text-align: center; margin-top: 1rem; }
.pdf-download a { background: #b89b68; color: white; font-weight: bold; padding: 0.6rem 1.2rem; border-radius: 8px; text-decoration: none; transition: 0.3s; }
.pdf-download a:hover { background: #8a6a42; }
@media (max-width: 768px) { .pdf-viewer { height: 480px; } }

/* Tabs within pages */
.tabbar { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px 0; padding:0; list-style:none; }
.tabbar a { padding:8px 12px; border:1px solid rgba(0,0,0,.15); background:rgba(255,255,255,.24); border-radius:8px; text-decoration:none; color:var(--ink) }
.tabbar a.active { background:#fff4e1; border-color:#b89b68; }
.tabcontent { display:none; }
.tabcontent.active { display:block; }

footer{ padding:18px; text-align:center; color:#6b4b31; font-size:14px }
.btn { display:inline-block; padding:10px 16px; border-radius:999px; border:1px solid rgba(0,0,0,.2); color:var(--ink); background:linear-gradient(#f4e3c5,#d9b88b); text-decoration:none; box-shadow:0 4px 10px rgba(0,0,0,.12) }
.btn:hover{ filter:brightness(1.05) }
.curriculum-hub {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.page-title {
  font-family: 'Cardo', serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
  text-align: center;
  color: #4a320a;
}

.curriculum-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.curriculum-column {
  flex: 1 1 45%;
  background: rgba(255, 248, 230, 0.75);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #d3b88c;
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
}

.curriculum-column h2 {
  color: #5b3a0c;
  font-size: 1.4rem;
  border-bottom: 2px solid #d3b88c;
  padding-bottom: 6px;
  margin-bottom: 15px;
}

.curriculum-links {
  list-style: none;
  padding: 0;
}

.curriculum-links li {
  margin-bottom: 10px;
}

.curriculum-links a {
  color: #3b2608;
  font-weight: 600;
  text-decoration: none;
}

.curriculum-links a:hover {
  text-decoration: underline;
  color: #8d5e18;
}
/* Back to Top Button (Universal) */
#topBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #C6A664;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#topBtn.show {
  opacity: 1;
}
#topBtn:hover {
  background-color: #e6c878;
  transform: translateY(-3px);
}
form {
  max-width: 650px;
  margin: 2rem auto;
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 10px;
  color: #fff;
}
form h3 {
  color: #C6A664;
  margin-top: 1.5rem;
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 5px;
  background: #2a2a2a;
  color: #fff;
}
.gold-btn {
  background-color: #C6A664;
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
}
.gold-btn:hover {
  background-color: #e6c878;
}
/* === Modal Overlay === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: #1a1a1a;
  color: #fff;
  border: 2px solid #C6A664;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  max-width: 450px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: scaleUp 0.3s ease;
}
.modal-content h3 {
  color: #C6A664;
  margin-bottom: 0.5rem;
}
.modal-content p {
  margin-bottom: 1.5rem;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleUp {
  from { transform: scale(0.9); }
  to { transform: scale(1); }
}
/* === Spinner Loader inside Button === */
.gold-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 0.8s linear infinite;
}

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

/* Spinner active state */
.loading .btn-text {
  opacity: 0.6;
  pointer-events: none;
}
.loading .spinner {
  display: inline-block;
}
/* ================================
   Sidebar Navigation Enhancements
   ================================ */
.sidebar-nav {
  position: fixed;
  left: 0;
  top: 120px;
  height: calc(100% - 120px);
  width: 240px;
  background: rgba(0, 0, 0, 0.85);
  padding: 1rem;
  overflow-y: auto;
  border-right: 2px solid #C6A664;
  z-index: 900;
  transition: transform 0.3s ease;
}
.sidebar-nav a {
  display: block;
  color: #eee;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-nav a:hover {
  background: rgba(198, 166, 100, 0.15);
  color: #C6A664;
}
.sidebar-nav a.active {
  color: #C6A664;
  text-shadow: 0 0 6px #C6A664;
  font-weight: 600;
}
@media (max-width: 992px) {
  .sidebar-nav {
    position: relative;
    width: 100%;
    height: auto;
    top: 0;
    border-right: none;
    border-bottom: 2px solid #C6A664;
  }
  .sidebar-nav a {
    display: inline-block;
    margin: 0.25rem 0.5rem;
  }
}
/* ===============================
   Support Navigation Hub
   =============================== */

.support-hub {
  padding: 3rem 1.5rem;
}

.support-hub-header {
  text-align: center;
  margin-bottom: 3rem;
}

.support-hub-header h2 {
  color: #C6A664;
  font-weight: 700;
}

.support-hub-header p {
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto;
}

.support-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.support-nav-card {
  background: rgba(0,0,0,0.85);
  border: 1px solid #C6A664;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.support-nav-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.support-nav-card .icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.support-nav-card h5 {
  color: #C6A664;
  margin-bottom: 0.5rem;
}

.support-nav-card p {
  font-size: 0.9rem;
  opacity: 0.85;
}


/* Main content padding for sidebar */
.main-content {
  margin-left: 260px;
  padding: 2rem;
}
@media (max-width: 992px) {
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
}
.doctrine-links {
  background: rgba(0,0,0,0.85);
  border-top: 1px solid #C6A664;
  border-bottom: 1px solid #C6A664;
}
.doctrine-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
}
.doctrine-links a {
  color: #C6A664;
  text-decoration: none;
  font-weight: 600;
}
.doctrine-links a:hover {
  text-decoration: underline;
}
.breadcrumbs ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 0.85rem;
}
.breadcrumbs a {
  color: #C6A664;
  text-decoration: none;
}
.breadcrumbs li::after {
  content: "›";
  margin-left: 0.5rem;
  color: #888;
}
.breadcrumbs li:last-child::after {
  content: "";
}

body {
  font-family: system-ui, sans-serif;
  background: #0b0b0b;
  color: #eaeaea;
}

.sheet {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: #111;
  border-radius: 10px;
}

label { display:block; margin-top:1rem; }
input, textarea, button {
  width:100%;
  padding:.6rem;
  margin-top:.4rem;
}

.message.success { color: #7CFC98; }
.message.error   { color: #FF7B7B; }
