/* ==========================================================================
   WTMA — Каталог (Katalog) TEX AREA Stylesheet
   Strict 1:1 match to Master Reference Mockup (katalog/main_toplami.jpg)
   ========================================================================== */

/* --- Master Body & Background --- */
.katalog-page-body {
  background-color: #03060c;
  color: #f3f4f6;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden !important;
}

/* Base Container */
.katalog-container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

/* ==========================================================================
   HEADER / NAVIGATION COMPATIBILITY
   Unified .site-header.header-scrolled-dark styles are provided by css/style.css
   ========================================================================== */

/* Search Modal */
.katalog-search-modal {
  display: none !important;
}

.katalog-search-modal.is-open {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(12px);
}

.search-modal-box {
  position: relative;
  z-index: 1;
  background: #090e18;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  width: 90%;
  max-width: 640px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 14px;
  margin-bottom: 18px;
  color: #ffffff;
}

.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
}

.search-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}

.search-quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-tag-label {
  font-size: 12px;
  color: #64748b;
}

.quick-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
}

.quick-tag:hover {
  background: rgba(229, 169, 60, 0.15);
  color: #e5a93c;
  border-color: #e5a93c;
}

.search-results-container {
  margin-top: 20px;
  max-height: 280px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-thumb {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

.search-result-item h4 {
  font-size: 13px;
  color: #ffffff;
  margin: 0 0 4px;
}

.search-result-item p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* ==========================================================================
   HERO SECTION: TEX AREA (Exact 3D Composition from main_toplami.jpg)
   ========================================================================== */
.katalog-hero-section {
  position: relative;
  width: 100%;
  min-height: 640px;
  height: 82vh;
  max-height: 780px;
  display: flex;
  align-items: center;
  padding-top: 76px;
  overflow: hidden;
  background-color: #03060c;
  box-sizing: border-box;
}

/* Full-width 3D Pyramid & Rays Background Environment */
.katalog-hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.katalog-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

/* Smooth left vignette so white text sits legibly over the beam */
.katalog-hero-left-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 6, 12, 0.92) 0%, rgba(3, 6, 12, 0.68) 36%, rgba(3, 6, 12, 0.15) 60%, transparent 80%);
}

/* Bottom fade seamlessly merging into the cards section */
.katalog-hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(0deg, #03060c 0%, rgba(3, 6, 12, 0.8) 40%, transparent 100%);
}

/* Hero Typography Content (Left-aligned over the beam) */
.katalog-hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.katalog-hero-content {
  max-width: 500px;
  padding-top: 10px;
}

.katalog-breadcrumb {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c7a877;
  margin-bottom: 14px;
}

.katalog-hero-title {
  font-family: 'Syncopate', var(--font-sans);
  font-size: clamp(2.8rem, 5.2vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.katalog-hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.38;
  text-transform: uppercase;
  color: #e2e8f0;
  margin: 0 0 18px 0;
  max-width: 480px;
}

.katalog-gold-divider {
  width: 44px;
  height: 2.5px;
  background: #e5a93c;
  margin-bottom: 22px;
  box-shadow: 0 0 10px rgba(229, 169, 60, 0.5);
  border-radius: 1px;
}

.katalog-hero-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: #94a3b8;
  margin: 0 0 32px 0;
  max-width: 440px;
}

/* Button "СМОТРЕТЬ ПРЕЗЕНТАЦИЮ ->" */
.katalog-hero-cta {
  display: flex;
}

.btn-katalog-presentation {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-katalog-presentation .cta-arrow {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-katalog-presentation:hover {
  background: #e5a93c;
  border-color: #e5a93c;
  color: #03060c;
  box-shadow: 0 6px 24px rgba(229, 169, 60, 0.4);
  transform: translateY(-2px);
}

.btn-katalog-presentation:hover .cta-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   CATALOG GRID: 8 EDITIONS (Exact 4x2 Grid from main_toplami.jpg)
   ========================================================================== */
.katalog-grid-section {
  position: relative;
  width: 100%;
  padding: 40px 0 0;
  background-color: #03060c;
  overflow: hidden;
}

/* Glowing Globe / Network Map Background Layer (Lower page half environment) */
.katalog-globe-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.katalog-globe-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.96;
  display: block;
}

.globe-blend-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(180deg, #03060c 0%, rgba(3, 6, 12, 0.65) 45%, rgba(3, 6, 12, 0) 100%);
  pointer-events: none;
}

.globe-blend-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(0deg, #03060c 0%, rgba(3, 6, 12, 0.7) 50%, rgba(3, 6, 12, 0) 100%);
  pointer-events: none;
}

.katalog-grid-container {
  position: relative;
  z-index: 2;
}

.katalog-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 24px;
}

