/* ============================================ */
/* FITMETRICS - MAIN STYLESHEET v2.0          */
/* Clean, Professional, Responsive             */
/* ============================================ */

/* ============================================ */
/* GLOBAL RESET & BASE STYLES                  */
/* ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f4e8c5;
  color: #2c3e50;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Hide scrollbar but keep functionality */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Remove default link styling */
a {
  text-decoration: none;
  color: inherit;
}

/* ============================================ */
/* HERO SECTION                                */
/* ============================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url(../images/BG.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 100px 60px;
  overflow: hidden;
  z-index: 1; /* supaya gak nutup section lain */
}

/* Hero Content */
.hero-content {
  max-width: 800px;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-family: "Bungee", cursive;
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: rgb(4, 30, 5);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content h1 span {
  color: rgb(255, 255, 255);
  display: inline-block;
}

.hero-content p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgb(4, 30, 5);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.8;
  font-weight: 400;
}

.hero-content button {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background-color: green;
  border: 2px solid rgba(0, 0, 0, 0.1);
  padding: 1.2rem 2.5rem;
  border-radius: 50px 0px 50px 0px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 15px rgba(109, 231, 93, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-content button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-content button:hover::before {
  width: 300px;
  height: 300px;
}

.hero-content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(109, 231, 93, 0.5);
  background: linear-gradient(135deg, rgb(57, 169, 42), rgb(109, 231, 93));
}

.hero-content button:active {
  transform: translateY(-1px);
}

/* ============================================ */
/* FEATURES SECTION (FUNGSI)                   */
/* ============================================ */
.fungsi {
  background: linear-gradient(180deg, rgb(157, 233, 164), rgb(109, 231, 93));
  padding: 80px 20px 120px;
  position: relative;
  margin-top: -5px;
}

.fungsi h1 {
  font-family: "Bungee", cursive;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: rgb(4, 30, 5);
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================ */
/* CARD CONTAINER                              */
/* ============================================ */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================ */
/* CARDS                                       */
/* ============================================ */
.card {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  background: #fff;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card:hover img {
  filter: brightness(50%);
  transform: scale(1.1);
}

/* Card Text (Bottom label) */
.card-text {
  position: absolute;
  bottom: 20px;
  left: 25px;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  z-index: 2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s ease;
}

.card:hover .card-text {
  opacity: 0;
}

/* ============================================ */
/* CARD OVERLAY                                */
/* ============================================ */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75),
    rgba(92, 122, 57, 0.85)
  );
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(5px);
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-overlay h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-overlay p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 90%;
}

.card-overlay button {
  background: linear-gradient(135deg, #5c7a39, #729b4a);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 15px rgba(92, 122, 57, 0.4);
}

.card-overlay button:hover {
  background: linear-gradient(135deg, #729b4a, #5c7a39);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 122, 57, 0.6);
}

.card-overlay button:active {
  transform: translateY(0);
}

/* ============================================ */
/* ANIMATIONS                                  */
/* ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================ */
/* RESPONSIVE - TABLET (768px - 1024px)        */
/* ============================================ */
@media screen and (max-width: 1024px) {
  .hero {
    padding: 100px 60px 60px;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .card-container {
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: 2rem;
  }

  .card {
    height: 440px;
  }
}

/* ============================================ */
/* RESPONSIVE - MOBILE (max-width: 768px)      */
/* ============================================ */
@media screen and (max-width: 768px) {
  .hero {
    padding: 140px 30px 60px;
    background-attachment: scroll;
    min-height: 90vh;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .hero-content p {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-content button {
    padding: 1rem 2rem;
    font-size: 0.95rem;
  }

  .fungsi {
    padding: 60px 15px 80px;
  }

  .fungsi h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    margin-bottom: 2rem;
  }

  .card-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
    max-width: 400px;
  }

  .card {
    height: 420px;
    max-width: 100%;
  }

  .card-overlay h3 {
    font-size: 1.4rem;
  }

  .card-overlay p {
    font-size: 0.9rem;
  }
}

/* ============================================ */
/* RESPONSIVE - SMALL MOBILE (max-width: 480px)*/
/* ============================================ */
@media screen and (max-width: 480px) {
  .hero {
    padding: 120px 20px 40px;
    min-height: 85vh;
  }

  .hero-content h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .hero-content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .hero-content button {
    padding: 0.9rem 1.8rem;
    font-size: 0.9rem;
  }

  .fungsi {
    padding: 50px 10px 60px;
  }

  .fungsi h1 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
  }

  .card {
    height: 400px;
  }

  .card-text {
    font-size: 1.1rem;
    bottom: 15px;
    left: 20px;
  }

  .card-overlay {
    padding: 1.5rem;
  }

  .card-overlay h3 {
    font-size: 1.3rem;
  }

  .card-overlay p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .card-overlay button {
    padding: 10px 22px;
    font-size: 0.9rem;
  }
}

/* ============================================ */
/* ACCESSIBILITY                               */
/* ============================================ */
.hero-content button:focus,
.card-overlay button:focus {
  outline: 3px solid rgba(109, 231, 93, 0.8);
  outline-offset: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================ */
/* PERFORMANCE OPTIMIZATION                    */
/* ============================================ */
.card,
.card img,
.hero-content button {
  will-change: transform;
}

/* ============================================ */
/* PRINT STYLES                                */
/* ============================================ */
@media print {
  .hero-content button,
  .card-overlay button {
    display: none;
  }

  .card {
    break-inside: avoid;
  }
}
