/* ==============================================
   iLahan - Main Stylesheet
   ============================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    min-height: 100vh;
    background-color: #1a2e1a;
    background-image: url('https://images.unsplash.com/photo-1590165482129-1b8b27698780?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 10, 0.72);
    z-index: 0;
}

* { position: relative; z-index: 1; }

/* ---- Card ---- */
.card {
    background: rgba(30, 48, 30, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(111, 207, 151, 0.15);
    border-radius: 16px;
    padding: 32px;
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(15, 28, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(111, 207, 151, 0.1);
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #6fcf97;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.back-btn {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    transition: all 0.2s;
}
.back-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* ---- Page Layout ---- */
.page-container {
    padding-top: 70px;
    min-height: 100vh;
}

.content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ---- Typography ---- */
h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
h4 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: rgba(255,255,255,0.9); }
h5 { font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.8); }

.subtitle {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

/* ---- Form Elements ---- */
label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
    margin-top: 14px;
}

input[type="number"], input[type="text"] {
    width: 100%;
    padding: 10px 13px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}
input:focus { border-color: rgba(111,207,151,0.5); background: rgba(255,255,255,0.09); }
input::placeholder { color: rgba(255,255,255,0.25); }

input[type="range"] {
    width: 100%;
    accent-color: #6fcf97;
    margin-top: 8px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #2d7a4f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}
.btn:hover { background: #38965f; transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); }

/* ---- Divider ---- */
.divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 24px 0;
}

/* ---- Status Boxes ---- */
.box {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.6;
}
.box-cocok   { background: rgba(0,114,178,0.2);  border: 1px solid rgba(0,114,178,0.4);  }
.box-netral  { background: rgba(230,159,0,0.2);  border: 1px solid rgba(230,159,0,0.4);  }
.box-tidak   { background: rgba(213,94,0,0.2);   border: 1px solid rgba(213,94,0,0.4);   }
.box-info    { background: rgba(74,144,226,0.15); border: 1px solid rgba(74,144,226,0.3); }
.box-warn    { background: rgba(230,159,0,0.15); border: 1px solid rgba(230,159,0,0.3);  }
.box-success { background: rgba(39,174,96,0.15); border: 1px solid rgba(39,174,96,0.3);  }
.box-notice  { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.box-error   { background: rgba(213,94,0,0.2);   border: 1px solid rgba(213,94,0,0.4);   }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.badge-cocok  { background: rgba(0,114,178,0.3);  color: #7fd4f7; }
.badge-netral { background: rgba(230,159,0,0.3);  color: #f7d87f; }
.badge-tidak  { background: rgba(213,94,0,0.3);   color: #f7a07f; }

/* ---- Info Grid ---- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.info-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 10px 14px;
}
.info-item .label { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.info-item .value { font-size: 1rem; font-weight: 700; }

/* ---- Form 2-col grid ---- */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}
@media(max-width:580px){ .form-grid-2 { grid-template-columns: 1fr; } }

/* ---- NPK Grid ---- */
.npk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
@media(max-width:580px){ .npk-grid { grid-template-columns: 1fr; } }

/* ---- Map ---- */
#map {
    width: 100%;
    height: 480px;
    border-radius: 0;
}

/* ---- Peta grid layout ---- */
.grid-peta {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: start;
}
@media(max-width:800px){ .grid-peta { grid-template-columns: 1fr; } }

/* ---- Side panel cards ---- */
.side-panel > .card {
    margin-bottom: 16px;
    padding: 20px;
}

/* ---- Legend ---- */
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ---- Radio options ---- */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.radio-option:hover { background: rgba(255,255,255,0.09); }
.radio-option input { accent-color: #6fcf97; }

/* ---- Step cards (alur interaktif peta) ---- */
.step-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 22px 24px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.step-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(111,207,151,0.15);
    border: 1px solid rgba(111,207,151,0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6fcf97;
}

.step-coord {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}

.step-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
@media(max-width:580px){ .step-btns { grid-template-columns: 1fr; } }

.step-btns .btn {
    flex-direction: column;
    padding: 14px 16px;
    text-align: center;
    font-size: 0.88rem;
    gap: 4px;
}

/* ---- Loading spinner ---- */
.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(111,207,151,0.3);
    border-top-color: #6fcf97;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(111,207,151,0.3); border-radius: 3px; }

/* ==============================================
   Site Footer — iLahan  v11
   ============================================== */

.site-footer {
    margin-top: 0;
    /* Lebih cerah secara signifikan agar logo terbaca */
    background: linear-gradient(
        180deg,
        rgba(34, 64, 34, 0.98) 0%,
        rgba(22, 44, 22, 0.99) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(111, 207, 151, 0.25);
    position: relative;
    z-index: 2;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(111, 207, 151, 0.8) 30%,
        rgba(111, 207, 151, 1.0) 50%,
        rgba(111, 207, 151, 0.8) 70%,
        transparent 100%
    );
}

.footer-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 40px 36px;
    display: grid;
    grid-template-columns: 1.4fr 2fr 1fr;
    gap: 48px;
    align-items: start;
}

/* ---- Brand ---- */
.footer-brand-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #6fcf97;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

.footer-brand-icon {
    width: 30px; height: 30px;
    background: rgba(111, 207, 151, 0.15);
    border: 1px solid rgba(111, 207, 151, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.footer-brand-desc {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
    text-align: left;
}

/* ---- Kolaborasi ---- */
.footer-collab {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.footer-collab-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(111, 207, 151, 0.9);
    margin: 0;
    text-align: center;
}

.footer-collab-inst {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.footer-inst-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.footer-inst-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: transparent;
    padding: 4px 0;
}

/* Logo dibesarkan + tanpa filter yg mengganggu
   (bg sudah putih, jadi filter tidak perlu) */
.footer-inst-logos img {
    height: 45px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    /* Filter minimal — hanya shadow natural */
    filter:
        drop-shadow(0 1px 4px rgba(0, 0, 0, 0.20))
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.10));
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.footer-inst-logos img:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

.footer-inst-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.6;
    display: block;
    width: 100%;
}

/* Separator */
.footer-collab-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0;
}
.footer-collab-with::before,
.footer-collab-with::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(111, 207, 151, 0.3);
    max-width: 48px;
}
.footer-collab-with-text {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(111, 207, 151, 0.7);
    white-space: nowrap;
}

/* ---- Navigasi ---- */
.footer-nav { text-align: left; }

.footer-nav-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(111, 207, 151, 0.9);
    margin: 0 0 16px 0;
}

.footer-nav ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav ul li a {
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
}
.footer-nav ul li a::before {
    content: "";
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(111, 207, 151, 0.55);
    flex-shrink: 0;
    transition: background 0.2s;
    display: inline-block;
}
.footer-nav ul li a:hover { color: #6fcf97; }
.footer-nav ul li a:hover::before { background: #6fcf97; }

/* ---- Bottom bar ---- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 16px 40px;
    text-align: left;
}

.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.52);
    letter-spacing: 0.3px;
    text-align: left;
    margin-right: auto;
}

.footer-collab-tag {
    font-size: 0.70rem;
    color: rgba(111, 207, 151, 0.58);
    text-align: right;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 28px 32px; }
    .footer-collab { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 620px) {
    .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 36px 24px 28px; }
    .footer-bottom { padding: 14px 24px; }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
    .footer-copy { margin-right: 0; }
    .footer-collab-tag { text-align: left; margin-left: 0; }
}
