:root {
  --white-color:                  #FFFFFF;
  --primary-color:                #38b083;
  --section-bg-color:             #f5f5f5;
  --border-color:                 #dee2e6;
  --dark-color:                   #000000;
  --grey-color:                   #fcfeff;
  --title-color:                  #565758;
  --p-color:                      #717275;
  --footer-bg-color:              #07262e;

  --body-font-family:             'Karla',"IBM Plex Sans Thai", sans-serif;


  --h1-font-size:                 68px;
  --h2-font-size:                 42px;
  --h3-font-size:                 36px;
  --h4-font-size:                 32px;
  --h5-font-size:                 24px;
  --h6-font-size:                 22px;
  --p-font-size:                  18px;
  --menu-font-size:               18px;
  --copyright-text-font-size:     16px;
  --custom-link-font-size:        14px;

  --font-weight-light:            300;
  --font-weight-normal:           400;
  --font-weight-bold:             600;
}

body {
    background: var(--white-color);
    font-family: var(--body-font-family); 
}

/*---------------------------------------
  TYPOGRAPHY               
-----------------------------------------*/

h2,
h3,
h4,
h5,
h6 {
  color: var(--dark-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: normal;
}

h1 {
  font-size: var(--h1-font-size);
}

h2 {
  font-size: var(--h2-font-size);
}

h3 {
  font-size: var(--h3-font-size);
}

h4 {
  font-size: var(--h4-font-size);
}

h5 {
  font-size: var(--h5-font-size);
}

h6 {
  font-size: var(--h6-font-size);
}

p {
  color: var(--p-color);
  font-size: var(--p-font-size);
  font-family: var(--body-font-family);
  font-weight: var(--font-weight-light);
  
  }

a, 
button {
  touch-action: manipulation;
  transition: all 0.3s;
}

a {
  color: var(--p-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-color);
}

::selection {
  background: var(--primary-color);
  color: var(--white-color);
}

::-moz-selection {
  background: var(--primary-color);
  color: var(--white-color);
}



b,
strong {
  font-weight: var(--font-weight-bold);
}

.paddingText {
  padding: 50px;
}



.navbar-brand i { margin-right: 12px; }

.backstretch { max-width: 99.99%; }


body {
  background: var(--white-color);
  font-family: var(--body-font-family); 
  margin: 0;
  padding: 0;
}


/* Premium Homepage Hero */
.premium-home {
  background: #fdfaf5;
  padding: 80px 20px 100px;
}

.hero-wrapper {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero-text {
  position: absolute;
  top: 15%;
  left: 10%;
  right: 10%;
  text-align: left;
  color: var(--dark-color);
  font-family: var(--body-font-family);
}

.hero-text .lab-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--dark-color);
}

.hero-text .lab-subtitle {
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.hero-text .lab-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--p-color);
}

.btn-start {
  background-color: var(--dark-color);
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 30px;
  font-weight: bold;
  border: none;
  transition: background 0.3s;
}

.btn-start:hover {
  background-color: #6a574e;
}

.quiz-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}



.article-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensures cards stretch to fit their container */
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.article-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.8;
}

.article-card .content {
  padding: 20px;
  flex-grow: 1; /* Ensures content stretches to fill available space */
}

.article-card .tag {
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.1);
  padding: 5px 10px;
  border-radius: 15px;
  display: inline-block;
  margin-bottom: 10px;
}

.article-card h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.article-card p {
  font-size: 1rem;
  color: #777;
}





/* Make sure illustration fills column */
.illustration {
  border-radius: 10px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 40px 16px 20px 16px;
  box-sizing: border-box;
  margin-bottom: 20px;
}




/* Title inside illustration */
.title {
    font-size: 22px;
    font-weight: bold;
    color: var(p-color);
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

/* Subtitle */
.subtitle {
    font-size: 14px;
    color: var(p-color);
    position: relative;
    z-index: 2;
    margin-bottom: 5px;
}


.content {
  padding: 20px;
  flex-grow: 1; /* Ensures content stretches to fill available space */
  display: flex;
  flex-direction: column;
}

/* Step Box Below Image */
.step-box {
    
    flex-grow: 1; /* Make sure they expand equally */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 12px;
    margin: 15px 0px;
    position: relative;

}

.step {
  font-size: 17px;
  font-weight: 600;
  color: #333; /* Use your strong readable color */
  margin-bottom: 4px;
  line-height: 1.5;
}

.step-detail {
  font-size: 15px;
  color: var(--p-color); /* Keeps it subtle but readable */
  font-weight: 400;
  margin-top: 0;
  line-height: 1.6;
}

.mission-box {
    flex-grow: 1; /* Make sure they expand equally */
    background: #f8f8f8;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    position: relative;

}
.instruction {
  font-size: 15px;
  font-weight: 400;
  color: var(--p-color);
  line-height: 1.6;
  margin-bottom: 0;
}


.instruction-badge {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #444 !important;
  border: 1.5px solid #888;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background-color: transparent !important;
}


.question-box {
    padding: 10px;

}

.question {
    font-size: 16px;
    font-weight: bold;
    color: #4d3b34;
}

.tip-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--p-color);
  line-height: 1.6;
  padding: 10px 14px;
  border-left: 4px solid #ccc;
  border-radius: 4px;
  margin: 15px 0;
}

