/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "gothic";
  src:
    local("gothic"),
    url("../assets/fonts/gothic.woff") format("woff");
}

html {
  scroll-behavior: auto;
}

body {
  font-family: "Inter", sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

p {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "gothic";
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  transition: background 0.3s;
}

.header img {
  /* max-width: 52%; */
  max-width: 70%;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-main {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1;
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2em;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.text-danger {
  color: #e94235;
}

.btn-search,
.btn-menu {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0.5rem;
  display: flex;
  align-items: end;
  justify-content: center;
  transition: opacity 0.3s;
}

.btn-search:hover,
.btn-menu:hover {
  opacity: 0.8;
}

.btn-menu {
  flex-direction: column;
  gap: 5px;
}

.btn-menu-line-1,
.btn-menu-line-2 {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s;
}

.btn-menu-line-3 {
  display: block;
  width: 18px;
  height: 2px;
  right: 0;
  background: #fff;
  transition: all 0.3s;
}

.btn-menu:hover .btn-menu-line-3 {
  width: 26px;
}

/* ===== FULLSCREEN SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s,
    visibility 0.4s;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  transition: opacity 0.3s;
}

.search-close:hover {
  opacity: 0.7;
}

.search-content {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 1.5rem 0;
  font-size: 2rem;
  font-family: inherit;
  color: #fff;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  outline: none;
  transition: border-color 0.3s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
  border-color: #fff;
}

.search-submit {
  align-self: flex-start;
  padding: 1rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #000;
  background: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s;
}

.search-submit:hover {
  opacity: 0.9;
}

/* ===== SIDE MENU (Slide from Right) ===== */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}

.side-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 1600;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.side-menu.active {
  transform: translateX(0);
}

.side-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 0.5rem;
  transition: opacity 0.3s;
}

.side-menu-close:hover {
  opacity: 0.7;
}

.side-menu-list {
  margin-top: 4rem;
}

.side-menu-list li {
  border-bottom: 1px solid #eee;
}

.side-menu-list a {
  display: block;
  padding: 1rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #333;
  transition:
    color 0.3s,
    padding-left 0.3s;
}

.side-menu-list a:hover {
  color: #666;
  padding-left: 0.5rem;
}

/* Side Menu Submenu - Projects Categories */
.side-menu-has-submenu {
  border-bottom: 1px solid #eee;
}

.side-menu-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition:
    color 0.3s,
    padding-left 0.3s;
}

.side-menu-trigger:hover {
  color: #666;
  padding-left: 0.5rem;
}

.side-menu-icon {
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform 0.3s;
}

.side-menu-trigger[aria-expanded="true"] .side-menu-icon {
  transform: rotate(45deg);
}

.side-menu-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.side-menu-submenu.is-open {
  max-height: 500px;
}

.side-menu-submenu li {
  border-bottom: none;
}

.side-menu-submenu a {
  padding: 0.75rem 0 0.75rem 1rem;
  font-size: 0.9rem;
  color: #666;
  border-left: 2px solid transparent;
}

.side-menu-submenu a:hover {
  color: #333;
  border-left-color: #333;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  /* box-shadow: rgba(0, 0, 0, 1) 0px -50px 36px -28px inset; */

}

.hero-slider {
  position: absolute;
  inset: 0;

}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
  /* background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent); */

}

.hero-slide-overlay {
  width: 100%;
  height: 100vh;
  background-image:
    linear-gradient(to top,
      rgba(0, 0, 0, 0.7) 0%,
      /* ดำล่างสุด */
      rgba(0, 0, 0, 0.4) 30%,
      rgba(0, 0, 0, 0.0) 60%
      /* เริ่มโปร่ง */
    );
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  width: 50%;
  text-align: center;
}

.hero-content-center {
  position: absolute;
  top: 45%;
  /* left: 50%; */
  /* transform: translateX(-50%); */
  text-align: center;
  z-index: 2;
  width: 100%;
}

.hero-content-center h1 {
  letter-spacing: 0.5em;
  font-weight: 300;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
  /* text-transform: uppercase; */
  margin-bottom: 0.5rem;
  /* text-shadow: 0 2px 20px rgba(0, 0, 0, 1); */
  line-height: 1.2
}

