/* =========================================================
   1) VARIABLES (Theme & Tokens)
   ---------------------------------------------------------
   - Palet terang, soft shadow & rounded untuk feel modern
   - Gunakan var(...) agar mudah di-branding ulang
========================================================= */
:root {
  /* Colors */
  --bg: #FFFEEB;
  --surface: #f8fafc;       /* latar lembut untuk blok */
  --surface-2: #eef2f7;     /* latar variasi */
  --text: #1f2937;          /* slate-800 */
  --muted: #667085;         /* abu teks sekunder */
  --heading: #0f172a;       /* slate-900 */
  --border: #e5e7eb;        /* abu garis */
  --primary: #00A2E8;       /* biru elegan */
  --primary-600: #1f65c0;   /* hover lebih gelap */
  --accent: #FFD700;        /* ungu lembut */
  --success: #00E600;       /* cyan aksen opsional */

  /* Gradient Accent */
  --gradient: linear-gradient(135deg, var(--primary), var(--accent));
  /* Shadows & Radius */
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-bold: 0 15px 40px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 6px 14px rgba(0, 0, 0, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 18px;

  /* Spacing scale */
  --container-x: clamp(16px, 5vw, 80px);
  --font-size-base: clamp(1.5rem, 4vw, 3rem);

  /* z-index */
  --z-base: 1;
  --z-loop: 50;
  --z-navbar: 100;
  --z-loader: 1000;
}

@font-face {
    font-family: 'hauser'; /* nama font bebas, nanti dipakai di font-family */
    src: url('/ARESTA-21/frontend/asset/FONT/hauser/Hauser Bold.otf') format('opentype');
    font-weight: normal; /* bisa juga bold */
    font-style: normal;  /* bisa italic */
}

/* =========================================================
   2) RESET & BASE
   ---------------------------------------------------------
   - Reset ringan + tipografi nyaman
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Semua elemen utama full lebar tanpa celah */
section, header, footer, .loader-wrapper, .hero {
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: 100%;
}

/* ============================================
   FIX: Loader responsiveness issue on mobile
============================================ */
html, body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'hauser', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: url("/ARESTA-21/frontend/asset/Element/background.webp"); 
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover; /* atau contain / 100% / auto */
}

/* Utility: kontainer & section spacing */
section {
  padding: clamp(56px, 8vw, 96px) var(--container-x);
  position: relative;
}


/* =========================================================
   LOADING SCREEN (responsive, centered, smooth)
========================================================= */
.loader-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, var(--primary-700, #0a0a0f), var(--primary-600, #1a1a24));
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Saat loading selesai (JS akan tambahkan class 'hidden') */
.loader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Konten di tengah */
.loader-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

/* Logo ARESTA */
.loader-logo {
  width: clamp(120px, 25vw, 220px);
  height: auto;
  user-select: none;
  animation: float 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

/* Animasi ringan biar terasa hidup */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsif tambahan (untuk device kecil banget) */
@media (max-width: 480px) {
  .loader-logo {
    width: 140px;
  }
}

/* From Uiverse.io by andrew-manzyk */ 
.loader {
  --main-size: 4em;
  --text-color: #ffffff;
  --shine-color: #ffffff40;
  --shadow-color: #aaaaaa;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  position: relative;
  font-size: var(--main-size);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-color);
  width: 7.3em;
  height: 1em;
  filter: drop-shadow(0 0 0.05em var(--shine-color));
}

.loader .text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: absolute;
}

.loader .text:nth-child(1) {
  clip-path: polygon(0% 0%, 11.11% 0%, 11.11% 100%, 0% 100%);
  font-size: calc(var(--main-size) / 20);
  margin-left: -2.1em;
  opacity: 0.6;
}

.loader .text:nth-child(2) {
  clip-path: polygon(11.11% 0%, 22.22% 0%, 22.22% 100%, 11.11% 100%);
  font-size: calc(var(--main-size) / 16);
  margin-left: -0.98em;
  opacity: 0.7;
}

.loader .text:nth-child(3) {
  clip-path: polygon(22.22% 0%, 33.33% 0%, 33.33% 100%, 22.22% 100%);
  font-size: calc(var(--main-size) / 13);
  margin-left: -0.33em;
  opacity: 0.8;
}

.loader .text:nth-child(4) {
  clip-path: polygon(33.33% 0%, 44.44% 0%, 44.44% 100%, 33.33% 100%);
  font-size: calc(var(--main-size) / 11);
  margin-left: -0.05em;
  opacity: 0.9;
}

.loader .text:nth-child(5) {
  clip-path: polygon(44.44% 0%, 55.55% 0%, 55.55% 100%, 44.44% 100%);
  font-size: calc(var(--main-size) / 10);
  margin-left: 0em;
  opacity: 1;
}

.loader .text:nth-child(6) {
  clip-path: polygon(55.55% 0%, 66.66% 0%, 66.66% 100%, 55.55% 100%);
  font-size: calc(var(--main-size) / 11);
  margin-left: 0.05em;
  opacity: 0.9;
}

