/* ======================================================
   GLOBAL
====================================================== */

.ser-cuz-hero,
.ser-cuz-intro,
.ser-cuz-feature,
.ser-cuz-dark,
.ser-cuz-factory,
.ser-cuz-core,
.ser-cuz-story {
  padding: clamp(72px, 8vw, 140px) 0;
}

.ser-cuz-chip,
.ser-cuz-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #0b2a55;
  margin-bottom: 16px;
}

.ser-cuz-btn {
  margin-top: 24px;
  padding: 14px 32px;
  border-radius: 999px;
  background: #0b2a55;
  color: #fff;
  border: none;
  cursor: pointer;
}

.ser-cuz-link {
  display: inline-block;
  margin-top: 24px;
  color: #0b2a55;
  cursor: pointer;
}

/* ======================================================
   HERO IMAGE CARDS (WITH REAL IMAGES)
====================================================== */

.ser-cuz-hero-grid {
  max-width: 680px;
}

/* ============= */

.ser-cuz-hero-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 20px;
}

.ser-cuz-img {
  position: relative;
  aspect-ratio: 1 / 1.15;
  border-radius: 16px;
  overflow: hidden;
  background: #e9edf4;
}

/* Image */
.ser-cuz-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay text */
.ser-cuz-img span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(11, 42, 85, 0.75),
    rgba(11, 42, 85, 0)
  );
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

/* Hover (optional but premium) */
.ser-cuz-img:hover img {
  transform: scale(1.05);
  transition: transform .6s ease;
}

@media (max-width: 1024px) {
  .ser-cuz-hero-images {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ser-cuz-img span {
  font-size: 14px;
}

}

@media (max-width: 640px) {
  .ser-cuz-hero-images {
    grid-template-columns: 1fr;
  }

    .ser-cuz-img span {
  font-size: 10px;
}
  
}

/* ======================================================
   HERO CLICKABLE IMAGE CARDS
====================================================== */

.ser-cuz-card-link {
  text-decoration: none;
  color: inherit;
}

.ser-cuz-img {
  position: relative;
  aspect-ratio: 1 / 1.15;
  border-radius: 16px;
  overflow: hidden;
  background: #e6ebf3;
  cursor: pointer;
  isolation: isolate;
}

/* IMAGE */
.ser-cuz-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.05);
  transition:
    filter .8s ease,
    transform 1s ease;
}

/* BLUR-UP COMPLETE */
.ser-cuz-img img.is-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* OVERLAY TEXT */
.ser-cuz-img span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px;
  background: linear-gradient(
    to top,
    rgba(11, 42, 85, 0.85),
    rgba(11, 42, 85, 0)
  );
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  z-index: 2;
}

/* REVEAL MASK EFFECT */
.ser-cuz-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b2a55;
  transform: translateY(100%);
  transition: transform 1s ease;
  z-index: 1;
}

/* WHEN CARD APPEARS */
.ser-cuz-show.ser-cuz-img::after {
  transform: translateY(0);
}

.ser-cuz-show.ser-cuz-img::after {
  transform: translateY(-100%);
}

/* HOVER MICRO-INTERACTION */
.ser-cuz-img:hover img {
  transform: scale(1.08);
}

/* ======================================================
   INTRO
====================================================== */

.ser-cuz-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr .9fr;
  gap: 48px;
  align-items: center;
}

.ser-cuz-intro-right ul {
  list-style: none;
  padding: 0;
}

.ser-cuz-intro-right li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(11,42,85,.15);
}

/* ===============================
   INTRO CENTER IMAGE (PREMIUM)
================================ */

.ser-cuz-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f7;
}

/* เงาแบบ soft + realistic */
.ser-cuz-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    0 18px 40px rgba(11, 42, 85, 0.12),
    0 6px 16px rgba(11, 42, 85, 0.08);
  border-radius: 16px;
}

/* รูปภาพ */
.ser-cuz-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;

  /* blur-up default */
  filter: blur(18px);
  transform: scale(1.03);
  transition:
    filter 0.8s ease,
    transform 0.8s ease;
}

/* เมื่อโหลดจริงแล้ว */
.ser-cuz-image-wrap img.is-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* ===============================
   INTRO IMAGE — TABLE SHADOW
================================ */

.ser-cuz-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f7;
}