.tip-text i {
  font-size: 16px;
  color: var(--primary-color);
  margin-top: 2px;
  flex-shrink: 0;
}


.hint {
    font-size: 12px;
    color: #8b8b8b;

}


/* Options Container */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



/* Custom Option Layout */
.option {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    border: 2px solid transparent;
    width: 100%;
}

/* Hide Default Radio */
.option input {
    display: none;
}

/* Custom Radio Indicator */
.radio-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0; /* Prevents shrinking */
  aspect-ratio: 1 / 1; /* Enforces perfect circle */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-sizing: border-box; /* Ensures border doesn’t distort size */
}


/* Inner Circle when Selected */
.option input:checked + .radio-circle {
    background: #38b083;
    border-color: #38b083;
    box-shadow: 0 0 6px rgba(56, 176, 131, 0.6);
}

.option input:checked + .radio-circle::after {
    content: "";
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    display: block;
}

@media (max-width: 768px) {
  .radio-circle {
    width: 18px;
    height: 18px;
    aspect-ratio: 1 / 1;
    margin-right: 10px;
  }

  .option-text {
    font-size: 14px;
  }

  .option-result {
    font-size: 15px;
  }
}


@media (max-width: 480px) {
  .radio-circle {
    width: 16px;
    height: 16px;
    aspect-ratio: 1 / 1;
    margin-right: 8px;
  }

  .option-text {
    font-size: 13px;
  }

  .option-result {
    font-size: 14px;
  }
}


/* Option Text Container */
.text-wrapper {
    display: flex;
    flex-direction: column; /* Ensures `option-result` is below `option-text` */
}

/* Main statement */
.option-text {
    font-size: 15px;
    font-weight: normal;
    color: var(--p-color);
}

/* Skin type result (New line below option-text) */
.option-result {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 4px;
    display: block; /* Forces it to appear on a new line */
}


.bottom-section {
    margin-top: 15px;
}

.buttons {
    display: flex;
    justify-content: space-between;
}

button {
    background-color: #5a4036;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

button:disabled {
    background-color: #bbb;
    cursor: not-allowed;
}

button:hover {
    background-color: #7a5a4e;
}


.tip-box {
  background-color: #fffaf5;
  border: 1px solid #e6ddd0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tip-toggle {
  background: none;
  border: none;
  color: var(--dark-color);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  gap: 8px;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.tip-toggle:hover,
.tip-toggle:focus {
  background-color: transparent !important;
  color: var(--dark-color);
}

.tip-toggle i {
  font-size: 18px;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-right: 4px;
}

.tip-content {
  margin-top: 10px;
  padding-left: 26px;
  font-size: 14px;
  color: var(--p-color);
  line-height: 1.7;
  display: none;
  border-left: 3px solid var(--highlight-color);
}



.custom-progress {
    width: 100%;
    position: relative;

}

.progress-track {
    background-color: #eee;
    border-radius: 10px;
    height: 10px;
    position: relative;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 10px;
    position: relative;
    transition: width 0.4s ease-in-out;
}

.progress-bubble {
    position: absolute;
    top: -32px;
    left: 100%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 1;
    transition: left 0.4s ease-in-out;
    z-index: 10;
}

.progress-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Progress bar spacing in mobile view */
@media (max-width: 768px) {
  .custom-progress {
    margin-top: 40px;
    margin-bottom: 10px;
    padding: 0 16px;
  }

  .progress-bubble {
    top: -38px;
    font-size: 12px;
    padding: 4px 8px;
  }
}


.toggle-input {
    display: none;
}

.toggle-label {
    background-color: var(--primary-color);
    border-radius: 20px;
    width: 60px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease-in-out;
}

.toggle-text {
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: color 0.3s ease-in-out;
}

.toggle-label::before {
    content: "";
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    left: 5px;
    transition: transform 0.3s ease-in-out;
}

.toggle-input:checked + .toggle-label::before {
    transform: translateX(28px);
}

.toggle-input:checked + .toggle-label {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label .toggle-text:first-child {
    color: white;
}

.toggle-input:checked + .toggle-label .toggle-text:last-child {
    color: var(--primary-color);
}


/* Revised Result Layout – Matching Question Design */

.result-container {
  background-color: transparent;
}

button,
.result-container button.btn {
  background-color: var(--dark-color);
  color: white;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
}

button:hover,
.result-container button.btn:hover {
  background-color: #6a574e;
}

.result-hero-img {
  border-radius: 10px;
  opacity: 0.9;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: auto;
  display: block;
  margin: auto 0;   
  object-fit: contain;
}

.result-container .lab-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.result-box {
  border-radius: 16px;
  background: #fffaf5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
}

.result-text-container {
  font-size: 16px;
  color: var(--p-color);
  line-height: 1.7;
}


.highlight-box {
  background: #f0e8dd;
  border-radius: 12px;
  padding: 16px;

}

.result-heading {
  font-size: 18px;
  font-weight: bold;
  color: var(--dark-color);
}

.result-subtext {
  font-size: 15px;
  margin-top: 6px;
}

.info-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 0px 0px 20px 20px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.03);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
}

.info-card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.soft-bg {
  margin-top: 15px;
  background-color: #f8f5f2;
}

.badge-label {
  font-size: 15px;
  font-weight: 600;
  color: #5c524a;
  background-color: #f0e8dd;
  border-radius: 999px;
  padding: 4px 12px;
  display: inline-block;
  text-transform: uppercase;
}

.info-card p {
  font-size: 15px;
  color: #333;
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
}


.soft-bg {
  background-color: #f8f4ef;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .info-card {
    padding: 16px 20px;
  }

  .info-card p {
    font-size: 15px;
  }

  .badge-label {
    font-size: 13px;
    padding: 3px 8px;
  }
}



