/* assets/css/autohome.css */
/* Minimal design inspired by high-contrast modern hero layouts */
/* Mobile-first */

/* Reset-ish */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #111;
  background: #fff;
  line-height: 1.5;

  /* Sticky footer layout additions */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Utility container */
.wrap {
  background-color: rgba(255, 255, 255, 0.85); /* semi-transparent */
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

main.wrap {
  background-color: rgba(255, 255, 255, 0.85); /* semi-transparent */
  max-width: 960px;
  width: 90%;
  margin: 3rem auto 5rem;
  padding: 1.5rem 2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* background: #fff; */ /* REMOVE or COMMENT this out */
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  user-select: text;
  box-sizing: border-box;
  word-wrap: break-word;

  /* Sticky footer layout fix */
  flex: 1 0 auto;

  position: relative;
  z-index: 10;
}

/* ============== Service box =================== */
.service-box {
    margin-bottom: 20px;
}
.purchase-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}
.purchase-button:hover {
    background-color: #0056b3;
}


/* ===================== Page Background ======================== */
#page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;       /* fill the screen, cropping if needed */
  background-position: center;  /* center image */
  background-repeat: no-repeat;
  z-index: 0;                  /* lowest, behind all content */
  transition: background-image 0.8s ease-in-out;
}

/* ===================== NAVIGATION ===================== */
/* Header with diagonal lines 45deg to right */
.nav {
  background:
    repeating-linear-gradient(
      45deg,
      #f9f9f9,
      #f9f9f9 4px,
      #dcdcdc 4px,
      #dcdcdc 5px
    ),
    rgba(255, 255, 255, 0.85);
  position: sticky;
  top: 0;
  z-index: 30; /* keep nav on top */
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.6rem 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 128px; /* smaller logo for nav */
  width: auto;
  display: block;
  user-select: none;
}

.nav-toggle {
  font-size: 1.3rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  display: inline-block;
  transition: color 0.3s ease;
}

.nav-toggle:hover,
.nav-toggle:focus {
  color: #007acc;
  outline: none;
}

/* Navigation links container */
.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* Navigation links styling */
.nav-links li a {
  display: block;
  padding: 0.6rem 0.8rem;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: background 0.15s ease;
  font-weight: 600;
  font-size: 1rem;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: rgba(0, 0, 0, 0.06);
}

/* ===================== User Menu ====================== */
/* Wrapper for positioning dropdown */
.user-menu {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The user toggle button */
.user-menu-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  user-select: none;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus {
  background-color: rgba(0, 0, 0, 0.06);
  outline: none;
}

/* User avatar/icon if any */
.user-icon {
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
  border-radius: 50%;
  object-fit: cover;
  user-select: none;
}

/* Dropdown menu */
.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  margin-top: 0.3rem;
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 100;
  display: none; /* hidden by default */
}

/* Show dropdown when active */
.user-menu.active {
  display: block;
}

/* Dropdown items */
.user-menu li {
  margin: 0;
}

/* Dropdown links */
.user-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #222;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.user-menu li a:hover,
.user-menu li a:focus {
  background: #007acc;
  color: #fff;
  outline: none;
}

/* ===================== LANG SWITCHER ===================== */
.lang-switcher {
  font-size: 0.9rem;
  opacity: 0.85;
  cursor: pointer;
}

/* ===================== MOBILE BEHAVIOR ===================== */
@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 64px;
    right: 1rem;
    background: #fff;
    flex-direction: column;
    padding: 0.6rem;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    display: none;
    min-width: 180px;
  }

  /* Show nav-links when active */
  .nav-links.active {
    display: flex;
  }

  .nav-links li a {
    padding: 0.8rem 1rem;
  }
}

/* Hide hamburger on desktop */
@media (min-width: 901px) {
  .nav-toggle {
    display: none;
  }
}

/* ===================== HERO SLIDER ===================== */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 980px;       /* max width as you wanted */
  height: 256px;          /* fixed height */
  margin: 1.5rem auto;    /* center with vertical spacing */
  border-radius: 16px;
  overflow: hidden;
  background: #efefef;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);  /* subtle drop shadow */
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: opacity, transform;
  padding: 1rem;
}

.hero-slider .slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slider .slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1) contrast(1);
  border-radius: 16px;
  will-change: transform;
}

