/* ============================================
   HackMap Custom CSS - Bulma Replacement
   Estimated size: ~8-12KB (vs 202KB Bulma)
   ============================================ */

/* === CSS Variables === */
:root {
  /* Colors */
  --color-primary: #00d1b2;
  --color-link: #3273dc;
  --color-success: #48c774;
  --color-warning: #ffdd57;
  --color-danger: #f14668;
  --color-info: #3298dc;
  
  /* Grays */
  --color-white: #ffffff;
  --color-black: #0a0a0a;
  --color-light: #f5f5f5;
  --color-dark: #363636;
  --color-text: #4a4a4a;
  --color-border: #dbdbdb;
  
  /* Spacing */
  --spacing-small: 0.5rem;
  --spacing-medium: 0.75rem;
  --spacing-large: 1rem;
  --spacing-xlarge: 1.5rem;
  
  /* Border radius */
  --radius: 4px;
  
  /* Breakpoints */
  --tablet: 769px;
  --desktop: 1024px;
}

/* === Base Reset === */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

/* === Layout === */
.section {
  padding: 2rem 1rem;
}

@media screen and (min-width: 1024px) {
  .section {
    padding: 2rem 2rem;
  }
}

.container {
  flex-grow: 1;
  margin: 0 auto;
  position: relative;
  width: auto;
  max-width: 1152px;
  padding: 0 1.5rem;
}

/* === Grid System === */
.column {
  padding: 0.75rem;
}

.column.is-full {
  width: 100%;
}

/* === Typography === */
.title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.title.is-4 {
  font-size: 1.25rem;
}

.subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.subtitle.is-6 {
  font-size: 0.875rem;
}

/* === Content === */
.content {
  color: var(--color-text);
}

.box {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 
              0 0px 0 1px rgba(10, 10, 10, 0.02);
  display: block;
  padding: 1.25rem;
}

/* === Buttons === */
.button {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-dark);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5em 1em;
  text-align: center;
  transition: all 0.2s ease;
}

.button:hover {
  border-color: #b5b5b5;
}

.button:focus {
  outline: none;
  border-color: #3273dc;
  box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
}

.button.is-primary {
  background-color: var(--color-primary);
  border-color: transparent;
  color: #fff;
}

.button.is-primary:hover {
  background-color: #00c4a7;
}

.button.is-link {
  background-color: var(--color-link);
  border-color: transparent;
  color: #fff;
}

.button.is-link:hover {
  background-color: #2366d1;
}

.button.is-success {
  background-color: var(--color-success);
  border-color: transparent;
  color: #fff;
}

.button.is-success:hover {
  background-color: #3ec46d;
}

.button.is-warning {
  background-color: var(--color-warning);
  border-color: transparent;
  color: rgba(0, 0, 0, 0.7);
}

.button.is-warning:hover {
  background-color: #ffd83d;
}

.button.is-danger {
  background-color: var(--color-danger);
  border-color: transparent;
  color: #fff;
}

.button.is-danger:hover {
  background-color: #f03a5f;
}

.button.is-info {
  background-color: var(--color-info);
  border-color: transparent;
  color: #fff;
}

.button.is-info:hover {
  background-color: #238cd1;
}

.buttons {
  display: grid;
  grid-auto-flow: column;
  gap: 0.5rem;
  justify-content: start;
}

.buttons.are-small .button {
  font-size: 0.75rem;
  padding: 0.25em 0.75em;
}

/* === Forms === */
.field {
  margin-bottom: var(--spacing-medium);
}

.field:last-child {
  margin-bottom: 0;
}

.label {
  color: var(--color-dark);
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5em;
}

.control {
  box-sizing: border-box;
  clear: both;
  font-size: 1rem;
  position: relative;
  text-align: inherit;
}

.input,
.textarea,
.select select {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-dark);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.5em 0.75em;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--color-link);
  outline: none;
  box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
}

.textarea {
  display: block;
  max-width: 100%;
  min-width: 100%;
  resize: vertical;
  min-height: 120px;
}

.select {
  position: relative;
  display: inline-block;
}

.select select {
  cursor: pointer;
  padding-right: 2.5em;
}

.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1em;
  width: 0.5em;
  height: 0.5em;
  border: 2px solid var(--color-link);
  border-top: 0;
  border-right: 0;
  transform: translateY(-75%) rotate(-45deg);
  pointer-events: none;
}

/* === Cards === */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
              0 0px 0 1px rgba(10, 10, 10, 0.02);
  color: var(--color-text);
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.card-content {
  padding: 1.5rem;
}

.card-image {
  display: block;
  position: relative;
}

/* === Media Object === */
.media {
  display: grid;
  gap: 1rem;
}

.media-content {
  min-width: 0;
}

/* === Image === */
.image {
  display: block;
  position: relative;
}

.image img {
  display: block;
  height: auto;
  width: 100%;
}

.image.is-64x64 {
  height: 64px;
  width: 64px;
}

.image.is-64x64 img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* === Icon === */
.icon {
  display: inline-grid;
  place-items: center;
  height: 1.5rem;
  width: 1.5rem;
}

.icon.is-medium {
  height: 2rem;
  width: 2rem;
}

.icon.is-large {
  height: 3rem;
  width: 3rem;
}

/* === Utility Classes === */
.has-background-light {
  background-color: var(--color-light);
}

.has-text-centered {
  text-align: center;
}

.has-text-grey-light {
  color: #b5b5b5;
}

/* === Navbar === */
.navbar {
  background-color: var(--color-white);
  min-height: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.5rem 1rem;
  position: relative;
  z-index: 30;
  gap: 1rem;
}

.navbar.is-primary {
  background-color: var(--color-primary);
  color: #fff;
}

.navbar h1,
.navbar-item h1 {
  font-size: 1.25rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.navbar-item {
  padding: 0.5rem 0.75rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.navbar-end {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* === Modal === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  place-items: center;
}

.modal.is-active {
  display: grid;
}

.modal-background {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 10, 10, 0.86);
}

.modal-content {
  position: relative;
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.modal-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-content .close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  line-height: 1;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s ease;
  z-index: 1;
  padding: 0.25rem;
}

.modal-content .close:hover {
  opacity: 0.7;
}
