/* =========================================================
   STC 2026
   NAVBAR
========================================================= */

/* =========================================================
   HEADER
========================================================= */

.header {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;

  z-index: 999;

  background: rgba(255, 255, 255, 0.75);

  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);

  box-shadow: 0 5px 30px rgba(31, 62, 108, 0.08);

  transition:
    background 0.4s ease,
    padding 0.4s ease,
    box-shadow 0.4s ease;
}

/* =========================================================
   HEADER SCROLLED
========================================================= */

.header.scrolled {
  background: rgba(255, 255, 255, 0.92);

  box-shadow: 0 8px 35px rgba(31, 62, 108, 0.12);
}

/* =========================================================
   NAVBAR CONTAINER
========================================================= */

.navbar {
  max-width: 1320px;

  height: 90px;

  margin: 0 auto;

  padding: 0 40px;

  display: flex;

  align-items: center;

  justify-content: space-between;
}

/* =========================================================
   LOGO
========================================================= */

.logo {
  display: flex;

  align-items: center;

  flex-shrink: 0;

  text-decoration: none;
}

.logo img {
  display: block;

  width: 120px;

  height: auto;

  transition:
    transform 0.4s ease,
    filter 0.4s ease;
}

.logo:hover img {
  transform: scale(1.06) rotate(-2deg);

  filter: drop-shadow(0 8px 18px rgba(79, 145, 216, 0.4));
}

/* =========================================================
   NAVIGATION MENU
========================================================= */

.nav-menu {
  display: flex;

  align-items: center;

  gap: 40px;

  list-style: none;

  margin: 0;

  padding: 0;
}

/* =========================================================
   NAVIGATION LINK
========================================================= */

.nav-link {
  position: relative;

  display: inline-block;

  color: #1f2937;

  font-size: 15px;

  font-weight: 500;

  letter-spacing: 0.3px;

  text-decoration: none;

  transition: color 0.3s ease;
}

/* Underline */

.nav-link::after {
  content: "";

  position: absolute;

  left: 0;

  bottom: -6px;

  width: 100%;

  height: 2.5px;

  background: linear-gradient(90deg, #2563eb, #7cb9e8);

  border-radius: 4px;

  transform: scaleX(0);

  transform-origin: left;

  transition: transform 0.35s ease;
}

/* Hover */

.nav-link:hover {
  color: #2563eb;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Active */

.nav-link.active {
  color: #2563eb;
}

/* =========================================================
   DROPDOWN ARROW
========================================================= */

.arrow {
  display: inline-block;

  margin-left: 4px;

  font-size: 12px;

  transition: transform 0.3s ease;
}

/* =========================================================
   DROPDOWN
========================================================= */

.dropdown {
  position: relative;
}

/* Arrow rotation */

.dropdown:hover .arrow {
  transform: rotate(180deg);
}

/* =========================================================
   DROPDOWN MENU
========================================================= */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;

    top: calc(100% + 12px);
    left: 50%;

    width: 215px;

    margin: 0;
    padding: 8px 0;

    list-style: none;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid rgba(124, 185, 232, 0.2);

    border-radius: 14px;

    box-shadow:
        0 20px 45px rgba(31, 62, 108, 0.15);

    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    transform:
        translate(-50%, 10px)
        scale(0.96);

    transform-origin: top center;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;

    z-index: 2000;
}


/* DROPDOWN OPEN */

.dropdown:hover .dropdown-menu {
    opacity: 1;

    visibility: visible;

    transform:
        translate(-50%, 0)
        scale(1);
}


/* DROPDOWN ITEM */

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: flex;

    align-items: center;

    width: 100%;

    box-sizing: border-box;

    padding: 13px 20px;

    color: #1f2937;

    font-size: 14px;

    font-weight: 500;

    text-decoration: none;

    border-left: 3px solid transparent;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        padding-left 0.3s ease,
        border-color 0.3s ease;
}


/* HOVER */

.dropdown-menu li a:hover {
    padding-left: 26px;

    color: #ffffff;

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #4f91d8
        );

    border-left-color: #7cb9e8;
}
/* =========================================================
   DROPDOWN LINK
========================================================= */

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu li a {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 13px 20px;

  color: #1f2937;

  font-size: 14px;

  text-decoration: none;

  border-left: 3px solid transparent;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    padding-left 0.3s ease,
    border-color 0.3s ease;
}

/* Cloud */

.dropdown-menu li a::before {
  content: "☁";

  font-size: 12px;

  opacity: 0;

  transition: opacity 0.3s ease;
}

/* Dropdown hover */