.hero-slider .slide .overlay {
  position: relative;
  max-width: 960px;       /* slightly smaller than hero for padding */
  margin: 0 auto;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically center content */
  height: 100%;
  user-select: none;
}

.hero-slider h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 3px 10px rgba(0,0,0,0.7);
}

.hero-slider p.lead {
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* Slide controls (small) */
.hero-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.hero-controls button {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero-controls button:hover,
.hero-controls button:focus {
  background: #007acc;
  outline: none;
}

/* ===================== HEADINGS ===================== */
h1, h2, h3 {
  font-weight: 700;
  color: #222;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.6rem;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

/* ===================== PARAGRAPHS ===================== */
p {
  font-weight: 400;
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

/* ===================== ALERTS ===================== */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 1rem;
  box-sizing: border-box;
}

.alert-error {
  background-color: #fddede;
  border: 1px solid #f5a5a5;
  color: #b22;
}

.alert-success {
  background-color: #d6f5d6;
  border: 1px solid #7bc47b;
  color: #2a7a2a;
}

/* ===================== FORM ELEMENTS ===================== */
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 1rem;
  user-select: none;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #222;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 42px;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form textarea:focus {
  outline: none;
  border-color: #007acc;
  box-shadow: 0 0 8px rgba(0, 122, 204, 0.4);
}

form textarea {
  min-height: 120px;
}

/* Submit button */
button.btn-primary,
form button[type="submit"] {
  background-color: #007acc;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease;
  display: inline-block;
  margin-top: 8px;
  width: 100%;
  user-select: none;
}

button.btn-primary:hover,
button.btn-primary:focus,
form button[type="submit"]:hover,
form button[type="submit"]:focus {
  background-color: #005fa3;
  outline: none;
}

/* ===================== RTL SUPPORT ===================== */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] form label {
  text-align: right;
}

[dir="rtl"] form input[type="text"],
[dir="rtl"] form input[type="email"],
[dir="rtl"] form textarea {
  text-align: right;
}

/* ===================== FOOTER ===================== */
/* Footer with diagonal lines 45deg to left */
.footer {
  background: repeating-linear-gradient(
    -45deg,
    #f9f9f9,
    #f9f9f9 4px,
    #dcdcdc 4px,
    #dcdcdc 5px
  );
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #444;
  margin-top: 4rem;
  user-select: none;

  position: relative; /* keep it on top of page-bg */
  z-index: 10;

  /* Sticky footer fix */
  flex-shrink: 0;
}

/* ==================== WorkDone parts ==================== */
.workdone-snapshot {
  font-family: Consolas, monospace, monospace;
  margin: 1rem auto;
  max-width: 960px;
  background: #f9f9f9;
  color: #111;
}

.workdone-snapshot h1 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.workdone-snapshot .meta {
  font-size: 0.9rem;
  margin-bottom: 2rem;
  color: #444;
}

.workdone-snapshot .file-block {
  margin-bottom: 3rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: auto;
}

.workdone-snapshot .file-header {
  background: #222;
  color: #eee;
  padding: 0.5rem 1rem;
  font-weight: 700;
  user-select: text;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  font-family: Arial, sans-serif;
}

.workdone-snapshot pre {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.3em;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  counter-reset: linenumber;
}

.workdone-snapshot pre code {
  display: block;
}

.workdone-snapshot pre code span {
  display: block;
  padding-left: 3.5em;
  position: relative;
  counter-increment: linenumber;
}

.workdone-snapshot pre code span::before {
  content: counter(linenumber);
  position: absolute;
  left: 0;
  width: 3em;
  text-align: right;
  color: #999;
  user-select: none;
}

/* ===================== MEDIA QUERIES ===================== */

/* Portrait vs Landscape hero image handling */
@media (orientation: portrait) {
  .hero-slider {
    height: clamp(280px, 45vh, 680px);
  }
}

@media (orientation: landscape) {
  .hero-slider {
    height: clamp(360px, 65vh, 900px);
  }
}

/* Small devices */
@media (max-width: 600px) {
  .hero-slider .slide .overlay {
    font-size: 0.9rem;
    padding: 1rem 1.2rem;
  }

  .nav-inner {
    padding: 0.4rem 1rem;
  }

  .nav-links li a {
    font-size: 0.9rem;
    padding: 0

