@import url("base.css");

/* News Section */
.news-section {
  padding: 80px 0;
  background: var(--gray-50);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 40px;
  padding: 32px 0;
}

.news-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: newsSlideIn 0.8s ease-out forwards;
  position: relative;
}

.news-card:nth-child(1) {
  animation-delay: 0.1s;
}

.news-card:nth-child(2) {
  animation-delay: 0.2s;
}

.news-card:nth-child(3) {
  animation-delay: 0.3s;
}

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

.news-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.news-image-container {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--gray-100);
  transition: var(--transition);
}

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

.news-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: var(--transition);
}

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

.news-read-more {
  background: var(--accent);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--border-radius-lg);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

.news-content {
  padding: 32px;
}

.news-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gray-900);
  line-height: 1.3;
  position: relative;
}

.news-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.news-card:hover .news-title::after {
  width: 80px;
}

.news-date {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
}

.news-date::before {
  content: "📅";
  margin-right: 8px;
}

.news-text {
  line-height: 1.7;
  color: var(--gray-600);
  font-size: 16px;
  position: relative;
}

/* News Modal */
.news-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.news-modal-overlay.active {
  opacity: 1;
}

.news-modal {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease-out;
}

.news-modal-overlay.active .news-modal {
  transform: scale(1);
}

.news-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.news-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.news-modal-image {
  background: var(--gray-100);
}

.news-modal-image img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.news-modal-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 500px;
}

.news-modal-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  line-height: 1.2;
}

.news-modal-date {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-modal-date::before {
  content: "📅";
  margin-right: 8px;
}

.news-modal-text {
  line-height: 1.8;
  color: var(--gray-600);
  font-size: 18px;
  max-width: 100%;
  word-wrap: break-word;
}

.news-modal-text p {
  margin-bottom: 20px;
}

/* Přidáno pro zobrazení propojených produktů */
.news-products-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.news-modal-products {
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.news-modal-products-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-800);
}

.news-modal-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.news-modal-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  cursor: pointer;
}

.news-modal-product:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.news-modal-product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.news-modal-product-info {
  flex: 1;
}

.news-modal-product-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--gray-800);
}

.news-modal-product-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.news-modal-product-btn:hover {
  background: var(--accent-dark, #6d4016);
}

/* Page Hero */
.page-hero {
  padding: 60px 0;
  min-height: 300px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(133, 82, 2, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(133, 82, 2, 0.1) 0%, transparent 50%);
  animation: heroFlow 15s ease-in-out infinite;
}

@keyframes heroFlow {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(20px) scale(1.05);
  }
}

.page-hero-content {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.3s forwards;
  max-width: 900px;
  margin: 0 auto;
}

.page-hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--white), rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.9;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 100px 32px;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 500;
  grid-column: 1 / -1;
  border: 1px solid var(--gray-200);
}

.no-results-icon {
  font-size: 80px;
  margin-bottom: 32px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 28px;
  color: var(--gray-700);
  margin-bottom: 16px;
  font-weight: 700;
}

.no-results p {
  font-size: 18px;
  margin-bottom: 32px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .news-modal-content {
    grid-template-columns: 1fr;
  }

  .news-modal-info {
    padding: 32px;
  }

  .news-modal-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0;
  }

  .news-content {
    padding: 24px;
  }

  .news-modal {
    width: 95%;
    margin: 16px;
  }

  .news-modal-info {
    padding: 24px;
  }

  .news-modal-title {
    font-size: 24px;
  }

  .news-modal-image img {
    min-height: 250px;
  }

  .news-image-container {
    height: 240px;
  }

  .news-title {
    font-size: 20px;
  }

  .page-hero {
    padding: 40px 0;
    min-height: 250px;
  }

  .page-hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .page-hero-subtitle {
    font-size: 1rem;
  }

  .news-modal-products-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .news-content {
    padding: 20px;
  }

  .news-modal-info {
    padding: 20px;
  }

  .news-modal-title {
    font-size: 20px;
  }

  .no-results {
    padding: 60px 20px;
  }

  .no-results-icon {
    font-size: 60px;
  }

  .no-results h3 {
    font-size: 24px;
  }
}
