/* ===================================
   LMI Event Booking Form - Clean Design
   ================================== */

:root {
  /* LMI Event 2025 Color Palette - Enhanced Version */
  --primary-green: #1B5E20;     /* Deep Green - Primary actions */
  --primary-light-green: #4CAF50; /* Bright Green - Secondary actions */
  --primary-white: #FFFFFF;     /* Pure White - Text & highlights */
  --primary-yellow: #FDD835;    /* Bright Yellow - Accent elements */
  
  /* Extended Colors - Improved contrast & readability */
  --green-light: #2E7D32;
  --green-dark: #1A5319;        /* Sedikit lebih terang untuk better readability */
  --green-soft: #E8F5E8;
  --green-bright: #66BB6A;
  
  --light-green-light: #81C784;
  --light-green-dark: #388E3C;
  --light-green-soft: #F1F8E9;
  
  --yellow-light: #FFEB3B;
  --yellow-dark: #F9A825;       /* Lebih warm, tidak terlalu orange */
  --yellow-soft: #FFFDE7;
  
  --white-soft: #FAFAFA;
  --white-dark: #F5F5F5;
  
  /* Neutral Colors - Enhanced for better UX */
  --white: #ffffff;
  --black: #000000;
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #2D3748;       /* Sedikit lebih warm untuk text */
  --neutral-800: #1a202c;       /* Better contrast dark text */
  
  /* Functional Shadows using new palette colors */
  --shadow-green: 0 4px 6px -1px rgba(27, 94, 32, 0.15);
  --shadow-light-green: 0 4px 6px -1px rgba(76, 175, 80, 0.15);
  --shadow-yellow: 0 4px 6px -1px rgba(253, 216, 53, 0.15);
  --shadow-white: 0 4px 6px -1px rgba(255, 255, 255, 0.2);
  
  /* Standard Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Work Sans', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--neutral-700);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container Styles */
.container-fluid {
  background: transparent !important;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form Card Styles */
#form_booking {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: var(--shadow-xl), 0 0 30px rgba(45, 90, 39, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  max-width: 1200px;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Header Section */
.form-header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light-green) 100%);
  color: var(--white);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.form-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.form-title {
  font-size: 1.8rem; /* Diperbesar dari 1.5rem */
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.form-subtitle {
  font-size: 1.2rem; /* Diperbesar dari 1rem */
  font-weight: 500;
  margin-bottom: 0.25rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.form-event-title {
  font-size: 1.5rem; /* Diperbesar dari 1.2rem */
  font-weight: 800;
  color: var(--primary-yellow);
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-organization {
  font-size: 1.1rem; /* Diperbesar dari 0.9rem */
  font-weight: 600;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Poster Section */
.poster-section {
  padding: 10px 0; /* Sedikit padding atas bawah */
  margin: 0 -30px; /* Increased negative margin untuk lebih mepet */
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.08) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(76, 175, 80, 0.08) 100%);
  border-top: 1px solid rgba(76, 175, 80, 0.3);
  border-bottom: 1px solid rgba(76, 175, 80, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% + 60px); /* Kompensasi untuk negative margin */
  overflow: hidden;
  min-height: 320px; /* Minimal tinggi untuk poster */
  border-radius: 0; /* Hilangkan border radius */
}

.poster-section img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain; /* Kembali ke contain agar tidak terpotong */
  object-position: center;
  display: block;
  max-width: none; /* Hilangkan max-width constraint */
  min-height: 300px; /* Minimal height untuk desktop */
  /* Pastikan aspect ratio terjaga */
  aspect-ratio: auto;
}

/* Form Content */
.form-content {
  padding: 1.5rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 0.8rem;
  padding: 0.6rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-group:hover {
  background-color: rgba(76, 175, 80, 0.08);
}

/* Row spacing untuk form yang berdampingan */
.form-group .row {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}

.form-group .row > [class*="col-"] {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Radio button container untuk tampilan horizontal */
.form-group .radio-inline-container {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  text-shadow: none;
  height: 48px;
  line-height: 1.5;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light-green);
  box-shadow: 0 0 0 3px var(--green-soft);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
  color: #000000;
}

.form-control:hover {
  border-color: var(--primary-yellow);
  background-color: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

.form-control::placeholder {
  color: #555555;
  font-weight: 600;
  text-shadow: none;
}

/* Select Styles */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 3rem;
  line-height: 1.5;
  vertical-align: top;
  height: 48px;
}

/* Input Number Styles */
input[type="number"].form-control {
  height: 48px;
  line-height: 1.5;
  padding: 0.75rem 1rem;
}

/* Input Tel Styles */
input[type="tel"].form-control {
  height: 48px;
  line-height: 1.5;
  padding: 0.75rem 1rem;
}

/* Input Text Styles */
input[type="text"].form-control {
  height: 48px;
  line-height: 1.5;
  padding: 0.75rem 1rem;
}

select.form-control option {
  color: #1a1a1a;
  background: #ffffff;
  font-weight: 600;
  padding: 8px 12px;
  line-height: 1.4;
}

/* Fix for select text alignment */
select.form-control:not([multiple]) {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  text-align-last: left;
  display: block;
  box-sizing: border-box;
}

/* Radio Button Styles */
.custom-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  padding: 0.8rem 0.4rem;
  margin-right: 0;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex: 1;
  text-align: center;
}

.custom-control:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-orange);
}

