/* BM Bangkae Services — Front Custom Styles */

body {
    font-family: 'Kanit', sans-serif;
    background: #ffffff;
    color: #0d1b2e;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Shadows */
.luxury-shadow {
    box-shadow: 0px 4px 24px rgba(10, 45, 110, 0.08);
}

/* Transitions */
.transition-soft {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Cursor */
a, button, [onclick], select,
input[type="submit"], input[type="button"] {
    cursor: pointer !important;
}

/* ── Accent utilities (Yellow) ── */
.bg-accent        { background-color: #f5c800; }
.text-accent      { color: #f5c800; }
.border-accent    { border-color: #f5c800; }
.hover\:bg-accent:hover { background-color: #f5c800; }

/* Yellow accent bar / highlight */
.accent-bar {
    display: inline-block;
    width: 40px;
    height: 4px;
    background: #f5c800;
    border-radius: 2px;
}

/* Section divider with accent */
.section-heading-accent::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 100%;
    background: #f5c800;
    margin-right: 10px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Blue gradient background for special sections */
.bg-blue-gradient {
    background: linear-gradient(135deg, #0a2d6e 0%, #1a52c4 100%);
}

/* Card hover with blue border */
.card-hover:hover {
    border-color: #2e7fd4;
    box-shadow: 0px 8px 32px rgba(10, 45, 110, 0.12);
}


/* ============================================================ */
/* ANIMATIONS & SCROLL REVEALS                                  */
/* ============================================================ */

/* ── Fade up (default reveal) ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Fade in (no movement) ── */
.reveal-fade {
    opacity: 0;
    transition: opacity 0.7s ease;
}
.reveal-fade.visible { opacity: 1; }

/* ── Slide from left ── */
.reveal-left {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Slide from right ── */
.reveal-right {
    opacity: 0;
    transform: translateX(36px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Stagger delay helpers ── */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Counter number pulse ── */
@keyframes count-up-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.stat-pulse { animation: count-up-pulse 0.4s ease; }

/* ── Service card image zoom on hover ── */
.service-img-wrap { overflow: hidden; }
.service-img-wrap img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-img-wrap:hover img { transform: scale(1.06); }

/* ── Why-us item hover ── */
.why-item {
    transition: transform 0.3s ease, background 0.3s ease;
}
.why-item:hover {
    transform: translateX(6px);
    background: rgba(255,255,255,0.18) !important;
}

/* ── Feature card icon bounce on hover ── */
.feature-card:hover .feature-icon {
    animation: icon-bounce 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes icon-bounce {
    0%,100% { transform: translateY(0); }
    30%     { transform: translateY(-6px); }
    60%     { transform: translateY(-2px); }
}

/* ── Accent bar grow animation ── */
.accent-bar-anim {
    display: block;
    height: 3px;
    background: #f5c800;
    border-radius: 2px;
    width: 0;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.accent-bar-anim.visible { width: 48px; }

/* ── Nav link underline slide ── */
.nav-underline {
    position: relative;
    padding-bottom: 2px;
}
.nav-underline::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: #f5c800;
    transition: width 0.25s ease;
}
.nav-underline:hover::after,
.nav-underline.active::after { width: 100%; }

/* ── Portfolio image overlay slide up ── */
.portfolio-overlay {
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.group:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* ── CTA button shimmer ── */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.btn-shimmer {
    background-size: 200% auto;
    transition: background-position 0s;
}
.btn-shimmer:hover {
    animation: shimmer 1.2s linear infinite;
    background-image: linear-gradient(90deg, #0a2d6e 0%, #1a52c4 40%, #0a2d6e 100%);
}

/* ── Scroll Reveal (IntersectionObserver) ── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* section ทั้ง block fade เบาๆ */
section.scroll-reveal {
    transform: translateY(16px);
}

/* hero ไม่ต้อง reveal */
#hero-section.scroll-reveal,
#hero-section.scroll-reveal * {
    opacity: 1 !important;
    transform: none !important;
}

/* service cards แสดงทันที ไม่ต้อง scroll */
.service-img-wrap.scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* ── Hero text entrance ── */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
#hero-section .bg-white\/10 > * {
    animation: hero-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#hero-section .bg-white\/10 > *:nth-child(1) { animation-delay: 0.2s; }
#hero-section .bg-white\/10 > *:nth-child(2) { animation-delay: 0.35s; }
#hero-section .bg-white\/10 > *:nth-child(3) { animation-delay: 0.45s; }
#hero-section .bg-white\/10 > *:nth-child(4) { animation-delay: 0.55s; }
#hero-section .bg-white\/10 > *:nth-child(5) { animation-delay: 0.65s; }

/* ── Why-us item slide right on hover ── */
.why-item {
    transition: transform 0.3s ease, background 0.3s ease;
}
.why-item:hover {
    transform: translateX(6px);
    background: rgba(255,255,255,0.18) !important;
}

/* ── Feature card icon bounce ── */
.feature-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card:hover .feature-icon {
    animation: icon-bounce 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ── Responsive Utilities ── */

/* Service card — stack on mobile */

  .service-img-wrap > div:first-child {
    width: 100% !important;
    height: 200px !important;
    flex-shrink: 0;
  }
  .service-img-wrap > div:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  /* content ไม่มี min-height แปลกๆ */
  .service-img-wrap .flex-1 {
    width: 100% !important;
  }
  .service-img-wrap .flex-1 { width: 100%; }

  /* Hero text */
  #hero-section .p-4 { padding: 16px !important; }
  #hero-section h1   { font-size: 22px !important; }

  /* About badge */
  .absolute.bottom-6.left-6 { bottom: 12px; left: 12px; padding: 10px 14px; }

  /* Portfolio grid */
  .pg-wide-tall, .pg-wide, .pg-standard { grid-column: span 12 !important; height: 220px !important; }

  /* Contact channels */
  .contact-card { flex-direction: column; text-align: center; }

  /* Why-us section */
  .why-item { font-size: 13px; }

  /* Footer grid */
  footer .grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Tablet (641–1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .service-img-wrap .w-2\/5 { width: 35%; display: block !important; }
  #hero-section h1 { font-size: 28px !important; }
  .pg-wide-tall { grid-column: span 12 !important; height: 300px !important; }
  .pg-wide      { grid-column: span 12 !important; }
  .pg-standard  { grid-column: span 6 !important; }
}

/* Nav mobile menu spacing */
#mobile-menu a { padding: 10px 0; border-bottom: 1px solid #eef1f7; }
#mobile-menu a:last-child { border-bottom: none; }

/* Feature cards — min height ให้สม่ำเสมอ */
.feature-card { height: 100%; }

/* Map responsive */
iframe[title*="BM Bangkae"] {
  min-height: 260px;
}
@media (min-width: 768px) {
  iframe[title*="BM Bangkae"] { min-height: 380px; }
}


  .service-img-wrap > div:first-child {
    width: 100% !important;
    min-height: 200px !important;
    height: 200px !important;
  }
  .service-img-wrap > div:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .service-img-wrap > div.flex-1 {
    width: 100% !important;
  }
}

/* ── Mobile: Service card stack (image top, content bottom, full width) ── */
@media (max-width: 639px) {
  .service-img-wrap {
    flex-direction: column !important;
  }
  .service-img-wrap > div:first-child {
    width: 100% !important;
    height: 220px !important;
  }
  .service-img-wrap > div:first-child img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
  }
  .service-img-wrap > div.flex-1 {
    width: 100% !important;
  }
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 639px) {
  }
@media (min-width: 640px) {
    .service-card-img img {
    position: absolute;
    inset: 0;
    height: 100% !important;
  }
  .service-img-wrap {
    min-height: 280px;
  }
}

.svc-img-col {
  width: 40%;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 100%;
}
.svc-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 280px;
}
@media (max-width: 639px) {
  .service-img-wrap {
    flex-direction: column;
    min-height: auto;
  }
  .svc-img-col {
    width: 100%;
    height: 220px;
  }
  .svc-img-col img {
    min-height: 220px;
  }
}

}

/* ── Service card: ภาพซ้าย text ขวา ── */
.service-img-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-height: 280px;
  opacity: 1 !important;
  transform: none !important;
}
.svc-img-col {
  width: 38%;
  min-width: 38%;
  flex-shrink: 0;
  overflow: hidden;
}
.svc-img-col img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
/* Mobile: ภาพบน text ล่าง */
@media (max-width: 640px) {
  .service-img-wrap {
    flex-direction: column !important;
    min-height: auto;
  }
  .svc-img-col {
    width: 100%;
    min-width: 100%;
    height: 220px;
  }
  .svc-img-col img {
    min-height: 220px;
    height: 220px;
  }
}

/* ═══════════════════════════════════════════
   BM SERVICE CARD — ภาพซ้าย text ขวา
   ไม่ conflict กับ Tailwind
═══════════════════════════════════════════ */
.bm-card {
  display: flex;
  flex-direction: row;
  min-height: 280px;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #c3c6d1;
  box-shadow: 0px 4px 24px rgba(10,45,110,0.08);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.bm-card:hover {
  box-shadow: 0px 8px 32px rgba(10,45,110,0.15);
  transform: translateY(-2px);
}
.bm-card-img {
  width: 38%;
  min-width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.bm-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.bm-card:hover .bm-card-img img {
  transform: scale(1.05);
}
@media (max-width: 640px) {
  .bm-card {
    flex-direction: column;
    min-height: auto;
  }
  .bm-card-img {
    width: 100%;
    min-width: 100%;
    height: 200px;
    position: relative;
  }
  .bm-card-img img {
    position: absolute;
  }
}

/* Mobile header: ซ่อน desktop nav, แสดง hamburger */
@media (max-width: 1024px) {
  .desktop-nav { display: none !important; }
}
@media (min-width: 1025px) {
  #mobile-menu-btn { display: none !important; }
}

/* ซ่อน brand text บนจอเล็กมาก */
@media (max-width: 480px) {
  #site-header a .brand-text { display: none; }
}


/* ── Mobile: services grid 1 column ── */
@media (max-width: 640px) {
  .home-services-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ── Mobile: service card content เพิ่มขนาดและช่องว่าง ── */
@media (max-width: 640px) {
  .bm-card .flex-1,
  .service-img-wrap .flex-1 {
    padding: 24px 20px !important;
  }
  .bm-card h2, .bm-card h3,
  .service-img-wrap h2, .service-img-wrap h3 {
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }
  .bm-card p,
  .service-img-wrap p {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  .bm-card ul li span:last-child,
  .service-img-wrap ul li span:last-child {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .bm-card a[href*="service/"],
  .service-img-wrap a[href*="service/"] {
    padding: 14px 24px !important;
    font-size: 16px !important;
  }
}

/* ═══════════════════════════════════════════
   GLOBAL FONT SIZE BUMP (ผู้ใช้งานวัย 40-60)
   เพิ่มความสามารถในการอ่าน
═══════════════════════════════════════════ */
body { font-size: 17px; line-height: 1.65; }

/* Headings */
h1 { font-size: clamp(30px, 4vw, 52px) !important; }
h2 { font-size: clamp(24px, 3vw, 38px) !important; }
h3 { font-size: clamp(20px, 2.2vw, 26px) !important; }
h4 { font-size: clamp(17px, 1.6vw, 20px) !important; }

/* Paragraphs / body text */
p { font-size: 16px; line-height: 1.7; }
li, label, span { font-size: 16px; }

/* Buttons / CTAs */
a[href^="tel:"], a[href*="line"], button {
  font-size: 16px;
}

/* Navigation menu */
.desktop-nav a { font-size: 18px !important; }

/* Section labels (e.g., WHY CHOOSE US) */
.uppercase { font-size: 14px !important; letter-spacing: 0.12em; }

/* Mobile: ใหญ่ขึ้นอีกนิด */
@media (max-width: 640px) {
  body { font-size: 18px; }
  p { font-size: 17px; }
  li, label, span { font-size: 17px; }
  h1 { font-size: 26px !important; }
  h2 { font-size: 22px !important; }
  h3 { font-size: 19px !important; }

  /* Service card content mobile */
  .bm-card h2, .bm-card h3,
  .service-img-wrap h2, .service-img-wrap h3 {
    font-size: 22px !important;
  }
  .bm-card p,
  .service-img-wrap p,
  .bm-card ul li span:last-child,
  .service-img-wrap ul li span:last-child {
    font-size: 16px !important;
  }
}

/* ── User-defined font weight & size overrides ── */
.font-semibold {
  font-weight: 500 !important;
}
.text-body-lg {
  font-size: 20px !important;
  line-height: 28px !important;
}
.text-body-md {
  font-size: 17px !important;
  font-weight: 400 !important;
}
.text-sm {
  font-size: 1rem !important;
  line-height: 1.25rem !important;
  font-weight: 300 !important;
}

/* ═══════════════════════════════════════════
   UNIFIED TYPOGRAPHY (สอดคล้องกับหน้า home)
═══════════════════════════════════════════ */

/* Section titles (h2) — ใช้ขนาดเดียวกับ home */
section h2 {
  font-size: clamp(28px, 3vw, 38px) !important;
  font-weight: 800 !important;
  color: #001e40 !important;
  line-height: 1.25;
}

/* Section subtitle/eyebrow (uppercase label) */
section .uppercase,
section [class*="text-secondary"][class*="uppercase"] {
  font-size: 13px !important;
  letter-spacing: 0.15em !important;
  font-weight: 700 !important;
  color: #2e7fd4 !important;
}

/* Card titles (h3) */
.bm-card h2, .bm-card h3,
.service-img-wrap h2, .service-img-wrap h3,
.feature-card h3 {
  font-size: clamp(18px, 2vw, 22px) !important;
  font-weight: 700 !important;
  color: #001e40 !important;
  line-height: 1.3;
}

/* Portfolio card title — สีขาวบนภาพ */
.port-card h3 {
  font-size: clamp(18px, 2vw, 22px) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Body text in cards */
.bm-card p,
.service-img-wrap p,
.feature-card p {
  font-size: clamp(15px, 1.4vw, 17px) !important;
  line-height: 1.7 !important;
  color: #43474f;
}

/* List items in cards */
.bm-card ul li,
.service-img-wrap ul li {
  font-size: 16px !important;
  line-height: 1.6 !important;
}
.bm-card ul li span:last-child,
.service-img-wrap ul li span:last-child {
  font-size: 16px !important;
}

/* CTA buttons */
.bm-card a[href*="service/"],
.service-img-wrap a[href*="service/"],
section a[href^="tel:"],
section a[href*="line"] {
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 22px !important;
}

/* Breadcrumb / nav text */
nav.flex.items-center.gap-2 {
  font-size: 14px !important;
}

/* Page hero title (other pages) */
section:first-of-type h1 {
  font-size: clamp(28px, 4vw, 44px) !important;
  font-weight: 800 !important;
  color: #001e40 !important;
  line-height: 1.2;
}

/* Section paragraphs (descriptions under title) */
section p.font-body-md,
section p[class*="text-on-surface-variant"] {
  font-size: clamp(15px, 1.4vw, 17px) !important;
  line-height: 1.7 !important;
}

/* Mobile bumps */
@media (max-width: 640px) {
  section h2 { font-size: 24px !important; }
  section h3 { font-size: 20px !important; }
  section h1 { font-size: 26px !important; }
  .bm-card h2, .bm-card h3,
  .service-img-wrap h2, .service-img-wrap h3 { font-size: 21px !important; }
  .bm-card p,
  .service-img-wrap p { font-size: 16px !important; }
}

/* Section spacing — สอดคล้องกัน */
section { padding-top: 48px; padding-bottom: 48px; }
@media (max-width: 640px) {
  section { padding-top: 32px; padding-bottom: 32px; }
}

/* ── Why-us / Feature strips: icon ใหญ่ขึ้น หัวข้อเด่น ── */
section .w-12.h-12,
section .feature-icon {
  width: 72px !important;
  height: 72px !important;
  border-radius: 16px !important;
}
section .w-12.h-12 .material-symbols-outlined,
section .feature-icon .material-symbols-outlined {
  font-size: 36px !important;
}

/* หัวข้อหลัก เด่น */
section .feature-card h4,
section [class*="grid"] > div > p.font-bold {
  font-size: 19px !important;
  font-weight: 500 !important;
  color: #001e40 !important;
  margin-bottom: 8px !important;
}

/* คำอธิบาย เล็กกว่าหัวข้อ */
section .feature-card p,
section [class*="grid"] > div > p:not(.font-bold) {
  font-size: 17px !important;
  color: #43474f !important;
}

/* ── ลดระยะห่าง section page-header (ใต้ navbar) ── */
header + section,
header + main > section:first-child,
main > section:first-child {
  padding-top: 24px !important;
}
@media (max-width: 640px) {
  main > section:first-child {
    padding-top: 16px !important;
  }
}

/* Hero h1 — ใช้สีขาวเสมอ ไม่ให้ override */
#hero-section h1 {
  color: #fff !important;
}


/* Page hero h1 font-weight */
section:first-of-type h1 {
  font-weight: 500 !important;
}

/* ── Contact section: icon + ข้อมูล สมดุล ── */
section .reveal-left .flex.items-start.gap-4 > div:first-child,
section .reveal-left .flex.items-start > .w-10.h-10 {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}
section .reveal-left .flex.items-start.gap-4 > div:first-child .material-symbols-outlined,
section .reveal-left .flex.items-start > .w-10.h-10 .material-symbols-outlined {
  font-size: 22px !important;
}
section .reveal-left .flex.items-start.gap-4 {
  gap: 16px !important;
  align-items: center !important;
}