.loader .text:nth-child(7) {
  clip-path: polygon(66.66% 0%, 77.77% 0%, 77.77% 100%, 66.66% 100%);
  font-size: calc(var(--main-size) / 13);
  margin-left: 0.33em;
  opacity: 0.8;
}

.loader .text:nth-child(8) {
  clip-path: polygon(77.77% 0%, 88.88% 0%, 88.88% 100%, 77.77% 100%);
  font-size: calc(var(--main-size) / 16);
  margin-left: 0.98em;
  opacity: 0.7;
}

.loader .text:nth-child(9) {
  clip-path: polygon(88.88% 0%, 100% 0%, 100% 100%, 88.88% 100%);
  font-size: calc(var(--main-size) / 20);
  margin-left: 2.1em;
  opacity: 0.6;
}

.loader .text span {
  animation:
    scrolling 2s cubic-bezier(0.1, 0.6, 0.9, 0.4) infinite,
    shadow 2s cubic-bezier(0.1, 0.6, 0.9, 0.4) infinite;
}

.loader .text:nth-child(1) span {
  background: linear-gradient(
    to right,
    var(--text-color) 4%,
    var(--shadow-color) 7%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(2) span {
  background: linear-gradient(
    to right,
    var(--text-color) 9%,
    var(--shadow-color) 13%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(3) span {
  background: linear-gradient(
    to right,
    var(--text-color) 15%,
    var(--shadow-color) 18%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(4) span {
  background: linear-gradient(
    to right,
    var(--text-color) 20%,
    var(--shadow-color) 23%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(6) span {
  background: linear-gradient(
    to right,
    var(--shadow-color) 29%,
    var(--text-color) 32%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(7) span {
  background: linear-gradient(
    to right,
    var(--shadow-color) 34%,
    var(--text-color) 37%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(8) span {
  background: linear-gradient(
    to right,
    var(--shadow-color) 39%,
    var(--text-color) 42%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .text:nth-child(9) span {
  background: linear-gradient(
    to right,
    var(--shadow-color) 45%,
    var(--text-color) 48%
  );
  background-size: 200% auto;
  background-clip: text;
  color: transparent;
}

.loader .line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 0.05em;
  width: calc(var(--main-size) / 2);
  margin-top: 0.9em;
  border-radius: 0.05em;
}

.loader .line::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: var(--text-color);
  opacity: 0.3;
}

.loader .line::after {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 0.05em;
  transform: translateX(-90%);
  animation: wobble 2s cubic-bezier(0.5, 0.8, 0.5, 0.2) infinite;
}

@keyframes wobble {
  0% {
    transform: translateX(-90%);
  }
  50% {
    transform: translateX(90%);
  }
  100% {
    transform: translateX(-90%);
  }
}

@keyframes scrolling {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes shadow {
  0% {
    background-position: -98% 0;
  }
  100% {
    background-position: 102% 0;
  }
}

/* =========================================================
   4) NAVBAR (sticky, translucent, accessible)
   ---------------------------------------------------------
   - Desktop: inline menu
   - Mobile: dropdown elegan dengan animasi lembut
========================================================= */
/* =========================================================
   🌐 NAVBAR — ARESTA 21 Clean Version
   (Tanpa hamburger menu, tetap responsif & blur elegan)
========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  height: 72px;
  padding: 0 clamp(16px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 20, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* =====================
   LOGO SECTION
===================== */
.logonav {
  width: clamp(42px, 6vw, 56px);
  height: auto;
  margin-right: 10px;
  flex-shrink: 0;
}

.logo {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--border);
  display: flex;
  align-items: center;
  font-family: "hauser", sans-serif;
  user-select: none;
}

/* =====================
   NAV LINKS (Desktop)
===================== */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--border);
  text-decoration: none;
  font-weight: 600;
  font-family: "hauser", sans-serif;
  letter-spacing: 0.5px;
  padding: 8px 6px;
  border-radius: 6px;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links li a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Underline efek halus */
.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links li a:hover::after {
  transform: scaleX(1);
}

/* =====================
   RESPONSIVE SETTINGS
===================== */

/* Tablet (≤992px) */
@media (max-width: 992px) {
  .navbar {
    height: 68px;
    padding: 0 5vw;
  }

  .logo {
    font-size: 1.2rem;
  }

  .nav-links li a {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 20px;
  }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    padding: 10px 0 12px;
    gap: 8px;
    text-align: center;
  }

  .logonav {
    width: 46px;
    margin-right: 6px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .nav-links li a {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}

/* Mini screen (≤380px) */
@media (max-width: 380px) {
  .logo {
    font-size: 1rem;
  }

  .nav-links li a {
    font-size: 0.85rem;
  }
}



.Competition-card {
  text-align: center;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-family: 'hauser', sans-serif;
  letter-spacing: 2px;
  margin-top: 80px;
  margin-bottom: 40px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

/* Garis glowing di bawah judul */
.Competition-card::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  background: var(--gradient);
  margin: 10px auto 0;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* ====================
   lomba section
==================== */ 

/* ===============================
   FILTER MENU (Responsive)
=============================== */
.filter-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  padding-bottom: 15px;
  margin-bottom: 50px; /* jarak dengan card di bawah */
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* ===============================
   BUTTON STYLE
=============================== */
.filter-menu {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.grade-filter button {
  background: linear-gradient(135deg, #ffffff, #f4f4f4);
  border: 2px solid #e4e4e4;
  padding: 12px 28px;
  border-radius: 12px;

  font-family: 'hauser', sans-serif;
  letter-spacing: 1px;
  font-size: 1.1rem;

  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.grade-filter button:hover {
  transform: translateY(-4px);
  background: var(--accent);
  border-color: #000;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.grade-filter button.active {
  background: var(--accent);
  color: #000;
  font-weight: bold;
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}


/* ===============================
   RESPONSIVE DESIGN
=============================== */

/* 🖥️ Desktop besar */
@media (min-width: 1025px) {
  .grade-filter button {
    font-size: 1rem;
    padding: 10px 24px;
  }
}

/* 💻 Tablet landscape / medium screen */
@media (max-width: 1024px) {
  .filter-menu {
    gap: 12px;
    margin-bottom: 40px;
  }

  .grade-filter button {
    font-size: 0.95rem;
    padding: 9px 18px;
  }
}

/* 📱 Tablet portrait / HP besar */
@media (max-width: 768px) {
  .filter-menu {
    flex-direction: row;
    gap: 10px;
    margin-bottom: 35px;
  }

  .grade-filter button {
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
  }
}

/* 📲 HP kecil */
@media (max-width: 480px) {
  .filter-menu {
    flex-direction: column; /* tombol jadi vertikal */
    align-items: stretch;
    gap: 8px;
    margin-bottom: 30px;
  }

  .grade-filter button {
    width: 100%;
    font-size: 0.85rem;
    padding: 10px;
    border-radius: 8px;
  }
}

    /* === Cards === */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 0 40px 60px;
  justify-content: center;
  align-content: flex-start;
  grid-auto-rows: auto; /* biar tinggi card fleksibel */
}

.card {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto /* ✅ tinggi seragam */
}
/* Bagian gambar */
.card img {
  width: 100%;
  height: 100%; /* sesuaikan tinggi gambar */
  object-fit: cover; /* ✅ gambar full tanpa ruang */
  display: block;
  vertical-align: top;
}

.img-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.img-wrapper img {
    width: 100%;
    display: block;
}

.kuota-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(37, 211, 102, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 300; /* pastikan lebih tinggi dari tombol */
    letter-spacing: 1px;
}

.kuota-full {
    background-color: rgba(230, 47, 47, 0.9) !important;
}

/* Wrapper untuk tag kuota (putra & putri) */
/* Wrapper untuk semua tag kuota */
.kuota-tags {
    position: absolute; /* posisi tetap di pojok kanan atas gambar */
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column; /* susun vertikal */
    gap: 4px; /* jarak antar tag */
    z-index: 300;
}

/* Khusus putri */
.kuota-putri {
    background-color: rgba(37, 162, 211, 0.9);
}


/* Tombol dan teks */
.card .buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 10px;
}

.card h2 {
  font-family: 'hauser', sans-serif;
  color: #1a1a1a;
  letter-spacing: 0.5px;
  padding: 0 10px;
  margin: 10px 0;
  font-size: 1rem;
  color: var(--text);
}

/* Responsive tweak */
@media (max-width: 480px) {
  .card img {
    height: 280px;
  }
}

/* Tombol */
.card .btn {
  background: #fff;
  color: var(--gradient);
  padding: 8px 14px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  text-decoration: none;
}

.card .btn:hover {
  background: #f5d100;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-bold);
}


/* === Responsiveness === */
@media (max-width: 768px) {
  .card-container {
    padding: 0 20px 40px;
    gap: 20px;
  }

  .card {
    max-width: 300px;
    min-height: 320px;
  }

  .card img {
    height: 100%;
  }
}

    /* Bottom footer */
footer {
  border-top: 1px solid var(--border);
  padding: 18px var(--container-x) 26px;
  background: var(--surface);
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  width: 100px;
  height: auto;
  margin-bottom: 6px;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ==============================
   POPUP KUOTA STYLING
============================== */
.popup-wrapper {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 99999;
  animation: fadeIn 0.3s ease forwards;
}

.popup-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 28px 32px;
  border-radius: 14px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  animation: popIn 0.35s ease forwards;
  font-family: 'hauser', sans-serif;
}

.popup-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #000;
  letter-spacing: 1px;
}

.popup-box p {
  margin-bottom: 20px;
  font-size: 1rem;
  color: #222;
}

#popupBtn {
  padding: 10px 22px;
  border: none;
  background: var(--accent);
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s ease;
}

#popupBtn:hover {
  background: #e7be00;
  transform: translateY(-2px);
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