.custom-control-input {
  position: absolute;
  left: 0;
  z-index: -1;
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: middle;
  color: #000000;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.custom-control-label::before {
  display: none;
}

.custom-control-input:checked ~ .custom-control-label::before {
  display: none;
}

.custom-control-label::after {
  display: none;
}

.custom-control-input:checked ~ .custom-control-label::after {
  display: none;
}

/* Efek untuk pilihan aktif */
.custom-control-input:checked ~ .custom-control-label {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light-green) 100%);
  color: var(--white);
  border-color: var(--primary-green);
  text-shadow: none;
  font-weight: 800;
}

.custom-control:has(.custom-control-input:checked) {
  background: rgba(27, 94, 32, 0.1);
  border-color: var(--primary-green);
}

/* Button Styles */
.primary-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light-green) 100%);
  border: none;
  border-radius: 12px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-light) 100%);
}

.primary-btn:active {
  transform: translateY(0);
}

/* Image Section */
.image-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--gray-soft);
}

.image-section img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

/* Loader Styles */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

#loader::after {
  content: '';
  width: 60px;
  height: 60px;
  border: 4px solid var(--white-soft);
  border-top: 4px solid var(--primary-light-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding: 1rem;
  }
  
  #form_booking {
    border-radius: 16px;
  }
  
  .form-header,
  .form-content {
    padding: 1.5rem;
  }
  
  .form-title {
    font-size: 1.25rem;
  }
  
  .form-event-title {
    font-size: 1.1rem;
  }
  
  .col-4 {
    flex: 0 0 auto;
    width: 33.333333%;
  }
  
  .col-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .col-8 {
    flex: 0 0 auto;
    width: 66.666667%;
  }
  
  /* Tablet: masih horizontal untuk radio button tapi lebih compact */
  .custom-control {
    padding: 0.7rem 0.3rem;
  }
  
  .custom-control-label {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
  }
}

/* Tablet view - transisi ke desktop */
@media (min-width: 769px) and (max-width: 1023px) {
  #form_booking {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .poster-section {
    margin: 0 -20px;
    width: calc(100% + 40px);
    min-height: 400px;
  }
  
  .poster-section img {
    max-height: 500px;
    min-height: 350px;
  }
}

