/* Home Page Styles - Adapted from homeTest.tsx */

/* Hide filters by default */
.search-filters.hidden {
  display: none;
}

/* Show filters when not hidden */
.search-filters:not(.hidden) {
  display: block;
}

.imager-stock {
  font-family: 'Inter', 'Arial', sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Header Styles */
.imager-stock__header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.imager-stock__header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.imager-stock__header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.imager-stock__logo-text {
  font-size: 24px;
  font-weight: bold;
  color: #2563eb;
  text-decoration: none;
}

.imager-stock__nav {
  display: flex;
  gap: 24px;
}

.imager-stock__nav-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.imager-stock__nav-link:hover {
  color: #2563eb;
}

.imager-stock__auth {
  display: flex;
  gap: 16px;
}

.imager-stock__auth-link {
  color: #666;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

.imager-stock__auth-link:hover {
  color: #2563eb;
}

.imager-stock__search-bar {
  padding: 16px 0;
  border-top: 1px solid #e5e5e5;
}

.imager-stock__search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 12px;
}

.imager-stock__search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
}


.imager-stock__search-button:hover {
  background: #1d4ed8;
}

/* Hero Section */
.imager-stock__hero {
  padding: 60px 32px;
  background-color: #EAEDF6;  
  background-repeat: no-repeat;
  background-size: 980px;
  background-position: right -40px bottom -100px;
  background-image: url(/static/img/slider-image.png);
  min-height: 1000px;
}
@media (max-width: 1200px) {
  .imager-stock__hero {
    /* Smooth transition between breakpoints */
    background-size: clamp(600px, 600px + (100vw - 650px) * 0.69, 980px);
    background-position: right clamp(-40px, -40px + (100vw - 650px) * 0.07, 0px) bottom -100px;
    min-height: clamp(800px, 800px + (100vw - 650px) * 0.36, 1000px);
  }
}

@media (max-width: 650px) {
  .imager-stock__hero {
    background-size: 600px;
    background-position: right 0px bottom -100px;
    min-height: 800px;
  }
}

.imager-stock__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.imager-stock__hero-title {
  font-size: 54px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1e293b;
  line-height: 1.2;
}

@media (max-width: 1200px) {
  .imager-stock__hero-title {
    font-size: 40px;
    background: #eaedf69e;
    padding: 12px;
  }
}

.imager-stock__hero-title-name {
  background: -webkit-linear-gradient(left, #b71870, #691e8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.imager-stock__hero-description {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 32px;
  background: #eaedf69e;
  padding: 12px;
}

.imager-stock__hero-cta {
  background: #008FA1;
  color: white;
  padding: 16px 32px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.imager-stock__hero-cta:hover {
  background: #007585;
}

.imager-stock__hero-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.imager-stock__hero-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

/* Container */
.imager-stock__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-shadow: none !important;
}

/* Section Titles */
.imager-stock__section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: #1e293b;
}

/* Categories Section */
.imager-stock__categories {
  padding: 80px 0;
}

.imager-stock__categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  margin-bottom: 48px;
  row-gap: 42px;
}

.imager-stock__category-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.imager-stock__category-card:hover {
  transform: scale(1.05);
}

