/* =========================================================
   ABOUT PAGE – VIP HAT (UNIFIED & STABLE)
   ========================================================= */

/* ---------------- BASE ---------------- */
.abt-body {
    width: 100%;
    overflow-x: hidden;
    color: #2f3a44;
    background: #ffffff;
}

.abt-body h1,
.abt-body h2,
.abt-body h3 {
    color: #0b2a4a;
    margin: 0 0 12px;
}

.abt-body p {
    margin: 0;
    line-height: 1.6;
}

/* ---------------- GLOBAL SECTION ---------------- */
.abt-body section {
    padding: 96px 0;
}

@media (max-width: 768px) {
    .abt-body section {
        padding: 64px 0;
    }
}

/* ---------------- GLOBAL CONTAINER LOGIC ---------------- */
.abt-body section>div {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (max-width: 768px) {
    .abt-body section>div {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =========================================================
   HERO
   ========================================================= */
.abt-heroex {
    position: relative;
    padding: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.abt-heroex.is-fading {
    opacity: 0.2;
    transform: translateY(-20px);
}

.abt-heroex-bg {
    width: 100%;
    height: min(70vh, 520px);
    z-index: 1;

    background-image:
        linear-gradient(
            to right,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.4) 35%,
            rgba(0, 0, 0, 0.15) 60%,
            rgba(0, 0, 0, 0) 80%
        ),
        url("../../picture/images/about/about2.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
}


.abt-heroex-content {
    position: relative;
    margin-top: -320px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
}

.abt-heroex-left h1 {
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0,0,0,0.45);
}


.abt-heroex-btn {
    display: inline-block;
    padding: 10px 18px;
    color: #0b2a4a;
    border: 2px solid #a40000;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 14px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .abt-heroex-content {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -280px;
    }

    .abt-heroex-left h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px),
(prefers-reduced-motion: reduce) {
    .abt-heroex-bg {
        animation: none;
        transform: scale(1);
    }

    .abt-heroex-left h1 span,
    .abt-heroex-btn {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* HERO BACKGROUND ZOOM */
.abt-heroex-bg {
    transform: scale(1);
    animation: heroZoom 14s ease-in-out forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

.abt-heroex-left h1 span {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: textFadeUp 0.8s ease forwards;
}

/* default = animation ทำงาน */
.abt-heroex-bg {
    animation-play-state: running;
}

/* เมื่อหยุด */
.abt-heroex-bg.is-paused {
    animation-play-state: paused;
}

@keyframes textFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.abt-heroex-btn {
    opacity: 0;
    transform: translateY(12px);
    animation: btnFadeUp 0.6s ease forwards;
    animation-delay: 1.6s;
}

@keyframes btnFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   HOW WE WORK
   ========================================================= */
.abt-work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.abt-work-card {
    background: #f4f7fa;
    border: 1px solid #e1e6eb;
    border-radius: 14px;
    padding: 24px;
}

.abt-work-step {
    font-size: 13px;
    color: #8a96a3;
}

@media (max-width: 900px) {
    .abt-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .abt-work-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STORY
   ========================================================= */
.abt-story-wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
}

.abt-story-image {
    background: #eef3f7;
    border-radius: 14px;
    min-height: 280px;
}

@media (max-width: 900px) {
    .abt-story-wrap {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   TIMELINE
   ========================================================= */
.abt-timeline {
    margin-top: 48px;
    display: grid;
    gap: 24px;
}

.abt-tl-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    background: #f4f7fa;
    border: 1px solid #e1e6eb;
    border-radius: 14px;
    padding: 24px;
}

.abt-tl-year {
    font-weight: 600;
    color: #0b2a4a;
}

@media (max-width: 600px) {
    .abt-tl-item {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   FACTORY & CAPACITY
   ========================================================= */
.abt-factory-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    margin-top: 48px;
}

.abt-factory-image {
    border-radius: 14px;
    overflow: hidden;
    background: #eef3f7;
}

.abt-factory-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.abt-factory-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.abt-cap-item {
    background: #ffffff;
    border: 1px solid #e1e6eb;
    border-radius: 14px;
    padding: 20px;
}

@media (max-width: 900px) {
    .abt-factory-grid {
        grid-template-columns: 1fr;
    }

    .abt-factory-info {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   WHY TRUST
   ========================================================= */
.abt-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.abt-trust-card {
    background: #f4f7fa;
    border: 1px solid #e1e6eb;
    border-radius: 14px;
    padding: 28px;
}

@media (max-width: 900px) {
    .abt-trust-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CLIENTS & MARKETS
   ========================================================= */
.abt-markets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.abt-client-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.abt-logo-box {
    height: 320px; /* เพิ่มจาก 80 → 120 */
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e1e6eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {

    .abt-markets,
    .abt-client-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .abt-markets,
    .abt-client-logos {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   OEM CTA
   ========================================================= */
.abt-oem-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}

.abt-oem-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0b2a4a;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
}

@media (max-width: 900px) {
    .abt-oem-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================= SECTION REVEAL ================= */
.abt-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.abt-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-work-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.abt-work-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-story-text,
.abt-story-image {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.abt-story-text.is-visible,
.abt-story-image.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-tl-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.abt-tl-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-factory-image,
.abt-cap-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.abt-factory-image.is-visible,
.abt-cap-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
    transition-delay: var(--delay, 0s);
}

.abt-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.abt-parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

.abt-work-card,
.abt-trust-card,
.abt-cap-item {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.abt-work-card:hover,
.abt-trust-card:hover,
.abt-cap-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.abt-logo-box {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.abt-logo-box:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    filter: grayscale(0%);
}

/* ================= WEIGHT EFFECT ================= */
.abt-weight {
    transition:
        transform 0.35s cubic-bezier(.22, .61, .36, 1),
        box-shadow 0.35s ease;
}

.abt-weight.is-visible {
    transform: scale(1);
}

.abt-weight:hover {
    transform: scale(1.015);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
}

.abt-story-image {
    border-radius: 14px;
    overflow: hidden;
    background: #eef3f7;
}

.abt-story-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


@media (max-width: 768px),
(prefers-reduced-motion: reduce) {

    .abt-reveal,
    .abt-work-card,
    .abt-tl-item,
    .abt-cap-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 768px),
(prefers-reduced-motion: reduce) {

    .abt-reveal,
    .abt-parallax,
    .abt-work-card,
    .abt-trust-card,
    .abt-cap-item,
    .abt-logo-box {
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 768px),
(prefers-reduced-motion: reduce) {

    .abt-img-mask,
    .abt-weight {
        transition: none !important;
        transform: none !important;
        clip-path: none !important;
        opacity: 1 !important;
    }
}

/* =========================
   CLIENT LOGOS
========================= */

.abt-client-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);

  align-items: center;
  margin-top: clamp(2rem, 4vw, 4rem);
}

/* logo box */
.abt-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;
  opacity: 0.75;

  transition: opacity .3s ease;
}

/* logo image */
.abt-logo-box img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  filter: grayscale(100%);
}

/* hover (optional) */
.abt-logo-box:hover {
  opacity: 1;
}

.abt-logo-box:hover img {
  filter: grayscale(0%);
}

/* logo box (ปรับเล็กน้อยให้เรียงแนวตั้ง) */
.abt-logo-box {
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

/* caption ใต้โลโก้ */
.abt-logo-caption {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280; /* เทา premium */
  line-height: 1.3;
}

/* hover effect ให้ดูแพงขึ้น */
.abt-logo-box:hover .abt-logo-caption {
  color: #0b2a4a;
}

.abt-logo-box,
.abt-logo-box * {
  transition: none !important;
}

/* ===== REMOVE SHADOW & CROP FOR CERTIFICATES ===== */
.abt-logo-box {
  box-shadow: none !important;
  border: 1px solid #e5e7eb; /* เส้นบาง ๆ แทนเงา */
  transform: none !important;
  opacity: 1;
}

/* ปิด effect ตอน hover */
.abt-logo-box:hover {
  box-shadow: none !important;
  transform: none !important;
  filter: none;
}

/* รูปไม่ครอป ไม่ขยาย */
.abt-logo-box img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  filter: none; /* เอา grayscale ออก ถ้าไม่อยากให้ซีด */
}
