/* ================= BODY ================= */

body {
  margin: 0;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(to bottom, #a8dadc, #f1faee);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-actions {
  width: 100%;
  margin: 20px 0;
  display: flex;
  justify-content: center;
  /* 👈 THIS CENTERS IT */
}

.post-btn {
  border-color: #457b9d;
  background: #457b9d;
  border-radius: 0.9em;
  cursor: pointer;
  padding: 0.8em 1.2em 0.8em 1em;
  transition: all ease-in-out 0.2s;
  font-size: 16px;
}

.post-btn span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

.post-btn:hover {
  background: #1d3557;
  border-color: #457b9d;
}

.vacancy-container {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vacancy-card {
  background: #f1faee;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  word-break: break-word;
  overflow: hidden;
}

.vacancy-card h3 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 12px 0;
}

.vacancy-card p {
  margin: 8px 0;
  line-height: 1.55;
  font-size: 15px;
}

.card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
}

/* ================= DELETE BUTTON ================= */

.delete-btn {
  width: 150px;

  height: 50px;

  cursor: pointer;

  display: flex;

  align-items: center;

  position: relative;

  overflow: hidden;

  background: #e63946;

  border: none;

  border-radius: 8px;

  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.delete-btn,
.delete-btn span {
  transition: 200ms;
}

.delete-btn .text {
  transform: translateX(22px);

  color: white;

  font-weight: bold;
}

.delete-btn .icon {
  position: absolute;

  right: 0;

  height: 50px;

  width: 40px;

  border-left: 1px solid #c41b1b;

  display: flex;

  align-items: center;

  justify-content: center;

  transition: 200ms;
}

.delete-btn svg {
  width: 15px;

  fill: #fff;
}

.delete-btn:hover {
  background: #ff3636;
}

.delete-btn:hover .text {
  color: transparent;
}

.delete-btn:hover .icon {
  width: 150px;

  border-left: none;
}

.delete-btn:active .icon svg {
  transform: scale(0.8);
}

/* ================= VIEW DETAILS BUTTON ================= */

.view-btn {
  width: 100%;
  margin-top: 10px;
  height: 50px;
  color: #f1faee;
  border-radius: 8px;
  padding: 10px 25px;
  font-weight: 600;
  background: #1d3557;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  box-shadow:
    inset 2px 2px 2px 0 rgba(255, 255, 255, 0.5),
    7px 7px 20px 0 rgba(0, 0, 0, 0.1),
    4px 4px 5px 0 rgba(0, 0, 0, 0.1);
  outline: none;
  font-size: 14px;
}

.view-btn:hover {
  box-shadow:
    4px 4px 6px 0 rgba(255, 255, 255, 0.5),
    -4px -4px 6px 0 rgba(116, 125, 136, 0.5),
    inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2),
    inset 4px 4px 6px 0 rgba(0, 0, 0, 0.4);
}

/* ================= VIEW APPLICANTS BUTTON ================= */

.view-applicants-btn {
  width: 100%;
  margin-top: 10px;
  height: 45px;
  color: #161616;
  border-radius: 8px;
  padding: 10px 25px;
  font-weight: 600;
  background: #457b9d;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    inset 2px 2px 2px 0 rgba(255, 255, 255, 0.8),
    7px 7px 20px 0 rgba(0, 0, 0, 0.08),
    4px 4px 5px 0 rgba(0, 0, 0, 0.05);
  font-size: 15px;
}

.view-applicants-btn:hover {
  background: #457b9d;

  box-shadow:
    4px 4px 6px 0 rgba(255, 255, 255, 0.8),
    -4px -4px 6px 0 rgba(116, 125, 136, 0.15),
    inset -4px -4px 6px 0 rgba(255, 255, 255, 0.5),
    inset 4px 4px 6px 0 rgba(0, 0, 0, 0.08);
}

.apply-btn {
  position: relative;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  padding: 15px;
  background: #457b9d;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
  border: 3px solid #ffffff4d;
  outline: none;
  overflow: hidden;
  font-size: 14px;
  width: 100%;
  margin-top: 10px;
}

.apply-btn:hover {
  background: #1d3557;
  transform: scale(1.03);
  border-color: #fff9;
}

.apply-btn::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100%;
  background-image: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0) 70%);
  top: 0;
  left: -100px;
  opacity: 0.6;
}

.apply-btn:hover::before {
  animation: shine 1.5s ease-out infinite;
}

