/* ================================================================
   TEMPLATES.CSS - Page-specific styles
   ================================================================ */

/* Hero Section */
.hero {
  position: relative;
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--color-primary-700) 0%, var(--color-primary-900) 50%, var(--color-slate-900) 100%);
  color: var(--text-on-primary);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--text-on-primary);
  margin-bottom: var(--space-6);
  max-width: 800px;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-xl);
  max-width: 600px;
  margin-bottom: var(--space-8);
}

.hero .btn-primary {
  background: white;
  color: var(--color-primary-700);
  border-color: white;
}

.hero .btn-primary:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-50);
  color: var(--color-primary-800);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
}

.post-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card .post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-card .post-content {
  padding: var(--space-6);
}

.post-card .post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.post-card .post-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: var(--line-height-snug);
}

.post-card .post-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-card .post-title a:hover {
  color: var(--text-link);
}

.post-card .post-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

.post-card .read-more {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-link);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.post-card .read-more:hover {
  gap: var(--space-3);
}

/* Single Post */
.single-post .entry-header {
  margin-bottom: var(--space-8);
}

.single-post .entry-title {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

.single-post .entry-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
}

.single-post .entry-content {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.single-post .entry-content p {
  margin-bottom: var(--space-6);
}

.single-post .entry-content blockquote {
  border-left: 4px solid var(--color-primary-500);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--text-primary);
}

.single-post .entry-content img {
  border-radius: 12px;
  margin: var(--space-8) 0;
}

/* Page Templates */
.page-template-landing .site-header {
  position: absolute;
  background: transparent;
  border-bottom: none;
}

.page-template-landing .site-header .site-title,
.page-template-landing .site-header .main-navigation a {
  color: white;
}

/* 404 Page */
.error-404 {
  text-align: center;
  padding: var(--space-24) 0;
}

.error-404 .error-code {
  font-size: clamp(8rem, 15vw, 12rem);
  font-weight: 800;
  color: var(--color-primary-200);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.error-404 h2 {
  margin-bottom: var(--space-4);
}

.error-404 p {
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
}

/* Search Results */
.search-results .search-form {
  max-width: 600px;
  margin: 0 auto var(--space-12);
}

/* WooCommerce Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

/* Comments */
.comments-area {
  margin-top: var(--space-16);
  padding-top: var(--space-16);
  border-top: 1px solid var(--border-light);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  padding: var(--space-6);
  background: var(--bg-surface);
  border-radius: 12px;
  margin-bottom: var(--space-4);
}

.comment .comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.comment .comment-author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment .comment-author .fn {
  font-weight: 700;
  color: var(--text-primary);
}

.comment .comment-metadata {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.comment .comment-content {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}
