/* Anak Agung Ngurah Krisna Artha Wibawa 240040075 BB244 */
:root {
  --stikom-blue: #003366;
  --stikom-light: #004d99;
  --accent-cyan: #00d2ff;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --font-main: "Inter", sans-serif;
}

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

body {
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f0f2f5;
}

header {
  flex: 0 0 auto;
  position: relative;
  z-index: 1000;
  background: white;
}

.main-content {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 600px;
  overflow: hidden;
}

.map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.sidebar-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 480px;
  height: 100%;
  z-index: 10;
  background: var(--glass-bg);
  box-shadow: -10px 0 40px rgba(0, 51, 102, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(50px);
  opacity: 0;
  animation: slideInRight 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar-header {
  background: linear-gradient(135deg, var(--stikom-blue) 0%, var(--stikom-light) 100%);
  padding: 40px;
  color: white;
  border-bottom-left-radius: 40px;
  box-shadow: 0 10px 20px rgba(0, 51, 102, 0.2);
  position: relative;
  z-index: 2;
}
.sidebar-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}
.sidebar-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
}

.sidebar-body {
  padding: 40px;
  flex: 1;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 15px;
  font-size: 1.2rem;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: 0.3s;
}

.custom-input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 2px solid #eee;
  border-radius: 12px;
  background: #f9f9f9;
  font-family: inherit;
  font-size: 0.95rem;
  color: #333;
  transition: all 0.3s ease;
}

.custom-input:focus {
  outline: none;
  background: white;
  border-color: var(--stikom-blue);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

.custom-input:focus + .input-icon,
.form-group:hover .input-icon {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

.input-label {
  position: absolute;
  left: 45px;
  top: 16px;
  color: #999;
  font-size: 0.9rem;
  pointer-events: none;
  transition: 0.3s;
  background: transparent;
}

.custom-input:focus ~ .input-label,
.custom-input:valid ~ .input-label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  background: white;
  padding: 0 5px;
  color: var(--stikom-blue);
  font-weight: 700;
}

.btn-send {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--stikom-blue), var(--stikom-light));
  color: white;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
}

.info-card {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 5;
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  max-width: 380px;
  border-left: 6px solid var(--stikom-blue);
  animation: slideUp 0.8s 0.3s forwards ease-out;
  opacity: 0;
  transform: translateY(30px);
}

.info-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--stikom-blue);
  margin-bottom: 12px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}
.info-icon {
  font-size: 1.1rem;
}

.mobile-info-toggle {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 20;
  background: var(--stikom-blue);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

@keyframes slideInRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .sidebar-overlay {
    width: 100%;
    height: 60vh;
    top: auto;
    bottom: 0;
    border-radius: 30px 30px 0 0;
    transform: translateY(100%);
    animation: slideUpPanel 0.8s forwards;
  }
  .sidebar-header {
    padding: 25px;
    border-radius: 0;
    text-align: center;
  }
  .sidebar-body {
    padding: 25px;
  }
  .info-card {
    display: none;
    bottom: 80px;
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
  }
  .mobile-info-toggle {
    display: flex;
  }
  .info-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    z-index: 30;
  }
  .backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 25;
  }
  .backdrop.active {
    display: block;
  }
  @keyframes slideUpPanel {
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* =========================================
    TAMPILAN TABLET 
   ========================================= */
@media (min-width: 601px) and (max-width: 900px) {
  .sidebar-overlay {
    width: 360px;
    height: auto;
    max-height: 90vh;
    top: 50%;
    right: 20px;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
    border-radius: 20px;
    opacity: 1;
    animation: none;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.15);
  }

  .sidebar-header {
    border-radius: 20px 20px 0 0;
    text-align: left;
    padding: 30px;
  }

  .info-card {
    display: block;
    bottom: 30px;
    left: 30px;
    width: 280px;
    opacity: 1;
    transform: none;
    animation: none;
    z-index: 5;
  }

  .mobile-info-toggle {
    display: none;
  }
  .backdrop {
    display: none;
  }
}

/* =========================================
   FIX TAMPILAN HP (Supaya Map Lebih Luas)
   Range: Layar HP (< 600px)
   ========================================= */
@media (max-width: 600px) {
  .sidebar-overlay {
    /* UBAH TINGGI DISINI */
    height: 45vh !important; /* Form cuma ambil 45% layar, Map dapet 55% */
    bottom: 0;
    border-radius: 25px 25px 0 0;
  }

  /* Kecilkan padding header biar hemat tempat */
  .sidebar-header {
    padding: 15px 20px !important;
  }

  .sidebar-title {
    font-size: 1.3rem !important; /* Judul dikecilin dikit */
    margin-bottom: 0;
  }

  .sidebar-subtitle {
    font-size: 0.8rem !important;
    display: none; /* Subtitle dihilangkan biar hemat tempat map */
  }

  /* Body form bisa discroll */
  .sidebar-body {
    padding: 20px !important;
    overflow-y: auto; /* Pastikan bisa discroll kalau kepotong */
  }

  /* Geser tombol "Info Kampus" ke atas dikit biar gak ketutup form */
  .mobile-info-toggle {
    bottom: 48vh !important; /* Muncul pas di atas kotak form */
    z-index: 50;
  }
}
