/*!
Theme Name: Spark Factor 2026
Theme URI: https://github.com/nutstick/spark-factor
Author: Nuttapat Kirawittaya
Author URI: https://github.com/nutstick
Description: Spark factor TH default theme
Version: 1.1.3
Tested up to: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: UNLICENSED
Text Domain: spark-factor-wordpress
*/

:root {
  --wp--preset--font-size--h1: 28px;
  --wp--preset--font-size--h2: 36px;
  --wp--preset--font-size--h3: 30px;
  --wp--preset--font-size--h4: 26px;
  --wp--preset--font-size--h5: 21px;
  --wp--preset--font-size--h6: 16px;
  --wp--preset--font-size--p: 16px;
  --navigator-height: 60px;
}

@media (min-width:768px) {
  :root {
    --wp--preset--font-size--h1: 64px;
    --wp--preset--font-size--h2: 48px;
    --wp--preset--font-size--h3: 36px;
    --wp--preset--font-size--h4: 30px;
    --wp--preset--font-size--h5: 26px;
    --wp--preset--font-size--h6: 26px;
    --wp--preset--font-size--p: 16px;
    --navigator-height: 140px;
  }
}

.has-bg-color {
  background-color: #ecf3ff;
}

.has-text-header {
  font-family: var(--wp--preset--font-family--header);
}

body {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--p);
  line-height: var(--wp--custom--line-height--body);
}

button,
input,
select,
textarea,
.wp-block-button__link {
  font-family: var(--wp--preset--font-family--body);
}

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 65px 8px 50px;
}

.content,
.site-footer,
.wp-block-post-content {
  -webkit-margin-before: unset!important;
  margin-block-start: unset!important;
}

.wp-block-post-terms {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0;
}

.wp-block-post-terms>.wp-block-post-terms__separator {
  width: 30px;
}