/* Lower Globe Vista Showcase (The glowing world map spreading below cards) */
.katalog-globe-vista {
  height: 320px;
  pointer-events: none;
}

/* Card */
.katalog-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.katalog-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 14;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #080c16;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.katalog-card-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  transition: transform 0.5s ease;
}

/* Card Hover Quickview Overlay */
.katalog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 6, 12, 0.1) 0%, rgba(3, 6, 12, 0.8) 100%);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.btn-card-quickview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #e5a93c;
  color: #03060c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transform: translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

/* Card Caption / Footer (Exact title style from main_toplami.jpg) */
.katalog-card-footer {
  padding-top: 14px;
}

.katalog-card-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5e1;
  margin: 0;
  transition: color 0.25s ease;
}

/* Hover States */
.katalog-card:hover {
  transform: translateY(-8px);
}

.katalog-card:hover .katalog-card-media {
  border-color: rgba(229, 169, 60, 0.75);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), 0 0 22px rgba(229, 169, 60, 0.25);
}

.katalog-card:hover .katalog-card-img {
  transform: scale(1.03);
}

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

.katalog-card:hover .btn-card-quickview {
  transform: translateY(0);
}

.katalog-card:hover .katalog-card-title {
  color: #ffffff;
}

/* ==========================================================================
   FOOTER (Seamless over the globe glow)
   ========================================================================== */
.katalog-footer {
  position: relative;
  z-index: 3;
  background: rgba(3, 6, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 0 36px;
}

.katalog-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.katalog-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.katalog-footer-socials {
  display: flex;
  align-items: center;
  gap: 18px;
}

.katalog-social-pipe {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  margin-right: 4px;
}

.katalog-social-link {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.katalog-social-link:hover {
  color: #e5a93c;
  transform: translateY(-2px);
}

/* ==========================================================================
   EDITION MODAL (Hidden by default, shown on card click)
   ========================================================================== */
.edition-modal-backdrop {
  display: none !important;
}

.edition-modal-backdrop.is-open {
  display: flex !important;
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.edition-modal-window {
  position: relative;
  background: #090e18;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(229, 169, 60, 0.15);
  padding: 38px;
  box-sizing: border-box;
}

.edition-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.edition-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-color: #e5a93c;
}

.edition-modal-content {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 34px;
  align-items: center;
}

.edition-modal-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 14;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  background: #050811;
}

.edition-modal-cover {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.edition-modal-vol-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(3, 6, 12, 0.85);
  color: #e5a93c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 4px 12px;
  border-radius: 2px;
  border: 1px solid rgba(229, 169, 60, 0.4);
}

.modal-tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #c7a877;
  text-transform: uppercase;
}

.modal-status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.modal-edition-title {
  font-family: 'Syncopate', var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.modal-edition-theme {
  font-size: 14.5px;
  font-weight: 500;
  color: #cbd5e1;
  margin: 0 0 16px 0;
}

.modal-gold-line {
  width: 36px;
  height: 2px;
  background: #e5a93c;
  margin-bottom: 16px;
}

.modal-edition-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.modal-topics-block h5 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #cbd5e1;
  margin: 0 0 10px 0;
  text-transform: uppercase;
}

.modal-topics-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-topics-list li {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-topics-list li::before {
  content: '•';
  color: #e5a93c;
  font-size: 16px;
  line-height: 1;
}

.modal-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-modal-request {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #e5a93c;
  color: #03060c;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-modal-request:hover {
  background: #ffffff;
  color: #03060c;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.3);
}

.btn-modal-preview-close {
  font-size: 13px;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-modal-preview-close:hover {
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1100px) {
  .katalog-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 16px;
  }
}

@media (max-width: 991px) {
  .katalog-nav {
    display: none;
  }

  .katalog-burger-toggle {
    display: flex;
  }

  .katalog-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  .katalog-hero-section {
    min-height: 560px;
    height: auto;
    padding: 120px 0 60px;
  }

  .katalog-hero-content {
    max-width: 100%;
  }

  .edition-modal-content {
    grid-template-columns: 1fr;
  }

  .edition-modal-cover-wrap {
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .katalog-hero-title {
    font-size: 2.4rem;
  }

  .katalog-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }

  .katalog-card-title {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .edition-modal-window {
    padding: 24px 18px;
  }

  .katalog-globe-vista {
    height: 180px;
  }
}

@media (max-width: 380px) {
  .katalog-cards-grid {
    grid-template-columns: 1fr;
  }
}
