:root {
  --primary-color: #0077be;
  --secondary-color: #004e7a;
  --success-color: #48bb78;
  --warning-color: #ed8936;
  --danger-color: #e53e3e;
  --dark-color: #2d3748;
  --gray-color: #718096;
  --light-gray: #e2e8f0;
  --white: #ffffff;
  --ocean-blue: #006994;
  --light-blue: #4da6d9;
  --deep-blue: #003d5c;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --danger: #ef4444;
  --ocean-gradient: linear-gradient(
    135deg,
    #0ea5e9 0%,
    #0284c7 25%,
    #0369a1 50%,
    #1e40af 75%,
    #1e3a8a 100%
  );
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(
    180deg,
    #87ceeb 0%,
    #4682b4 25%,
    #0077be 50%,
    #006994 75%,
    #003d5c 100%
  );
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Animated waves background */
.ocean-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

.wave {
  position: absolute;
  width: 200%;
  height: 200px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: wave-animation 6s ease-in-out infinite;
}

.wave:nth-child(1) {
  top: 20%;
  animation-delay: 0s;
}

.wave:nth-child(2) {
  top: 40%;
  animation-delay: -2s;
}

.wave:nth-child(3) {
  top: 60%;
  animation-delay: -4s;
}

@keyframes wave-animation {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }

  50% {
    transform: translateX(-50%) rotate(2deg);
  }
}

/* Floating bubbles */
.bubble {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float-up 8s infinite linear;
  z-index: -1;
}

.bubble:nth-child(1) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
}

.bubble:nth-child(2) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: 2s;
}

.bubble:nth-child(3) {
  left: 70%;
  width: 25px;
  height: 25px;
  animation-delay: 4s;
}

.bubble:nth-child(4) {
  left: 80%;
  width: 18px;
  height: 18px;
  animation-delay: 6s;
}

