:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2563eb;
  --ring: rgba(37, 99, 235, 0.25);
}

:root.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --brand: #ffffff;
  --ring: rgba(59, 130, 246, 0.4);
}

* {
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
    color: var(--text);
    background: var(--bg);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
     line-height: 1.6;
}
/* ---------------- Header ---------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  position: relative;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.3px;
  color: var(--brand);
  text-decoration: none;
}

.logo span {
  opacity: 0.7;
}

/* ---------------- Controls styling ---------------- */

.themeToggle,
.hamburger,
.closeBtn {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid #e5e7eb;
  font-size: 1rem;
}

.dark .themeToggle,
.dark .hamburger,
.dark .closeBtn {
  border-color: #334155;
}

.hamburger {
  display: none;
  font-size: 1.2rem;
}

.dark .hamburger {
  color: #fff;
}

.closeBtn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
}

/* ---------------- Focus state (Accessibility) ---------------- */

.themeToggle:focus,
.hamburger:focus,
.closeBtn:focus {
  outline: 2px solid var(--brand);
}

/* ---------------- Layout ---------------- */

.wrap {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.content {
  flex: 3;
  background: var(--card);
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: block;
  flex-direction: column;
}

.dark .content {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: relative;
  align-self: flex-start;
  background: var(--card);
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
}

.dark .sidebar {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.sidebar h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.sidebar li a {
  color: var(--text);
  text-decoration: none;
}

.sidebar li a:hover {
  color: #2563eb;
  text-decoration: none;
}

/* Extra Sidebar */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 300px;
  align-self: flex-start; /* ensures sticky works */
  height: auto; /* ya max-content */
}

.extra-sidebar {
  position: sticky;
  top: 80px;
}


@media (min-width: 992px) {
  .extra-sidebar {
    display: block;
    position:sticky;
    top: 80px; /* height of header */
    background: var(--card);
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    width: 300px;
  }

  .dark .extra-sidebar {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .extra-sidebar h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--text);
  }

  .extra-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .extra-sidebar li {
    margin-bottom: 12px;
    font-size: 0.95rem;
  }

  .extra-sidebar li a {
    color: var(--text);
    text-decoration: none;
  }

  .extra-sidebar li a:hover {
    color: #2563eb;
    text-decoration: none;
  }
}

@media (max-width: 991px) {
  .extra-sidebar {
    display: none !important;
  }
}


/* ---------------- Typography ---------------- */
h1, h2, h3 {
  margin: 16px 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.4;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.2;
}

p, li {
  line-height: 1.7;
  margin-bottom: 12px;
}

ul {
  margin-left: 20px;
}

/* ---------------- Contact Form ---------------- */
.contact-form {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
  background: var(--bg);
  color: var(--text);
}

html.dark .contact-form input,
html.dark .contact-form textarea {
  border: 1px solid #475569;
  background: var(--bg);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 6px rgba(74, 144, 226, 0.3);
  background: #fff;
}

html.dark .contact-form input:focus,
html.dark .contact-form textarea:focus {
  background: #1e293b;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background: #4a90e2;
  color: #fff;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.contact-form button:hover {
  background: #357ab8;
  transform: translateY(-2px);
}

/* FAQ */
.faq {
  margin-top: 30px;
}

.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.dark .faq-item {
  border-bottom: 1px solid #334155;
}

.faq-item h3 {
  margin-bottom: 10px;
  color: var(--brand);
}

.faq-item p {
  margin-bottom: 0;
}


/* Mobile / Tablet */
@media (max-width: 768px) {
  .wrap {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100%;
    z-index: 20;
    padding: 18px;
    display: block;
    border-radius: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .sidebar.active {
    left: 0;
  }

  .nav {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
  }

  .nav-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .themeToggle {
    order: 1;
  }

  .hamburger {
    order: 2;
    display: block;
  }

  .closeBtn {
    display: block;
    color: red;
  }

  .logo {
    font-size: 1.5rem;
  }
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 15;
}

.overlay.active {
  display: block;
}

/* Dark Mode Content Links */

.content a {
  color: #2563eb;
  text-decoration: none;
}

.content a:hover {
  color: lightgray;
}

.dark .content a {
  color:#2563eb;
  text-decoration: none;
}

.dark .content a:hover {
  color: lightgray; 
}

/* Footer */
footer {
  margin-top: 30px;
  border-top: 1px solid #e9edf3;
  background: var(--card);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.dark footer {
  border-color: #334155;
}

footer a {
  color: var(--text);
  text-decoration: none;
  margin: 0 4px;
}

footer a:hover {
  text-decoration: none;
    color: var(--brand);
}