/* ==========================================================================
   TUMBUH JAYA MULIA — GLOBAL CORE STYLES (css/main.css)
   Clean, Elegant, Crisp White & Royal Blue Corporate Theme
   ========================================================================== */

:root {
  /* Core White & Blue Theme Palette */
  --bg-dark: #ffffff;
  --bg-page: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --primary: #1d4ed8;
  --primary-light: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --primary-subtle: #eff6ff;
  
  --accent-blue: #0284c7;
  --accent-sky: #38bdf8;
  --accent-navy: #0f172a;
  
  /* Text & Border Colors for White Base */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-light: #94a3b8;
  
  --border-glass: #e2e8f0;
  --border-glass-hover: #93c5fd;
  --border-blue: #bfdbfe;
  
  /* Typography & Wider Layout */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --container-max: 1540px; /* Lebih lebar & optimal di layar modern */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  /* Transitions & Shadows */
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 36px rgba(37, 99, 235, 0.09);
  --shadow-hover: 0 16px 40px rgba(37, 99, 235, 0.12);
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Subtle Blue Glow Ambient Lights (Soft & Clean) */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

.glow-top-left {
  top: -160px;
  left: -160px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.8) 0%, rgba(239, 246, 255, 0.4) 60%, transparent 80%);
}

.glow-bottom-right {
  bottom: 5%;
  right: -120px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(224, 242, 254, 0.7) 0%, rgba(240, 249, 255, 0.3) 70%, transparent 80%);
}

/* Layout Container (Lebih proporsional & lebar) */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 36px;
}

/* Gradient Text Utilities (Clean Blue Shades) */
.gradient-text {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   HEADER & NAVBAR (Royal Blue & Crisp White Text)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(29, 78, 216, 0.92) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

body:not(.admin-body) {
  padding-top: 84px;
}

@media (max-width: 992px) {
  body:not(.admin-body) {
    padding-top: 76px;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) {
    padding-top: 70px;
  }
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  padding: 8px 0;
  position: relative;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Language Switcher Widget (Desktop Pill & Mobile Dropdown) */
.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  user-select: none;
}

.lang-globe-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  opacity: 0.9;
  flex-shrink: 0;
}

.lang-desktop-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 6px;
  border-radius: 100px;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
  color: #ffffff;
}

.lang-desktop-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 8px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.03em;
  font-family: inherit;
  line-height: 1;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.lang-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.72rem;
  user-select: none;
  margin: 0 1px;
}

/* Mobile Dropdown */
.lang-mobile-dropdown {
  display: none;
  position: relative;
}

.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 100px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1;
}

.lang-dropdown-trigger:hover,
.lang-dropdown-trigger.open {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-current-code {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lang-dropdown-chevron {
  width: 11px;
  height: 11px;
  transition: transform 0.2s ease;
  stroke: currentColor;
}

.lang-dropdown-trigger.open .lang-dropdown-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 175px;
  background: #0b1329;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1100;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.lang-dropdown-menu.show {
  display: flex;
  animation: langDropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.lang-dropdown-item:hover {
  background: rgba(37, 99, 235, 0.22);
  color: #ffffff;
}

.lang-dropdown-item.active {
  background: rgba(37, 99, 235, 0.35);
  color: #60a5fa;
  font-weight: 750;
}

.lang-check {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 800;
  display: none;
}

.lang-dropdown-item.active .lang-check {
  display: inline-block;
}

@media (max-width: 992px) {
  .lang-desktop-pill {
    display: none !important;
  }
  .lang-mobile-dropdown {
    display: inline-block !important;
  }
  .nav-actions {
    gap: 8px;
  }
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  transition: 0.3s ease;
}

/* ==========================================================================
   FOOTER (High Contrast Corporate Industrial Blue with Factory Backdrop)
   ========================================================================== */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #172554 0%, #09101f 100%);
  color: #f8fafc;
  padding: 64px 0 28px;
  margin-top: auto;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/hero/factory-hero.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.22;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 1;
}

.footer-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr 1.3fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-logo-img {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.footer-brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.footer-tagline {
  font-size: 0.93rem;
  color: #f1f5f9;
  line-height: 1.65;
  margin: 0;
  font-weight: 450;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  display: inline-block;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 4px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col ul li a {
  font-size: 0.92rem;
  color: #f8fafc;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-block;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-col ul li a:hover {
  color: #60a5fa;
  transform: translateX(5px);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-contact-list svg {
  width: 19px;
  height: 19px;
  color: #60a5fa;
  flex-shrink: 0;
  margin-top: 3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.footer-contact-list a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.5);
  transition: var(--transition-smooth);
}

.footer-contact-list a:hover {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}

.footer-bottom {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 24px;
}

.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e8f0;
  flex-wrap: wrap;
  gap: 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-note {
  color: #93c5fd;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   RESPONSIVE BASE (NAV & FOOTER)
   ========================================================================== */
@media (max-width: 992px) {
  .container {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.90) 0%, rgba(23, 37, 84, 0.92) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    gap: 8px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
    animation: mobileNavFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes mobileNavFadeIn {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-item {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateX(3px);
  }

  .nav-item.active {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-left: 4px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }

  .nav-item.active::after {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:nth-child(2) {
    grid-column: 1;
  }

  .footer-col:nth-child(3) {
    grid-column: 2;
  }

  .footer-col:nth-child(4) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .nav-container {
    height: 70px;
  }

  .brand-logo {
    gap: 10px;
  }

  .brand-logo-img {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-tagline {
    font-size: 0.65rem;
  }

  .site-footer {
    padding: 40px 0 20px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    margin-bottom: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:nth-child(2) {
    grid-column: 1;
  }

  .footer-col:nth-child(3) {
    grid-column: 2;
  }

  .footer-col:nth-child(4) {
    grid-column: 1 / -1;
  }

  .footer-brand-name {
    font-size: 1.15rem;
  }

  .footer-tagline {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .footer-heading {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .footer-col ul {
    gap: 8px;
  }

  .footer-col ul li a {
    font-size: 0.84rem;
  }

  .footer-contact-list li {
    font-size: 0.84rem;
    gap: 10px;
    align-items: flex-start;
  }

  .footer-contact-list svg {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
  }

  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    font-size: 0.82rem;
  }
}

/* Global Mobile Fit Engine for All Pages */
@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }
}
