:root {
  --gold: #d4af37;
  --overlay1: rgba(0,0,0,0.3);
  --overlay2: rgba(0,0,0,0.75);
}

.hero-v2{position:relative;height:70vh;min-height:460px;color:#fff;overflow:hidden;isolation:isolate;}
.hero-v2__bg{position:absolute;inset:0;background:radial-gradient(80% 90% at 70% 20%,rgba(212,175,55,.18),transparent 60%),linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.55))
,url('../img/bg/modern-villa-with-swimming-pool-blue-sky.jpg') center/cover no-repeat;transform:scale(1.04);filter:saturate(105%) contrast(102%);z-index:-1;}
.hero-v2__inner{position:absolute;left:clamp(20px,6vw,80px);bottom:clamp(96px,18vh,140px);max-width:min(680px,82vw);}.hero-v2__eyebrow{display:inline-flex;gap:12px;align-items:center;font-weight:700;letter-spacing:.18em;font-size:.85rem;color:var(--gold);text-transform:uppercase;}
.hero-v2__eyebrow::before{content:"";width:44px;height:2px;background:var(--gold);border-radius:2px;}
.hero-v2__title{margin:.4rem 0 .25rem;font-size:clamp(32px,6vw,64px);line-height:1.12;font-weight:800;background:linear-gradient(90deg,#fff,#fff,var(--gold));-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 18px rgba(212,175,55,.35);}
.hero-v2__title span{opacity:.9;font-weight:700;}.hero-v2__desc{margin-top:.4rem;font-size:clamp(14px,2.2vw,18px);color:#e5e7eb;opacity:.9;}


.projects-wrap {
  padding: clamp(40px, 6vw, 80px) 20px;
  background: #f9f9f9;
}

.projects-container {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (min-width: 1200px) {
  .projects-container {
    grid-template-columns: repeat(3, 1fr); 
  }
}

.projects-wrap {
  padding: clamp(40px, 6vw, 80px) 20px;
  background: #f9f9f9;
}

.projects-container {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (min-width: 1200px) {
  .projects-container {
    grid-template-columns: repeat(3, 1fr); 
  }
}

/* การ์ด */
.projects-wrap {
  padding: clamp(60px, 7vw, 100px) 20px;
  background: #f9f9f9;
  text-align: center;
}

.projects-header {
  max-width: 700px;
  margin: 0 auto 50px;
}
.projects-eyebrow {
  margin: 0 0 8px;
  font-size: .9rem;
  letter-spacing: .2em;
  font-weight: 700;
  color: #caa86a;
  text-transform: uppercase;
}
.projects-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: #0f172a;
}
.projects-sub {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #6b7280;
}

/* Grid responsive */
.projects-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto 40px;
}
@media (min-width: 768px) {
  .projects-container { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .projects-container { grid-template-columns: repeat(3, 1fr); }
}

.projects-wrap {
  padding: clamp(60px, 7vw, 100px) 20px;
  background: #f9f9f9;
  text-align: center;
}

.projects-header {
  max-width: 700px; margin: 0 auto 50px;
}
.projects-eyebrow {
  margin: 0 0 8px; font-size: .9rem; letter-spacing: .2em;
  font-weight: 700; color: #caa86a; text-transform: uppercase;
}
.projects-title {
  margin: 0 0 14px; font-size: clamp(28px, 5vw, 42px);
  font-weight: 800; color: #0f172a;
}
.projects-sub {
  margin: 0; font-size: 1rem; line-height: 1.7; color: #6b7280;
}

/* Grid responsive */
.projects-container {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  max-width: 1440px; margin: 0 auto 40px;
}
@media (min-width: 768px){ .projects-container{ grid-template-columns: repeat(2,1fr);} }
@media (min-width:1200px){ .projects-container{ grid-template-columns: repeat(3,1fr);} }

/* Card */
.project-card{
  display:flex; flex-direction:column; border-radius:14px; overflow:hidden;
  background:#fff; border:1px solid rgba(0,0,0,.08);
  text-decoration:none; color:inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position:relative;
}
@media (hover:hover){
  .project-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
    border-color: rgba(0,0,0,.12);
  }
}

.project-media{ aspect-ratio:16/10; overflow:hidden; }
.project-media img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .3s ease;
}
@media (hover:hover){
  .project-card:hover .project-media img{ transform:scale(1.06); filter:brightness(1.05) contrast(1.05); }
}

.project-card::after{
  content:""; position:absolute; inset:-40%;
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%,
    rgba(255,255,255,.22) 45%, rgba(255,255,255,0) 60%);
  transform: translateX(-120%) rotate(8deg);
  transition: transform .8s ease; pointer-events:none;
}
@media (hover:hover){
  .project-card:hover::after{ transform: translateX(35%) rotate(8deg); }
}

.project-meta{ padding:16px 18px 20px; text-align:left; }
.project-title{ margin:0; font-size:1.1rem; font-weight:700; color:#0f172a; }
.project-location{ margin:4px 0 0; font-size:.95rem; color:#caa86a; font-weight:600; }

.projects-footer{ text-align:center; }
.projects-btn{
  display:inline-block; padding:14px 32px; border-radius:999px; font-weight:700;
  text-decoration:none; font-size:1rem; background:linear-gradient(90deg,#caa86a,#b28a56);
  color:#fff; box-shadow:0 8px 20px rgba(202,168,106,.4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.projects-btn:hover{ transform:translateY(-3px); box-shadow:0 10px 24px rgba(202,168,106,.55); }

.reveal-up{
  opacity:0; transform: translateY(40px);
}
.reveal-up.is-in{
  opacity:1; transform: translateY(0);
  transition: opacity var(--rev-dur, .9s) ease, transform var(--rev-dur, .9s) ease;
  transition-delay: var(--rev-delay, 0ms);
}

@media (prefers-reduced-motion: reduce){
  .project-card, .project-media img, .project-card::after{ transition:none !important; }
  .reveal-up{ opacity:1 !important; transform:none !important; }
}


/* YT*/
.yt-reviews {
  background: linear-gradient(160deg, #0b0b0b, #1c1c1c 60%, #0f0f0f);
  position: relative;
  color: #fff;
}
.yt-reviews::after {
  content:""; position:absolute; inset:0;
  background: radial-gradient(circle at 50% 50%, rgba(180,180,180,0.25), transparent 70%);
  mix-blend-mode: screen;
}

.yt-reviews > * {
  position: relative;
  z-index: 1;
}

.yt-reviews__head{ max-width:1100px; margin:0 auto 16px; text-align:center;  }
.yt-reviews h2{ margin:0 0 6px; font:700 clamp(22px,2.8vw,36px)/1.2 Inter,system-ui; }
.yt-reviews__sub{ margin:0; opacity:.85; }

.yt-stage {
  position: relative;
  max-width: min(1200px, 96vw);
  margin: 18px auto 0;
  padding: 32px 0;         
  overflow: hidden;
}

.yt-rail{
  display:flex; align-items:stretch; gap:18px;
  padding:8px 4px;
  overflow-x:auto; overflow-y:hidden;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
  cursor:grab;
}
.yt-rail:active{ cursor:grabbing; }

.yt-card {
  position: relative;
  flex: 0 0 82%;             
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), 
              opacity .3s ease, 
              filter .3s ease;
  scroll-snap-align: center;
}
.yt-card[aria-selected="true"] {
  opacity: 1;
  filter: none;
  transform: scale(1);
  z-index: 2;           
}
.yt-card[aria-selected="false"] {
  opacity: .5;
  filter: saturate(.85) contrast(.9);
  transform: scale(.9);
  z-index: 1;
}
.yt-card[aria-selected="false"]{ opacity:.55; filter:saturate(.85) contrast(.95); transform:scale(.92); }
.yt-card[aria-selected="true"]{  opacity:1;   transform:scale(1); }
.yt-poster, .yt-frame{ position:absolute; inset:0; width:100%; height:100%; }
.yt-poster{ display:grid; place-items:center; background:transparent; } 
.yt-poster img{ width:100%; height:100%; object-fit:cover; display:block; }
.yt-frame iframe{ width:100%; height:100%; border:0; display:block; }


.yt-overlay{
  position:absolute; inset:0; display:grid; place-items:center;
  background:linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,.12));
  opacity:.85; transition:opacity .25s ease;
}
.yt-card:hover .yt-overlay{ opacity:.65; }
.yt-play{
  width:72px; height:72px; border-radius:50%;
  background:#fff; display:grid; place-items:center;
  box-shadow:0 12px 28px rgba(255,255,255,.18);
}
.yt-play::before{
  content:""; display:block; border-style:solid;
  border-width:10px 0 10px 18px; border-color:transparent transparent transparent #111;
  margin-left:4px;
}
.yt-cap{
  position:absolute; left:0; right:0; bottom:0;
  padding:12px 16px; color:#fff; z-index:1;
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.72));
  font-weight:600; letter-spacing:.02em;
}

.yt-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(0,0,0,.35);       
  color:#fff; font-size:26px;
  backdrop-filter: blur(4px); z-index:5;
  transition: background .25s ease, transform .1s ease, box-shadow .25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.yt-nav:hover{  background:rgba(0,0,0,.55); box-shadow:0 10px 26px rgba(0,0,0,.35); }
.yt-nav:active{ transform:translateY(-50%) scale(.96); }
.yt-nav--prev{ left:6px; }
.yt-nav--next{ right:6px; }

.yt-fade{ display:none !important; }

@keyframes goldGlow {
  0%,100% {
    box-shadow: 0 0 0 rgba(212,175,55,0), 0 0 0 rgba(212,175,55,0);
  }
  50% {
    box-shadow: 0 0 12px rgba(212,175,55,.35), 0 0 22px rgba(212,175,55,.25);
  }
}
.yt-reviews__cta{ margin-top:22px; text-align:center; }
.yt-btn{
  position:relative;
  display:inline-block;
  padding:12px 28px;
  border-radius:999px;
  background: linear-gradient(135deg, #FFD700, #B8860B); 
  color:#111;
  text-decoration:none;
  font-weight:800;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  animation: goldGlow 4s ease-in-out infinite; 
  overflow:hidden;
}

.yt-btn::after{ 
  content:""; 
  position:absolute; 
  inset:-2px; 
  border-radius:999px;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,.25) 0%,   
    rgba(255,255,255,0) 60%
  );
  transform: translateX(-140%);
  transition: transform 1.2s ease;
  pointer-events:none;
  mix-blend-mode:screen;
}

