/* ==========================================================================
   Global Reset & Color Variables (Navy Blue, Slate Gray, Emerald Green)
   ========================================================================== */
:root {
  --primary-navy: #0a192f;
  --secondary-navy: #1e293b;
  --slate-gray: #64748b;
  --light-gray: #f8fafc;
  --border-gray: #e2e8f0;
  --emerald-green: #10b981;
  --emerald-hover: #059669;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

/* Sticky Footer Setup: Memastikan Footer Selalu Berada di Bawah Layar */
html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--light-gray);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Kontainer Utama Pengisi Ruang Kosong */
.directory-layout, 
.section-padding {
  flex: 1 0 auto;
}

/* Navbar Consistent Styling */
.navbar {
  background-color: var(--primary-navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span {
  color: var(--emerald-green);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--emerald-green);
}

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

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--emerald-green);
  color: var(--white);
}

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

.btn-outline {
  background-color: transparent;
  color: var(--white);
  border: 1px solid #475569;
}

.btn-outline:hover {
  border-color: var(--emerald-green);
  color: var(--emerald-green);
}

/* Dynamic State Buttons */
.btn-submitted {
  background-color: #94a3b8 !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
  border: none !important;
}

.btn-reserved {
  background-color: var(--secondary-navy) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  border: none !important;
}

.btn-joined {
  background-color: var(--primary-navy) !important;
  color: var(--emerald-green) !important;
  border: 1px solid var(--emerald-green) !important;
  cursor: not-allowed !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--white);
  border-radius: 2px;
}

/* Toast Notification UI */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--primary-navy);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-left: 5px solid var(--emerald-green);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Badge & Status Styling */
.badge-available {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--emerald-green);
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-available::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--emerald-green);
  border-radius: 50%;
}

.tag {
  background-color: #f1f5f9;
  color: var(--slate-gray);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Hero & Sections Styling */
.hero {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.search-box {
  background: var(--white);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  display: flex;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  outline: none;
}

.stats-section {
  padding: 3rem 0;
  margin-top: -2rem;
}

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

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-gray);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.2rem;
}

.stat-label {
  color: var(--slate-gray);
  font-weight: 500;
}

.section-padding {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-navy);
}

.section-title p {
  color: var(--slate-gray);
}

/* Grid & Card Layouts */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.freelancer-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-gray);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.freelancer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.rate-info {
  font-weight: 700;
  color: var(--primary-navy);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Page Layouts */
.directory-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.filter-sidebar {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gray);
  height: fit-content;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-navy);
}

.filter-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
}

.job-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gray);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-info h3 {
  color: var(--primary-navy);
  margin-bottom: 0.3rem;
}

.job-meta {
  display: flex;
  gap: 1rem;
  color: var(--slate-gray);
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

/* Tabs & Accordion */
.tab-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.8rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--primary-navy);
  color: var(--white);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  outline: none;
}

.accordion-item {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.accordion-header {
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  background: var(--white);
}

.accordion-body {
  padding: 1rem;
  border-top: 1px solid var(--border-gray);
  display: none;
  color: var(--text-muted);
}

.accordion-item.active .accordion-body {
  display: block;
}

/* Footer (Menggunakan Margin Auto Top untuk Penataan Selalu di Dasar Layar) */
.footer {
  background: var(--primary-navy);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

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

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-navy);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-actions {
    display: none;
  }

  .directory-layout {
    grid-template-columns: 1fr;
  }

  .job-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}