/* style/download.css */

/* --- General Styles --- */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css (#121212) */
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-download__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-download__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-download__section-description {
  font-size: 1.1em;
  color: #f0f0f0; /* Lighter text for descriptions on dark background */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-download__btn-primary {
  background-color: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

.page-download__btn-primary:hover {
  background-color: #02a052; /* Slightly darker green */
  border-color: #02a052;
}

.page-download__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-download__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #017439;
  border-color: #017439;
}

.page-download__btn-primary--center {
  display: block;
  margin: 30px auto 0 auto;
  max-width: 300px;
}

/* --- Card Styles --- */
.page-download__card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark body */
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff; /* Light text on card background */
  text-align: left;
}

.page-download__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439; /* Brand color for card titles */
}

.page-download__card-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* --- Hero Section --- */
.page-download__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 80px 0;
  overflow: hidden;
  background-color: #017439; /* Use brand color as background for hero */
}

.page-download__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 20px;
  color: #ffffff;
}

.page-download__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-download__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background image */
  z-index: 1;
}

/* --- Why Download Section --- */
.page-download__why-download {
  padding: 80px 0;
  background-color: #1a1a1a; /* Darker background for contrast with hero */
}

.page-download__why-download .page-download__section-title {
  color: #017439; /* Brand color for title */
}

.page-download__why-download .page-download__section-description {
  color: #f0f0f0;
}

.page-download__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-download__section-image {
  display: block;
  max-width: 80%;
  height: auto;
  margin: 50px auto 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- How to Install Section --- */
.page-download__how-to-install {
  padding: 80px 0;
  background-color: #121212; /* Match body background for consistency */
  color: #ffffff;
}

.page-download__how-to-install .page-download__section-title {
  color: #017439;
}

.page-download__how-to-install .page-download__section-description {
  color: #f0f0f0;
}

.page-download__installation-tabs {
  margin-top: 50px;
}

.page-download__tab-header {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 15px;
}

.page-download__tab-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 25px;
  font-size: 1.1em;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-download__tab-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-download__tab-button--active {
  background-color: #017439;
  border-color: #017439;
  color: #ffffff;
}

.page-download__tab-content {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__tab-pane {
  display: none;
}

.page-download__tab-pane--active {
  display: block;
}

.page-download__tab-pane-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 25px;
  text-align: center;
}

.page-download__install-steps {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-download__install-steps li {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  margin-bottom: 15px;
  border-left: 5px solid #017439;
  border-radius: 5px;
  color: #f0f0f0;
}

.page-download__install-steps li strong {
  color: #ffffff;
}

.page-download__install-image {
  display: block;
  max-width: 70%;
  height: auto;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Features Section --- */
.page-download__features {
  padding: 80px 0;
  background-color: #1a1a1a;
}

.page-download__features .page-download__section-title {
  color: #017439;
}

.page-download__features .page-download__section-description {
  color: #f0f0f0;
}

.page-download__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-download__feature-card .page-download__card-title {
  color: #017439;
}

/* --- Video Section --- */
.page-download__video-section {
  padding: 80px 0;
  background-color: #121212;
}

.page-download__video-section .page-download__section-title {
  color: #017439;
}

.page-download__video-section .page-download__section-description {
  color: #f0f0f0;
}

.page-download__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin-top: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-download__video-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.page-download__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block; /* Ensure no extra space below video */
}

/* --- FAQ Section --- */
.page-download__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a;
}

.page-download__faq-section .page-download__section-title {
  color: #017439;
}

.page-download__faq-section .page-download__section-description {
  color: #f0f0f0;
}

.page-download__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-download__faq-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.page-download__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.page-download__faq-title {
  font-size: 1.2em;
  color: #ffffff;
  margin: 0;
}

.page-download__faq-toggle {
  font-size: 1.8em;
  color: #017439;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.page-download__faq-item.active .page-download__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to form an X or minus */
}

.page-download__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 20px;
}

.page-download__faq-answer p {
  margin: 0;
  padding-bottom: 10px; /* Add some padding for text within answer */
  color: #f0f0f0;
}

.page-download__faq-answer a {
  color: #017439;
  text-decoration: none;
}

.page-download__faq-answer a:hover {
  text-decoration: underline;
}

/* --- Final CTA Section --- */
.page-download__cta-final {
  padding: 80px 0;
  text-align: center;
  background-color: #017439; /* Use brand color as background */
  color: #ffffff;
}

.page-download__cta-final .page-download__section-title {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-download__cta-final .page-download__section-description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

.page-download__cta-content {
  max-width: 800px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: 3em;
  }
  .page-download__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-download {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure content is below fixed header on mobile */
  }

  .page-download__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-download__hero-section {
    min-height: 400px;
    padding: 60px 0;
  }

  .page-download__hero-title {
    font-size: 2.2em;
  }

  .page-download__hero-description {
    font-size: 1em;
  }

  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-download__btn-primary,
  .page-download__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-download__benefits-grid,
  .page-download__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-download__card {
    padding: 20px;
  }

  .page-download__card-title {
    font-size: 1.3em;
  }

  .page-download__tab-header {
    flex-direction: column;
    gap: 10px;
  }

  .page-download__tab-button {
    width: 100%;
    padding: 10px 15px;
  }

  .page-download__tab-content {
    padding: 20px 15px;
  }

  .page-download__tab-pane-title {
    font-size: 1.5em;
  }

  .page-download__install-steps li {
    padding: 15px;
    font-size: 0.95em;
  }

  .page-download__install-image,
  .page-download__section-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Video responsiveness */
  .page-download__video-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-download video,
  .page-download__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-download__faq-item {
    margin-bottom: 10px;
  }

  .page-download__faq-question {
    padding: 15px;
  }

  .page-download__faq-title {
    font-size: 1.1em;
  }

  .page-download__faq-toggle {
    font-size: 1.5em;
  }

  .page-download__faq-answer {
    padding: 0 15px;
  }

  .page-download__faq-item.active .page-download__faq-answer {
    padding: 15px;
  }

  .page-download__cta-final {
    padding: 60px 0;
  }
}

/* --- Color Contrast Fixes (as per instructions) --- */
/* For dark body background #121212, default text is #ffffff */
.page-download__light-bg {
  background: #1a1a1a; /* Dark background for sections */
  color: #ffffff;
}

.page-download__dark-section {
  background: #121212; /* Dark background for sections */
  color: #ffffff;
}

/* Ensure titles and important text on dark backgrounds are visible */
.page-download__section-title {
  color: #017439; /* Brand green, visible on dark */
}

.page-download__card-title {
  color: #017439; /* Brand green, visible on dark card background */
}

/* Text color for descriptions on dark backgrounds */
.page-download__section-description,
.page-download__card-text,
.page-download__install-steps li,
.page-download__faq-answer p {
  color: #f0f0f0; /* Lighter white for readability */
}

/* Special color for register/login buttons as per custom配色 */
.page-download__register-button {
  background-color: #C30808; /* Red for register */
  color: #FFFF00; /* Yellow font for register */
  border: 2px solid #C30808;
}
.page-download__register-button:hover {
  background-color: #e01212;
  border-color: #e01212;
}

.page-download__login-button {
  background-color: #C30808; /* Red for login */
  color: #FFFF00; /* Yellow font for login */
  border: 2px solid #C30808;
}
.page-download__login-button:hover {
  background-color: #e01212;
  border-color: #e01212;
}