@keyframes float-up {
  0% {
    bottom: -100px;
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    bottom: 100vh;
    opacity: 0;
  }
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo i {
  color: var(--primary-color);
  font-size: 2rem;
}

.logo h1 {
  color: var(--dark-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 119, 190, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #38a169);
  color: var(--white);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

/* Search Form */
.search-section {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-title {
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  color: var(--dark-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--dark-color);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--gray-color);
}

.form-select {
  cursor: pointer;
}

.form-select option {
  padding: 0.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-color);
  font-size: 1rem;
}

.input-icon .form-input {
  padding-left: 2.5rem;
}

/* Alumni Registration Form */
.registration-section {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.registration-title {
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--dark-color);
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
  transform: translateY(-2px);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.checkbox-label {
  color: var(--dark-color);
  font-size: 0.95rem;
  cursor: pointer;
}

.form-radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-radio {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.radio-label {
  color: var(--dark-color);
  font-size: 0.95rem;
  cursor: pointer;
}

/* Map Container */
.map-container {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  position: relative;
  height: 600px;
  margin-bottom: 2rem;
}

.map-header {
  background: #ffffff;
  color: var(--white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-title {
  color: var(--dark-color);
  font-size: 1.25rem;
  font-weight: 600;
}

#map_canvas {
  width: 100%;
  height: calc(100% - 60px);
  position: relative;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.stat-label {
  color: var(--gray-color);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Dialog Styles */
.dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.dialog-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  width: 1200px;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-gray);
}

.dialog-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-color);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--danger-color);
}

/* Loading Spinner */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Footer */
.footer {
  background: linear-gradient(
    135deg,
    var(--deep-blue) 0%,
    var(--ocean-blue) 50%,
    var(--secondary-color) 100%
  );
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V30c0,0,100,60,300,60s300-60,300-60s100,60,300,60s300-60,300-60V0Z" fill="rgba(255,255,255,0.1)"/></svg>');
  background-size: cover;
  opacity: 0.3;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section p,
.footer-section li {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.footer-section a:hover {
  color: var(--white);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.footer-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,60c100,0,200-30,300-30s200,30,300,30s200-30,300-30s200,30,300,30V120H0V60Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
  animation: wave-footer 4s ease-in-out infinite;
}

@keyframes wave-footer {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-20px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

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

  .container {
    padding: 1rem;
  }

  .map-container {
    height: 450px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dialog-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .social-links {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-radio-group {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .stat-card {
    padding: 1.5rem;
  }

  .stat-icon {
    font-size: 2.5rem;
  }

  .footer {
    padding: 2rem 0 1rem;
  }

  .search-section,
  .registration-section {
    padding: 1.5rem;
  }
}

/* Welcome Card */
.welcome-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  padding: 3rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.welcome-title {
  font-size: 2.25rem;
  font-weight: 800;
  background: var(--ocean-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.welcome-text {
  color: var(--gray-700);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.benefits-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(14, 165, 233, 0.08);
  border-radius: var(--radius);
  border-left: 4px solid var(--ocean-blue);
}

.benefit-icon {
  width: 24px;
  height: 24px;
  background: var(--ocean-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-text {
  color: var(--gray-700);
  font-weight: 500;
}

.thank-you {
  text-align: center;
  font-style: italic;
  color: var(--gray-500);
  font-size: 1.125rem;
  font-weight: 500;
}

/* Instructions Card */
.instructions-card {
  background: rgba(248, 113, 113, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.instructions-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.instructions-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.instructions-list {
  list-style: none;
  counter-reset: step;
}

.instruction-item {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--gray-700);
  font-weight: 500;
}

.instruction-item::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Custom Select2 Styling */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 56px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.select2-container--default .select2-selection--single:hover {
  border-color: #0077be !important;
  box-shadow: 0 4px 12px rgba(0, 119, 190, 0.15) !important;
}

.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #0077be !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1) !important;
  outline: none !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #374151 !important;
  line-height: 56px !important;
  padding-left: 16px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #9ca3af !important;
  font-style: italic !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 56px !important;
  top: 2px !important;
  right: 12px !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: #6b7280 transparent transparent transparent !important;
  border-width: 6px 5px 0 5px !important;
  margin-top: -3px !important;
}

.select2-container--default.select2-container--open
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: transparent transparent #6b7280 transparent !important;
  border-width: 0 5px 6px 5px !important;
}

/* Dropdown Styling */
.select2-dropdown {
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  background: #ffffff !important;
  margin-top: 4px !important;
}

.select2-container--default .select2-results > .select2-results__options {
  max-height: 250px !important;
  padding: 8px 0 !important;
}

.select2-container--default .select2-results__option {
  padding: 12px 16px !important;
  font-size: 15px !important;
  color: #374151 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.select2-container--default .select2-results__option:hover {
  background-color: #f0f9ff !important;
  color: #0077be !important;
}

.select2-container--default .select2-results__option--highlighted {
  background-color: #0077be !important;
  color: #ffffff !important;
}

.select2-container--default .select2-results__option--selected {
  background-color: #e0f2fe !important;
  color: #0077be !important;
  font-weight: 600 !important;
}

/* Search Box Styling */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 2px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  margin: 8px 12px 12px 12px !important;
  width: calc(100% - 24px) !important;
}

.select2-container--default
  .select2-search--dropdown
  .select2-search__field:focus {
  border-color: #0077be !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0, 119, 190, 0.1) !important;
}

/* Custom scrollbar for dropdown */
.select2-results__options::-webkit-scrollbar {
  width: 6px;
}

.select2-results__options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.select2-results__options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.alert.alert-danger {
  background-color: #fee2e2;
  /* Merah muda */
  color: #991b1b;
  /* Merah gelap untuk teks */
  border: 1px solid #fca5a5;
  /* Garis merah muda */
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Ikon (jika pakai Font Awesome atau SVG inline) */
.alert.alert-danger::before {
  content: "⚠️";
  /* Bisa ganti pakai <i class="fas fa-exclamation-circle"> dalam HTML */
  font-size: 18px;
}

/* Tombol close */
.alert.alert-danger .close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  color: #991b1b;
  cursor: pointer;
  background: none;
  border: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.form-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Opsional: agar ada batas minimal untuk scroll */
}

.form-table th,
.form-table td {
  padding: 8px 12px;
  /* border: 1px solid #ccc; */
  text-align: left;
}

@media (max-width: 600px) {
  .form-table th,
  .form-table td {
    font-size: 14px;
  }
}