.dropdown-menu li a:hover {
  padding-left: 26px;

  color: #ffffff;

  background: linear-gradient(90deg, #2563eb, #4f91d8);

  border-left-color: #7cb9e8;
}

.dropdown-menu li a:hover::before {
  opacity: 1;
}



/* =========================================================
   AUTH BUTTONS DESKTOP
========================================================= */

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-btn {
  position: relative;

  z-index: 1;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 12px 30px;

  border: 2px solid #2563eb;

  border-radius: 50px;

  color: #2563eb;

  font-size: 15px;

  font-weight: 600;

  text-decoration: none;

  overflow: hidden;

  transition:
    color 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

/* Login background */

.login-btn::before {
  content: "";

  position: absolute;

  inset: 0;

  z-index: -1;

  background: linear-gradient(90deg, #2563eb, #4f91d8);

  border-radius: 50px;

  transform: translateX(-101%);

  transition: transform 0.4s ease;
}

/* Login hover */

.login-btn:hover {
  color: #ffffff;

  transform: translateY(-2px);

  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.login-btn:hover::before {
  transform: translateX(0);
}

/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {
  display: none;

  width: 42px;

  height: 42px;

  padding: 0;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  gap: 5px;

  border: none;

  border-radius: 10px;

  background: transparent;

  cursor: pointer;

  z-index: 1001;

  transition: background 0.3s ease;
}

/* Hamburger hover */

.hamburger:hover {
  background: rgba(65, 105, 216, 0.08);
}

/* Hamburger lines */

.hamburger span {
  display: block;

  width: 26px;

  height: 3px;

  border-radius: 5px;

  background: #4169d8;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    width 0.3s ease;
}

/* =========================================================
   HAMBURGER ACTIVE
========================================================= */

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  width: 0;

  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   FIX NAVBAR OVERLAP
   Memberi jarak agar konten tidak tertutup navbar
========================================================= */

.competition-container {
    padding-top: 120px;
}


/* ==============================
   COMPETITION HEADER
============================== */

.competition-header {
    position: relative;
    z-index: 1;
    margin-bottom: 50px;
}


/* ==============================
   TABLET
============================== */

@media (max-width: 900px) {

    .competition-container {
        padding-top: 110px;
    }

    .competition-header {
        margin-bottom: 40px;
    }

}


/* ==============================
   MOBILE
============================== */

@media (max-width: 650px) {

    .competition-container {
        padding-top: 100px;
    }

    .competition-header {
        margin-bottom: 35px;
    }

}
/* =========================================================
   MOBILE NAVBAR
   Sumber tunggal aturan navbar layar kecil — dipakai semua
   halaman (navbar.css selalu dimuat, responsive.css tidak).
   Breakpoint 900px disamakan dengan JavaScript navbar/hamburger.
========================================================= */

/* Login versi dalam menu: hanya untuk layar kecil */
.nav-login-item {
  display: none;
}

@media (max-width: 900px) {

  .hamburger {
    display: flex;
  }

  /* Menu jadi panel yang turun dari header */
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    display: none;
    flex-direction: column;
    align-items: stretch;

    gap: 4px;
    padding: 14px 20px 22px;

    background: #ffffff;
    border-top: 1px solid rgba(124, 185, 232, 0.35);
    box-shadow: 0 18px 40px rgba(31, 62, 108, 0.12);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
  }

  .nav-menu > li > .nav-link {
    display: block;
    padding: 12px 4px;
    font-size: 16px;
  }

  /* Dropdown Competitions: menumpuk, bukan melayang */
  .nav-menu .dropdown-menu {
    position: static;
    display: none;

    width: 100%;
    margin: 2px 0 6px;
    padding: 6px 0 6px 14px;

    opacity: 1;
    visibility: visible;
    transform: none;

    border-left: 2px solid rgba(124, 185, 232, 0.5);
    background: transparent;
    box-shadow: none;
  }

  .nav-menu .dropdown.active .dropdown-menu {
    display: block;
  }

  .nav-menu .dropdown-menu li a {
    display: block;
    padding: 10px 6px;
    font-size: 15px;
  }

  /* Tombol Login / Dashboard desktop disembunyikan */
  .nav-auth {
    display: none;
  }

  /* …dan muncul sebagai item terakhir di dalam hamburger */
  .nav-login-item {
    display: block;

    margin-top: 10px;
    padding-top: 14px;

    border-top: 1px solid rgba(124, 185, 232, 0.35);
  }

  .nav-login-item .login-btn {
    display: flex;
    width: 100%;
  }

}


/* =========================================================
   DASHBOARD BUTTON
   Tombol dashboard peserta menggunakan gaya yang sama
   dengan tombol Login / Logout.
========================================================= */

.dashboard-btn {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 30px;

  border: 2px solid #2563eb;
  border-radius: 50px;

  color: #2563eb;

  font-size: 15px;
  font-weight: 600;

  text-decoration: none;
  overflow: hidden;

  transition:
    color 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.dashboard-btn::before {
  content: "";

  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(90deg, #2563eb, #4f91d8);
  border-radius: 50px;

  transform: translateX(-101%);
  transition: transform 0.4s ease;
}

.dashboard-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.dashboard-btn:hover::before {
  transform: translateX(0);
}

@media (max-width: 900px) {
  .dashboard-btn {
    display: flex;
    width: 100%;
  }
}

/* =========================================================
   DASHBOARD MOBILE
   Dashboard peserta masuk ke dalam hamburger.
========================================================= */

.nav-dashboard-item {
  display: none;
}

@media (max-width: 900px) {
  .nav-dashboard-item {
    display: block;
    width: 100%;
    margin-top: 4px;
  }

  .nav-dashboard-item[hidden] {
    display: none;
  }

  .nav-dashboard-item .dashboard-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .dashboard-desktop {
    display: none !important;
  }

  /* Dashboard dan Logout dibuat berdekatan */
  .nav-login-item {
    margin-top: 4px;
    padding-top: 8px;
  }

  .nav-login-item .login-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}


/* Respect hidden attribute even when display is defined by button styles */
.dashboard-desktop[hidden] {
  display: none !important;
}