@keyframes shine {
  0% {
    left: -100px;
  }

  60% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

.apply-btn .icon {
  width: 24px;
  height: 24px;
  transition: 0.3s;
}

.apply-btn:hover .icon {
  transform: translateX(4px);
}

.disabled-btn {
  background: #ccc !important;
  cursor: not-allowed;
}

/* ================= FOOTER ================= */

.footer.dole-footer {
  margin-top: auto;
  padding: 15px 24px 12px;
  border-top: 1px solid #ddd;
  background: #f5f5f5;
  color: #555;
  font-family: Calibri, Arial, sans-serif;
  font-size: 13px;
  text-align: left;
}

.dole-footer .dole-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.dole-footer .footer-main,
.dole-footer .footer-bottom,
.dole-footer .footer-heading,
.dole-footer .footer-social,
.dole-footer .footer-nav {
  display: flex;
  align-items: center;
}

.dole-footer .footer-main,
.dole-footer .footer-bottom {
  justify-content: space-between;
  gap: 16px;
}

.dole-footer .footer-identity { min-width: 0; }

.dole-footer .footer-heading {
  flex-wrap: wrap;
  gap: 8px 10px;
}

.dole-footer .footer-heading strong {
  color: #333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.dole-footer .footer-version {
  padding: 3px 8px;
  border-radius: 20px;
  background: #e8f1f8;
  color: #1d5d85;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.dole-footer .footer-credit {
  display: block;
  margin-top: 5px;
  color: #555;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}

.dole-footer .footer-credit strong { color: #1d3557; font-weight: 700; }

.dole-footer .footer-social { flex-shrink: 0; gap: 8px; }

.dole-footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid #cbdce8;
  border-radius: 8px;
  background: #fff;
  color: #1d5d85;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.dole-footer .footer-social a:hover,
.dole-footer .footer-social a:focus-visible {
  background: #e8f1f8;
  border-color: #457b9d;
  color: #0b4ea2;
}

.dole-footer .footer-contact-icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: inherit;
  pointer-events: none;
}

.dole-footer .footer-bottom {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #ddd;
}

.dole-footer .footer-copyright {
  flex: 1;
  min-width: 0;
  color: #777;
  font-size: 11px;
  line-height: 1.5;
}

.dole-footer .footer-nav { flex-wrap: wrap; flex-shrink: 0; gap: 4px 18px; }

.dole-footer .footer-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #52677d;
  font: inherit;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.dole-footer .footer-info-button:hover,
.dole-footer .footer-info-button:focus-visible {
  background: transparent;
  color: #0b4ea2;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
  transform: none;
}

.dole-footer .footer-social a:focus-visible,
.dole-footer .footer-info-button:focus-visible {
  outline: 2px solid #457b9d;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .footer.dole-footer { padding: 16px; }
  .dole-footer .footer-main,
  .dole-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dole-footer .footer-nav { gap: 4px 14px; }
  .dole-footer .footer-social a { width: 40px; height: 40px; flex-basis: 40px; }
}

/* ================= VACANCY DIVIDER ================= */

.vacancy-divider {
  border: none;
  border-top: 1px solid #dcdcdc;
  margin: 15px 0;
}

.nav-right .nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-right .nav-links a:hover,
.nav-right .nav-links a:focus-visible {
  text-decoration: none;
  background: rgba(255, 255, 255, .14);
  transform: translateY(-1px);
  outline: none;
}

.no-vacancy {
  width: 100%;
  max-width: 700px;
  margin: 80px auto;
  padding: 40px;
  text-align: center;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.no-vacancy h2 {
  color: #003366;
  margin-bottom: 10px;
}

.no-vacancy p {
  color: #666;
  font-size: 16px;
}

/* ================= APPLICATION SUCCESS MODAL ================= */

.success-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100000;
}

.success-modal-content {
  width: 90%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.success-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #198754;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36px;
  font-weight: bold;
}

.success-modal-content h2 {
  color: #1D3557;
  margin: 0 0 12px;
}

.success-modal-content p {
  color: #555;
  line-height: 1.5;
  margin-bottom: 25px;
}

#successOkBtn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #457B9D;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}

#successOkBtn:hover {
  background: #1D3557;
}

@media (max-width: 768px) {
  .vacancy-container {
    padding: 0 8px;
  }

  .vacancy-card {
    padding: 14px;
  }

  .vacancy-card h3 {
    font-size: 20px;
  }

  .vacancy-card p {
    font-size: 14px;
  }

  .view-btn,
  .apply-btn {
    height: 48px;

    font-size: 13px;
  }

}


/* Home only: shared page styles above remain available to other portal pages. */
.home-page,
.home-page *,
.home-page *::before,
.home-page *::after {
  box-sizing: border-box;
}

.home-page {
  min-height: 100vh;
  min-height: 100svh;
  color: #243b4a;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: visible;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.home-page .home-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.home-page .home-skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100001;
  padding: 12px 18px;
  border-radius: 8px;
  background: #fff;
  color: #1d3557;
  font-weight: 700;
  transform: translateY(-180%);
}

.home-page .home-skip-link:focus {
  transform: none;
}

.home-page .navbar {
  gap: 16px;
  padding: 12px 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}

.home-page .nav-left,
.home-page .title-group {
  min-width: 0;
}

.home-page .logo {
  flex-shrink: 0;
  object-fit: contain;
}

.home-page .title {
  font-size: 15px;
  line-height: 1.3;
}

.home-page .subtitle {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
}

.home-page .nav-right {
  flex-shrink: 0;
}

.home-page .nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.home-page .nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, .14);
}

