/* ===============================
   GLOBAL STYLE
================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #0f2027 0%,
    #203a43 50%,
    #2c5364 100%
  );
  background-attachment: fixed;
}


/* ===============================
   CONTAINER
================================ */

.mawaris-container {
  width: 100%;
  max-width: 600px;
  margin: 80px auto 40px auto;
}
/* ===============================
   TITLE
================================ */

.mawaris-container h1 {
  text-align: center;
  color: white;
  margin-bottom: 25px;
  font-size: 26px;
  letter-spacing: 1px;
}

/* ===============================
   CARD BOX
================================ */

.form-box {
  background: #1c2f45;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 
    0 15px 40px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.1);
  margin-bottom: 25px;
  color: white;
}

/* ===============================
   LABEL
================================ */

.form-box label {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
}

/* ===============================
   INPUT
================================ */

.form-box input[type="number"],
.form-box input[type="text"] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 14px;
  background: #243a55;
  color: white;
  transition: 0.3s;
}

.form-box input[type="number"]:focus {
  background: #2a425f;
  transform: scale(1.02);
}

.form-box input[type="checkbox"] {
  margin-top: 10px;
  transform: scale(1.2);
}

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

.form-box button {
  width: 100%;
  margin-top: 25px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color: white;
  transition: 0.3s;
  box-shadow: 0 8px 20px rgba(221, 36, 118, 0.4);
}

.form-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(221, 36, 118, 0.6);
}

/* ===============================
   RESULT CARD
================================ */

#hasil {
  background: white;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  animation: fadeIn 0.4s ease-in-out;
}

#hasil h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #2c5364;
}

#hasil p {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

#hasil p:last-child {
  border-bottom: none;
}

/* ===============================
   ANIMATION
================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 600px) {
  .mawaris-container {
    max-width: 100%;
  }

  .form-box {
    padding: 22px;
  }
}

.section-title {
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 15px;
}

.section-sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 3px;
}

#mazhab {
  padding: 8px 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1f3a46, #274c5e);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: 0.3s ease;
}

#mazhab:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ff6a00;
}

.form-box button {
  background: linear-gradient(90deg, #ff512f, #dd2476);
  border: none;
  padding: 14px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(255, 81, 47, 0.4);
}

.form-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(255, 81, 47, 0.6);
}

.form-box button:active {
  transform: scale(0.98);
}

.mawaris-container > button {
  margin-top: 20px;
  padding: 10px 22px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(90deg, #11998e, #38ef7d);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 6px 18px rgba(56, 239, 125, 0.4);
}

.mawaris-container > button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(56, 239, 125, 0.6);
}

/* MODE SELECT */
#mode {
  display: block;
  margin: 15px auto 25px;
  padding: 10px 18px;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(135deg, #1f3a46, #2c5364);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: all 0.3s ease;
}

/* Hover */
#mode:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.5);
}

/* Focus */
#mode:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ff6a00;
}

/* Dropdown option style (browser support terbatas) */
#mode option {
  background: #1b2d38;
  color: #ffffff;
}

/* WRAPPER FLEX ATAS */
.nav-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

/* Biar tombol PDF gak full width */
.top-bar button {
  width: auto;
  padding: 10px 20px;
}

select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background-color: #1f3c3c;
  color: white;
  font-size: 14px;
  outline: none;
  appearance: none;
}

select:focus {
  box-shadow: 0 0 0 2px #2ecc71;
}

.navbar {
  background: linear-gradient(90deg,#0f2027,#203a43,#2c5364);
  padding: 15px 40px;
  color: white;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand{
  text-decoration:none;
  color:inherit;
}

.nav-brand-glass{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:16px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 12px 30px rgba(0,0,0,0.25);
}

.nav-brand-icon{
  width:22px;
  height:22px;
  border-radius:8px;
}

.nav-brand-text{
  font-weight:800;
  font-size:16px;
  letter-spacing:0.2px;
  color:#e2e8f0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #eaf2ff;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: #00ffcc;
}

.navbar .lang-dropdown {
  position: relative;
  flex-shrink: 0;
}

.navbar .lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.navbar .lang-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.navbar .lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  background: #0f2027;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 1300;
}

.navbar .lang-menu button {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: #f1f5f9;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.navbar .lang-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.navbar .lang-dropdown.active .lang-menu {
  display: block;
}

html[lang="ar"] .navbar .lang-menu {
  right: auto;
  left: 0;
}

html[lang="ar"] .navbar .lang-menu button {
  text-align: right;
}

@media (min-width: 900px) {
  .navbar{
    padding: 14px 40px;
  }

  .nav-container{
    flex-direction:column;
    justify-content:center;
    gap:12px;
  }

  .nav-brand{
    width:100%;
    display:flex;
    justify-content:center;
  }

  .nav-links{
    flex-wrap:wrap;
    justify-content:center;
    gap:10px 18px;
    padding:10px 14px;
    border-radius:18px;
    background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
  }

  .nav-links a{
    white-space:nowrap;
  }
}

/* ===============================
   PREFOOTER MODERN
================================ */

.prefooter {
  background: linear-gradient(135deg, #0f3d3e, #145a5c);
  padding: 50px 30px;
  color: #eafafa;
  position: relative;
  overflow: hidden;
}

.prefooter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(0,255,200,0.15), transparent 60%);
  pointer-events: none;
}

