/**
 * Oben Theme - Tailwind CSS & Modern Design System
 * Author: Marlon Lamprea
 * Version: 1.0.0
 */

/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
  --oben-primary: #0084d6;
  --oben-primary-hover: #006cb3;
  --oben-primary-light: #e0f2fe;
  --oben-accent: #38bdf8;
  --oben-navy: #070e22;
  --oben-navy-surface: #0f1c3d;
  --oben-dark: #0f172a;
  --oben-muted: #64748b;
  --oben-subtle: #94a3b8;
  --oben-border: #e2e8f0;
  --oben-bg-light: #f8fafc;
  --oben-gold: #f59e0b;
  --oben-emerald: #10b981;
  --oben-font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --oben-container-max: 1280px;
}

*, ::before, ::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: var(--oben-font-family);
  color: var(--oben-dark);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: var(--oben-dark);
  font-family: var(--oben-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Logo Sizing Control (Prevents SVG blowup) */
.custom-logo,
.site-branding img,
.site-branding svg,
.site-branding .custom-logo {
  max-height: 42px !important;
  width: auto !important;
  max-width: 170px !important;
  object-fit: contain !important;
  display: block !important;
}
.site-branding {
  max-width: 175px !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   2. Layout & Containers
   ========================================================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { max-width: 640px; padding-left: 1.25rem; padding-right: 1.25rem; } }
@media (min-width: 768px) { .container { max-width: 768px; padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { max-width: 1024px; padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }
@media (min-width: 1536px) { .container { max-width: 1440px; } }

.container-fluid {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ==========================================================================
   3. Grid & Flexbox Utilities
   ========================================================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.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)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-12 { grid-column: span 12 / span 12; }

.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; }

/* Responsive Grid / Flex */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none !important; }
  .md\:grid { display: grid; }
  .md\:flex-row { flex-direction: row; }
  .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\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-8 { grid-column: span 8 / span 8; }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none !important; }
  .lg\:grid { display: grid; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:col-span-9 { grid-column: span 9 / span 9; }
}
@media (min-width: 1280px) {
  .xl\:flex { display: flex; }
  .xl\:hidden { display: none !important; }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   4. Spacing & Sizing
   ========================================================================== */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }

.w-full { width: 100%; }
.w-auto { width: auto; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-80 { width: 20rem; }
.w-96 { width: 24rem; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }

.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-full { max-width: 100%; }
.min-h-screen { min-height: 100vh; }

/* ==========================================================================
   5. Typography
   ========================================================================== */
.font-sans { font-family: var(--oben-font-family); }
.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.16; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

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

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   6. Colors & Backgrounds (Oben Brand Palette)
   ========================================================================== */
.text-oben-primary { color: var(--oben-primary); }
.text-oben-navy { color: var(--oben-navy); }
.text-oben-accent { color: var(--oben-accent); }
.text-oben-dark { color: var(--oben-dark); }
.text-oben-muted { color: var(--oben-muted); }
.text-oben-subtle { color: var(--oben-subtle); }
.text-white { color: #ffffff; }
.text-slate-500 { color: #64748b; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-emerald-600 { color: #059669; }
.text-amber-600 { color: #d97706; }
.text-red-600 { color: #dc2626; }

.bg-oben-primary { background-color: var(--oben-primary); }
.bg-oben-primary-hover { background-color: var(--oben-primary-hover); }
.bg-oben-primary-light { background-color: var(--oben-primary-light); }
.bg-oben-navy { background-color: var(--oben-navy); }
.bg-oben-navy-surface { background-color: var(--oben-navy-surface); }
.bg-oben-light { background-color: var(--oben-bg-light); }
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-red-50 { background-color: #fef2f2; }

.hover\:text-oben-primary:hover { color: var(--oben-primary); }
.hover\:text-oben-primary-hover:hover { color: var(--oben-primary-hover); }
.hover\:bg-oben-primary:hover { background-color: var(--oben-primary); }
.hover\:bg-oben-primary-hover:hover { background-color: var(--oben-primary-hover); }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }

/* ==========================================================================
   7. Borders & Rounded
   ========================================================================== */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-r { border-right-width: 1px; }

.border-transparent { border-color: transparent; }
.border-oben { border-color: var(--oben-border); }
.border-oben-primary { border-color: var(--oben-primary); }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }

.rounded-none { border-radius: 0px; }
.rounded-sm { border-radius: 0.25rem; }
.rounded { border-radius: 0.375rem; }
.rounded-md { border-radius: 0.5rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.25rem; }
.rounded-full { border-radius: 9999px; }

/* ==========================================================================
   8. Shadows & Transitions
   ========================================================================== */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-oben { box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03); }
.shadow-oben-hover { box-shadow: 0 20px 32px -4px rgba(15, 23, 42, 0.12), 0 8px 16px -2px rgba(15, 23, 42, 0.06); }

.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* ==========================================================================
   9. Positioning & Z-Index
   ========================================================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.top-0 { top: 0px; }
.right-0 { right: 0px; }
.bottom-0 { bottom: 0px; }
.left-0 { left: 0px; }
.inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }
.z-modal { z-index: 9999; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }

/* ==========================================================================
   10. Custom Components (Oben Nutrition UI)
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--ob-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--ob-transition-smooth);
  border: 1px solid transparent;
}
.btn:focus {
  outline: 2px solid var(--oben-primary);
  outline-offset: 2px;
}
.btn-primary {
  background-color: var(--oben-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--oben-primary-hover);
  color: #ffffff;
}
.btn-secondary {
  background-color: var(--oben-navy);
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: var(--oben-navy-surface);
  color: #ffffff;
}
.btn-outline {
  border-color: var(--oben-border);
  color: var(--oben-dark);
  background-color: #ffffff;
}
.btn-outline:hover {
  border-color: var(--oben-primary);
  color: var(--oben-primary);
  background-color: var(--oben-primary-light);
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}
.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
  border-radius: var(--ob-radius-md);
}

/* Badges & PV Pill */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  line-height: 1;
}
.badge-primary { background-color: var(--oben-primary-light); color: var(--oben-primary); }
.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-gold { background-color: #fef3c7; color: #92400e; }

.oben-pv-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid #7dd3fc;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.1);
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Cards */
.card {
  background-color: #ffffff;
  border: 1px solid var(--oben-border);
  border-radius: var(--ob-radius-md);
  box-shadow: var(--ob-card-shadow);
  transition: var(--ob-transition-smooth);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--ob-card-shadow-hover);
  transform: translateY(-2px);
}

/* Forms */
.form-input, .form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--oben-dark);
  background-color: #ffffff;
  border: 1px solid var(--oben-border);
  border-radius: var(--ob-radius-sm);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-input:focus, .form-select:focus {
  border-color: var(--oben-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 132, 214, 0.15);
}

/* Off-canvas Drawers */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 14, 34, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background-color: #ffffff;
  z-index: 9999;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.drawer-left {
  left: 0;
  transform: translateX(-100%);
}
.drawer-right {
  right: 0;
  transform: translateX(100%);
}
.drawer-panel.active {
  transform: translateX(0);
}

/* Screen Reader / Skip Link */
.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;
}
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100000;
  padding: 0.75rem 1.5rem;
  background-color: var(--oben-primary);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--ob-radius-sm);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ==========================================================================
   11. Elementor Editor Safety Isolation
   ========================================================================== */
.elementor-editor-active,
.elementor-editor-preview {
  /* Prevent any Tailwind preflight resets from modifying Elementor control layout */
}
.elementor-editor-active .elementor-edit-area {
  display: block !important;
}
.elementor-widget-container {
  max-width: 100%;
}
