/* ========================================
   UTILITIES - Helpers & Additional Styles
   ======================================== */

/* ========================================
   CENTERING & ALIGNMENT
   ======================================== */

.center {
  text-align: center;
}

.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Container variants */
.container-narrow {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.container-medium {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.container-wide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Vertical spacing */
.my-xs { margin-top: var(--space-xs); margin-bottom: var(--space-xs); }
.my-sm { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-md { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.my-lg { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.my-xl { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

/* Horizontal spacing */
.mx-auto { margin-left: auto; margin-right: auto; }

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

/* ========================================
   RECIPE DETAIL PAGE
   ======================================== */

.recipe-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.recipe-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.recipe-content h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.recipe-ingredients {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.recipe-ingredients h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.recipe-ingredients h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: var(--space-lg) 0 var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-sans);
}

.recipe-ingredients ul {
  list-style: none;
  padding: 0;
}

.recipe-ingredients li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-light);
}

.recipe-ingredients li:last-child {
  border-bottom: none;
}

.recipe-steps {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.recipe-steps h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.recipe-steps h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: var(--space-lg) 0 var(--space-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-steps p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* ========================================
   TWO COLUMN REVERSE
   ======================================== */

@media (min-width: 901px) {
  .two-col.reverse {
    flex-direction: row;
  }
  
  .two-col.reverse > .two-col-text {
    order: -1;
  }
}

/* ========================================
   ADDITIONAL HELPER CLASSES
   ======================================== */

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* User Select */
.select-none { user-select: none; }
.select-text { user-select: text; }

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

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Transitions */
.transition-fast { transition: all var(--transition-fast); }
.transition { transition: all var(--transition); }
.transition-slow { transition: all var(--transition-slow); }

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from { 
    opacity: 0;
    transform: translateY(-10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition) ease-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-slow) ease-out;
}

.animate-slide-down {
  animation: slideDown var(--transition) ease-out;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  header, footer, .kb-sidebar, .kb-hero, .kb-search {
    display: none;
  }
  
  .kb-layout {
    display: block;
  }
  
  .kb-card, .kb-menu-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