.prefooter-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  position: relative;
  z-index: 1;
}

.prefooter-col h4 {
  color: #00ffcc;
  margin-bottom: 12px;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.prefooter-col p {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.9;
}

/* ===============================
   FOOTER BAWAH FINAL
================================ */

.footer-bottom {
  background: linear-gradient(135deg, #0e3b3d, #0c2f30);
  padding: 25px 20px;
  text-align: center;
  color: #d8ffff;
  font-size: 13px;
  border-top: 1px solid rgba(0,255,200,0.15);
}

/* Link container */
.footer-links {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* Link style */
.footer-links a {
  color: #aefefe;
  text-decoration: none;
  font-size: 13px;
  transition: 0.3s ease;
  position: relative;
}

/* Hover modern underline */
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #00ffcc;
  transition: 0.3s;
}

.footer-links a:hover {
  color: #00ffcc;
}

.footer-links a:hover::after {
  width: 100%;
}

/* ===============================
   MOBILE - MAWARIS
================================ */

@media (max-width: 768px) {

  .mawaris-container {
    max-width: 100%;
    padding: 0 15px;
  }

  .form-box {
    padding: 20px;
    border-radius: 14px;
  }

  .form-box label {
    font-size: 13px;
  }

  .form-box input,
  .form-box select {
    font-size: 13px;
    padding: 9px;
  }

  .form-box button {
    font-size: 14px;
    padding: 12px;
  }

  #hasil {
    padding: 18px;
    font-size: 13px;
  }

  #hasil h3 {
    font-size: 16px;
  }
}

/* =====================================
   MOBILE NAV – LOGO DI ATAS SENDIRI
===================================== */

@media (max-width: 768px) {

  .nav-container {
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    gap: 10px;
  }

  .nav-brand{
    width:100%;
    display:flex;
    justify-content:center;
  }

  .nav-brand-glass{
    width:100%;
    justify-content:center;
  }

  .nav-links{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px 14px;
    padding:8px 10px;
    border-radius:16px;
    background:rgba(255,255,255,0.05);
    border:1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
  }

  .nav-links a{
    font-size:13px;
    white-space:nowrap;
  }

}

.lang-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e9ffff;
}

.lang-switch-label {
  font-size: 12px;
  opacity: 0.9;
}

.lang-switch-select {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  width: 68px;
}

.lang-switch-select option {
  color: #111;
}

.i18n-helper-card {
  margin-top: 20px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 16px 18px;
  color: #ffffff;
}

.i18n-helper-card h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.i18n-helper-card ul {
  margin-left: 18px;
}

.i18n-helper-card li {
  margin-bottom: 7px;
  line-height: 1.55;
  font-size: 13px;
}

.footer-copy-text {
  margin-top: 6px;
}

html[dir="rtl"] .i18n-helper-card {
  text-align: right;
}

 .scroll-to-top{
   position: fixed;

   left: 18px;
   bottom: 26px;

   width: 42px;
   height: 36px;

   border: none;
   border-radius: 10px;

   display: flex;
   align-items: center;
   justify-content: center;

   cursor: pointer;

   background: linear-gradient(135deg,#ef4444,#dc2626);

   color: white;

   box-shadow:
     0 6px 16px rgba(0,0,0,0.25),
     0 3px 8px rgba(239,68,68,0.35);

   opacity: 0;
   visibility: hidden;

   transform: translateY(14px);
   transition: all 0.28s ease;

   z-index: 999;
   pointer-events: none;
 }

 .scroll-to-top svg{
   width: 16px;
   height: 16px;
 }

 .scroll-to-top.show{
   opacity: 1;
   visibility: visible;
   transform: translateY(0);
   pointer-events: auto;
 }

 .scroll-to-top:hover{
   transform: translateY(-2px);
   box-shadow:
     0 10px 22px rgba(0,0,0,0.3),
     0 6px 14px rgba(239,68,68,0.45);
 }

 .scroll-to-top:active{
   transform: scale(0.95);
 }
