/* ==========================================================================
   UTILITIES.CSS — Global Utility Classes, Animations, and Accessibility
   ParentingPatch (GeneratePress Child Theme)
   ========================================================================== */

/* ------------------------------
   Colors
--------------------------------*/
:root {
  --pp-green: #058d05;
  --pp-green-dark: #036e03;
  --pp-light-gray: #f7f7f7;
  --pp-dark-gray: #333;
}

/* ------------------------------
   Spacing Utilities
--------------------------------*/
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.pt-1 { padding-top: 0.5rem !important; }
.pb-1 { padding-bottom: 0.5rem !important; }
.pt-2 { padding-top: 1rem !important; }
.pb-2 { padding-bottom: 1rem !important; }

/* ------------------------------
   Text Utilities
--------------------------------*/
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-muted { color: #777 !important; }
.text-green { color: var(--pp-green) !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-bold { font-weight: 700 !important; }

/* ------------------------------
   Flex & Grid Helpers
--------------------------------*/
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.items-center { align-items: center !important; }
.grid { display: grid !important; }
.grid-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
.grid-3 { grid-template-columns: repeat(3, 1fr) !important; gap: 1rem !important; }
.grid-4 { grid-template-columns: repeat(4, 1fr) !important; gap: 1rem !important; }

/* ------------------------------
   Buttons
--------------------------------*/
.pp-btn {
  background: var(--pp-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.pp-btn:hover {
  background: var(--pp-green-dark);
  transform: translateY(-2px);
}
.pp-btn:active {
  transform: translateY(0);
}

/* ------------------------------
   Shadow & Card Helpers
--------------------------------*/
.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important; }
.shadow-md { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important; }
.shadow-lg { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16) !important; }

.rounded-sm { border-radius: 4px !important; }
.rounded-md { border-radius: 8px !important; }
.rounded-lg { border-radius: 12px !important; }

/* ------------------------------
   Responsive Visibility
--------------------------------*/
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
}
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

/* ------------------------------
   Transitions & Animations
--------------------------------*/
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-up {
  opacity: 0;
  animation: slideUp 0.5s ease forwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------
   Accessibility
--------------------------------*/
a:focus-visible,
button:focus-visible {
  outline: 2px dashed var(--pp-green);
  outline-offset: 3px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

/* ------------------------------
   Light / Dark Mode Adjustments
--------------------------------*/
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0f1114;
    color: #f0f0f0;
  }
  a {
    color: #90ee90;
  }
  .pp-btn {
    background-color: #5cb85c;
  }
  .pp-btn:hover {
    background-color: #4ca64c;
  }
  .shadow-md,
  .shadow-lg {
    box-shadow: none !important;
  }
}