.hero-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* text-shadow: 0 2px 20px rgba(0, 0, 0, 1); */
}

.hero-indicators {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.hero-chevron-down-wrap {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.indicator {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  /* text-shadow: 0 2px 20px rgba(0, 0, 0, 1); */
}

.indicator.active {
  background: #fff;
  border-color: #fff;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.5);
}

.hero-chevron-down {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  z-index: 2;
  transition:
    color 0.3s,
    transform 0.3s;
}

.hero-chevron-down:hover {
  color: #fff;
  transform: translateX(-50%) translateY(4px);
}

.hero-chevron-down i {
  animation: chevron-bounce 2s ease-in-out infinite;
}

.d-none {
  display: none !important;
}



@keyframes chevron-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ===== PROJECT GRID ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* gap: 2rem; */
  /* padding: 2rem; */
}

.project-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover img {
  transform: scale(1.05);
  filter: grayscale(90%);
}

.project-overlay {
  position: absolute;
  inset: 0;
  /* background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%); */
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  /* justify-content: flex-end; */
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s;
  justify-content: center;
  text-align: center;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-arrow-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: #fff;
}

.project-overlay-arrow-icon::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}

.see-all-projects {
  grid-column: 2 / -2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.see-all-projects a {
  border: 1px solid #5a5a5a;
  padding: 1rem 2rem;
  transition: all 0.3s;
}

.see-all-projects-link {
  display: inline-flex;
  align-items: center;
  /* จัดให้อยู่กึ่งกลางแนวตั้ง */
  gap: 6px;
  /* ระยะห่างข้อความกับรูป */
  text-decoration: none;
}

.see-all-projects a:hover {
  background: #5a5a5a;
  color: #fff;
}

.project-overlay h3 {
  font-size: 1.85rem;
  font-weight: 300;
  /* font-style: italic; */
  color: #fff;
  /* letter-spacing: 0.05em; */
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.project-overlay p {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-overlay-arrow {
  font-size: 1.2rem;
  color: #fff;
  margin-top: 1rem;
}

.scroll-hint {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: #999;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 500px;
  padding: 6rem 12rem;
}

.experience-image {
  overflow: hidden;
}

.experience-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}

.experience-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
}

.experience-content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.experience-content p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.link-more {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #333;
  display: inline-flex;
  align-items: center;
  transition:
    margin-left 0.3s,
    transform 0.3s;
  -webkit-transition:
    margin-left 0.3s,
    transform 0.3s;
  -moz-transition:
    margin-left 0.3s,
    transform 0.3s;
  -ms-transition:
    margin-left 0.3s,
    transform 0.3s;
  -o-transition:
    margin-left 0.3s,
    transform 0.3s;
}

.link-more:hover {
  margin-left: 0.5rem;
}

/* ===== QUOTE SECTION ===== */
.quote-section {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14rem 20rem;
}

.quote-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* filter: grayscale(100%) brightness(0.6); */
  /* -webkit-filter: grayscale(100%) brightness(0.6); */
}

.quote-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
}

.quote-content blockquote {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.quote-content cite {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  font-weight: 800;
}

/* ===== FOOTER ===== */
.footer {
  background: #000;
  color: #fff;
  padding: 4rem 16rem 2rem;
}

.footer-copyright {
  background: #fff;
  color: #111;
  padding: 2rem 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

/* SITEMAP column - header darker gray */
.footer-col:first-child h4 {
  color: rgba(255, 255, 255, 0.4);
}

.footer-sitemap-cols {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
}

.footer-col ul li {
  margin-bottom: 0.3rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
}

/* Footer Accordion - Projects Categories */
.footer-accordion {
  position: relative;
  margin-top: 2.2rem;
}

.footer-accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  /* color: inherit; */
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  text-align: left;
}

.footer-accordion-trigger span {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
}

.footer-accordion-trigger .accordion-icon {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s;
}

.footer-accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}

.footer-submenu {
  padding-left: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease,
    margin-top 0.3s ease;
}

.footer-submenu {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
}

