/* Base Reset & Global Styles
================================= */
:root {
  --brand-blue: #2980b9;
  --brand-deep: #189ab4;
  --dark-blue: #2c3e50;
  --text-dark: #222;
  --text-muted: #666;
  --muted: #666;
  --bg-light: #fff;
  --panel: #f5f5f5;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --bg: var(--bg-light);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: #f9f9f9;
  margin: 0;
  line-height: 1.5;
  scroll-behavior: smooth;
}

/* Navbar Styles
================================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Hamburger on left, logo centered, nav-links on right */
  padding: 0.8rem 1rem;
  background-color: var(--bg-light);
  box-shadow: 0 2px 5px var(--shadow-light);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 48px; /* Compact, matches Lenovo */
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  justify-content: center; /* Center logo and bot-container */
}

.navbar .logo img {
  height: 32px;
  display: block;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar .nav-links ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.navbar a {
  color: var(--dark-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

.navbar a:hover,
.navbar a:focus-visible {
  color: var(--brand-blue);
  text-decoration: underline;
  transform: translateY(-2px);
}

/* Bot Container */
.bot-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-image {
  width: 28px;
  height: auto;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.cloud-text {
  font-size: 0.7rem;
  color: #222;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(42, 139, 255, 0.2);
  line-height: 1.2;
}

/* Hamburger Button */
.hamburger {
  display: none; /* Hidden on desktop */
  background: none; /* No background, like Lenovo */
  color: #000; /* Black icon */
  border: none;
  font-size: 1.5rem; /* Slightly larger for clarity */
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s ease;
  order: -1; /* Places hamburger before logo */
}

.hamburger:hover,
.hamburger:focus {
  transform: scale(1.1);
  outline: none;
}

/* Mobile Menu */
.mobile-menu {
  display: block;
  position: fixed;
  top: 48px;
  left: 0;
  width: 100%;
  background-color: var(--bg-light);
  overflow: hidden;
  height: 0;                         /* collapsed */
  transition: height 0.3s ease;      /* animate open/close */
  box-shadow: 0 2px 5px var(--shadow-light);
  z-index: 1001;
}

.mobile-menu.active {
  /* no fixed height here — JS will set it */
}

.mobile-menu ul {
  list-style: none;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mobile-menu li a {
  font-size: 1rem;
  color: var(--dark-blue);
  text-decoration: none;
  padding: 0.5rem;
  display: block;
}

.mobile-menu li a:hover,
.mobile-menu li a:focus {
  color: var(--brand-blue);
  background-color: #f7fafd;
  border-radius: 4px;
}

/* Social Icons */
.navbar-social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.navbar-social img {
  height: 18px;
  width: auto;
  transition: filter 0.3s ease;
}

.navbar-social a:hover img,
.navbar-social a:focus img {
  filter: brightness(1.2);
}

.mobile-menu .navbar-social {
  padding: 0.8rem 1.8rem;
  justify-content: left;
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Section Wrapper
================================= */
.section {
  padding: 5rem 1.5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  scroll-margin-top: 48px; /* Matches navbar height */
}

.content {
  max-width: 1000px;
  text-align: center;
}

/* Page Container */
main.page {
  flex: 1 0 auto;
  max-width: 1100px;
  margin: 2rem auto 5rem;
  padding: 64px 1.5rem 0; /* Added padding-top: 64px for breathing space */
  width: 100%;
}

/* Header + CTA */
.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-head .title {
  font-size: 2.5rem;
  color: var(--brand-blue);
  font-weight: 600;
  line-height: 1.3;
}

.page-head .sub {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 1rem;
  line-height: 1.7;
}

.cta-wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  color: #fff;
  background-color: var(--brand-blue);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(42, 139, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #1a6edd 0%, #0f8299 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(42, 139, 255, 0.4);
  outline: none;
}

.btn-primary.secondary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: 1px solid rgba(42, 139, 255, 0.3);
  box-shadow: none;
}

.btn-primary.secondary:hover,
.btn-primary.secondary:focus {
  background: linear-gradient(135deg, #2980b9 0%, #1a6edd 100%);
  transform: translateY(-2px);
  border-color: var(--brand-blue);
}

.download-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.4em;
}
/* Table of Contents (Top) */
.toc-top {
  background: var(--panel);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px var(--shadow-light);
  border: 1px solid #dcdcdc;
}

.toc-top ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.toc-top a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.toc-top a:hover,
.toc-top a:focus {
  background-color: var(--brand-blue);
  color: #fff;
  text-decoration: none;
  outline: none;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

/* Content Panels */
.panel {
  background: var(--panel);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px var(--shadow-light);
  border: 1px solid #dcdcdc;
}

.panel ul {
  padding-left: 1.2rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.panel h3 {
  color: var(--brand-deep);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

.lead {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Steps */
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid #dcdcdc;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  transition: box-shadow 0.3s ease;
}

.step:hover,
.step:focus-within {
  box-shadow: 0 5px 20px var(--shadow-hover);
  outline: none;
}

.step .num {
  background: var(--brand-blue);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.8rem;
}

.step .content {
  flex: 1;
}

.step .content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.5;
}

.step .content p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Collapsible Setup Steps */
.setup-section {
  margin-top: 2rem;
}

.setup-section h2.section-title {
  font-size: 1.75rem;
  color: var(--brand-blue);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  text-align: left;
}

.setup-step {
  margin-bottom: 1rem;
}

.setup-step summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid #dcdcdc;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.setup-step summary:hover,
.setup-step summary:focus {
  box-shadow: 0 5px 20px var(--shadow-hover);
  outline: none;
}

.setup-step summary .num {
  background: var(--brand-blue);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.8rem;
}

.setup-step summary .content {
  flex: 1;
}

.setup-step summary .content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.5;
}

.setup-step .step-image {
  margin-top: 0.75rem;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bg-light);
}

.setup-step .step-image img {
  width: 50%;
  height: auto;
  object-fit: contain;
  display: block;
}

.setup-step .step-text {
  margin-top: 0.75rem;
}

.setup-step .step-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Right Sidebar */
aside.side {
  position: sticky;
  top: 80px;
  align-self: start;
  margin-bottom: 1.5rem;
}

.toc h4,
.download-box h4 {
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--brand-deep);
  font-size: 1.1rem;
  line-height: 1.5;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.toc a:hover,
.toc a:focus {
  text-decoration: underline;
  outline: none;
}

.download-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid #dcdcdc;
  box-shadow: 0 2px 12px var(--shadow-light);
}

.download-box p.small {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.download-box .btn-primary {
  width: 100%;
  justify-content: center;
}

/* FAQ */
.faq-item {
  margin-bottom: 1rem;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--panel);
  transition: box-shadow 0.3s ease;
}

.faq-item summary:hover,
.faq-item summary:focus {
  box-shadow: 0 5px 20px var(--shadow-hover);
  outline: none;
}

.faq-item p {
  margin-top: 0.5rem;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Feedback Box */
.feedback-panel,
.feedback-panel-mobile {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid #dcdcdc;
  box-shadow: 0 2px 12px var(--shadow-light);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.feedback-panel label,
.feedback-panel-mobile label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--brand-deep);
  font-size: 0.95rem;
}

.feedback-panel textarea,
.feedback-panel-mobile textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: var(--bg-light);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  resize: vertical;
  font-family: var(--font-family);
}

.feedback-panel textarea::placeholder,
.feedback-panel-mobile textarea::placeholder {
  color: #aaa;
}

.feedback-panel textarea:focus,
.feedback-panel-mobile textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 5px rgba(42, 139, 255, 0.2);
}

.feedback-panel button,
.feedback-panel-mobile button {
  margin-top: 0.75rem;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.feedback-panel button:hover,
.feedback-panel-mobile button:hover,
.feedback-panel button:focus,
.feedback-panel-mobile button:focus {
  background: #1a6edd;
  transform: translateY(-2px);
  outline: none;
}

#feedback-status,
#feedback-status-mobile {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  background-color: #e6ffe6;
  color: #2a6700;
  font-size: 0.9rem;
  display: none;
}

#feedback-status.error,
#feedback-status-mobile.error {
  background-color: #ffe6e6;
  color: #670000;
}

.feedback-panel-mobile {
  display: none;
}

/* Footer
================================= */
.footer {
  background-color: var(--bg-light);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dark);
  border-top: 1px solid #ddd;
  font-family: var(--font-family);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-link {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: #1a6edd;
  text-decoration: underline;
  outline: none;
}
/* Social Media Icons in Footer */
.footer-container nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0.6rem;
}

