/* ==============================================
   Custom Styles - SCL AIOMICS

   This file contains custom styles that override
   or supplement the Tailwind utilities.
   Edit this file for design changes.
   ============================================== */

/* --- Base body style --- */
body {
  font-family: 'Noto Sans JP', 'Pretendard', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Smooth scroll --- */
html {
  scroll-behavior: smooth;
}

/* --- Image defaults --- */
img {
  color: transparent;
}

/* --- Video background --- */
video {
  object-fit: cover;
}

/* --- Scroll animation classes --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
}

/* --- Desktop nav: prevent menu item wrapping --- */
header nav {
  flex-wrap: nowrap;
  white-space: nowrap;
}
header nav > .relative > a {
  white-space: nowrap;
}
header nav .nav-dropdown {
  white-space: normal;
}

/* --- Mobile menu overlay --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.95);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu-overlay.is-open {
  transform: translateX(0);
}

/* --- Card flip effect --- */
.card-flip {
  perspective: 1000px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* --- Key personnel hover image swap --- */
.personnel-card img.hover-img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.personnel-card:hover img.hover-img {
  opacity: 1;
}

.personnel-card img.normal-img {
  transition: opacity 0.3s ease;
}

.personnel-card:hover img.normal-img {
  opacity: 0;
}

/* --- WordPress placeholders --- */
.wp-placeholder {
  border: 2px dashed #ccc;
  padding: 40px;
  text-align: center;
  color: #999;
  background: #f9f9f9;
  border-radius: 8px;
  margin: 20px 0;
}

.wp-placeholder p {
  margin: 0;
  font-size: 16px;
}

/* --- CEO Message section: 2-column layout at tablet (md: 1080px+) ---
   lg:flex-row only activates at 1440px in this theme's Tailwind config.
   This forces 2-column at 1080px+ so tablets (e.g. 1280×800) show side-by-side. */
@media (min-width: 1080px) {
  .flex.flex-col.gap-12.lg\:flex-row {
    flex-direction: row;
    align-items: center;
    gap: 60px;
  }
  .flex.flex-col.gap-12.lg\:flex-row > .flex:first-child {
    width: 45%;
    justify-content: flex-end;
    margin-right: 60px;
  }
  .flex.flex-col.gap-12.lg\:flex-row > .flex.flex-col:last-child {
    width: 50%;
  }
  /* Reduce CEO message text font size */
  .flex.flex-col.gap-12.lg\:flex-row .text-justify {
    font-size: 16px;
    line-height: 26px;
  }
}

/* At lg (1440px+), slightly larger text */
@media (min-width: 1440px) {
  .flex.flex-col.gap-12.lg\:flex-row .text-justify {
    font-size: 18px;
    line-height: 28px;
  }
}

/* --- CEO Message: smaller font on mobile --- */
@media (max-width: 767px) {
  .ceo-message-text {
    font-size: 12px !important;
    line-height: 20px !important;
  }
}

@media (max-width: 599px) {
  .carousel-3d {
    transform: rotate(-6deg) scale(0.54) !important;
  }
  .carousel-3d h4 {
    font-size: 28px !important;
  }
  .carousel-3d .group ul {
    font-size: 20px !important;
    padding-left: 38px !important;
  }
}
