/* ----------------------------------------------------
   Ustalar Yapı Katalog - Modern Premium Style System
---------------------------------------------------- */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* CSS Custom Properties / Design Tokens */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colors */
  --bg-main: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --primary: #f59e0b; /* Amber 500 */
  --primary-hover: #d97706; /* Amber 600 */
  --primary-glow: rgba(245, 158, 11, 0.15);
  --primary-glow-hover: rgba(245, 158, 11, 0.3);
  
  --text-main: #d4d4d4;
  --text-white: #ffffff;
  --text-muted: #737373;
  --text-dark: #171717;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Base resets & Defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Selection Colors */
::selection {
  background-color: var(--primary);
  color: var(--text-dark);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mono {
  font-family: var(--font-mono);
}

/* Button & Interactable Defaults */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  outline: none;
}

/* ---------------- HEADER ---------------- */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-container {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: var(--primary);
  color: var(--text-dark);
  font-weight: 900;
  transition: transform var(--transition-fast);
}

.logo-container:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-size: 0.875rem;
  font-weight: 900;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .logo-text {
    font-size: 1rem;
  }
}

.logo-accent {
  color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--text-dark);
  padding: 0.375rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 15px -3px var(--primary-glow), 0 4px 6px -2px var(--primary-glow);
}

.btn-primary svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 2.5;
}

/* ---------------- HERO SLIDER ---------------- */
.hero-slider-wrapper {
  position: relative;
  height: 440px;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}

@media (min-width: 640px) {
  .hero-slider-wrapper { height: 480px; }
}
@media (min-width: 768px) {
  .hero-slider-wrapper { height: 520px; }
}

.slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
  z-index: 0;
}

.slide-item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.slide-image-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-main) 0%, rgba(10, 10, 10, 0.5) 50%, rgba(10, 10, 10, 0.8) 100%);
  z-index: 2;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.65);
  transform: scale(1.08);
  transition: transform 6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.slide-item.active .slide-image {
  transform: scale(1);
}

.slide-item:not(.active) .slide-image {
  transform: scale(1.08);
  transition: transform 0.8s ease-out;
}

.slide-content-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
}

.slide-content-box {
  max-width: 650px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-badge,
.slide-title,
.slide-desc,
.slide-actions {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.slide-item.active .slide-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.slide-item.active .slide-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.slide-item.active .slide-desc {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.45s;
}

.slide-item.active .slide-actions {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}

.slide-item:not(.active) .slide-badge,
.slide-item:not(.active) .slide-title,
.slide-item:not(.active) .slide-desc,
.slide-item:not(.active) .slide-actions {
  opacity: 0;
  transform: translateY(20px);
  transition: none;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 4px;
  background-color: var(--primary);
  color: var(--text-dark);
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: fit-content;
  margin-bottom: 0.75rem;
}

.slide-badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

.slide-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-white);
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .slide-title { font-size: 1.875rem; }
}
@media (min-width: 768px) {
  .slide-title { font-size: 2.25rem; }
}
@media (min-width: 1024px) {
  .slide-title { font-size: 3rem; }
}

.slide-desc {
  margin-top: 1rem;
  color: #d4d4d4;
  font-size: 0.75rem;
  line-height: 1.6;
  max-width: 570px;
}

@media (min-width: 640px) {
  .slide-desc { font-size: 0.875rem; }
}

.slide-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.btn-secondary {
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: var(--text-white);
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background-color: var(--bg-card);
}

/* Slider Controls */
.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.slider-control:hover {
  border-color: var(--primary);
  background-color: #000;
  color: var(--text-white);
}

.slider-control.prev { left: 1rem; }
.slider-control.next { right: 1rem; }

.slider-control svg {
  width: 1.25rem;
  height: 1.25rem;
}

.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 0.375rem;
}

.dot {
  height: 6px;
  border-radius: 3px;
  background-color: #525252;
  transition: all var(--transition-normal);
  width: 6px;
}

.dot.active {
  width: 24px;
  background-color: var(--primary);
}

.dot:hover:not(.active) {
  background-color: #a3a3a3;
}


/* ---------------- CATEGORY & CATALOG SECTION ---------------- */
.section-wrapper {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section-wrapper { padding: 4.5rem 0; }
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .section-title { font-size: 1.875rem; }
}

.section-title-accent {
  color: var(--primary);
}