.yt-btn:hover{
  background: linear-gradient(135deg, #FFD700, #DAA520);
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(212,175,55,.45);
  filter:saturate(1.05);
}

.yt-btn:hover::after{ 
  transform: translateX(140%); } 

/* ===== Responsive ===== */
@media (max-width:900px){
  .yt-stage{ padding:28px 48px; }
  .yt-card{ flex-basis:86vw; }
}
@media (max-width:600px){
  .yt-stage{ padding:20px 42px; }
  .yt-nav{ width:42px; height:42px; font-size:22px; }
  .yt-card{ border-radius:16px; }
}

:root{
  --sec1-bg:#f7f7f9;   
  --sec2-bg:#141111;   
}

.projects-wrap{
  position: relative;
  background: var(--sec1-bg);
  z-index:1;
  isolation:isolate;
  padding-bottom: clamp(60px,7vw,100px);
}

.projects-wrap::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-1px;
  height:110px;               
  background: var(--sec2-bg);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'><path fill='black' d='M0,64 C360,160 1080,0 1440,96 V160 H0 Z'></path></svg>") no-repeat center / cover;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'><path fill='black' d='M0,64 C360,160 1080,0 1440,96 V160 H0 Z'></path></svg>") no-repeat center / cover;
  z-index:-1;
}


