/**
 * 404 Page Styles
 * Stylish and user-friendly error page
 */

/* ===================================
   404 PAGE LAYOUT
   =================================== */

.error-404-page {
  padding: var(--tcp-space-12) 0;
  min-height: 60vh;
}

.error-404-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--tcp-space-4);
}

/* ===================================
   404 CONTENT
   =================================== */

.error-404-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--tcp-space-12) auto;
}

/* 404 Number */
.error-404-number {
  font-family: var(--tcp-font-display);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 700;
  color: var(--tcp-primary);
  line-height: 1;
  margin-bottom: var(--tcp-space-4);
  opacity: 0.2;
}

/* Title */
.error-404-title {
  font-family: var(--tcp-font-display);
  font-size: var(--tcp-text-4xl);
  font-weight: 700;
  color: var(--tcp-dark);
  margin: 0 0 var(--tcp-space-4) 0;
  line-height: 1.2;
}

/* Description */
.error-404-description {
  font-family: var(--tcp-font-primary);
  font-size: var(--tcp-text-lg);
  color: var(--tcp-gray-600);
  line-height: 1.6;
  margin: 0 0 var(--tcp-space-8) 0;
}

/* ===================================
   SEARCH FORM
   =================================== */

.error-404-search {
  margin-bottom: var(--tcp-space-8);
}

.error-404-search-label {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-sm);
  font-weight: 700;
  color: var(--tcp-gray-700);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--tcp-space-3);
}

.error-search-wrapper {
  display: flex;
  gap: var(--tcp-space-2);
  max-width: 500px;
  margin: 0 auto;
}

.error-search-input {
  flex: 1;
  font-family: var(--tcp-font-primary);
  font-size: var(--tcp-text-base);
  padding: var(--tcp-space-3) var(--tcp-space-4);
  border: 2px solid var(--tcp-gray-300);
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

.error-search-input:focus {
  outline: none;
  border-color: var(--tcp-primary);
}

.error-search-submit {
  background: var(--tcp-primary);
  color: var(--tcp-white);
  border: none;
  border-radius: 6px;
  padding: var(--tcp-space-3) var(--tcp-space-5);
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--tcp-space-2);
}

.error-search-submit:hover {
  background: var(--tcp-primary-dark, #0056b3);
}

.error-search-submit svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   QUICK LINKS
   =================================== */

.error-404-links {
  padding-top: var(--tcp-space-6);
  border-top: 1px solid var(--tcp-gray-200);
}

.error-404-links-label {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-sm);
  font-weight: 700;
  color: var(--tcp-gray-700);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--tcp-space-4);
}

.error-404-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tcp-space-3);
  justify-content: center;
}

.error-404-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--tcp-space-2);
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--tcp-space-3) var(--tcp-space-5);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.error-404-btn svg {
  width: 18px;
  height: 18px;
}

.error-404-btn-primary {
  background: var(--tcp-primary);
  color: var(--tcp-white);
}

.error-404-btn-primary:hover {
  background: var(--tcp-primary-dark, #0056b3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-404-btn-secondary {
  background: var(--tcp-white);
  color: var(--tcp-gray-800);
  border: 2px solid var(--tcp-gray-300);
}

.error-404-btn-secondary:hover {
  background: var(--tcp-gray-100);
  border-color: var(--tcp-gray-400);
  transform: translateY(-2px);
}

/* ===================================
   RECENT POSTS
   =================================== */

.error-404-recent {
  margin-top: var(--tcp-space-2);
  padding-top: var(--tcp-space-8);
}

.error-404-recent-title {
  font-family: var(--tcp-font-display);
  font-size: var(--tcp-text-3xl);
  font-weight: 700;
  color: var(--tcp-dark);
  text-align: center;
  margin: 0 0 var(--tcp-space-8) 0;
}

.error-404-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tcp-space-6);
}

.error-404-post-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.error-404-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.error-404-post-card:hover .error-404-post-image img {
  transform: scale(1.05);
}

.error-404-post-content {
  padding: var(--tcp-space-4);
}

.error-404-post-category {
  margin-bottom: var(--tcp-space-2);
}

.error-404-post-category a {
  font-family: var(--tcp-font-secondary);
  font-size: var(--tcp-text-xs);
  font-weight: 700;
  color: var(--tcp-primary);
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.error-404-post-category a:hover {
  color: var(--tcp-primary-dark, #0056b3);
}

.error-404-post-title {
  font-family: var(--tcp-font-display);
  font-size: var(--tcp-text-lg);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--tcp-space-3) 0;
}

.error-404-post-title a {
  color: var(--tcp-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.error-404-post-title a:hover {
  color: var(--tcp-primary);
}

.error-404-post-meta {
  display: flex;
  align-items: center;
  gap: var(--tcp-space-2);
}

.error-404-post-date {
  font-family: var(--tcp-font-primary);
  font-size: var(--tcp-text-sm);
  color: var(--tcp-gray-600);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
  .error-404-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .error-404-page {
    padding: var(--tcp-space-8) 0;
  }

  .error-404-content {
    margin-bottom: var(--tcp-space-8);
  }

  .error-404-number {
    font-size: 100px;
  }

  .error-404-title {
    font-size: var(--tcp-text-2xl);
  }

  .error-404-description {
    font-size: var(--tcp-text-base);
  }

  .error-search-wrapper {
    flex-direction: column;
  }

  .error-search-submit {
    width: 100%;
    justify-content: center;
  }

  .error-404-buttons {
    flex-direction: column;
  }

  .error-404-btn {
    width: 100%;
    justify-content: center;
  }

  .error-404-posts {
    grid-template-columns: 1fr;
  }

  .error-404-recent-title {
    font-size: var(--tcp-text-2xl);
  }
}

@media (max-width: 480px) {
  .error-404-number {
    font-size: 80px;
  }

  .error-404-title {
    font-size: var(--tcp-text-xl);
  }
}
