/* ==========================================================================
   Premium UI Components
   ========================================================================== */

/* Editorial Grid - Instagram Feed Style */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr));
  gap: 3rem;
  margin-bottom: 6rem;
  justify-content: center;
}

/* Instagram-inspired Post Card */
.post-card {
  position: relative;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-medium);
  margin-bottom: 2rem;
}

.post-card-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.post-card-author-info {
  display: flex;
  flex-direction: column;
}

.post-card-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.post-card-location {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.post-card-more {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

.post-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1; /* Instagram Square Style */
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-interaction {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.interaction-left {
  display: flex;
  gap: 1.5rem;
}

.interaction-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.interaction-btn:hover {
  transform: scale(1.2);
}

.interaction-btn:active {
  transform: scale(0.9);
}

.interaction-btn.active svg {
  fill: var(--color-accent);
  stroke: var(--color-accent);
}

.interaction-btn.like-btn.active svg {
  fill: #ff3040;
  stroke: #ff3040;
  animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.interaction-btn.save-btn.active svg {
  fill: #fff;
  stroke: #fff;
}

.post-card-content {
  padding: 0 1.5rem 1.5rem;
}

.post-card-views {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
}

.post-card-caption {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 0.5rem;
  font-family: var(--font-primary);
  font-weight: 400;
}

.caption-author {
  font-weight: 600;
  margin-right: 0.5rem;
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.post-card-tags a {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  margin-right: 0.3rem;
}

.post-card-date-instagram {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

.post-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

/* Premium Buttons */
.btn-zen {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1rem 2.5rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  transition: all var(--transition-medium);
}

.btn-zen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-premium);
  z-index: -1;
}

.btn-zen:hover {
  color: #fff;
}

.btn-zen:hover::before {
  transform: translateY(0);
}

/* Architectural Large Footer */
.large-footer {
  padding: 12rem 0 6rem;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.large-footer::before {
  content: '禅'; /* Zen in Japanese */
  position: absolute;
  top: 4rem;
  right: 4rem;
  font-family: var(--font-serif);
  font-size: 15rem;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 6rem;
  margin-bottom: 10rem;
}

.footer-brand h2 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.footer-brand p {
  color: var(--color-text-muted);
  max-width: 320px;
  line-height: 1.8;
  font-size: 0.95rem;
}

.footer-column h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  margin-bottom: 3rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 4rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* Newsletter Form Refinement */
.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1.5rem 2rem;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 1rem;
  border-radius: 4px;
  transition: border-color 0.3s;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Comment Section UI */
.post-card-comments {
  padding: 0 1.5rem;
  margin-top: 1rem;
}

.comment-item {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: #fff;
}

.comment-author {
  font-weight: 600;
  margin-right: 0.5rem;
}

.view-comments-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 0;
  cursor: pointer;
  margin-bottom: 0.8rem;
}

.add-comment-form {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.comment-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  outline: none;
}

.comment-submit {
  background: none;
  border: none;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.comment-input:not(:placeholder-shown) + .comment-submit {
  opacity: 1;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

@media (max-width: 768px) {
  .posts-grid {
    gap: 0;
    margin-bottom: 0;
  }

  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0;
  }
  
  .post-card-header, .post-card-interaction, .post-card-content, .post-card-comments, .add-comment-form {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}
