@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary: #0b3d2e;
  --primary-dark: #07271e;
  --primary-light: #125541;
  --accent: #d4af37;
  --accent-light: #f3e5ab;
  --accent-hover: #b89528;
  --emerald: #10b981;
  --bg-main: #f4f7f5;
  --bg-surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: rgba(11, 61, 46, 0.08);
  --shadow-sm: 0 4px 12px rgba(11, 61, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 61, 46, 0.08);
  --shadow-lg: 0 16px 36px rgba(11, 61, 46, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body > * {
  position: relative;
  z-index: 1;
}

/* WATERMARK */
.watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  background: url('images/logo-sapsreplace.webp') no-repeat center;
  background-size: contain;
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
}

/* HEADER */
header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 16px 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-bottom: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

header img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: var(--transition);
}

header img:hover {
  transform: scale(1.04);
}

header strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* NAV */
nav {
  background: rgba(18, 85, 65, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

nav a {
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 18px;
  margin: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

nav a.active {
  color: var(--accent-light);
  background: rgba(212, 175, 55, 0.15);
  font-weight: 700;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent);
}

/* HERO SECTION (INDEX) */
.hero {
  position: relative;
  height: 440px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: inset 0 -10px 30px rgba(0,0,0,0.3);
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 39, 30, 0.5) 0%, rgba(7, 39, 30, 0.75) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: white;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  background: rgba(7, 39, 30, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px 36px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
}

/* SUBPAGE HERO BANNER */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 50px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.12), transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin: 0 0 10px 0;
  color: #ffffff;
}

.page-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* GENERAL SECTIONS */
.section {
  padding: 60px 20px;
  text-align: center;
  max-width: 1140px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section h3 {
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin-top: 28px;
  margin-bottom: 12px;
}

.section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 860px;
  margin: 0 auto 20px auto;
}

.subtitle {
  font-size: 1.15rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 40px !important;
}

.container {
  max-width: 1140px;
  margin: auto;
}

/* GRID & CARDS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.card {
  background: var(--bg-surface);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(18, 85, 65, 0.2);
}

.card h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 16px;
  margin-bottom: 10px;
  font-weight: 700;
}

.card p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  transition: var(--transition);
}

.card:hover img {
  transform: scale(1.03);
}

/* STATS CARDS */
.stat {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: linear-gradient(135deg, #ffffff 0%, #f4f9f6 100%);
  border-top: 4px solid var(--accent);
  padding: 36px 24px;
  letter-spacing: -0.3px;
}

.stat:hover {
  border-top-color: var(--primary);
}

/* VISI MISI */
.visi-misi .card {
  text-align: center;
  align-items: center;
  padding: 25px;
}

.visi-misi ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* PRODUCT SPECIFICATIONS & CARDS */
.product-card {
  text-align: left;
  align-items: flex-start;
  padding: 32px;
}

.product-badge {
  background: var(--primary-light);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.product-specs {
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  width: 100%;
  margin-top: 16px;
  border-left: 3px solid var(--accent);
}

.product-specs h4 {
  margin: 0 0 6px 0;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.product-specs ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* PARTNERS SECTION */
.partners-section {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
}

.section-title {
    font-size: 28px;
    margin-bottom: 40px;
    font-weight: 600;
    color: #222;
}

.partner-item {
    background: #fff;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

.partner-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: 0.3s;
}

.partner-item img:hover {
    filter: grayscale(0%);
}

/* GALLERY */
.gallery {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery img:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

/* BUTTONS */
.career-btn, .email-btn, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 12px 8px;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.career-btn:hover, .email-btn:hover, .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* TIMELINE (CAREER PAGE) */
.selection-process {
  margin-top: 40px;
}

.timeline {
  position: relative;
  margin-top: 36px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.timeline-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(18, 85, 65, 0.2);
}

.icon {
  min-width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(11, 61, 46, 0.2);
  flex-shrink: 0;
  animation: pulse 2.5s infinite;
}

.content {
  text-align: left;
  flex: 1;
}

.content h4 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.content p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 61, 46, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(11, 61, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(11, 61, 46, 0);
  }
}

/* POPUP OVERLAY (WITH ACTIVE CUSTOM SCROLLBAR) */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 39, 30, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
  overflow-y: auto;
}

.popup-box {
  background: var(--bg-surface);
  padding: 36px 32px;
  max-width: 620px;
  width: 100%;
  max-height: 78vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #0b3d2e #f1f5f9;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.4s ease;
}

/* VISIBLE SCROLLBAR FOR POPUP BOX */
.popup-box::-webkit-scrollbar {
  width: 6px;
}

.popup-box::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.popup-box::-webkit-scrollbar-thumb {
  background: #0b3d2e;
  border-radius: 4px;
}

.popup-box::-webkit-scrollbar-thumb:hover {
  background: #125541;
}

.popup-box h2 {
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.6rem;
  font-weight: 700;
}

.popup-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.popup-box button {
  margin-top: 18px;
  padding: 12px 32px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.popup-box button:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--primary-dark);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* CONTACT MAP IFRAME */
iframe {
  max-width: 100%;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md) !important;
  margin-top: 24px;
}

/* CORPORATE MEGA FOOTER */
.mega-footer {
  background: linear-gradient(180deg, var(--primary-dark) 0%, #041812 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 50px 20px 24px 20px;
  border-top: 3px solid var(--accent);
  font-size: 0.92rem;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  text-align: left;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 14px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent-light);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  text-align: center;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  header img {
    height: 38px;
  }
  
  header strong {
    font-size: 1.05rem;
    letter-spacing: 1px;
  }

  nav {
    padding: 6px 10px;
  }

  nav a {
    padding: 8px 12px;
    font-size: 0.88rem;
    margin: 1px;
  }

  .hero {
    height: 280px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    padding: 16px 20px;
  }

  .page-hero {
    padding: 36px 16px;
  }

  .page-hero h1 {
    font-size: 1.7rem;
  }

  .section {
    padding: 46px 16px;
  }

  .section h2 {
    font-size: 1.7rem;
  }

  .grid {
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 18px;
  }

  .partner-item {
    min-width: 140px;
    padding: 14px 18px;
  }

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

@media (max-width: 576px) {
  .popup-overlay {
    padding: 12px;
  }
  .popup-box {
    padding: 24px 16px;
    max-height: 80vh;
    border-radius: 14px;
  }
  .popup-box h2 {
    font-size: 1.2rem !important;
    margin-bottom: 12px !important;
  }
  .popup-box p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
  }
  .popup-box button {
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  .close-btn {
    top: 10px;
    right: 14px;
    font-size: 24px;
  }
}