@media (min-width: 1024px) {
  #form_booking {
    max-width: 1400px; /* Perbesar untuk menampung layout side by side */
    margin: 0 auto;
  }
  
  .form-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Poster lebih besar dari form */
    grid-template-areas: 
      "header header"
      "poster form";
    gap: 0;
    align-items: start;
  }
  
  .form-header {
    grid-area: header;
    margin: 0; /* Reset margin untuk header */
  }
  
  .poster-section {
    grid-area: poster;
    margin: 0; /* Reset negative margin untuk desktop */
    padding: 2rem;
    width: 100%; /* Reset width calculation */
    min-height: 700px; /* Diperbesar min-height */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .form-content {
    grid-area: form;
    padding: 2rem;
    min-height: 700px; /* Sesuaikan dengan poster */
    /* Tambahan styling untuk desktop form */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Styling khusus form di desktop */
  .form-content .form-group {
    margin-bottom: 1rem;
  }
  
  .poster-section img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    max-width: 100%;
    /* Poster diperbesar untuk desktop side by side */
    max-height: 650px;
    min-height: 450px;
  }
}

/* Large desktop view */
@media (min-width: 1440px) {
  #form_booking {
    max-width: 1600px;
  }
  
  .poster-section {
    padding: 3rem;
  }
  
  .form-content {
    padding: 3rem;
  }
  
  .poster-section img {
    max-height: 750px; /* Diperbesar untuk layar besar */
  }
}

/* Input validation styles */
.form-control.is-invalid {
  border-color: #E53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-control.is-valid {
  border-color: var(--primary-light-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Mobile-first responsive */
@media (max-width: 576px) {
  .form-header {
    padding: 1.5rem 1rem;
  }
  
  .form-content {
    padding: 1.5rem 1rem;
  }
  
  .form-title {
    font-size: 1.1rem;
  }
  
  .form-event-title {
    font-size: 1rem;
  }
  
  .poster-section {
    padding: 0;
    margin: 0 -24px; /* Increased negative margin untuk mobile */
    width: calc(100% + 48px);
  }
  
  .poster-section img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    max-width: none;
    /* Memberikan ruang yang cukup untuk poster pada mobile */
    max-height: 70vh;
    min-height: 250px;
  }
  
  .custom-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    width: 100%;
    padding: 0.6rem 0.2rem;
    text-align: center;
    flex: 1;
  }
  
  .form-group .radio-inline-container {
    flex-direction: row;
    gap: 0.3rem;
    flex-wrap: nowrap;
  }
  
  .custom-control-label {
    font-size: 0.75rem;
    padding: 0.3rem 0.3rem;
    white-space: nowrap;
    width: 100%;
    text-align: center;
  }
  
  .col-4 {
    flex: 0 0 auto;
    width: 30%;
  }
  
  .col-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .col-8 {
    flex: 0 0 auto;
    width: 70%;
  }
  
  .col-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .col-9 {
    flex: 0 0 auto;
    width: 75%;
  }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
  .custom-control-label {
    font-size: 0.7rem;
    padding: 0.25rem 0.2rem;
  }
  
  .custom-control {
    padding: 0.5rem 0.1rem;
  }
}

/* Enhanced animations */
.form-control {
  transform: translateY(0);
}

.form-control:focus {
  animation: focusGlow 0.3s ease;
}

@keyframes focusGlow {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.01);
  }
  100% {
    transform: translateY(-1px) scale(1);
  }
}

.primary-btn {
  position: relative;
  overflow: hidden;
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.primary-btn:hover::before {
  left: 100%;
}

/* Loading state */
.primary-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.primary-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Media query untuk layar sangat kecil */
@media (max-width: 480px) {
  .poster-section {
    margin: 0 -20px;
    width: calc(100% + 40px);
  }
  
  .poster-section img {
    max-height: 60vh;
    object-fit: contain;
    max-width: none;
    min-height: 200px;
  }
  
  .container-fluid {
    padding: 0.5rem;
  }
  
  .form-header,
  .form-content {
    padding: 1rem;
  }
}
