/* =========================================================
   🌐 GLOBAL STYLES — Zafera Teknik Website
   ========================================================= */

/* Global */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}
h1, h2, h3 { margin-bottom: 15px; }
p { margin-bottom: 10px; }

/* =========================================================
   HEADER
   ========================================================= */
header {
  background: linear-gradient(90deg, #800000, #00aaff);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
}
header .logo img {
  max-height: 60px;
  width: auto;
  height: auto;
}
nav a {
  margin: 0 10px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease;
}

/* Gradient underline effect */
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #800000, #00aaff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
nav a:hover::after { transform: scaleX(1); }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  background: url("../img/hero-bg.jpg") center/cover no-repeat;
  text-align: center;
  padding: 100px 20px;
  min-height: 400px;
  color: white;
  overflow: hidden;
}

/* Gradient overlay for contrast */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(128, 0, 0, 0.65),
    rgba(0, 170, 255, 0.45)
  );
  z-index: 0;
}

/* Hero text sits above overlay */
.hero-text {
  position: relative;
  z-index: 1;
}

/* Fade-in-up keyframes */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Hero Animation */
.hero h1 {
  font-size: 2.8em;
  margin-bottom: 10px;
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1.2s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}
.hero p {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #e0f5ff;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
  animation: fadeInUp 1.4s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}
.btn {
  background: linear-gradient(90deg, #800000, #800000);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.4s ease;
  display: inline-block;
  animation: fadeInUp 1.6s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}
.btn:hover {
  background: linear-gradient(90deg, #800000, #00aaff);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* =========================================================
   SECTION BASE
   ========================================================= */
section {
  padding: 60px 20px;
  text-align: center;
}
#about { background: #fff; }

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}
.about-text { text-align: left; }
.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Scroll-trigger Fade-In */
.scroll-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}
.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive About */
@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-text { text-align: center; }
}

/* =========================================================
   SERVICES SECTION
   ========================================================= */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
  max-width: 1100px;
  margin: auto;
}
.card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s, opacity 1s ease;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
}
.card img {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  margin-bottom: 15px;
  object-fit: contain;
}
.card:hover { transform: translateY(-5px); }

/* =========================================================
   CONTACT SECTION
   ========================================================= */
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
form input, form textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
form button { cursor: pointer; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: linear-gradient(90deg, #800000, #00aaff);
  color: white;
  text-align: center;
  padding: 4px 4px;
  font-size: 0.9em;
}

/* =========================================================
   CONTACT FORM CONFIRMATION MESSAGE
   ========================================================= */
.zt-status {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  text-align: center;
}
.zt-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  animation: ztFadeIn 0.5s ease forwards;
}
.zt-success {
  background: linear-gradient(90deg, #008000, #00cc66);
}
.zt-error {
  background: linear-gradient(90deg, #cc0000, #ff3333);
}
.zt-ok {
  background: #fff;
  color: #333;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
.zt-ok:hover { background: #eee; }

/* Animations */
@keyframes ztFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ztFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}
.zt-fade-out { animation: ztFadeOut 0.5s ease forwards; }

/* =========================================================
   📱 MOBILE TUNING (max-width: 600px)
   ========================================================= */
@media (max-width: 600px) {

  /* General layout */
  section { padding: 30px 15px; }
  h1, h2, h3 { margin-bottom: 10px; }
  p {
    font-size: 0.95em;
    line-height: 1.5;
  }

  /* Header */
  header {
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    text-align: center;
  }
  header .logo img {
    max-height: 50px;
    margin-bottom: 10px;
  }
  nav a {
    display: inline-block;
    margin: 5px 8px;
    font-size: 0.95em;
  }

  /* Hero */
  .hero {
    padding: 60px 15px;
    min-height: 300px;
  }
  .hero h1 { font-size: 1.9em; }
  .hero p {
    font-size: 1em;
    margin-bottom: 15px;
  }
  .btn {
    padding: 8px 16px;
    font-size: 0.9em;
  }

  /* About */
  .about-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .about-text { text-align: center; }
  .about-image img { max-width: 90%; }

  /* Services */
  .services {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .card {
    width: 100%;
    padding: 15px;
  }
  .card img {
    max-width: 70px;
    margin-bottom: 10px;
  }

  /* Contact */
  form {
    width: 100%;
    padding: 0 10px;
  }
  form input, form textarea {
    font-size: 0.95em;
  }

  /* Footer */
  footer {
    padding: 8px 10px;
    font-size: 0.8em;
  }
}