.result-tips {
  background-color: #f6f1ea;
  border-left: 4px solid #d6c4b5;
  padding: 16px;
  border-radius: 10px;
}

.tips-header {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
}

.tips-list {
  padding-left: 18px;
  margin: 0;
}

.tips-list li {
  margin-bottom: 6px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .result-box {
    padding: 20px;
  }

  .lab-title {
    font-size: 20px;
  }

  .result-text-container {
    padding-top: 20px;
  }
}


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px; /* Adjust to your actual navbar height */
  z-index: 1000;
}

.navbar-spacer {
  height: 100px;
  transition: all 0.3s ease;
}

#home-page .navbar-spacer {
  display: none;
}


.container-nav {
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.language-switch {
  margin-left: auto;
}



/* Responsive override if mobile navbar is taller */
@media (max-width: 768px) {
  .navbar {
    height: 80px; /* simulate taller mobile navbar */
  }

  .navbar-spacer {
    height: 80px; /* match mobile navbar height */
  }

  .illustration {
  min-height: 240px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  justify-content: flex-end;
  align-items: center;
}

}



/* Home Page */

#home-page {
  padding-top: 100px;
}

#home-page h2 {
  font-size: 36px;
  color: var(--primary-color);
  font-family: var(--body-font-family);
  font-weight: bold;
}

#home-page p.lead {
  font-size: 22px;
  color: var(--p-color);
}

#home-page button.btn {
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 12px;
  background-color: #5a4036;
  color: white;
}

#home-page {
    padding-top: 100px;
}

.lab-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
}

.lab-subtitle {
    font-size: 20px;
    color: var(--p-color);
    font-weight: 500;
    margin-top: 10px;
}

.lab-description {
    font-size: 16px;
    color: var(--p-color);
    font-weight: 300;
    margin-top: 10px;
}

.home-image {
  border-radius: 10px;
  opacity: 0.9;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: auto;
  display: block;
  margin: auto 0;   
  object-fit: contain;
}




/* --- Premium Style Enhancements for DIY Workshop Vibe --- */

:root {
  --primary-color: #bba78c; /* muted beige-gold */
  --dark-color: #3a2e28;
  --p-color: #5c514a;
  --section-bg-color: #fdfaf5;
  --accent-color: #e8ddd0;
  --highlight-color: #e3cfc1;
}

body {
  background: linear-gradient(120deg, #fdfaf5, #f7f3ec);
}

/* Card style upgrades */
.article-card, .step-box, .mission-box {
  border-radius: 16px;
  background: #fffaf5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Enhanced typography for lab introduction */
.lab-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--dark-color);
  font-family: 'Karla', sans-serif;
}

.lab-subtitle {
  font-size: 22px;
  font-style: italic;
  color: var(--p-color);
  margin-top: 10px;
}

.lab-description {
  font-size: 17px;
  color: var(--p-color);
  line-height: 1.7;
  margin-top: 15px;
}

/* Premium button style */
button,
#home-page button.btn {
  background-color: var(--dark-color);
  color: white;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
}

button:hover,
#home-page button.btn:hover {
  background-color: #6a574e;
}

/* Soft progress bubble */
.progress-bubble {
  background-color: var(--highlight-color);
  color: var(--dark-color);
  font-weight: 500;
}

/* Image overlay mood filter */
.illustration::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 245, 230, 0.4);
  z-index: 1;
}

.title,
.subtitle {
  position: relative;
  z-index: 2;
}

/* Entry animation */
.fade-in {
  animation: fadeIn 1s ease-out both;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