/* เงาเฉพาะด้านล่าง */
.ser-cuz-image-wrap::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -14px;
  height: 22px;

  background: radial-gradient(
    ellipse at center,
    rgba(11, 42, 85, 0.25) 0%,
    rgba(11, 42, 85, 0.15) 35%,
    rgba(11, 42, 85, 0.05) 60%,
    transparent 75%
  );

  filter: blur(12px);
  z-index: -1;
}

/* รูปภาพ */
.ser-cuz-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;

  /* blur-up */
  filter: blur(18px);
  transform: scale(1.03);
  transition:
    filter 0.8s ease,
    transform 0.8s ease;
}

/* โหลดเสร็จ */
.ser-cuz-image-wrap img.is-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* ===============================
   SERVICE CATEGORY LINKS
================================ */

.ser-cuz-service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ser-cuz-service-list li {
  margin-bottom: 0px;
}

/* ตัวลิงก์ */
.ser-cuz-service-link {
  display: flex;
  align-items: center;
  gap: 14px;

  text-decoration: none;   /* 🔥 ลบเส้น */
  color: inherit;          /* 🔥 ไม่เป็นสีลิงก์ */
  padding: 2px 2px;
  border-radius: 8px;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

/* icon */
.ser-cuz-service-link i {
  color: #0b2a55;
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* hover */
.ser-cuz-service-link:hover {
  background: rgba(11, 42, 85, 0.06);
  transform: translateX(4px);
}

/* mobile tap feedback */
@media (max-width: 768px) {
  .ser-cuz-service-link {
    padding: 2px 2px;
    font-size: 14px;
  }
}

/* ===============================
   SER-CUZ LINK (NO UNDERLINE)
================================ */

.ser-cuz-link {
  text-decoration: none;   /* 🔥 ลบเส้น */
  color: #0b2a55;
  font-weight: 500;
  display: inline-block;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.ser-cuz-link:hover {
  color: #061a36;
  transform: translateX(4px);
}

.ser-cuz-link:visited,
.ser-cuz-link:active,
.ser-cuz-link:focus {
  text-decoration: none;   /* 🔒 กันเส้นกลับมา */
  outline: none;
}







/* ======================================================
   FEATURE
====================================================== */

.ser-cuz-feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ser-cuz-feature-image {
  position: relative;
}

.ser-cuz-index {
  position: absolute;
  top: -40px;
  left: 0;
  font-size: 120px;
  color: rgba(11,42,85,.08);
  font-weight: 700;
}

.ser-cuz-image-xl {
  aspect-ratio: 4 / 5;
  background: #e9edf4;
  border-radius: 28px;
}

.ser-cuz-arrows {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ======================================================
   DARK CARD
====================================================== */

.ser-cuz-dark-header {
  text-align: left;
}

.ser-cuz-dark-header h2,
.ser-cuz-dark-header p {
  margin-left: 0;
  margin-right: 0;
}


.ser-cuz-dark .ser-cuz-chip {
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ser-cuz-dark {
  background: #0b2a55;
  color: #fff;
}

.ser-cuz-dark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.ser-cuz-card {
  background: rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 32px;
  transition: transform .4s ease;
}

.ser-cuz-card:hover {
  transform: translateY(-8px);
}

/* ===============================
   DARK SECTION — IMAGE MODE FIX
   ใช้เฉพาะ section ระบบปรับขนาด
================================ */

/* grid ยังคุม layout เหมือนเดิม */
.ser-cuz-fit-grid {
  margin-top: 48px;
}

/* 🔥 override card เดิม */
.ser-cuz-fit-grid .ser-cuz-fit-card {
  padding: 0;                /* ← ตัด padding เก่า */
  background: transparent;   /* ← ไม่ใช้พื้นหลัง card */
  border-radius: 0;
}

/* wrapper 1:1 ทำงานเต็มพื้นที่ */
.ser-cuz-fit-grid .ser-cuz-image-1x1 {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
}


/* ======================================================
   FACTORY
====================================================== */

.ser-cuz-factory-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
}

.ser-cuz-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.ser-cuz-factory-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.ser-cuz-image-md {
  aspect-ratio: 4 / 3;
  background: #edf1f7;
  border-radius: 20px;
}

/* ======================================================
   CORE TYPO
====================================================== */

.ser-cuz-core-words {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-size: clamp(28px, 4vw, 64px);
  font-weight: 600;
  color: rgba(11,42,85,.15);
}

/* ======================================================
   STORY
====================================================== */

.ser-cuz-story-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.ser-cuz-story-image {
  aspect-ratio: 4 / 5;
  background: #e8ecf4;
  border-radius: 28px;
}

.ser-cuz-story-meta {
  margin-top: 32px;
}

.ser-cuz-pagination {
  margin-top: 24px;
  letter-spacing: .2em;
}

/* ======================================================
   ANIMATION
====================================================== */

.ser-cuz-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}

.ser-cuz-slide-up {
  transform: translateY(32px);
}

.ser-cuz-slide-left {
  transform: translateX(-32px);
}

.ser-cuz-slide-right {
  transform: translateX(32px);
}

.ser-cuz-show {
  opacity: 1;
  transform: translate(0);
}

/* ==========================================================
   RESPONSIVE GRID CONTROL — TABLET & MOBILE
   Service Customize (VIPHAT)
   Purpose:
   - Prevent grid overflow on tablet (landscape / portrait)
   - Normalize layout collapse to single-column safely
========================================================== */

/* ----------------------------------------------------------
   1) TABLET & DOWN (≤1024px)
   - Force critical grids to single-column
   - Prevent wide grid math from exceeding viewport
---------------------------------------------------------- */
/* ==================================================
   GLOBAL OVERFLOW LOCK (TABLET + MOBILE)
================================================== */
@media (max-width: 1024px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }
}

@media (max-width: 1024px) {
  .ser-cuz-intro-grid,
  .ser-cuz-feature-grid,
  .ser-cuz-factory-grid,
  .ser-cuz-story-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  /* Dark section keeps 2 columns on tablet */
  .ser-cuz-dark-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 100%;
  }
}

/* ----------------------------------------------------------
   2) MOBILE ONLY (≤640px)
   - Further collapse grids for small screens
---------------------------------------------------------- */
@media (max-width: 640px) {
  /* Hero image collage */
  .ser-cuz-hero-images {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  /* Dark section stacks fully on mobile */
  .ser-cuz-dark-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   MOBILE OVERFLOW FIX — SERVICE CUSTOMIZE (VIPHAT)
   Purpose:
   - Eliminate horizontal scroll on mobile
   - Prevent grid / animation overflow issues
   - Safe for production (mobile-only)
========================================================== */

/* ----------------------------------------------------------
   1) GLOBAL SAFETY NET (Mobile Only)
   - Prevent any accidental overflow from animations / grids
---------------------------------------------------------- */
@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }
}

/* ----------------------------------------------------------
   2) FACTORY SECTION CONTAINMENT
   - Ensure Factory section never exceeds viewport width
---------------------------------------------------------- */
@media (max-width: 768px) {
  .ser-cuz-factory {
    position: relative;
    overflow-x: hidden;
  }

  .ser-cuz-factory-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .ser-cuz-factory-text,
  .ser-cuz-factory-images {
    max-width: 100%;
  }
}

/* ----------------------------------------------------------
   3) STATS GRID FIX (Critical)
   - min-width: 0 prevents text/grid from forcing overflow
   - Common mobile Chrome flex/grid bug
---------------------------------------------------------- */
@media (max-width: 768px) {
  .ser-cuz-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 100%;
  }

  .ser-cuz-stats > div {
    min-width: 0;
  }
}

/* ----------------------------------------------------------
   4) ANIMATION SAFETY
   - Prevent transform-based animations from pushing layout
---------------------------------------------------------- */
@media (max-width: 768px) {
  .ser-cuz-animate {
    will-change: transform;
  }
}

/* ----------------------------------------------------------
   5) CORE TYPO RESPONSIVE TUNING (Small Mobile)
---------------------------------------------------------- */
@media (max-width: 640px) {
  .ser-cuz-core-words {
    font-size: clamp(22px, 7vw, 36px);
    gap: 20px;
  }
}

/* ----------------------------------------------------------
   6) TYPO OVERFLOW PREVENTION (Global)
   - Long words will never break layout
---------------------------------------------------------- */
.ser-cuz-core-words {
  overflow-wrap: anywhere;
  word-break: break-word;
}

