/* Download Page Styles */
.download-html section.page-title {
  background-image: url("../images/contact/contact_bg.jpg");
  background-position-y: 27%;
}

/* Section: Download Area */
.download_section {
  padding: 6vh 1.046vw 4vh;
}

.download_section > p {
  text-align: center;
  font-weight: bold;
  font-size: 1.6rem;
  line-height: 2.3;
  letter-spacing: 0.1em;
  margin-bottom: 2vh;
}

/* Machine Type Tabs */
.download_tabs {
  width: 52.301vw;
  margin: 0 auto;
}

.tab_nav {
  display: flex;
  justify-content: space-around;
  gap: 0;
  margin-bottom: 4vh;
  border-bottom: 2px solid #d5d5d5;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tab_nav li {
  list-style: none;
}

.tab_nav li a {
  display: block;
  padding: 1.5vh 2.5vw;
  font-size: 1.5rem;
  font-weight: bold;
  color: #717171;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
}

.tab_nav li a:hover {
  color: #614f42;
}

.tab_nav li a.active {
  color: #614f42;
  border-bottom-color: #614f42;
}

/* Tab Content */
.tab_content {
  display: none;
}

.tab_content.active {
  display: block;
}

/* File List */
.file_list {
  width: 100%;
  margin-bottom: 3vh;
}

.file_list dt {
  font-size: 1.8rem;
  font-weight: bold;
  color: #264483;
  padding: 2vh 0 1vh;
  letter-spacing: 0.1em;
  border-bottom: 2px solid #264483;
  margin-bottom: 1.5vh;
}

.file_list dd {
  margin: 0;
  padding: 0;
}

.file_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8vh 1.5vw;
  border-bottom: 1px solid #d5d5d5;
  transition: background 0.2s ease;
}

.file_item:hover {
  background: #f9f7f5;
}

.file_item:last-child {
  border-bottom: 1px solid #d5d5d5;
}

.file_info {
  flex: 1;
}

.file_info h4 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #303030;
  margin: 0 0 0.5vh;
  letter-spacing: 0.05em;
}

.file_info p {
  font-size: 1.2rem;
  color: #717171;
  margin: 0;
  letter-spacing: 0.05em;
}

.file_download_btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: #614f42;
  color: #fff;
  text-align: center;
  font-weight: 500;
  font-size: 1.3rem;
  border-radius: 4px;
  padding: 1vh 2vw;
  letter-spacing: 0.1em;
  transition: opacity 0.3s;
  cursor: pointer;
  white-space: nowrap;
}

.file_download_btn:hover {
  opacity: 0.6;
}

/* Modal Overlay */
.download_modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.download_modal.show {
  display: flex;
}

.form_privacy {
  height: 25.988vh;
  margin: 0 auto;
  overflow: auto;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  font-size: 1.3rem;
  padding: 2.911vh 1.255vw;
  letter-spacing: 0.1em;
  line-height: 2.1;
}
.form_privacy a[href^="tel:"] {
  pointer-events: none;
}

/* Modal Content */
.modal_content {
  background: #fff;
  width: 52.301vw;
  max-height: 90vh;
  overflow-y: hidden;
  border-radius: 4px;
  position: relative;
  padding: 4vh 2vw;
}

.modal_close {
  position: absolute;
  top: 1.5vh;
  right: 1.5vw;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #717171;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.modal_close:hover {
  color: #303030;
}

.modal_title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1vh;
  letter-spacing: 0.1em;
}

.modal_desc {
  font-size: 1.4rem;
  text-align: center;
  color: #717171;
  margin-bottom: 3vh;
  letter-spacing: 0.05em;
}

/* Modal Form - two column layout */
.modal_form {
  width: 100%;
  margin: 0 auto;
}

.form_row {
  display: flex;
  gap: 2vw;
  margin-bottom: 2vh;
}

.form_group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form_group label {
  display: flex;
  align-items: center;
  gap: 0.8vw;
  color: #264483;
  font-weight: bold;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  margin-bottom: 1vh;
}

.form_group label .required {
  display: inline-block;
  background: #ebaf3d;
  padding: 0.2vh 0.5vw;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 2px;
}

.form_group input[type="text"],
.form_group input[type="email"],
.form_group input[type="tel"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border-radius: 4px;
  border: 1px solid #000;
  padding: 1.2vh 0.8vw;
  background: #fff;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  box-sizing: border-box;
}

.form_group input:focus {
  outline: none;
  box-shadow: 0 0 6px 0 #ebaf3d;
  border: 1px solid rgba(0, 0, 0, 0);
}

.modal_form_error {
  color: #b70000;
  font-size: 1.1rem;
  margin-top: 0.5vh;
  display: none;
}

.modal_btn {
  text-align: center;
  margin-top: 3vh;
}

.modal_btn button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: #614f42;
  color: #fff;
  text-align: center;
  font-weight: 500;
  font-size: 1.6rem;
  border-radius: 4px;
  padding: 2vh 5vw;
  letter-spacing: 0.1em;
  transition: opacity 0.3s;
  cursor: pointer;
}

.modal_btn button:hover {
  opacity: 0.6;
}

.modal_privacy {
  font-size: 1.2rem;
  color: #717171;
  text-align: center;
  margin-top: 2vh;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

/* Success Message */
.download_success {
  display: none;
  text-align: center;
  padding: 4vh 2vw;
}

.download_success .success_icon {
  font-size: 5rem;
  color: #614f42;
  margin-bottom: 2vh;
}

.download_success h3 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1vh;
  letter-spacing: 0.1em;
}

.download_success p {
  font-size: 1.4rem;
  color: #717171;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 767px) {
  .modal_btn button {
    font-size: 1.1rem;
  }
  .modal_privacy {
    font-size: 1.1rem;
  }
  .modal_desc {
    font-size: 1.1rem;
  }
  .download_tabs,
  .modal_content {
    width: 90%;
  }
  .tab_nav li a {
    padding: 1vh 3vw;
    font-size: 1.1rem;
  }
  .form_row {
    flex-direction: column;
    gap: 0;
  }
  .form_group label {
    font-size: 1.3rem;
  }
  .form_group label .required {
    padding: 0.2vh 8px;
  }
  .file_item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1vh;
  }
  .file_download_btn {
    align-self: flex-end;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .download_tabs,
  .modal_content {
    width: 75%;
  }
}