/* เสริม */
.yt-reviews{
  position: relative;
  background: var(--sec2-bg);
  padding-top: clamp(80px,10vw,140px); 
}

.yt-reviews{
  padding-bottom: clamp(40px, 7vw, 88px);
}

.yt-reviews__cta{
  margin-top: clamp(18px, 3vw, 30px);

  display: flex;
  justify-content: center;
  max-width: min(1200px, 96vw);
  margin-left: auto;
  margin-right: auto;
}

.yt-btn{
  margin-bottom: clamp(8px, 2vw, 16px);
}
@media (max-width: 480px){
  .yt-reviews{
    padding-bottom: clamp(56px, 12vw, 96px);
  }
  .yt-reviews__cta{
    margin-top: clamp(16px, 4vw, 26px);
  }
}


#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  display: none;
  background: #3f3f3f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s;
  z-index: 999;
}
#backToTop:hover {
  background: #555;
}

/* =====================================================
   PROJECTS — show/hide & reveal animation
   ===================================================== */
.project-hidden {
  display: none !important;
}
.project-reveal {
  animation: projFadeUp .45s ease both;
}
@keyframes projFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   VIDEO CAROUSEL — featured / rotating design
   ===================================================== */

/* Stage wrapper — no overflow (clipping on inner .yt-overflow) */
.yt-stage {
  position: relative;
  max-width: 1080px;
  margin: 28px auto 0;
  padding: 0;
  overflow: visible;
}

