html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  /* box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; */
  box-shadow: none;
}

.btn:disabled{
  background-color: #b1b1b1;;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin-bottom: 30px;
  padding-top: 70px; /* 為固定頂部 navbar 留出空間 */
  overflow: hidden;
}

.navbar-custom {
  background: #f7f7f7; /* 不透明淺灰底色，方便測試 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  --navbar-link-inline-space: clamp(0.6rem, 1vw, 1.15rem);
}

/* 大螢幕維持與筆電相近的左右留白，不使用過寬的固定 container */
@media (min-width: 1200px) {
  .navbar-custom .container {
    max-width: none;
    padding-left: clamp(1rem, 2.6vw, 2.25rem);
    padding-right: clamp(1rem, 2.6vw, 2.25rem);
  }
}

.navbar-custom .nav-link {
  color: rgba(26, 26, 26, 0.8);
}

.navbar-custom .nav-link{
  color: var(--brand-red);
  font-weight: 600;
  padding-right: var(--navbar-link-inline-space);
  padding-left: var(--navbar-link-inline-space);
}

.navbar-custom .nav-link.active{
  color: #fff;
  background-color: #6d1b1b;
  /* border-radius: 6px; */
  padding-right: var(--navbar-link-inline-space);
  padding-left: var(--navbar-link-inline-space);
}

@media (min-width: 992px) {
  .navbar-custom .navbar-nav {
    column-gap: clamp(0.25rem, 0.7vw, 0.95rem);
  }

  .navbar-custom .nav-link {
    white-space: nowrap;
  }
}

.navbar-brand-logo {
  width: auto;
  height: 45px;
  object-fit: contain;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* 全域輸入欄位圓角 & focus 色調 */
.form-control,
.form-select {
    border-radius: 50px;
}

.form-control:focus,
.form-select:focus {
    border-color: #c67d30;
    box-shadow: 0 0 0 0.25rem rgba(198, 125, 48, 0.25);
}

.form-check-input:focus {
    border-color: #c67d30;
    box-shadow: 0 0 0 0.25rem rgba(198, 125, 48, 0.25);
}

.form-check-input:checked {
    background-color: #c67d30;
    border-color: #c67d30;
}

:root {
  --brand-gold: #b27a2c;
  --brand-gold-dark: #8d5d24;
  --brand-red: #6d1b1b;
  --brand-cream: #f8f1e6;
}

.home-hero {
  background: linear-gradient(135deg, #f8f1e6 0%, #e6c590 45%, #a9762a 100%);
  position: relative;
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0) 55%);
  pointer-events: none;
}

.home-hero .navbar {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-car {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.hero-car::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.6), transparent 60%),
              radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.35), transparent 55%);
}

.hero-car::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600'%3E%3Cpath d='M60 420c0-100 160-180 320-180h400c150 0 240 80 240 180s-90 180-240 180H380c-160 0-320-80-320-180Z' fill='%23fff' opacity='0.18'/%3E%3Cpath d='M180 480c0-40 40-72 90-72h660c50 0 90 32 90 72s-40 72-90 72H270c-50 0-90-32-90-72Z' fill='%23fff' opacity='0.14'/%3E%3Cpath d='M260 380s120-120 380-120 360 120 360 120' stroke='%23fff' stroke-width='18' stroke-linecap='round' opacity='0.6' fill='none'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.home-hero .carousel {
  position: relative;
  z-index: 1;
}