.section-desc {
  max-width: 36rem;
  margin: 0.5rem auto 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Search Bar */
.search-container {
  max-width: 28rem;
  margin: 1.5rem auto 0;
  position: relative;
}

.search-input {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  font-size: 0.75rem;
  color: var(--text-white);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-clear:hover {
  color: var(--text-white);
}

.search-clear svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Category Grid */
.categories-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Accordion Card */
.cat-card {
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: rgba(17, 17, 17, 0.4);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.cat-card:hover {
  background-color: var(--bg-card);
  border-color: var(--border-hover);
}

.cat-card.expanded {
  border-color: var(--primary);
  background-color: var(--bg-card);
}

.cat-header-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-align: left;
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.cat-icon-wrapper {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  shrink-0: 0;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: #262626;
  color: #d4d4d4;
  transition: all var(--transition-normal);
}

.cat-icon-wrapper svg {
  width: 1.25rem;
  height: 1.25rem;
}

.cat-card.expanded .cat-icon-wrapper {
  background-color: var(--primary);
  color: var(--text-dark);
}

.cat-info-wrapper {
  overflow: hidden;
}

.cat-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-white);
}

.cat-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 0.125rem;
}

.cat-chevron {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: #262626;
  color: var(--text-muted);
  transition: transform var(--transition-normal), color var(--transition-normal), background-color var(--transition-normal);
}

.cat-chevron svg {
  width: 0.875rem;
  height: 0.875rem;
}

.cat-card.expanded .cat-chevron {
  transform: rotate(180deg);
  color: var(--primary);
  background-color: var(--primary-glow);
}

/* Expandable Panel */
.cat-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
  border-top: 1px solid transparent;
  background-color: rgba(10, 10, 10, 0.5);
}

.cat-card.expanded .cat-panel {
  border-color: var(--border-color);
  max-height: 500px; /* arbitrary height to slide down */
}

.cat-panel-inner {
  padding: 0.75rem 1rem 1rem;
}

.cat-panel-title {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.catalogs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.catalog-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: rgba(17, 17, 17, 0.8);
  padding: 0.75rem;
  transition: all var(--transition-fast);
}

@media (min-width: 640px) {
  .catalog-item {
    flex-direction: row;
    align-items: center;
  }
}

.catalog-item:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: var(--bg-card);
}

.catalog-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e5e5e5;
  transition: color var(--transition-fast);
}

.catalog-item:hover .catalog-name {
  color: var(--primary);
}

.catalog-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.btn-action-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #1c1c1c;
  padding: 0.375rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-action-open:hover {
  border-color: var(--primary);
  color: var(--text-white);
}

.btn-action-open svg {
  width: 0.75rem;
  height: 0.75rem;
}

.btn-action-offer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 4px;
  background-color: var(--primary);
  padding: 0.375rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 900;
  color: var(--text-dark);
  transition: background-color var(--transition-fast);
}

.btn-action-offer:hover {
  background-color: var(--primary-hover);
}

.btn-action-offer svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* No Search Results */
.no-results {
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: rgba(17, 17, 17, 0.4);
  padding: 2.5rem;
  text-align: center;
}

.no-results svg {
  width: 2.5rem;
  height: 2.5rem;
  color: #404040;
  margin: 0 auto;
}

.no-results-text {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.no-results-btn {
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-decoration: underline;
}

.no-results-btn:hover {
  color: var(--primary-hover);
}


/* ---------------- CORPORATE VALUES ---------------- */
.values-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
}

.values-title-pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

.values-title {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-align: center;
  background: linear-gradient(to right, #ffffff, #e5e5e5, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  width: fit-content;
  margin: 0.75rem auto 0;
}

@media (min-width: 768px) {
  .values-title { font-size: 2.25rem; }
}

.values-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}

.value-card {
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-main);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.value-card:hover {
  border-color: var(--primary);
}

.value-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: var(--primary-glow);
  color: var(--primary);
  transition: all var(--transition-normal);
}

.value-card:hover .value-icon {
  background-color: var(--primary);
  color: var(--text-dark);
}

.value-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.value-name {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-white);
}

.value-desc {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* ---------------- FOOTER ---------------- */
.app-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  padding: 3rem 0 2rem;
}

