/* static/css/utilities.css */
/* static/css/utilities.css */
/* 
 * FULL VERSION
 * UPD: Wider container (90rem), XL breakpoints.
 */

/* ─── Display ────────────────────────────────────────────── */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* ─── Positioning ────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.top-full { top: 100%; }
.left-4 { left: 1rem; }
.top-1\/2 { top: 50%; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-60 { z-index: 60; }
.z-\[80\] { z-index: 80; }

/* ─── Flex / Alignment ───────────────────────────────────── */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.self-end { align-self: 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; }
.justify-content-center { justify-content: center; }

/* ─── Gap ────────────────────────────────────────────────── */
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* ─── Grid ───────────────────────────────────────────────── */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ─── Container (Wider) ──────────────────────────────────── */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  /* Default width increased */
  max-width: 80rem; /* 1280px */
}

/* ─── Sizing ─────────────────────────────────────────────── */
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.h-auto { height: auto; }

.max-w-none { max-width: none; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

.max-w-\[560px\] { max-width: 560px; }
.max-w-\[900px\] { max-width: 900px; }
.max-w-\[1100px\] { max-width: 1100px; }
.max-h-\[90vh\] { max-height: 90vh; }
.max-h-\[70vh\] { max-height: 70vh; }

.w-\[280px\] { width: 280px; }

.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-w-\[85\%\] { min-width: 85%; }
.min-w-\[170px\] { min-width: 170px; }

/* Icon/box sizes */
.w-1\.5 { width: 0.375rem; } .h-1\.5 { height: 0.375rem; }
.w-2 { width: 0.5rem; } .h-2 { height: 0.5rem; }
.w-2\.5 { width: 0.625rem; } .h-2\.5 { height: 0.625rem; }
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; } .h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-11 { width: 2.75rem; } .h-11 { height: 2.75rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-14 { width: 3.5rem; } .h-14 { height: 3.5rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; }

/* ─── Spacing ────────────────────────────────────────────── */
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }

.ml-0\.5 { margin-left: 0.125rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-4 { margin-right: 1rem; }
.ml-6 { margin-left: 1.5rem; }
.mr-6 { margin-right: 1.5rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }

.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }

.pl-12 { padding-left: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; } /* needed for share buttons */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-7 { padding: 1.75rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }

/* ─── Space between children ─────────────────────────────── */
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 2.5rem; }

/* ─── Typography ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { word-break: break-word; }

.uppercase { text-transform: uppercase; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-\[8px\] { font-size: 8px; line-height: 1; }
.text-\[9px\] { font-size: 9px; line-height: 1; }
.text-\[10px\] { font-size: 10px; line-height: 1.2; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.tracking-tight { letter-spacing: -0.02em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* line clamp (used in blog cards) */
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* ─── Rounding ───────────────────────────────────────────── */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* ─── Overflow ───────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-visible { overflow: visible; }

/* ─── Object-fit ─────────────────────────────────────────── */
.object-cover { object-fit: cover; }

/* ─── Backdrop blur ─────────────────────────────────────── */
.backdrop-blur-xl {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ─── Transforms ─────────────────────────────────────────── */
.translate-x-0\.5 { transform: translateX(0.125rem); }
.translate-x-1 { transform: translateX(0.25rem); }
.-translate-x-0\.5 { transform: translateX(-0.125rem); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.rotate-45 { transform: rotate(45deg); }

.hover\:scale-105:hover { transform: scale(1.05); }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:-translate-x-0\.5 { transform: translateX(-0.125rem); }
.group:hover .group-hover\:translate-x-0\.5 { transform: translateX(0.125rem); }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }

/* ─── Transitions ────────────────────────────────────────── */
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; }
.transition-transform { transition-property: transform; }
.transition-all { transition-property: all; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }

/* ─── Aspect ratio ───────────────────────────────────────── */
.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
.aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
.aspect-\[9\/16\] { aspect-ratio: 9 / 16; }
.aspect-\[21\/9\] { aspect-ratio: 21 / 9; }

/* ─── Scroll snap ────────────────────────────────────────── */
.snap-x { scroll-snap-type: x mandatory; }
.snap-mandatory { scroll-snap-type: x mandatory; }
.snap-start { scroll-snap-align: start; }

/* ─── Responsive Breakpoints ────────────────────────────── */

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:w-auto { width: auto; }
  .sm\:min-w-\[380px\] { min-width: 380px; }
  .sm\:items-center { align-items: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:justify-end { justify-content: flex-end; }
  .sm\:justify-center { justify-content: center; }
  .sm\:gap-4 { gap: 1rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:text-left { text-align: left; }
}

@media (min-width: 768px) {
  .md\:block { display: block !important; }
  .md\:flex { display: flex !important; }
  .md\:grid { display: grid !important; }
  .md\:hidden { display: none !important; }
  .md\:overflow-visible { overflow: visible; }

  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:items-end { align-items: flex-end; }
  .md\:items-start { align-items: flex-start; }

  .md\:justify-between { justify-content: space-between; }
  .md\:justify-end { justify-content: flex-end; }
  .md\:justify-start { justify-content: flex-start; }

  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }

  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .md\:text-left { text-align: left; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

  .md\:min-w-\[420px\] { min-width: 420px; }
  .md\:w-auto { width: auto; }
  .md\:w-10 { width: 2.5rem; } .md\:h-10 { height: 2.5rem; }
  .md\:w-12 { width: 3rem; } .md\:h-12 { height: 3rem; }
  .md\:w-5 { width: 1.25rem; } .md\:h-5 { height: 1.25rem; }
  .md\:w-3\.5 { width: 0.875rem; } .md\:h-3\.5 { height: 0.875rem; }

  .md\:py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .md\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:p-8 { padding: 2rem; }
  .md\:p-10 { padding: 2.5rem; }
  .md\:p-12 { padding: 3rem; }

  .md\:mb-8 { margin-bottom: 2rem; }
  .md\:mb-10 { margin-bottom: 2.5rem; }
  .md\:mb-12 { margin-bottom: 3rem; }
  .md\:mt-10 { margin-top: 2.5rem; }
  .md\:mt-16 { margin-top: 4rem; }
  .md\:mt-20 { margin-top: 5rem; }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:gap-10 { gap: 2.5rem; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:grid { display: grid !important; }
  .lg\:hidden { display: none !important; }

  .container {
      max-width: 90rem; /* 1440px on large screens */
      padding-left: 2rem;
      padding-right: 2rem;
  }

  .lg\:flex-row { flex-direction: row; }
  .lg\:items-center { align-items: center; }
  .lg\:items-start { align-items: flex-start; }
  .lg\:items-end { align-items: flex-end; }

  .lg\:justify-between { justify-content: space-between; }
  .lg\:justify-start { justify-content: flex-start; }

  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .lg\:text-left { text-align: left; }
  .lg\:text-5xl { font-size: 3rem; }
  .lg\:text-4xl { font-size: 2.25rem; }
  .lg\:text-3xl { font-size: 1.875rem; }
  .lg\:text-xl { font-size: 1.25rem; }

  .lg\:gap-12 { gap: 3rem; }
  .lg\:gap-16 { gap: 4rem; }

  .lg\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .lg\:min-h-screen { min-height: 100vh; }

  .lg\:p-8 { padding: 2rem; }
  .lg\:pb-8 { padding-bottom: 2rem; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

@media (min-width: 1280px) {
    /* XL Screens */
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xl\:gap-16 { gap: 4rem; }
}