/* ============================================
   www.amoxicillinbact.com - Purple Theme Stylesheet
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

/* ---------- CSS Variables ---------- */
:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --accent: #a855f7;
  --accent-light: #c084fc;
  --bg: #ffffff;
  --bg-dark: #0f172a;
  --bg-section: #faf5ff;
  --text: #1e293b;
  --text-muted: #4a5568;
  --text-light: #f8fafc;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.3s ease;
}

/* ---------- Container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

header#main-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--border);
}

.header-inner,
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* ---------- Logo ---------- */
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

/* ---------- Desktop Nav ---------- */
.desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

/* ---------- Mobile Menu Button ---------- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
  transition: transform var(--transition);
}

.mobile-menu-btn.open {
  transform: rotate(90deg);
}

/* ---------- Mobile Menu Container ---------- */
.mobile-menu-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
}

.mobile-menu-container.active {
  display: block;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: var(--bg);
  padding-top: 60px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.mobile-menu-header {
  padding: 0 24px 20px;
}

.mobile-menu-header .mobile-menu-logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.mobile-menu-header .mobile-menu-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Mobile Menu Close ---------- */
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.mobile-menu-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

/* ---------- Mobile Menu Nav ---------- */
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

.mobile-nav-link {
  display: block;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-bottom: 4px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

/* ---------- Mobile Menu Footer ---------- */
.mobile-menu-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 50%, #f5f3ff 100%);
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-content h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ---------- Buttons ---------- */
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
  overflow: hidden;
}

.section:nth-child(even) {
  background: var(--bg-section);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-title h2 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title p {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.65;
}

/* ---------- Services Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
}

.service-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  color: #fff;
}

.service-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

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

/* ---------- Content Grid ---------- */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.content-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.content-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 1.2rem;
}

.content-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.content-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 6th section inner pages: override to pure black for readability */
section:nth-of-type(6):not(.app-guide) .content-card p,
section:nth-of-type(6):not(.app-guide) .service-content p,
section:nth-of-type(6):not(.app-guide) .content-card h3,
section:nth-of-type(6):not(.app-guide) .service-content h3 {
  color: #000000;
}

/* ---------- App Guide ---------- */
.app-guide {
  background: var(--bg-dark);
  padding: 100px 0;
}

.app-guide .section-title h2 {
  color: var(--text-light);
}

.app-guide .section-title h2 span {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-guide .section-title p {
  color: rgba(255, 255, 255, 0.6);
}

.app-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.app-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 12px;
}

.app-content p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  line-height: 1.7;
}

.app-image img {
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-step h4 {
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-step p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
  user-select: none;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-toggle {
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 0 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 400px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-content: flex-start;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  transition: color var(--transition);
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

.copyright p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  line-height: 1.6;
}

.copyright p + p {
  margin-top: 4px;
}

/* ---------- Keyword & Highlight ---------- */
.keyword {
  color: var(--primary);
  font-weight: 600;
}

.app-guide .keyword,
footer .keyword {
  color: var(--accent-light);
}


.highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-guide .highlight,
footer .highlight {
  background: linear-gradient(135deg, var(--accent-light), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

/* 1024px - Tablet landscape */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-container {
    gap: 40px;
  }

  .section-title h2 {
    font-size: 1.9rem;
  }
}

/* 900px */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content p {
    margin: 0 auto 32px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 80%;
    margin: 0 auto;
  }

  .app-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .app-image {
    order: -1;
  }

  .app-image img {
    max-width: 80%;
    margin: 0 auto;
  }
}

/* 768px - Tablet portrait & mobile */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-content {
    width: 100%;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-container {
    gap: 32px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-image img {
    max-width: 70%;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 1.7rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .app-guide {
    padding: 60px 0;
  }
}

/* 480px - Small phones */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

  .hero-image img {
    max-width: 100%;
  }

  .section-title h2 {
    font-size: 1.4rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .app-image img {
    max-width: 100%;
  }

  .mobile-menu-content {
    padding-top: 48px;
  }
}