.footer-top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .footer-top { grid-template-columns: repeat(3, 1fr); }
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.675rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  text-decoration: none;
  padding-left: 3rem;
  margin-top: 0.25rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-logo-link:hover {
  color: var(--primary);
}

.footer-partner-logo {
  height: 0.875rem;
  width: auto;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.footer-logo-link:hover .footer-partner-logo {
  opacity: 1;
}

.footer-desc {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-stars {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-stars svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--primary);
  color: var(--primary);
}

.footer-star-text {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.footer-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-white);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-contacts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.footer-contacts svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.footer-form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.btn-footer-submit {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 4px;
  background-color: var(--primary);
  color: var(--text-dark);
  padding: 0.625rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-footer-submit:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 15px -3px var(--primary-glow);
}

.btn-footer-submit svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--transition-normal);
}

.btn-footer-submit:hover svg {
  transform: scale(1.1);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.6875rem;
  color: #404040;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  color: #a3a3a3;
}


/* ---------------- BOOK READER OVERLAY MODAL ---------------- */
.reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none; /* controlled by JS */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.95);
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.reader-overlay.active {
  display: flex;
}

.reader-header {
  display: flex;
  width: 100%;
  max-width: 1000px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.reader-meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reader-meta-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary-glow-hover);
}

.reader-meta-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.reader-meta-title {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-white);
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .reader-meta-title { font-size: 0.875rem; }
}

.reader-meta-pages {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.125rem;
  letter-spacing: 0.05em;
}

.reader-controls-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-reader-action-offer {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--text-dark);
  padding: 0.375rem 1rem;
  font-size: 0.6875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color var(--transition-fast);
}

.btn-reader-action-offer:hover {
  background-color: var(--primary-hover);
}

.btn-reader-action-offer svg {
  width: 0.75rem;
  height: 0.75rem;
}

.btn-reader-close {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #171717;
  color: #a3a3a3;
  transition: all var(--transition-fast);
}

.btn-reader-close:hover {
  border-color: var(--primary);
  color: var(--text-white);
}

.btn-reader-close svg {
  width: 1rem;
  height: 1rem;
}

/* Flipbook Stage & 3D Container */
.flipbook-stage {
  position: relative;
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1000px;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  perspective: 1500px;
}

.book-shadow-board {
  position: absolute;
  inset-y: 3rem;
  width: 100%;
  max-width: 800px;
  background-color: rgba(17, 17, 17, 0.4);
  border-radius: 4px;
  filter: blur(24px);
}

.book-3d-container {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 800px;
  height: 400px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

@media (min-width: 640px) {
  .book-3d-container { height: 460px; }
}
@media (min-width: 768px) {
  .book-3d-container { height: 500px; }
}

/* Inner Spine */
.book-spine-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(to right, #000 0%, #262626 50%, #000 100%);
  z-index: 30;
  opacity: 0.85;
  display: none;
}

@media (min-width: 768px) {
  .book-spine-line { display: block; }
}

/* Page Spreads */
.book-side-left, .book-side-right {
  position: relative;
  height: 100%;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-side-left {
  width: 50%;
  border-right: 1px solid #000;
  display: none; /* hidden on mobile, shown on desktop */
}

.book-side-right {
  width: 100%; /* full width on mobile */
}

@media (min-width: 768px) {
  .book-side-left { display: flex; }
  .book-side-right { width: 50%; }
}

/* Page Inner Layout */
.book-page-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  justify-content: space-between;
  color: var(--text-white);
  z-index: 5;
}

.book-page-bg-soft {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.1;
  pointer-events: none;
}

.book-page-bg-soft img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-page-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.book-page-meta-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
}

.book-page-num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
}

.book-page-showcase {
  position: relative;
  z-index: 10;
  flex: 1;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--bg-main);
}

.book-page-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.book-page-showcase:hover img {
  transform: scale(1.02);
}

.book-page-gradient-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

