/* ============================================================
   CALVION TECHNOLOGIES
   utilities.css — Helper & Utility Classes
   ============================================================ */

/* ── Visibility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden { display: none !important; }

/* ── Scroll Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.fade-up--delay-1 { transition-delay: 80ms; }
.fade-up--delay-2 { transition-delay: 160ms; }
.fade-up--delay-3 { transition-delay: 240ms; }
.fade-up--delay-4 { transition-delay: 320ms; }
.fade-up--delay-5 { transition-delay: 400ms; }
.fade-up--delay-6 { transition-delay: 480ms; }

/* Fade only (no y movement) */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
}

/* ── Text Utilities ── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-justify { text-align: justify; }

.text-primary     { color: var(--color-text-primary); }
.text-secondary   { color: var(--color-text-secondary); }
.text-muted       { color: var(--color-text-tertiary); }
.text-inverse     { color: var(--color-text-inverse); }
.text-inverse-muted { color: var(--color-text-inverse-muted); }
.text-accent      { color: var(--color-accent); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }

.font-regular  { font-weight: var(--weight-regular); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }

.uppercase { text-transform: uppercase; }
.tracking-caps { letter-spacing: var(--tracking-caps); }
.tracking-tight { letter-spacing: var(--tracking-tight); }
.leading-tight { line-height: var(--leading-tight); }
.leading-normal { line-height: var(--leading-normal); }

/* ── Spacing Utilities ── */
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

/* ── Display ── */
.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-block { display: block; }

.align-center  { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── Image ── */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-1-1  { aspect-ratio: 1 / 1; }

/* ── Borders ── */
.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }

/* ── Background ── */
.bg-primary   { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-dark      { background-color: var(--color-bg-dark); }

/* ── Max Width ── */
.max-w-narrow {
  max-width: var(--container-narrow);
}

/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }

/* ── Responsive Hide/Show ── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── WhatsApp FAB ── */
.whatsapp-fab {
  box-sizing: border-box;
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: var(--z-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  height: 56px;
  width: 56px;
  padding: 0;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
}

.whatsapp-fab svg,
.whatsapp-fab__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-fab__label {
  display: none;
}

.whatsapp-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.42);
}

.whatsapp-fab:active {
  transform: scale(1);
}

@media (max-width: 480px) {
  .whatsapp-fab {
    bottom: var(--space-6);
    right: var(--space-6);
  }
}

/* Floating WhatsApp Icon (Float Variant) */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25D366;
  color: #FFF;
  border-radius: 50%;
  text-align: center;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.whatsapp-float svg {
  width: 36px;
  height: 36px;
  fill: #FFF;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

@media screen and (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
