/* News Section Styles */
/* Speicherort: html/css/news.css */

/* News Section on Homepage */
.news-section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

.news-section .section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* News Posts Grid */
.news-posts-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Post Card */
.news-post-card {
  background: linear-gradient(135deg, var(--background2) 0%, #1a1d21 100%);
  border: 2px solid var(--accent2_transp);
  border-radius: var(--roundness);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: slideInUp 0.5s ease-out;
  cursor: pointer;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-post-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent2);
  box-shadow: 0 12px 40px rgba(0, 172, 252, 0.3);
}

.news-post-card:focus {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* Post Banner */
.post-banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.post-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-post-card:hover .post-banner img {
  transform: scale(1.05);
}

.post-banner.banner-blur img {
  filter: blur(8px);
}

/* Post Content */
.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent1);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #999;
}

.post-author {
  color: var(--accent2);
  font-weight: 600;
}

.post-date {
  color: #777;
}

.post-text {
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Post Images Grid */
.post-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.post-image-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.post-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-image-item:hover img {
  transform: scale(1.1);
}

/* Lazy Loading */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

/* Show More Button */
.show-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  margin-top: 3rem;
}

.show-more-btn {
  padding: 1rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent1) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 172, 252, 0.3);
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 172, 252, 0.5);
}

.show-more-btn:active {
  transform: translateY(0);
}

/* View All News Link */
.view-all-news-link {
  display: inline-block;
  text-decoration: none;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  color: #999;
  font-size: 1.2rem;
  padding: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .news-section {
    padding: 3rem 1rem;
  }

  .news-section .section-title {
    font-size: 2rem;
  }

  .news-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .post-banner {
    height: 180px;
  }

  .post-title {
    font-size: 1.3rem;
  }

  .post-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (max-width: 480px) {
  .post-content {
    padding: 1rem;
  }

  .post-banner {
    height: 150px;
  }

  .show-more-btn {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }
}

/* News Page Specific Styles */
.news-page-header {
  text-align: center;
  padding: 8rem 2rem 2rem;
  background: linear-gradient(180deg, rgba(0, 172, 252, 0.1) 0%, transparent 100%);
}

.news-page-title {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.news-page-subtitle {
  font-size: 1.3rem;
  color: #ddd;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .news-page-title {
    font-size: 2.5rem;
  }

  .news-page-subtitle {
    font-size: 1.1rem;
  }
}

/* News Modal Styles */
.news-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-modal.modal-visible {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: linear-gradient(135deg, var(--background2) 0%, #1a1d21 100%);
  border: 2px solid var(--accent2);
  border-radius: var(--roundness);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 172, 252, 0.4);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--accent2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  color: white;
}

.modal-close:hover {
  background: var(--accent2);
  transform: rotate(90deg);
}

.modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal-banner {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.modal-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-banner.banner-blur img {
  filter: blur(8px);
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent1);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.modal-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #999;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--accent2_transp);
}

.modal-author {
  color: var(--accent2);
  font-weight: 600;
}

.modal-date {
  color: #777;
}

.modal-text {
  color: #ddd;
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.modal-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.modal-image-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.modal-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modal-image-item:hover img {
  transform: scale(1.1);
}

/* Modal Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-banner {
    height: 200px;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-text {
    font-size: 1rem;
  }

  .modal-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-banner {
    height: 180px;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