.footer-container nav a img {
  width: 24px;
  height: 24px;
  transition: filter 0.3s ease;
}

.footer-container nav a:hover img,
.footer-container nav a:focus img {
  filter: brightness(1.2);
}
/* Accessibility helper */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

/* =========================================================
   Responsive Styles - Cleaned & Consolidated
   ========================================================= */

/* Tablet & Below (max-width: 992px) */
@media (max-width: 992px) {
  .grid {
    grid-template-columns: 1fr;
  }

  aside.side {
    position: static;
    margin-top: 2rem;
    max-width: 100%;
  }

  .page-head {
    justify-content: center;
    text-align: center;
    gap: 1rem;
  }

  .page-head .title {
    font-size: 2rem;
  }

  .toc-top ul {
    flex-direction: column;
    gap: 0.2rem; /* Reduced line spacing */
  }

  .toc-top a {
    display: block;
    padding: 0.75rem 1rem;
  }

  .feedback-wrapper {
    display: none;
  }

  .feedback-panel-mobile {
    display: block;
    order: 999;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 1rem;
    height: 46px;
    justify-content: space-between;
  }

  .navbar .nav-links {
    display: none; /* Hide desktop links */
  }

  .hamburger {
    display: block; /* Show hamburger */
  }

  .navbar .logo {
    justify-content: flex-start;
  }

  .navbar .logo img {
    height: 28px;
  }

  .bot-container {
    gap: 6px;
  }

  .bot-image {
    width: 24px;
  }

  .cloud-text {
    font-size: 0.65rem;
  }

  .page-head .title {
    font-size: 2rem;
  }

  .step .num,
  .setup-step .num {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  main.page {
    padding: 56px 1.5rem 0;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.8rem;
    height: 44px;
  }

  .navbar .logo img {
    height: 24px;
  }

  .bot-image {
    width: 20px;
  }

  .cloud-text {
    font-size: 0.6rem;
  }

  .mobile-menu.active {
    min-height: 280px; /* Ensures space for all items */
  }

  .page-head .title {
    font-size: 1.7rem;
  }

  .page-head .sub {
    font-size: 0.9rem;
  }

  .toc-top a {
    font-size: 0.9rem;
    padding: 0.1rem 0.8rem;
  }

  main.page {
    padding: 56px 1.5rem 0; /* Consistent spacing */
  }
}

/* Narrow Screens (max-width: 700px) */
@media (max-width: 700px) {
  .page-head {
    flex-direction: column;
  }
}

/* High Contrast Mode */
@media (forced-colors: active) {
  .btn-primary,
  .btn-primary.secondary {
    background-color: ButtonFace !important;
    color: ButtonText !important;
    border: 2px solid ButtonBorder !important;
  }
}

/* Desktop & Larger (min-width: 769px) */
@media (min-width: 769px) {
  .navbar .logo {
    justify-content: flex-start;
  }
}

/* Inline Icon */
.inline-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  margin-left: 0.3em;
}
