/* =========================================================
   GOODWOOD FOOTER – FINAL (MATCHED WITH HTML)
========================================================= */

/* Reset footer bawaan OJS */
footer[role="contentinfo"] {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* =========================
   FOOTER MAIN
========================= */
.footer-main {
  background-color: #F2F2F2;
  color: #0B3C8A;
  padding: 50px 0 35px;
  border-top: 4px solid #0B3C8A;
  margin-top: 40px;
  font-size: 15px;
}

/* =========================
   LAYOUT
========================= */
.footer-main .container {
  max-width: 1200px;
}

.footer-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

/* Kolom */
.footer-brand,
.footer-nav,
.footer-resources {
  flex: 1 1 260px;
}

/* =========================
   BRANDING – JARAK RAPAT
========================= */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px; /* JARAK ANTAR ELEMEN */
}

/* Logo */
.footer-logo {
  max-width: 130px;
  margin-bottom: 4px;
  height: auto;
}

/* Text footer */
.footer-text {
  margin: 0;
  line-height: 1.4;
  font-size: 14px;
}

/* Copyright */
.footer-copy {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

/* =========================
   TITLES
========================= */
.footer-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #0B3C8A;
}

/* =========================
   MENU
========================= */
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 10px;
}

.footer-menu a {
  color: #0B3C8A;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.footer-menu a:hover {
  color: #FBA03D;
  padding-left: 6px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 767px) {
  .footer-custom {
    flex-direction: column;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }
}

/* RTL support */
body.rtl .footer-menu a:hover {
  padding-left: 0;
  padding-right: 6px;
}

/* =========================================================
   FOOTER DROPDOWN → OPEN UPWARDS (OJS 3 SAFE)
========================================================= */

/* Anchor positioning */
.footer-nav,
.footer-navigation {
  position: relative;
  overflow: visible !important;
}

/* Drop-up menu */
.footer-nav .dropdown-menu,
.footer-navigation .dropdown-menu {
  top: auto !important;
  bottom: 100% !important;
  margin-bottom: 8px;
  z-index: 9999;
  transform-origin: bottom;
  animation: footerDropUp 0.18s ease-out;
}

/* Animasi halus */
@keyframes footerDropUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pastikan footer & konten tidak memotong dropdown */
.footer-main,
.footer-custom,
.pkp_structure_content,
.pkp_structure_main,
.pkp_structure_page {
  overflow: visible !important;
}

/* Pastikan semua wrapper footer tidak memotong dropdown */
.footer-main,
.footer-custom,
.footer-nav,
.footer-navigation {
  overflow: visible !important;
  position: relative;
}

/* Buka overflow container konten terdekat */
.pkp_structure_content,
.pkp_structure_main,
.pkp_structure_page {
  overflow: visible !important;
}

/* Drop-up positioning (tetap ke atas) */
.footer-navigation .dropdown-menu,
.footer-nav .dropdown-menu {
  top: auto !important;
  bottom: 100% !important;
  margin-bottom: 8px;
  z-index: 9999; /* PENTING: di atas konten */
}
