/* Custom Tailwind CSS for Essentialist Hugo Theme */

/* Alpine.js x-cloak directive */
[x-cloak] {
  display: none !important;
}

/* Prose styles for blog content */
.prose {
  color: #374151;
  max-width: none;
}

.prose h1 {
  color: #111827;
  font-weight: 800;
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 2rem;
  line-height: 1.1111111;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3333333;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.prose p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.625rem;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose ul ul {
  list-style-type: circle;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.prose ul ul ul {
  list-style-type: square;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose blockquote {
  font-weight: 400;
  font-style: italic;
  color: #6b7280;
  background-color: #f9fafb;
  border-left-width: 0.25rem;
  border-left-color: #10b981;
  quotes: "\201C""\201D""\2018""\2019";
  margin-top: 1.6rem;
  margin-bottom: 1.6rem;
  padding: 1rem 1.5rem;
  border-radius: 0 0.375rem 0.375rem 0;
}

.prose code {
  color: #111827;
  font-weight: 600;
  font-size: 0.875rem;
  background-color: #f3f4f6;
  padding: 0.25rem 0.375rem;
  border-radius: 0.25rem;
}

.prose pre {
  color: #e5e7eb;
  background-color: #1f2937;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  border-radius: 0.375rem;
  padding: 1rem;
}

.prose img {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
}

.prose a {
  color: #059669;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #047857;
}

.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  line-height: 1.7142857;
  border-collapse: collapse;
  border-spacing: 0;
}

.prose thead {
  border-bottom-width: 1px;
  border-bottom-color: #d1d5db;
}

.prose thead th {
  color: #111827;
  font-weight: 600;
  vertical-align: bottom;
  padding: 0.75rem 0.75rem 0.75rem 0;
}

.prose tbody tr {
  border-bottom-width: 1px;
  border-bottom-color: #e5e7eb;
}

.prose tbody tr:last-child {
  border-bottom-width: 0;
}

.prose tbody td {
  vertical-align: baseline;
  padding: 0.75rem 0.75rem 0.75rem 0;
}

.prose tbody td:first-child {
  padding-left: 0;
}

.prose thead th:first-child,
.prose tbody td:first-child {
  padding-left: 0;
}

/* Custom button styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #10b981;
  color: white;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #059669;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 2px solid #10b981;
  color: #059669;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #ecfdf5;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom gradients */
.gradient-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-blue-purple {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

/* Focus styles for accessibility */
.focus-ring {
  outline: none;
}

.focus-ring:focus {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Aspect ratio utility */
.aspect-w-16 {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.aspect-w-16 > * {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Enhanced shadows */
.shadow-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pagination ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.pagination a:hover,
.pagination .page-link:hover {
  color: #059669;
  background-color: #ecfdf5;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination .active a,
.pagination .active .page-link,
.pagination li.active a {
  color: #ffffff;
  background-color: #10b981;
  border-color: #10b981;
  font-weight: 600;
}

.pagination .active a:hover,
.pagination .active .page-link:hover,
.pagination li.active a:hover {
  background-color: #059669;
  border-color: #059669;
  transform: translateY(-1px);
}

.pagination .disabled a,
.pagination .disabled .page-link {
  color: #9ca3af;
  background-color: #f9fafb;
  border-color: #e5e7eb;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination .page-item.first a::before,
.pagination .page-item.last a::after {
  content: '';
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  margin: 0 0.25rem;
}

.pagination .page-item.first a::before {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.pagination .page-item.last a::after {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Previous/Next navigation styling */
.pagination .page-item.prev a,
.pagination .page-item.next a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.pagination .page-item.prev a::before {
  content: '←';
  font-size: 1rem;
}

.pagination .page-item.next a::after {
  content: '→';
  font-size: 1rem;
}

/* Mobile responsive pagination */
@media (max-width: 640px) {
  .pagination {
    gap: 0.25rem;
  }
  
  .pagination a,
  .pagination .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .pagination .page-item.prev a,
  .pagination .page-item.next a {
    padding: 0.25rem 0.75rem;
  }
  
  /* Hide page numbers on very small screens, keep only prev/next */
  .pagination li:not(.prev):not(.next):not(.active) {
    display: none;
  }
}
