/* 
   Johor Bahru (JB) Relocation Guide - Light & Formal Design System
   Designed by Antigravity for Gaurav Garg
*/

:root {
  /* Color Palette - Clean, Professional Light Mode */
  --bg-primary: #ffffff;       /* Pure white for page/main cards */
  --bg-secondary: #f8fafc;     /* Slate-50 for panels and backgrounds */
  --bg-tertiary: #f1f5f9;      /* Slate-100 for tags and toggles */
  
  --text-primary: #0f172a;     /* Slate-900 for dark formal text */
  --text-secondary: #475569;   /* Slate-600 for descriptions */
  --text-muted: #64748b;       /* Slate-500 for small details */
  
  --accent-navy: #1e3a8a;      /* Corporate Navy for buttons/primary actions */
  --accent-navy-hover: #172554;
  --accent-red: #be123c;       /* Muted rose/red for tags */
  --accent-blue: #0369a1;      /* Muted light blue for maps/transit links */
  
  --border-color: #cbd5e1;     /* Slate-300 for clean thin borders */
  --border-light: #e2e8f0;     /* Slate-200 for internal dividers */
  
  --font-heading: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8; /* Spacious line height for readability */
  letter-spacing: 0.015em; /* Relaxed letter spacing */
  padding-bottom: 100px; /* Space for sticky bottom tab nav */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin-bottom: 16px; /* Spacing between paragraphs */
}

li {
  margin-bottom: 8px; /* Spacing between list items */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-navy);
}

/* Clean Panels */
.clean-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-header {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

/* Micro-interactions */
.transition-all-200 {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-active:active {
  transform: scale(0.98);
}

/* Layout Utilities */
.container-custom {
  max-width: 640px; /* Centered sheet size */
  margin: 0 auto;
  padding: 24px 16px;
}

@media (min-width: 768px) {
  .container-custom {
    max-width: 800px;
  }
}

/* Floating Tab Nav Bar (Mobile-first) */
.mobile-nav-container {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 600px;
  z-index: 100;
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

/* Pills & Badges */
.badge-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.badge-navy {
  background: var(--bg-tertiary);
  color: var(--accent-navy);
  border: 1px solid var(--border-color);
}

.badge-red {
  background: rgba(190, 18, 60, 0.08);
  color: var(--accent-red);
  border: 1px solid rgba(190, 18, 60, 0.15);
}

.badge-blue {
  background: rgba(3, 105, 161, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(3, 105, 161, 0.15);
}

.badge-gray {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

/* Accordion slide-down transition styling */
.expanded-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
  opacity: 0;
}

.expanded-content.active {
  max-height: 1200px;
  opacity: 1;
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

/* Input Fields styling */
.input-custom {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.input-custom:focus {
  border-color: var(--accent-navy);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
}

/* Custom Accordion Indicator Rotate */
.rotate-icon {
  transition: transform 0.2s ease;
}
.card-active .rotate-icon {
  transform: rotate(180deg);
}

/* Tab Active Styles */
.tab-btn {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  background: transparent;
}

.tab-btn.active {
  background: var(--accent-navy);
  color: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-navy);
  border: 2px solid var(--bg-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Currency toggles */
.currency-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
}

.currency-badge.selected {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--accent-navy);
  box-shadow: var(--shadow-sm);
}

/* 
   --------------------------------------------------
   DESKTOP / LAPTOP READABILITY OVERRIDES
   --------------------------------------------------
*/
@media (min-width: 1024px) {
  body {
    font-size: 19px; /* Globally scale base typography on laptops */
    letter-spacing: 0.02em; /* Increase letter spacing for better visual flow */
  }
  
  /* Scale layout container for comfortable reading width */
  .container-custom {
    max-width: 1200px; /* Stretch layout to 1200px as requested */
    padding: 36px 24px;
  }
  
  /* Convert the lists and module accordions into a premium 2-column layout to fill 1200px */
  main#listings-container,
  main.flex.flex-col {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important; /* Spacious margins between grid columns/rows */
    align-items: start;
  }
  
  /* Add more breathing room inside clean-panels and data-cards */
  .clean-panel, .data-card {
    padding: 32px !important;
    border-radius: var(--radius-lg);
    margin-bottom: 0 !important; /* Managed by grid gap */
  }
  
  /* Increase padding inside input elements & components */
  .input-custom {
    font-size: 1.05rem;
    padding: 14px 18px;
  }
  
  .badge-pill {
    font-size: 0.85rem;
    padding: 5px 14px;
  }
  
  .tab-btn {
    font-size: 0.95rem;
    padding: 12px 20px;
    gap: 5px;
  }
  
  .currency-badge {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
  
  /* Ensure details size overrides do not render too small to read */
  .text-xs {
    font-size: 0.875rem !important; /* ~16.6px */
  }
  .text-sm {
    font-size: 1rem !important; /* ~19px */
  }
  .text-md {
    font-size: 1.1rem !important; /* ~21px */
  }
  .text-lg {
    font-size: 1.35rem !important; /* ~25.6px */
  }
  .text-xl {
    font-size: 1.55rem !important;
  }
  .text-2xl {
    font-size: 2.1rem !important;
  }
  .text-3xl {
    font-size: 2.6rem !important;
  }
  
  /* Ensure inline sizes in datasets scale up comfortably */
  .text-\[11px\] {
    font-size: 0.85rem !important; /* ~16.2px */
  }
  .text-\[10px\] {
    font-size: 0.825rem !important; /* ~15.7px */
  }
  .text-\[9px\] {
    font-size: 0.8rem !important; /* ~15.2px */
  }
  
  /* Make lists and checklist blocks more spacious */
  li {
    margin-bottom: 12px;
  }
  p {
    margin-bottom: 20px;
  }
}
