/* ===== Book Haven — Premium Luxury Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-color: #0B0F17;
  --surface: #121A26;
  --surface-hover: #1A2433;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --gold: #D6A756;
  --gold-glow: rgba(214, 167, 86, 0.4);
  --blue: #4DA8FF;
  --white: #FFFFFF;
  --muted: #AAB5C4;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 20px rgba(77, 168, 255, 0.15);
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

html { scroll-behavior: auto; /* Lenis handles smooth scroll */ }
html[dir="rtl"] { text-align: right; }

body { 
  font-family: var(--font-sans); 
  background-color: var(--bg-color); 
  color: var(--white); 
  line-height: 1.6; 
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { 
  font-family: var(--font-serif); 
  font-weight: 500; 
  line-height: 1.2; 
  color: var(--white);
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; outline: none; border: none; background: transparent; }
input, textarea { font-family: inherit; }

/* ===== UTILITIES ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
}
.text-gradient {
  background: linear-gradient(135deg, var(--blue) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-padding { padding: 120px 0; }

/* ===== NAVIGATION ===== */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background 0.4s ease, border 0.4s ease;
  padding: 20px 0;
  border-bottom: 1px solid transparent;
}
nav.topnav.scrolled {
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--white); letter-spacing: 1px; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 40px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.3s ease; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0%; height: 1px; background: var(--gold); transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid var(--glass-border);
  color: var(--white);
  padding: 10px 24px; border-radius: 30px;
  font-size: 14px; font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--bg-color); }

.lang-switcher { display: flex; gap: 8px; }
html[dir="rtl"] .lang-switcher { margin-left: 0; }
.lang-switcher button {
  border: 1px solid var(--glass-border);
  color: var(--muted); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; transition: all 0.3s ease;
}
.lang-switcher button:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }
.lang-switcher button.active { background: var(--white); color: var(--bg-color); border-color: var(--white); }

.nav-hamburger { display: none; flex-direction: column; gap: 6px; padding: 4px; z-index: 1001; }
.nav-hamburger span { width: 28px; height: 2px; background: var(--white); transition: 0.3s ease; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta-desk { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open { 
    display: flex; flex-direction: column; position: fixed; inset: 0; 
    background: var(--bg-color); padding: 100px 24px; gap: 30px; align-items: center; justify-content: center;
  }
  .nav-links.open a { font-size: 24px; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--white); color: var(--bg-color);
  padding: 16px 36px; border-radius: 30px;
  font-size: 15px; font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(255,255,255,0.2); }

.btn-outline {
  background: rgba(255,255,255,0.03); color: var(--white);
  padding: 15px 36px; border-radius: 30px;
  font-size: 15px; font-weight: 500;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* ===== CARDS (MAGAZINE STYLE) ===== */
.book-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  display: flex; flex-direction: column;
  position: relative;
}
.book-card:hover { 
  transform: translateY(-8px); 
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(214, 167, 86, 0.05);
}
.book-card-img {
  aspect-ratio: 3/4; width: 100%;
  position: relative; overflow: hidden;
  background: #000;
  padding: 30px;
  display: flex; align-items: center; justify-content: center;
}
.book-card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 0%, transparent 40%);
  pointer-events: none;
}
.book-card-img img {
  width: auto; height: 100%; object-fit: contain;
  box-shadow: 20px 0 30px rgba(0,0,0,0.5);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left center;
}
.book-card:hover .book-card-img img { transform: perspective(1000px) rotateY(-15deg) scale(1.05); }

.book-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; z-index: 2; }
.book-card-body h3 { font-size: 20px; margin-bottom: 6px; color: var(--white); }
.book-card-body .author { font-size: 13px; color: var(--gold); margin-bottom: 20px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; flex: 1; }
.book-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 16px; }
.book-price { font-size: 18px; font-weight: 600; color: var(--white); font-family: var(--font-sans); }
.btn-view { color: var(--muted); font-size: 13px; font-weight: 500; transition: color 0.3s; }
.btn-view:hover { color: var(--white); }

/* ===== SECTION TITLES ===== */
.section-label { font-size: 11px; font-weight: 600; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-sans); }
.section-title { font-size: 48px; font-weight: 500; color: var(--white); margin-bottom: 20px; letter-spacing: -1px; }
@media (max-width: 768px) { .section-title { font-size: 32px; } }

/* ===== FOOTER ===== */
footer {
  background: #06090D;
  padding: 100px 24px 40px;
  border-top: 1px solid rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}
.footer-inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 80px; }
.footer-brand .logo { font-family: var(--font-serif); font-size: 32px; font-weight: 700; color: var(--white); }
.footer-brand .logo span { color: var(--gold); }
.footer-brand p { font-size: 15px; color: var(--muted); margin-top: 16px; max-width: 300px; }
.footer-links h4 { color: var(--white); font-size: 12px; font-family: var(--font-sans); margin-bottom: 24px; letter-spacing: 2px; text-transform: uppercase; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.3); }

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

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity 0.4s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-card {
  background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 480px; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  transform: translateY(20px); transition: transform 0.4s ease;
}
.modal-overlay.open .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--muted); transition: color 0.3s;
}
.modal-close:hover { color: var(--white); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); color: var(--white); font-size: 15px; transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--blue); outline: none; }

/* Dashboard forms */
.dash-card { background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-glass); }
.dash-card input, .dash-card textarea { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: var(--white); }
.dash-nav { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }

/* Contact Forms */
.contact-form-card { background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 40px; }
.contact-form-card input, .contact-form-card textarea { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); color: var(--white); }