/* Clipping container */
.yt-overflow {
  overflow: hidden;
  position: relative;
  border-radius: 6px;
}

/* Track — the moving strip */
.yt-track {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.72s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

/* ── Slides ── */
.yt-slide {
  flex: 0 0 76%;
  flex-shrink: 0;
  transition: transform 0.72s ease, opacity 0.72s ease, filter 0.72s ease;
}
.yt-slide.is-active {
  transform: scale(1)   !important;
  opacity:   1          !important;
  filter:    none       !important;
}
.yt-slide:not(.is-active) {
  transform: scale(0.87);
  opacity:   0.48;
  filter:    saturate(0.6) brightness(0.85);
  pointer-events: none;
}

/* ── Card (visual box) ── */
.yt-card {
  /* reset old flex child behavior */
  flex: none;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  box-shadow: 0 14px 45px rgba(0,0,0,.45);
  transition: box-shadow 0.55s ease;
  /* cancel old aria-selected states */
  opacity: 1 !important;
  filter: none !important;
}
.yt-slide.is-active .yt-card {
  box-shadow: 0 28px 80px rgba(0,0,0,.70),
              0 0 0 1.5px rgba(212,175,55,.35);
}

/* ── Thumbnail ── */
.yt-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.yt-slide.is-active .yt-card:hover .yt-thumb {
  transform: scale(1.04);
}

/* ── Overlay & play button ── */
.yt-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(0deg, rgba(0,0,0,.42), rgba(0,0,0,.08));
  opacity: 0.88;
  transition: opacity .25s ease;
}
.yt-card:hover .yt-overlay { opacity: 0.68; }

.yt-play {
  width: 82px; height: 82px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  display: grid; place-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.yt-card:hover .yt-play {
  transform: scale(1.13);
  box-shadow: 0 14px 44px rgba(0,0,0,.55);
}
.yt-play::before {
  content: "";
  border-style: solid;
  border-width: 13px 0 13px 23px;
  border-color: transparent transparent transparent #111;
  margin-left: 5px;
}

/* ── Caption ── */
.yt-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 22px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  z-index: 1;
}

/* ── Inline iframe player (replaces thumbnail on click) ── */
.yt-card-frame {
  position: absolute; inset: 0;
  display: none;
}
.yt-card-frame.playing { display: block; }
.yt-card-frame iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* ── Arrow nav buttons ── */
.yt-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.48);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s ease, border-color .2s ease;
  user-select: none;
}
.yt-arrow:hover {
  background: rgba(0,0,0,.68);
  border-color: rgba(255,255,255,.5);
}
.yt-arrow:active { transform: translateY(-50%) scale(.93); }
.yt-arrow--prev { left:  6px; }
.yt-arrow--next { right: 6px; }

/* ── Dot indicators ── */
.yt-dots {
  display: flex; gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.yt-dot {
  height: 10px; width: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.28);
  cursor: pointer;
  padding: 0;
  transition: background .35s ease, transform .35s ease, width .35s ease;
}
.yt-dot.is-active {
  background: #d4af37;
  width: 28px;
  transform: none;
}

/* ── Loading placeholder ── */
.yt-loading {
  padding: 56px 24px;
  color: rgba(255,255,255,.45);
  font-size: 1rem;
  text-align: center;
  width: 100%;
}

/* ── Head padding ── */
.yt-reviews__head {
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .yt-slide { flex: 0 0 84%; }
  .yt-play  { width: 66px; height: 66px; }
  .yt-play::before { border-width: 10px 0 10px 18px; }
  .yt-arrow { width: 44px; height: 44px; font-size: 20px; }
}
@media (max-width: 480px) {
  .yt-slide { flex: 0 0 92%; }
  .yt-slide:not(.is-active) { transform: scale(0.93); }
  .yt-arrow { width: 38px; height: 38px; font-size: 17px; }
  .yt-cap   { font-size: .92rem; padding: 12px 14px; }
  .yt-play  { width: 56px; height: 56px; }
  .yt-play::before { border-width: 9px 0 9px 16px; }
}