.imager-stock__category-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.imager-stock__category-card:hover .imager-stock__category-image {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.imager-stock__category-placeholder {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.imager-stock__category-name {
  font-size: 18px;
  color: #0E1320;
  font-weight: 400;
}

.imager-stock__category-card {
  position: relative;
}

/* Background effect on hover - transparent for zoom effect */
.imager-stock__category-card:after {
  content: "";
  position: absolute;
  width: 100%;
  height: auto;
  background: transparent;
  border-radius: 8px;
  top: 0;
  left: 0;
  z-index: -1;
  transition: all 0.3s ease;
}

.imager-stock__category-card:hover:after {
  height: 100%;
  top: 0;
  background: transparent;
}

/* Transparent background for Topical thematic collections */
.imager-stock__collections .imager-stock__category-card:after {
  background: transparent;
}

/* Transparent background for Topical thematic collections section */
.imager-stock__collections .imager-stock__category-card:after {
  background: transparent;
}

.imager-stock__category-edit-link {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.3);
  padding: 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imager-stock__category-edit-link svg {
  stroke: rgb(0, 147, 173);
}

.imager-stock__category-edit-link:hover {
  background: rgba(255, 255, 255, 0.7);
}

.imager-stock__category-card:hover .imager-stock__category-edit-link {
  opacity: 1;
}

.imager-stock__view-all-btn {
  display: inline-block;
  margin: 0 auto;
  padding: 12px 32px;
  background: transparent;
  border: 1px solid #1e293b;
  color: #1e293b;
  border-radius: 46px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.imager-stock__view-all-btn {
  display: block;
  margin: 0px auto;
  max-width: 262px;
  white-space: nowrap;
}

.imager-stock__view-all-btn:hover {
  background: #f5f7fc;
  /* color: white; */
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

/* Categories List Page */
.imager-stock__categories-header {
  padding: 60px 0 40px;
  text-align: center;
  background: #f8fafc;
}

.imager-stock__page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1e293b;
}

.imager-stock__page-description {
  font-size: 18px;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.imager-stock__category-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.imager-stock__no-categories {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 18px;
}

/* Legal Content Section */
.imager-stock__legal-content {
  padding: 80px 0;
  background: #E5E5E5;
}

.imager-stock__legal-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.imager-stock__legal-description {
  font-size: 26px;
  color: #0E1320;
  margin-bottom: 32px;
  font-weight: 600;
  line-height: 125%;
  margin-top: 24px;
}

.imager-stock__legal-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.imager-stock__legal-point p {
  color: #0E1320;
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  margin-bottom: 24px;
}

.imager-stock__legal-illustration-wrapper {
  width: 100%;
  height: 300px;
  background: #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reasons Section */
.imager-stock__reasons {
  padding: 80px 0;
}

.imager-stock__reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.imager-stock__reason-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.imager-stock__reason-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.imager-stock__reason-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.imager-stock__reason-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1e293b;
}

.imager-stock__reason-description {
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Collections Section */
.imager-stock__collections {
  padding: 80px 0;
  background: #f8fafc;
}

.imager-stock__collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.imager-stock__collection-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.imager-stock__collection-item:hover {
  transform: scale(1.02);
}

.imager-stock__collection-item.large {
  grid-column: span 2;
}

.imager-stock__collection-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.imager-stock__collection-title {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

/* New Authors Section */

.imager-stock__author-banner .imager-stock__container {
  padding: 32px;
  background: linear-gradient(90deg, #A34570 0%, #008FA1 100%);
  border-radius: 8px;
}

.imager-stock__new-authors {
  padding: 40px 0 0;
}

.imager-stock__authors-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f1f5f9;
}

.imager-stock__authors-grid::-webkit-scrollbar {
  height: 8px;
}

.imager-stock__authors-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.imager-stock__authors-grid::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.imager-stock__authors-grid::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.imager-stock__author-card {
  flex: 0 0 auto;
  width: 280px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.imager-stock__author-card:hover {
  transform: translateY(-4px);
}

.imager-stock__author-image-link {
  position: relative;
  display: block;
}

/* Убираем черный фон для контейнеров с видео, так как используем object-fit: cover */
.imager-stock__author-image-link:has(.imager-stock__author-image--video) {
  background: transparent;
  border-radius: 12px;
}

.imager-stock__author-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #f1f5f9;
}

/* Для видео используем cover чтобы заполнить контейнер */
.imager-stock__author-image--video {
  object-fit: cover;
  background: transparent;
}

.imager-stock__author-name {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 16px;
}

/* Author Registration Banner */
.imager-stock__author-banner {
  /* padding: 80px 0; */
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  margin: 80px 0;
}

.imager-stock__author-banner-content {
  display: flex;
  gap: 48px;
  align-items: center;
}

.imager-stock__author-banner-text {
  color: white;
  flex: 1;
  padding: 0 0 0 75px;
}

@media (max-width: 1150px) {
  .imager-stock__author-banner-text {
    padding: 0 0 0 clamp(0px, calc(0px + (100vw - 1000px) * 0.500), 75px);
  }
}

@media (max-width: 900px) {
  .imager-stock__author-banner-content {
    display: block;
  }  
  .imager-stock__author-banner-text {
    text-align: center;
  }
}



.imager-stock__author-banner-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.imager-stock__author-banner-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  opacity: 0.9;
}

.imager-stock__author-register-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  padding: 16px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

@media (max-width: 900px) {
  .imager-stock__author-register-btn {
     margin: 0 auto; 
  }
}

.imager-stock__author-register-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.imager-stock__author-banner-illustration {
  flex: 0 0 470px;
}

@media (max-width: 900px) {
  .imager-stock__author-banner-illustration {
  margin-top: 32px;
  }
}

.imager-stock__author-banner-illustration img {
  height: auto;
  width: 100%;
}

/* Browsed Section */
.imager-stock__browsed {
  padding: 48px 0;
  background: #EAEDF6;
}

.imager-stock__browsed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.imager-stock__browsed-item {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  height: 240px;
}

.imager-stock__browsed-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.imager-stock__browsed-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.imager-stock__browsed-image-wrapper:hover {
  opacity: 0.85;
}

/* Убираем черный фон для wrapper'ов с видео, так как используем object-fit: cover */
.imager-stock__browsed-image-wrapper:has(.imager-stock__browsed-image--video) {
  background: transparent;
}

.imager-stock__browsed-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.imager-stock__browsed-empty {
  text-align: center;
  padding: 40px 20px;
}

.imager-stock__browsed-empty p {
  color: #64748b;
  margin-bottom: 20px;
}

/* Footer */
.imager-stock__footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 48px 0 24px;
}

.imager-stock__footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.imager-stock__footer-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.imager-stock__footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.imager-stock__footer-links li {
  margin-bottom: 8px;
}

.imager-stock__footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.imager-stock__footer-links a:hover {
  color: white;
}

.imager-stock__language-select {
  background: #374151;
  color: white;
  border: 1px solid #4b5563;
  border-radius: 4px;
  padding: 8px;
  width: 100%;
}

.imager-stock__footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid #374151;
}

.imager-stock__footer-bottom p {
  margin: 0;
}

.imager-stock__footer-bottom .hitexis-link {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.imager-stock__footer-bottom .hitexis-link:hover {
  color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .imager-stock__categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .imager-stock__browsed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .imager-stock__hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .imager-stock__hero-title {
    font-size: 36px;
  }

  .imager-stock__legal-content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .imager-stock__browsed-grid {
    grid-template-columns: 1fr;
  }
  
  .imager-stock__nav {
    display: none;
  }

  .imager-stock__header-top {
    flex-direction: column;
    gap: 16px;
  }

  .imager-stock__categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .imager-stock__reasons-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .imager-stock__categories-grid {
    grid-template-columns: 1fr;
  }

  .imager-stock__page-title {
    font-size: 32px;
  }

  .imager-stock__page-description {
    font-size: 16px;
  }
}

/* Video Badge Styles */
.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s ease;
}

.imager-stock__author-image-link:hover .video-badge,
.browsing-history__link:hover .video-badge,
.imager-stock__browsed-item:hover .video-badge {
  opacity: 0.9;
}

.video-badge svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}
