/**
 * Modern Blog Design for Travelgram
 * 
 * Clean, minimalist card-based layout inspired by modern design trends:
 * - Pinterest/Instagram-style grid
 * - Clean typography and spacing
 * - Subtle animations and hover effects
 * - Mobile-first responsive design
 * - Dark mode support
 * 
 * @author Admir Bjelic
 * @version 1.0
 */

/* Blog Page Header */
.page-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.3rem;
  color: #666;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Blog Container */
.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Stories Grid */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Story Card */
.story-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.story-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgb(0 0 0 / 15%);
}

/* Story Image */
.story-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-card:hover .card-image {
  transform: scale(1.05);
}

/* Story Overlay */
.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgb(0 0 0 / 10%) 0%,
    rgb(0 0 0 / 30%) 50%,
    rgb(0 0 0 / 70%) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-card:hover .story-overlay {
  opacity: 1;
}

.story-category {
  background: rgb(255 255 255 / 20%);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.story-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgb(0 0 0 / 30%);
}

.story-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgb(0 0 0 / 30%);
}

.story-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  opacity: 0.9;
}

.read-time {
  font-weight: 500;
}

.story-date {
  font-weight: 400;
}

/* Story Footer */
.story-footer {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.story-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: #f8f9fa;
  color: #666;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--primary);
  color: white;
  cursor: pointer;
}

.read-more-btn {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
}

.read-more-btn:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(45 108 223 / 30%);
}

/* Responsive Design */
@media (width <= 768px) {
  .page-header h1 {
    font-size: 2.5rem;
  }

  .page-header p {
    font-size: 1.1rem;
  }

  .blog-container {
    padding: 0 1rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .story-image {
    height: 250px;
  }

  .story-overlay {
    padding: 1.5rem;
  }

  .story-title {
    font-size: 1.2rem;
  }

  .story-excerpt {
    font-size: 0.85rem;
  }

  .story-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .story-tags {
    width: 100%;
    justify-content: flex-start;
  }

  .read-more-btn {
    align-self: flex-end;
  }
}

@media (width <= 480px) {
  .page-header {
    margin-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .story-image {
    height: 220px;
  }

  .story-overlay {
    padding: 1rem;
  }

  .story-title {
    font-size: 1.1rem;
  }

  .story-excerpt {
    font-size: 0.8rem;
  }

  .story-footer {
    padding: 0.8rem 1rem;
  }
}

/* Dark Mode Styles */
[data-theme="dark"] .story-card {
  background: var(--card-bg-dark);
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
}

[data-theme="dark"] .story-card:hover {
  box-shadow: 0 20px 40px rgb(0 0 0 / 50%);
}

[data-theme="dark"] .story-footer {
  background: var(--card-bg-dark);
}

[data-theme="dark"] .tag {
  background: var(--nav-hover-dark);
  color: var(--text-dark);
}

[data-theme="dark"] .tag:hover {
  background: var(--primary-dark);
  color: white;
}

[data-theme="dark"] .read-more-btn {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

[data-theme="dark"] .read-more-btn:hover {
  background: var(--card-bg-dark);
  color: var(--primary-dark);
}

[data-theme="dark"] .page-header h1 {
  color: var(--primary-dark);
}

[data-theme="dark"] .page-header p {
  color: #a0a0a0;
}

/* Animation for card entrance */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-card:nth-child(1) {
  animation: fade-in-up 0.6s ease-out 0.1s;
}

.story-card:nth-child(2) {
  animation: fade-in-up 0.6s ease-out 0.2s;
}

/* Coming Soon Section */
.coming-soon-section {
  margin-top: 4rem;
  padding: 3rem 2rem;
  text-align: center;
  background: #e4f2fd;
  border-radius: 16px;
  border: 1px solid #bbdefb;
}

.coming-soon-content h2 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.coming-soon-content p {
  font-size: 1.1rem;
  color: #666;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Responsive Coming Soon */
@media (width <= 768px) {
  .coming-soon-section {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
  }

  .coming-soon-content h2 {
    font-size: 1.6rem;
  }

  .coming-soon-content p {
    font-size: 1rem;
  }
}

@media (width <= 480px) {
  .coming-soon-section {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
  }

  .coming-soon-content h2 {
    font-size: 1.4rem;
  }
}

/* Dark Mode Coming Soon */
[data-theme="dark"] .coming-soon-section {
  background: rgb(74 144 226 / 8%);
  border-color: rgb(74 144 226 / 20%);
}

[data-theme="dark"] .coming-soon-content h2 {
  color: var(--primary-dark);
}

[data-theme="dark"] .coming-soon-content p {
  color: #a0a0a0;
}
