/* Reset & Base Styles */
:root {
  --primary-color: #c1964c;
  --secondary-color: #1a1a1a;
  --accent-color: #a87c2d;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  --dark-bg: #111;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--white);
  color: var(--text-color);
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

/* Ensure proper stacking context */
body {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  will-change: auto;
}

html {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  will-change: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header Styles */
header {
  background-color: var(--dark-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateZ(0);
  will-change: auto;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px; /* atur sesuai kebutuhan */
  height: 60px; /* atur sesuai kebutuhan */
  overflow: hidden; /* cegah elemen keluar batas */

}

.logo img,
.logo span {
  transition: transform 0.3s ease;
}

nav ul {
  display: flex;
  gap: 1.5rem;
}

nav ul li a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

nav ul li a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover:after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 2px 0;
  transition: all 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .header-container {
    padding: 0.8rem 1rem;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--dark-bg);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav ul.active {
    display: flex;
    max-height: 500px; /* or any max height to show menu */
  }

  nav.active ul {
    display: flex;
    max-height: 500px; /* or any max height to show menu */
  }

  nav ul li {
    text-align: center;
    margin: 0.5rem 0;
  }

  nav ul li a {
    padding: 0.5rem 1rem;
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
  }
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url("layout1.png") no-repeat center center/cover;
  height: 80vh;
  min-height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-align: center;
  transform: translateZ(0);
  will-change: auto;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

.hero-content {
  position: relative;
  max-width: 800px;
  padding: 0 2rem;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-contact {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.8rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-contact:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 25px;
  height: 25px;
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  transform: rotate(45deg);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-8px, -8px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(8px, 8px);
  }
}

/* Main Content */
main {
  width: 100%;
  overflow-x: hidden;
  transform: translateZ(0);
  will-change: auto;
}

section {
  padding: 3rem 0;
  transform: translateZ(0);
  will-change: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  transform: translateZ(0);
  will-change: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  transform: translateZ(0);
  will-change: auto;
}

.section-header h4 {
  color: var(--primary-color);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
  color: #666;
}

/* About Section */
.about-section {
  background: var(--white);
}

.about-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.text-section {
  flex: 1;
}

.text-section h4 {
  color: var(--primary-color);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
}

.text-section h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.text-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 1.5rem;
}

.stats-container {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-section {
  flex: 1;
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.image-frame:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  top: 10px;
  left: 10px;
  z-index: -1;
}

/* Safety Section */
.safety-section {
  background: var(--light-bg);
  text-align: center;
}

.safety-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.icon-box {
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.icon-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
  width: 70px;
  height: 70px;
  background: rgba(193, 150, 76, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}

.icon-wrapper i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.icon-box h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
}

.icon-box p {
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Certificates Section */
.certificates-section {
  background: var(--white);
}

.certificates-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.certificate-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* Gambar */
.certificate-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.no-image {
  width: 100%;
  height: 150px;
  background: #f4f4f4;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.certificate-info {
  padding: 15px;
}

.certificate-info h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.certificate-info p {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}

.certificate-icon {
  width: 60px;
  height: 60px;
  background: rgba(193, 150, 76, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}

.certificate-icon i {
  font-size: 1.6rem;
  color: var(--primary-color);
}

.certificate-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
}

.certificate-card p {
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url("https://images.unsplash.com/photo-1508873696983-2dfd5898a7b4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80") no-repeat center center/cover;
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn-cta {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-cta:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 4rem 0 0;
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  will-change: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-info {
  padding-right: 1.5rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-logo img {
  height: 40px;
  margin-right: 10px;
}

.footer-info p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  gap: 0.8rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.social-icons i {
  font-size: 1rem;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--primary-color);
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-links ul li {
  margin-bottom: 0.7rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.footer-links ul li a {
  opacity: 0.8;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.footer-links ul li a:hover {
  opacity: 1;
  color: var(--primary-color);
  padding-left: 5px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1rem;
  width: 18px;
}

.contact-item a,
.contact-item span {
  opacity: 0.8;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.contact-item a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 0;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
  transform: translateZ(0);
  will-change: auto;
  position: relative;
  z-index: 1;
}

/* Background Overlay */
.overlay-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 2147483647 !important;
  pointer-events: none;
  transform: translateZ(0) !important;
  will-change: opacity, visibility;
  -webkit-transform: translateZ(0) !important;
  -moz-transform: translateZ(0) !important;
  -ms-transform: translateZ(0) !important;
  -o-transform: translateZ(0) !important;
}

/* Munculkan ketika aktif */
.overlay-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Konten Popup */
.overlay-content {
  background: #fff !important;
  border-radius: 12px !important;
  width: 90% !important;
  max-width: 500px !important;
  padding: 30px !important;
  position: relative !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  transform: scale(0.9) !important;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 2147483647 !important;
  transform: translateZ(0) !important;
  will-change: transform, opacity;
  -webkit-transform: translateZ(0) !important;
  -moz-transform: translateZ(0) !important;
  -ms-transform: translateZ(0) !important;
  -o-transform: translateZ(0) !important;
}

/* Animasi muncul ketika overlay aktif */
.overlay-container.active .overlay-content {
  transform: scale(1);
  opacity: 1;
}

/* Tombol Close */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--primary-color);
}

/* Ikon dalam Popup */
.detail-icon {
  width: 70px;
  height: 70px;
  background: rgba(193, 150, 76, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.detail-icon i {
  font-size: 32px;
  color: var(--primary-color);
}

.detail-content h2 {
  font-size: 24px;
  margin-bottom: 15px;
  text-align: center;
  color: var(--secondary-color);
}

.detail-content p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  text-align: center;
}

/* Safety Popup Styles */
.safety-popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2147483648; /* lebih tinggi dari overlay biasa */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.safety-popup-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.safety-popup-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.safety-popup-container.active .safety-popup-content {
  transform: scale(1);
}

.close-popup-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.close-popup-btn:hover {
  color: var(--primary-color);
}

.safety-popup-body .detail-content {
  text-align: center;
}

.safety-popup-body .detail-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.safety-popup-body h2 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.safety-popup-body p {
  color: #666;
  line-height: 1.6;
}

.safety-popup-container {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.safety-popup-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.close-popup-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}
/* Popup overlay full screen */
#safety-popup {
  display: none; /* default hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7); /* semi-transparent dark background */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-in-out;
}

/* Popup content full screen */
#safety-popup .popup-content {
  background: #fefefe;
  width: 90vw;
  max-width: 1000px;
  height: 90vh;
  padding: 2rem 3rem;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
  overflow-y: auto;
  border-left: 6px solid #c1964c; /* aksen warna */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Close button */
#safety-popup .popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #c1964c;
  cursor: pointer;
  transition: transform 0.2s;
}

#safety-popup .popup-close:hover {
  transform: rotate(90deg);
  color: #a87c2d;
}

/* Safety content styling */
#safety-popup-body h2 {
  margin-top: 0;
  font-size: 2rem;
  margin-bottom: 1rem; /* jarak ke deskripsi */
  color: #1a1a1a;
  text-align: center;
}

#safety-popup-body p {
  font-size: 1rem;
  color: #333;
  white-space: pre-line; /* menjaga line break */
  margin-bottom: 2rem;
}

/* Animasi muncul */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.popup-content h2 {
    margin-bottom: 1rem;
}

.popup-content p {
    line-height: 1.6;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
}
/* Tombol Selengkapnya di Safety - Modern & Halus */
.safety-icons .btn-read-more {
    display: inline-block;
    padding: 8px 18px;
    background: #f3e2c8; /* warna lembut */
    color: #5a4630; /* warna teks natural */
    font-weight: 500;
    border: 1px solid #d8b776; /* border halus */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-size: 0.85rem;
    text-transform: none;
}

.safety-icons .btn-read-more:hover {
    background: #e8d3a8; /* hover sedikit lebih gelap */
    color: #44321f;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
@media (max-width: 992px) {
  .about-section .container {
    flex-direction: column;
    gap: 2rem;
  }

  .text-section, .image-section {
    flex: unset;
    width: 100%;
  }

  .text-section h1 {
    font-size: 1.8rem;
  }

  .text-section p {
    font-size: 0.95rem;
  }
}