.wp-block-post-terms>a {
  align-items: center;
  background-color: var(--wp--preset--color--primary)!important;
  border-radius: 100px;
  color: var(--wp--preset--color--white)!important;
  display: flex;
  font-size: 20px;
  height: 40px;
  justify-content: center;
  margin: 0 0 12px;
  overflow: hidden;
  padding: 0 20px;
  text-align: center;
  text-decoration: none!important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-block-post-author.spark-factor-post--post-author>.wp-block-post-author__avatar {
  border-radius: 50%;
  height: 100px;
  overflow: hidden;
  width: 100px;
}

.wp-block-post-author.spark-factor-post--post-author>.wp-block-post-author__avatar>img {
  height: 100%!important;
  width: 100%!important;
}

.wp-block-post-author.spark-factor-post--post-author>.wp-block-post-author__content {
  display: flex;
  flex-direction: column;
  font-family: var(--wp--preset--font-family--body);
  font-size: 24px;
  justify-content: center;
  line-height: 75%;
}

.wp-block-post-author.spark-factor-post--post-author>.wp-block-post-author__content>.wp-block-post-author__name>a {
  text-decoration: none;
}

.wp-block-post-author.spark-factor-post--post-author>.wp-block-post-author__content>.wp-block-post-author__name:before {
  content: "Author";
  display: block;
  font-weight: 700;
}

.spark-factor-related-post {
  width: calc(100% - 16px);
}
.footer {
  padding: 50px 20px 20px;
}

.footer,
footer {
  -webkit-margin-before: unset!important;
  margin-block-start: unset!important;
}

.footer p {
  -webkit-margin-before: 8px!important;
  line-height: 16px;
  margin-block-start: 8px!important;
  margin: 0;
}

.footer-container {
  max-width: 100%;
}

@media (min-width:640px) {
  .footer-container {
    max-width: 640px;
  }
}

@media (min-width:768px) {
  .footer-container {
    max-width: 768px;
  }
}

@media (min-width:1024px) {
  .footer-container {
    max-width: 1280px;
  }
}

@media (min-width:1280px) {
  .footer-container {
    max-width: 1360px;
  }
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(1,minmax(0,1fr));
  gap: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 1080px;
}

@media (min-width:1024px) {
  .footer {
    padding-bottom: 30px;
    padding-top: 30px;
  }

  .footer-container {
    align-items: start;
    grid-template-columns: minmax(200px, 240px) minmax(300px, 1fr) minmax(220px, 260px);
  }

  .footer-container>div {
    padding: 20px;
  }
}

.footer-main-section {
  display: block;
  font-size: 14px;
  line-height: 21px;
}

.footer-main-section>.wp-block-image {
  margin-bottom: 30px;
}

.footer-main-section .footer-nav {
  margin-top: 0;
}

.footer-main-section .wp-block-navigation-item {
  font-size: 14px;
  line-height: 1.3;
  list-style: none;
  text-transform: uppercase;
}

.footer-main-section .wp-block-navigation-item__content {
  color: inherit;
  padding: 0;
}

.footer-main-section .wp-block-navigation__container {
  align-items: flex-start;
  gap: 8px;
}

.footer-contact-col,
.footer-social-col {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 1rem;
  line-height: 21px;
}

.footer-contact-col>h6,
.footer-social-col>h6 {
  font-size: 16px;
  line-height: 21px;
  margin: 0;
}

.footer-contact-info {
  color: #fff;
  display: flex;
  flex-direction: row;
  gap: 1rem!important;
  margin: 0;
}

.footer-contact-info img {
  height: 2.25rem!important;
  max-width: unset!important;
  width: 2.25rem!important;
}

.footer-social-buttons {
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.footer-social-buttons .wp-block-button {
  width: 100%;
}

.footer-social-buttons .wp-block-button__link {
  border-radius: 999px;
  color: #fff;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  justify-content: center;
  min-width: 0;
  padding: 0.9rem 1rem 0.9rem 3.5rem;
  text-align: center;
  position: relative;
  width: 100%;
}

.footer-social-buttons .wp-block-button__link:before {
  height: 100%;
  width: 2.8rem;
}

.footer-social-buttons .wp-block-button.facebook .wp-block-button__link {
  background: #3b5995;
}

.footer-social-buttons .wp-block-button.facebook .wp-block-button__link:before {
  aspect-ratio: 1 / 1;
  background-image: url("/wp-content/themes/spark-factor-2026/assets/images/fb.svg");
  background-size: 100% 100%;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
}

.footer-social-buttons .wp-block-button.line .wp-block-button__link {
  background: #4cab50;
}

.footer-social-buttons .wp-block-button.line .wp-block-button__link:before {
  aspect-ratio: 1 / 1;
  background-image: url("/wp-content/themes/spark-factor-2026/assets/images/line.svg");
  background-size: 100% 100%;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
}

.footer-social-buttons .wp-block-button.instagram .wp-block-button__link {
  background: linear-gradient(90deg,#fae011,#fa2180 50%,#8c00d8);
}

.footer-social-buttons .wp-block-button.instagram .wp-block-button__link:before {
  aspect-ratio: 1 / 1;
  background-image: url("/wp-content/themes/spark-factor-2026/assets/images/instagram.svg");
  background-size: 100% 100%;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
}

@media (max-width:1023px) {
  .footer-container>div {
    padding: 0 20px;
  }
}

footer+div {
  display: none;
}
/* overflow: clip allows sticky header to work (unlike overflow: hidden) */
.wp-site-blocks {
  overflow-x: clip;
  position: relative;
}

/* ── Sticky header ─────────────────────────────────────────── */
header.wp-block-template-part {
  margin-bottom: 0 !important;
  position: sticky;
  top: 0;
  z-index: 9999;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

header.wp-block-template-part + * {
  margin-block-start: 0 !important;
}

main.spark-page {
  margin-top: 0 !important;
}

/* Fix hero image z-index so it never overlaps the sticky nav */
.intro .wp-block-image img,
.intro .wp-block-image {
  z-index: 0;
}

/* ── Active nav link ───────────────────────────────────────── */
.navigation-item__content[aria-current="page"] {
  background-color: var(--wp--preset--color--primary);
  color: #fff;
}

@media (min-width:640px) {
  .site-header {
    max-width: 640px;
  }
}

@media (min-width:768px) {
  .site-header {
    height: 140px;
    justify-content: start;
    margin-left: auto;
    margin-right: auto;
    max-width: 768px;
  }
}

@media (min-width:1024px) {
  .site-header {
    max-width: 1280px;
  }
}

@media (min-width:1280px) {
  .site-header {
    max-width: 1360px;
  }
}

.navigation {
  align-items: center;
  display: flex;
  flex-direction: row;
  height: 60px;
  justify-content: space-between;
}

@media (min-width:768px) {
  .navigation {
    gap: 30px;
    height: 140px;
    justify-content: start;
  }
}

.site-logo {
  padding: 0 20px;
}

.site-logo>.logo {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.site-logo>.logo>.logo-icon {
  height: 30px;
}

.site-logo>.logo>.logo-text {
  height: 20px;
}

@media (min-width:768px) {
  .site-logo>.logo {
    flex-direction: column;
  }

  .site-logo>.logo>.logo-icon {
    height: 40px;
  }

  .site-logo>.logo>.logo-text {
    height: auto;
    width: 70px;
  }
}

.navigation-menu {
  background: none;
  border: none;
  height: 60px;
  width: 60px;
}

@media (min-width:768px) {
  .navigation-menu {
    display: none;
  }
}

.navigation-modal {
  background-color: var(--wp--preset--color--white)!important;
  bottom: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100000;
}

.navigation-modal.open {
  display: flex;
}

@media (min-width:768px) {
  .navigation-modal {
    display: flex;
    flex-direction: row;
    inset: unset;
    position: relative;
    z-index: 0;
  }
}

.navigation-modal>.close {
  background: none;
  border: none;
  height: 32px;
  padding: 0;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 32px;
}

@media (min-width:768px) {
  .navigation-modal>.close {
    display: none;
  }
}

.menu-content {
  display: flex;
  flex-direction: column;
  padding: 0;
}

@media (min-width:768px) {
  .menu-content {
    display: flex;
    flex-direction: row;
  }
}

.navigation-item {
  align-items: center;
  display: flex;
  height: 90px;
  justify-content: center;
  list-style-type: none;
}

@media (min-width:768px) {
  .navigation-item {
    height: auto;
  }
}

.navigation-item__content {
  align-items: center;
  border-radius: 20px;
  display: flex;
  flex-direction: row;
  font-family: var(--wp--preset--font-family--header);
  font-size: 18px;
  font-weight: 500;
  height: 40px;
  line-height: 1;
  justify-content: center;
  padding-left: 21px;
  padding-right: 21px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.navigation-item__label {
  display: block;
  line-height: 1;
}

.navigation-item__content:hover {
  background-color: var(--wp--preset--color--primary);
  color: #fff;
}

@media (min-width:768px) {
  .item__content-item {
    font-size: 18px;
  }
}

.search {
  display: none;
}

.wp-block-search {
  align-items: center;
  display: flex;
  height: 90px;
}

.wp-block-search__inside-wrapper {
  background-color: #d9d9d9;
  border: none!important;
  border-radius: 20px;
  display: flex;
  flex: auto;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  height: 32px;
  max-width: 100%;
  overflow: hidden;
}

.wp-block-search__inside-wrapper .wp-block-search__input {
  background-color: transparent;
  color: #000;
  line-height: 24px;
  text-transform: uppercase;
}

.wp-block-search__inside-wrapper .wp-block-search__button.has-icon {
  background-color: transparent!important;
  border: none!important;
  color: #8f9194;
  cursor: pointer;
  margin-left: 0!important;
  padding: 0!important;
}