.home-hero .carousel-item {
  display: flex;
  align-items: center;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  /*background-color: rgba(255, 255, 255, 0.8);*/
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236d1b1b'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236d1b1b'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.btn-gold {
  background-color: #f6b849;
  border-color: var(--brand-gold);
  color: #fff;
}

.btn-gold:hover,
.btn-gold:focus,
.btn-gold:active {
  background-color: var(--brand-gold-dark)!important;
  border-color: var(--brand-gold-dark)!important;
  color: #fff!important;
}

.btn-darkred {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff!important;
}

.btn-darkred:hover,
.btn-darkred:focus,
.btn-darkred:active {
  background-color: rgba(109, 27, 27, 0.85)!important;
  border-color: rgba(109, 27, 27, 0.85)!important;
  color: #fff!important;
  box-shadow: none!important;
}

.text-gold {
  color: var(--brand-gold) !important;
}

.text-darkred {
  color: var(--brand-red) !important;
}

.loan-step-t{
  width: 100%;
}

.nav-item .nav-link:hover{
  color: #C67D30;
}

.nav-item .nav-link.active:hover{
  color: #FFFFFF;
}

/*-- Loan Shared: stepper & page --*/
.loan-page {
  background: linear-gradient(135deg, var(--brand-cream) 0%, rgba(248, 241, 230, 0.85) 55%, rgba(255, 255, 255, 1) 100%);
  min-height: 100vh;
}

.bg-decor-waves {
  /*background: url('../images/wave-line.png') no-repeat top center;
  margin-top: 10px;
  height: 280px;
  width: 100%;
  position: absolute;*/
  display: none;
}

.loan-page > .container {
  position: relative;
  z-index: 1;
}

.loan-card {
  max-width: 980px;
  margin: 0 auto;
  z-index: 10;
  border-radius: 1.2rem;
}

.stepper {
  position: relative;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 2.2rem;
  left: 2.8rem;
  right: 2.8rem;
  height: 3px;
  background: rgba(109, 27, 27, 0.18);
  z-index: 1;
}

.stepper .step {
  position: relative;
  z-index: 2;
  text-align: center;
}

.stepper .step a {
  text-decoration: none;
}

.stepper .step .step-circle {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(109, 27, 27, 0.3);
  color: #b7b2b2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.stepper .step.step-active .step-circle {
  background-color: #C67D30 !important;
  border-color: #C67D30 !important;
  color: #fff !important;
}

.stepper .step .step-label {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #898989;
}

.stepper .step.step-active .step-label {
  color: #C67D30;
  font-weight: 600;
}

.stepper::after {
  content: "";
  position: absolute;
  top: 2.2rem;
  left: 2.8rem;
  height: 3px;
  background: #6d1b1b;
  z-index: 1;
  width: calc((100% - 5.6rem) * var(--stepper-progress, 0));
}

.stepper .step.step-done .step-circle {
  background-color: #6d1b1b;
  border-color: #6d1b1b;
  color: #fff;
}

.stepper .step.step-done .step-label {
  color: #6d1b1b;
  font-weight: 600;
}

.accordion-header .accordion-button:focus:not(:focus-visible) {
    outline: 0;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: #C67D30;
    background-color: #fcf1d5;
    box-shadow: none;
}
/*-- //Loan Shared --*/

.card-glass {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgb(215 210 210);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 1.2rem;
}

.floating-btn {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 100;
}

.copyright {
  background: linear-gradient(90deg, #ffb549, #eed484 35%, #c67d30 65%, #ffb549 86%);
}
.copyright p{
  color: #ffffff;
  margin-bottom: 0rem;
  white-space: break-spaces;
  line-height: 30px;
}

/*--page loader--*/
#nprogress .spinner {
    display: none;
}
.loadergif {
    position: absolute;
    height: 100%;
    background-color: #ffffff;
    z-index: 100;
    opacity: 0.7;
    /*background-image: url(../images/Ball.gif);*/
    background-image: url(../images/dot.gif);
    background-size: 100px 100px;
    /*background-size: 64px 21.5px;*/
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    top: 0;
    left: 0;
}
.loadergif-ai {
    position: absolute;
    height: 100%;
    background-color: #ffffff;
    z-index: 100;
    opacity: 0.75;
    width: 100%;
    top: 0;
    left: 0;
    pointer-events: auto;
}
.loadergif-ai img {
    width: 100px;
    margin: 0 auto;
    display: block;
    margin-top: 38vh;
}
.loader-normal {
    width: fit-content;
    font-weight: bold;
    font-family: monospace;
    padding-top: 10px;
    font-size: 25px;
    margin: 0 auto;
    clip-path: inset(0 3ch 0 0);
    animation: ai 1s steps(4) infinite;
    text-indent: 25px;
}
.loader-normal:before {
    content: "Loading..."
}
.loader-ai {
    width: fit-content;
    font-weight: bold;
    font-family: monospace;
    padding-top: 10px;
    font-size: 25px;
    margin: 0 auto;
    clip-path: inset(0 3ch 0 0);
    animation: ai 1s steps(4) infinite;
    text-indent: 25px;
}
.loader-ai:before {
    content: "啟動AI加載器..."
}
@keyframes ai {
    to {
        clip-path: inset(0 -1ch 0 0)
    }
}

@-webkit-keyframes zy {
    0%, 10%, 100% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(10deg);
    }

    15% {
        transform: rotate(-5deg);
    }

    20% {
        transform: rotate(5deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    30% {
        transform: rotate(0deg);
    }
}
@keyframes zy {
    0%, 10%, 100% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(10deg);
    }

    15% {
        transform: rotate(-5deg);
    }

    20% {
        transform: rotate(5deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    30% {
        transform: rotate(0deg);
    }
}
.img-robot {
    animation: zy 5s linear infinite;
}
/*--//page loader--*/

/*-- Swal Custom Class --*/
.swal-button-font-size {
    font-size: 20px !important;
}
.swal-title-font-size {
    font-size: 30px !important;
}
.swal2-popup {
    margin-bottom: 30px;
    margin-top: 40px;
}
#swal2-title {
  font-size: 1.6em;
}
div:where(.swal2-container) .swal2-actions button:where(.swal2-styled).swal2-confirm
{
  background-color: rgb(198, 125, 48);
}
/*.sw-btn {
    background-color: #5cace2 !important;
}
.sw-btn:focus {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.5) !important;
}*/
.sw-popup {
    width: 20em !important;
}
/*.sw-title {
    letter-spacing: 1.5px !important;
    font-size: 1.5em !important;
    font-weight: 500 !important;
    color: #0a5181 !important;
}*/
.swal2-container button.swal2-close {
    background-color: #000000;
    right: -5px;
    top: -5px;
    position: absolute;
    color: #ffffff;
    border-radius: 25px;
    text-align: center;
}
div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline {
    box-shadow: none!important;
}
/*-- //Swal Custom Class --*/

@media screen and (max-width: 768px) {
    .loan-step-t{
       width: 100%!important;
    }
    .floating-btn {
        top: 30vh;
    }
    .floating-btn a {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        padding: 1.2rem 0.5rem !important;
        letter-spacing: 2px;
        line-height: 1.2;
    }
    .floating-btn i {
        order: 2;          
        margin-right: 0 !important;
        margin-top: 5px; 
        margin-bottom: 0;
    }
    .floating-btn a span, 
    .floating-btn a {
        order: 1;
    }
}