/* PAPAN SSD LTD — utilities.css */

/* Accessibility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.not-sr-only {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  clip-path: none !important;
}

/* Display */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

/* Visibility helpers */
.hide-mobile {
  display: initial;
}

.show-mobile {
  display: none;
}

.hide-tablet {
  display: initial;
}

.show-tablet {
  display: none;
}

/* Position */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.sticky {
  position: sticky;
}

.isolate {
  isolation: isolate;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

/* Text alignment */
.text-left {
  text-align: left;
}

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

.text-right {
  text-align: right;
}

/* Text colour */
.text-white {
  color: var(--color-white);
}

.text-muted {
  color: var(--color-muted);
}

.text-deep {
  color: var(--color-deep-blue);
}

.text-sky {
  color: var(--color-sky-blue);
}

.text-ink {
  color: var(--color-ink);
}

/* Font weight */
.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

.fw-900 {
  font-weight: 900;
}

/* Margin */
.mx-auto {
  margin-inline: auto;
}

.ml-auto {
  margin-left: auto;
}

.mr-auto {
  margin-right: auto;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: .75rem;
}

.mt-2 {
  margin-top: 1.25rem;
}

.mt-3 {
  margin-top: 2rem;
}

.mt-4 {
  margin-top: 3rem;
}

.mt-5 {
  margin-top: 4rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: .75rem;
}

.mb-2 {
  margin-bottom: 1.25rem;
}

.mb-3 {
  margin-bottom: 2rem;
}

.mb-4 {
  margin-bottom: 3rem;
}

.mb-5 {
  margin-bottom: 4rem;
}

/* Padding */
.p-0 {
  padding: 0;
}

.p-1 {
  padding: .75rem;
}

.p-2 {
  padding: 1.25rem;
}

.p-3 {
  padding: 2rem;
}

.p-4 {
  padding: 3rem;
}

.py-1 {
  padding-block: .75rem;
}

.py-2 {
  padding-block: 1.25rem;
}

.py-3 {
  padding-block: 2rem;
}

.py-4 {
  padding-block: 3rem;
}

.px-1 {
  padding-inline: .75rem;
}

.px-2 {
  padding-inline: 1.25rem;
}

.px-3 {
  padding-inline: 2rem;
}

.px-4 {
  padding-inline: 3rem;
}

/* Widths */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.max-420 {
  max-width: 420px;
}

.max-520 {
  max-width: 520px;
}

.max-640 {
  max-width: 640px;
}

.max-760 {
  max-width: 760px;
}

.max-900 {
  max-width: 900px;
}

.max-1100 {
  max-width: 1100px;
}

/* Backgrounds */
.bg-white {
  background: var(--color-white);
}

.bg-light {
  background: var(--color-light);
}

.bg-surface-blue {
  background: var(--color-surface-blue);
}

.bg-dark {
  color: var(--color-white);
  background: var(--gradient-dark);
}

.bg-primary {
  color: var(--color-white);
  background: var(--gradient-primary);
}

.bg-water {
  color: var(--color-white);
  background: var(--gradient-water);
}

/* Borders */
.border {
  border: var(--line);
}

.border-blue {
  border: var(--line-blue);
}

.border-white {
  border: var(--line-white);
}

/* Radius */
.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-pill {
  border-radius: var(--radius-pill);
}

.rounded-full {
  border-radius: 50%;
}

/* Shadows */
.shadow-none {
  box-shadow: none;
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-float {
  box-shadow: var(--shadow-float);
}

.shadow-blue {
  box-shadow: var(--shadow-blue);
}

/* Layout helpers */
.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-start {
  justify-content: flex-start;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: .75rem;
}

.gap-2 {
  gap: 1.25rem;
}

.gap-3 {
  gap: 2rem;
}

.gap-4 {
  gap: 3rem;
}

/* Object fit */
.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

/* Aspect ratios */
.aspect-square {
  aspect-ratio: 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-wide {
  aspect-ratio: 16 / 10;
}

.aspect-photo {
  aspect-ratio: 4 / 3;
}

/* Z-index helpers */
.z-1 {
  z-index: 1;
}

.z-2 {
  z-index: 2;
}

.z-3 {
  z-index: 3;
}

/* Mobile and tablet */
@media (max-width: 900px) {
  .hide-tablet {
    display: none !important;
  }

  .show-tablet {
    display: initial !important;
  }

  .text-center-tablet {
    text-align: center;
  }

  .stack-tablet {
    display: grid;
    gap: 1rem;
  }
}

@media (max-width: 760px) {
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: initial !important;
  }

  .text-left-mobile {
    text-align: left;
  }

  .text-center-mobile {
    text-align: center;
  }

  .full-mobile {
    width: 100%;
  }

  .stack-mobile {
    display: grid;
    gap: 1rem;
  }

  .p-3,
  .p-4 {
    padding: 1.35rem;
  }

  .py-4 {
    padding-block: 2rem;
  }

  .px-4 {
    padding-inline: 1.35rem;
  }
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  border-radius: 50%;
  color: var(--color-white);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-blue);
  transition:
    opacity var(--duration) var(--ease-soft),
    visibility var(--duration) var(--ease-soft),
    transform var(--duration) var(--ease-soft);
}

.back-to-top.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}