.footer-accordion .footer-submenu.is-open {
  max-height: 500px;
  margin-top: 0.7rem;
  opacity: 1;
  visibility: visible;
}

.footer-submenu li {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  position: relative;
  padding-left: 2.25rem;
}

.footer-submenu li::before {
  content: url("../assets/images/dot.png");
  /* color: rgba(255, 255, 255, 0.6); */
  /* font-size: 1rem; */
  /* flex-shrink: 0; */
  /* line-height: 1; */
  position: absolute;
  left: 1rem;
  top: 2px;
  transform: scale(0.15);
  transform-origin: left top;
}

.footer-submenu a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.footer-submenu a:hover {
  color: #fff;
}

.footer-col a,
.footer-col p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col p {
  margin-bottom: 0.5rem;
}

.footer-social {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border: 1px solid rgba(255, 255, 255, 0.3); */
  color: #fff;
  font-size: 1.8rem;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.social-icons a:hover {
  /* background: #fff; */
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s;
  /* border-color: #fff; */
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

.footer-copyright-bottom {
  text-align: center;
}

/* .has-pc-image{
  display: block;
}

.has-mobile-image{
  display: none;
} */


.hero-slide {
  background-image: var(--bg-pc);
  background-size: cover;
  background-position: center;
}

/* mobile */
@media (max-width: 768px) {
  .hero-slide {
    background-image: var(--bg-mobile);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .project-overlay {
    text-align: start;
    justify-content: end;
    opacity: 1;
    background: rgba(0, 0, 0, 0);
    padding: 1.5rem 1.5rem 2rem 1.5rem;
  }

  .project-overlay .project-overlay-arrow-icon {
    display: none;
  }

  .experience-section {
    grid-template-columns: 1fr;
  }

  .experience-image {
    min-height: 300px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    padding: 4rem 4rem 2rem;
  }

  .quote-section {
    padding: 6rem 2rem;
  }

  .experience-section {
    padding: 6rem 2rem;
  }
}

@media (max-width: 992px) {
  .hero-slide-overlay {
    height: 150vh !important;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    /* gap: 1rem; */
    padding: 0;
  }

  .experience-content {
    padding: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .search-input {
    font-size: 1.5rem;
  }

  .footer {
    padding: 2rem 2rem 2rem;
  }

  .quote-section {
    padding: 6rem 2rem;
  }

  .experience-section {
    padding: 6rem 2rem;
  }

  .see-all-projects {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .project-card {
    /* aspect-ratio: auto; */
    overflow: visible;
    /* padding-bottom: 1.25rem; */
    /* กันข้อความยาวชนขอบล่าง */
    /* margin: 0 0 4.2rem 0; */
  }

  .project-detail-mobile {
    display: block;
    padding: 0.75rem 1rem 1.5rem;
    margin: 0;
    background: #fff;
  }

  .project-detail-mobile h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.15rem;
    line-height: 1.3;
  }

  .project-detail-mobile p {
    font-size: 0.75rem;
    font-weight: normal;
    color: #777;
    letter-spacing: 0.08em;
    font-family: "Inter", sans-serif;
    text-transform: uppercase;
  }
}

@media (min-width: 769px) {
  .project-detail-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  .side-menu {
    width: 100%;
  }

  .footer {
    padding: 4rem 1rem 1rem;
  }

  .quote-section {
    padding: 0;
  }

  .experience-section {
    padding: 0;
  }

  .footer-accordion {
    margin-top: 0.2rem;
  }

  .footer-sitemap-cols {
    grid-template-columns: 1fr;
  }

  .header img {
    max-width: 80%;
  }

  /* ใช้สไตล์เดียวกับ max-width: 768px แต่อย่าทับค่า */
  .project-overlay {
    text-align: start;
    justify-content: end;
    opacity: 1;
    background: rgba(0, 0, 0, 0);
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    /* display: none; */
  }

  .project-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
  }

  .project-overlay .project-overlay-arrow {
    display: none;
  }

  .hero-content {
    width: 90%;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  /* .has-pc-image{
    display: none;
  }

  .has-mobile-image{
    display: block;
  } */


}