/* Closed state backs */
.book-page-closed-backing {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.book-page-closed-backing-left {
  background: linear-gradient(to right, #000 0%, var(--bg-card) 100%);
}

.book-page-closed-backing-right {
  background: linear-gradient(to left, #000 0%, var(--bg-card) 100%);
}

.book-page-closed-spine {
  height: 5rem;
  width: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}

/* Flipping Animation Simulation Overlay (3D effect) */
.flipping-page-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%; /* on mobile */
  z-index: 40;
  background-color: #1e1e1e;
  border-left: 1px solid #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
  .flipping-page-overlay {
    width: 50%;
  }
}

.flipping-page-overlay.flip-next {
  right: 0;
  transform-origin: left center;
  animation: flipNextAnim 0.45s ease-in-out forwards;
}

.flipping-page-overlay.flip-prev {
  left: 0;
  transform-origin: right center;
  animation: flipPrevAnim 0.45s ease-in-out forwards;
}

@keyframes flipNextAnim {
  0% {
    transform: rotateY(0deg) translateZ(50px);
  }
  100% {
    transform: rotateY(-180deg) translateZ(50px);
  }
}

@keyframes flipPrevAnim {
  0% {
    transform: rotateY(0deg) translateZ(50px);
  }
  100% {
    transform: rotateY(180deg) translateZ(50px);
  }
}

.flipping-inner-loading {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.flipping-inner-loading svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
  animation: pulse 1s infinite alternate;
}

.flipping-text {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: #a3a3a3;
  letter-spacing: 0.1em;
}

.glare-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(12deg);
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* Navigation hotspot arrows */
.reader-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: #171717;
  color: var(--text-main);
  transition: all var(--transition-fast);
  z-index: 45;
}

.reader-nav-arrow:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--text-white);
}

.reader-nav-arrow:disabled {
  border-color: #1c1c1c;
  background-color: rgba(10, 10, 10, 0.2);
  color: #404040;
  cursor: not-allowed;
}

.reader-nav-arrow.prev { left: 0.5rem; }
.reader-nav-arrow.next { right: 0.5rem; }

@media (min-width: 1024px) {
  .reader-nav-arrow.prev { left: -3rem; }
  .reader-nav-arrow.next { right: -3rem; }
}

.reader-nav-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Reader Footer progress bar */
.reader-footer {
  display: flex;
  width: 100%;
  max-width: 500px;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.reader-progress-track {
  width: 100%;
  background-color: #171717;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.reader-progress-bar {
  background-color: var(--primary);
  height: 100%;
  width: 0%;
  transition: width var(--transition-normal);
}

.reader-footer-hint {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------------- PRELOADER ---------------- */
.preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  width: 100%;
  padding: 2rem;
}

/* Pulsing background ambient glow */
.preloader-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0) 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

/* Icon Wrapper and SVG */
.preloader-icon-wrapper {
  position: relative;
  z-index: 2;
  width: 5.5rem;
  height: 5.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  animation: preloader-card-bounce 2s ease-in-out infinite;
}

.preloader-icon-svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--primary);
}

/* Flipping page animations on the book icon */
.flipping-page-line {
  animation: book-spine-pulse 2s ease-in-out infinite;
}

@keyframes preloader-card-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes book-spine-pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    color: var(--text-white);
  }
}

/* Title and Subtitle */
.preloader-title {
  position: relative;
  z-index: 2;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--text-white);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.preloader-accent {
  color: var(--primary);
}

.preloader-subtitle {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Premium spinner element */
.preloader-spinner-container {
  position: relative;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid rgba(245, 158, 11, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: preloader-spin 0.8s linear infinite;
}

@keyframes preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

.cat-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

/* Google Play Download Button */
.footer-app-badges {
  margin-top: 1.5rem;
}

.btn-google-play {
  display: inline-flex;
  align-items: center;
  background-color: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: #fff;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-google-play:hover {
  background-color: #17171c;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.google-play-icon {
  height: 1.25rem;
  width: auto;
  margin-right: 0.5rem;
  object-fit: contain;
}

.btn-google-play .play-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.btn-google-play .play-subtitle {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #a1a1aa;
  letter-spacing: 0.05em;
}

.btn-google-play .play-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

/* ---------------- VIDEO PLAYER & PLAY BUTTON ---------------- */
.btn-action-play {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 4px;
  background-color: var(--primary);
  padding: 0.375rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 900;
  color: var(--text-dark);
  transition: background-color var(--transition-fast);
}

.btn-action-play:hover {
  background-color: var(--primary-hover);
}

.btn-action-play svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn var(--transition-fast) forwards;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 850px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-iframe-container {
  width: 100%;
  height: 100%;
}

.video-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-close-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 160;
  transition: all var(--transition-fast);
}

.video-close-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-dark);
  transform: rotate(90deg);
}

.video-close-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