.home-page .burger {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.home-page .vacancy-container {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px 36px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  gap: 24px;
  min-width: 0;
}

.home-page .home-page-heading h1 {
  margin: 0 0 6px;
  color: #1d3557;
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -.4px;
}

.home-page .home-page-heading p {
  margin: 0;
  color: #355566;
  font-size: 16px;
  line-height: 1.55;
}

.home-page .vacancy-card {
  padding: 28px;
  border: 1px solid #d1e3d6;
  border-radius: 18px;
  background: #f1faee;
  box-shadow: 0 6px 20px rgba(29, 53, 87, .07);
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: normal;
}

.home-page .vacancy-card h2 {
  margin: 0 0 20px;
  color: #1d3557;
  font-size: clamp(21px, 3vw, 25px);
  line-height: 1.3;
  letter-spacing: -.25px;
}

.home-page .vacancy-card h3 {
  margin: 0 0 12px;
  color: #1d3557;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.home-page .vacancy-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

.home-page .vacancy-card dl {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.home-page .home-vacancy-meta {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px 24px;
}

.home-page .vacancy-card dt {
  color: #355566;
  font-weight: 700;
}

.home-page .vacancy-card dd {
  min-width: 0;
  margin: 3px 0 0;
}

.home-page .home-vacancy-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #d6e5d8;
}

.home-page .home-vacancy-qualifications {
  display: grid;
  gap: 12px;
}

.home-page .home-vacancy-qualifications > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.home-page .home-vacancy-qualifications dd {
  margin: 0;
}

.home-page .vacancy-card .home-application-duration {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #d6e5d8;
  border-radius: 10px;
  background: rgba(255, 255, 255, .6);
  color: #1d3557;
}

.home-page .vacancy-card .home-vacancy-note {
  margin-top: 14px;
  color: #355566;
}

.home-page .home-vacancy-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 24px;
}

.home-page .view-btn,
.home-page .apply-btn,
.home-page #successOkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 52px;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid #457b9d;
  border-radius: 10px;
  background: #457b9d;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.home-page .view-btn {
  border-color: #1d3557;
  background: transparent;
  color: #1d3557;
}

.home-page .apply-btn::before {
  content: none;
  animation: none;
}

.home-page .apply-btn .icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  transform: none;
  transition: none;
}

.home-page .apply-btn.disabled-btn {
  border-color: #cdd8dc;
  background: #e8eff0 !important;
  color: #415461;
  opacity: 1;
  cursor: default;
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 3px solid #0b4ea2;
  outline-offset: 4px;
}

/* The main landmark receives focus after the dialog; action controls keep their rings. */
.home-page #homeContent:focus {
  outline: none;
}

.home-page .navbar a:focus-visible {
  outline-color: #fff;
  transform: none;
}

.home-page .mobile-menu.mobile-nav-hidden:focus-within {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.home-page .no-vacancy {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #d1e3d6;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(29, 53, 87, .07);
  overflow-wrap: anywhere;
}

.home-page .no-vacancy h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.3;
}

.home-page .no-vacancy p {
  margin: 0;
  color: #415461;
  font-size: 16px;
}

.home-page.home-modal-open {
  overflow: hidden;
}

.home-page .success-modal {
  display: flex;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-backdrop-filter: blur(3px);
}

.home-page .success-modal[hidden] {
  display: none;
}

.home-page .success-modal-content {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: clamp(20px, 5vw, 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 18px;
  overflow-wrap: anywhere;
  box-shadow: 0 18px 48px rgba(15, 42, 76, .2);
}

.home-page .success-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  background: #e5f4eb;
  color: #167343;
}

.home-page .success-modal-content h2 {
  font-size: 24px;
  line-height: 1.3;
}

.home-page .success-modal-content p {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
}

.home-page #successOkBtn {
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .home-page .view-btn:hover {
    background: #e1ede7;
    box-shadow: none;
    transform: none;
  }

  .home-page .apply-btn:not(:disabled):hover,
  .home-page #successOkBtn:hover {
    background: #1d3557;
    border-color: #1d3557;
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 768px) {
  .home-page {
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .home-page .navbar {
    padding-bottom: 12px;
  }

  .home-page .title {
    font-size: 13px;
  }

  .home-page .logo {
    width: 34px;
    height: 34px;
  }

  .home-page .vacancy-container {
    padding-top: 24px;
    padding-bottom: 28px;
    gap: 20px;
  }

  .home-page .vacancy-card {
    padding: 20px;
    border-radius: 14px;
  }

  .home-page .vacancy-card h2 {
    margin-bottom: 18px;
  }

  .home-page .dropdown a {
    padding: 6px 2px;
    font-size: 12px;
    line-height: 1.3;
  }

  .home-page .mobile-nav-label {
    min-height: 16px;
    line-height: 1.3;
  }

  .home-page .mobile-menu {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 600px) {
  .home-page .home-vacancy-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .home-page .home-vacancy-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .home-page .vacancy-card {
    padding: 18px;
  }

  .home-page .home-vacancy-qualifications > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .home-page .home-application-duration {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
