/* Main CSS Styles for EduShare */

/* CSS Variables */
:root {
  /* Colors */
  --primary: #4361ee;
  --primary-light: rgba(67, 97, 238, 0.1);
  --secondary: #3f37c9;
  --accent: #f72585;
  --accent-light: rgba(247, 37, 133, 0.1);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --error: #ef4444;
  --dark: #212529;
  --light: #f8f9fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  
  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-accent: 'Playfair Display', serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  
  /* Transitions */
  --transition-normal: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.5s ease;
  
  /* Z-index */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-max: 9999;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  overflow-x: hidden;
}

main {
  padding-top: 4.5rem; /* Thêm khoảng cách để nội dung không bị khuất dưới navbar */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

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

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
  text-align: center;
}

/* Buttons */
.primary-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition-normal);
}

.primary-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

.secondary-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition-normal);
}

.secondary-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.text-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--primary);
  font-weight: 500;
  text-align: center;
  transition: var(--transition-normal);
}

.text-btn:hover {
  color: var(--secondary);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  transition: var(--transition-normal);
}

.icon-btn:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.icon-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(1rem);
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: var(--z-30);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #f0f0f5;
  z-index: var(--z-40);
  transition: all 0.3s ease;
}

/* Thêm phần này chỉ khi browser hỗ trợ backdrop-filter */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.header.scrolled {
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dark mode styles for header */
body.dark-mode .header {
  background-color: #1a1a2e;
  border-bottom-color: #252542;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  body.dark-mode .header {
    background-color: rgba(26, 26, 46, 0.95);
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  flex-wrap: nowrap;
  padding: 0 0.5rem;
  transition: height 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.logo a {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.logo a:hover {
  transform: translateY(-2px);
}

.logo-icon {
  width: 2.6rem;
  height: 2.6rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 60%);
  transform: rotate(45deg);
  z-index: 1;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-left: 1.5rem;
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.7rem;
  background-color: transparent;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--gray-600);
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2.5px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
  border-radius: 4px;
}

.nav-link:hover {
  color: var(--gray-900);
  background-color: rgba(67, 97, 238, 0.05);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 70%;
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(240, 240, 250, 0.8);
}

.mobile-menu-toggle i {
  font-size: 1.2rem;
  color: var(--gray-700);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background-color: var(--primary-light);
}

.mobile-menu-toggle:hover i {
  color: var(--primary);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--white);
  z-index: var(--z-max);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu.active::before {
  opacity: 1;
  visibility: visible;
}

.mobile-search {
  padding: 1.2rem;
  margin-top: 4.5rem;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}

.mobile-search input {
  width: 100%;
  padding: 0.7rem 2.8rem 0.7rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(215, 220, 245, 0.7);
  background-color: var(--white);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.15);
  outline: none;
}

.mobile-search button {
  position: absolute;
  right: 1.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.4rem;
  transition: all 0.3s ease;
}

.mobile-search button:hover {
  color: var(--primary);
}

/* Mobile Nav Styles */
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.mobile-nav-link {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background-color: var(--primary-light);
  transition: width 0.3s ease;
  z-index: -1;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.mobile-nav-link:hover::before {
  width: 100%;
}

.mobile-nav-link.active {
  color: var(--primary);
  font-weight: 700;
  background-color: var(--primary-light);
}

/* Mobile Auth Styles */
.mobile-auth {
  padding: 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--gray-100);
}

.mobile-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  background-color: transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.mobile-login-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.mobile-register-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.mobile-register-btn:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.25);
}

.search-box {
  position: relative;
  margin-right: 0.8rem;
  width: 220px;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  border-radius: 20px;
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  color: var(--gray-700);
  box-shadow: none;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
  outline: none;
  background-color: #fff;
}

.search-box input::placeholder {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.search-box button {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.3rem;
  transition: all 0.3s ease;
}

.search-box button:hover,
.search-box input:focus ~ button {
  color: var(--primary);
}

/* Dark Mode Toggle - Base style */
.dark-mode-toggle {
  position: relative;
  width: 46px;
  height: 22px;
  border-radius: 11px;
  background-color: #e0e0e0;
  cursor: pointer;
  margin-right: 1rem;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  padding: 0;
}

/* Đảm bảo tắt cả pseudo-element */
.dark-mode-toggle::after,
.dark-mode-toggle::before {
  display: none !important;
  content: none !important;
}

.dark-mode-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.dark-mode-toggle.active {
  background-color: #4361ee;
}

.dark-mode-toggle.active .dark-mode-handle {
  transform: translateX(24px);
}

.login-btn {
  padding: 0.4rem 0.8rem;
  color: #4361ee;
  font-weight: 600;
  border: 1px solid #4361ee;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  background-color: transparent;
}

.login-btn i {
  font-size: 0.8rem;
}

.login-btn:hover {
  background-color: #4361ee;
  color: white;
}

.register-btn {
  padding: 0.4rem 0.8rem;
  background-color: #4361ee;
  color: white;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  border: none;
}

.register-btn i {
  font-size: 0.8rem;
}

.register-btn:hover {
  background-color: #3a0ca3;
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.title-regular {
  display: block;
  color: var(--gray-900);
}

.title-gradient {
  display: block;
  font-family: var(--font-accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(45deg, var(--primary), var(--accent));
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.users-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.avatars {
  display: flex;
  align-items: center;
}

/* User menu and avatar styles - for header */
.user-menu {
  position: relative;
  margin-left: 1rem;
  z-index: 100;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--primary-light);
  background-color: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 320px;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.user-menu.active .user-dropdown,
.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background-color: var(--white);
  transform: rotate(45deg);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
  z-index: 2;
  background-color: var(--white);
}

.dropdown-user-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
  border: 2px solid var(--primary-light);
}

.dropdown-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-user-info {
  flex: 1;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.dropdown-user-email {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
}

.user-dropdown-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-light);
  color: var(--primary);
}

.balance-amount {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.balance-recharge-btn {
  padding: 0.25rem 0.75rem;
  background-color: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.balance-recharge-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-1px);
}

.user-dropdown-links {
  padding: 0.75rem 0;
}

.dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: var(--gray-700);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dropdown-link i {
  width: 1.5rem;
  margin-right: 0.75rem;
  font-size: 1rem;
  color: var(--gray-500);
  transition: all 0.2s ease;
}

.dropdown-link:hover,
.dropdown-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.dropdown-link:hover i,
.dropdown-link.active i {
  color: var(--primary);
}

/* Ripple effect */
.link-ripple {
  position: absolute;
  background: rgba(67, 97, 238, 0.2);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
  z-index: 0;
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.user-dropdown-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--gray-100);
}

.dropdown-logout-btn {
  display: flex;
  align-items: center;
  color: var(--error);
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
}

.dropdown-logout-btn i {
  margin-right: 0.75rem;
}

.dropdown-logout-btn:hover {
  opacity: 0.8;
}

/* For hero section avatars - different styling */
.avatars .user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
  overflow: hidden;
  margin-right: -0.75rem;
}

.avatars .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-more {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
  background-color: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
}

.counter-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.counter-text span {
  font-weight: 600;
  color: var(--gray-900);
}

.hero-image {
  position: relative;
  width: 100%;
  max-width: 24rem;
}

.main-image-wrapper {
  background-color: var(--white);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.main-image-wrapper img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.stats-card {
  position: absolute;
  background-color: var(--white);
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  max-width: 15rem;
}

.document-stats {
  bottom: -1.5rem;
  left: -1.5rem;
}

.users-stats {
  top: -1rem;
  right: -1rem;
}

.stats-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.docs-icon {
  background-color: var(--success-light);
  color: var(--success);
}

.users-icon {
  background-color: var(--primary-light);
  color: var(--primary);
}

.stats-text {
  flex: 1;
}

.stats-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.stats-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* Categories Section */
.categories {
  padding: 4rem 0;
  background-color: var(--white);
}

.category-filters {
  display: flex;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  gap: 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: transparent;
  cursor: pointer;
  transition: var(--transition-normal);
}

.category-pill:hover, .category-pill.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.category-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-0.375rem);
  box-shadow: var(--shadow-md);
}

.category-icon {
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.it-icon {
  background-color: var(--primary-light);
  color: var(--primary);
}

.business-icon {
  background-color: rgba(63, 55, 201, 0.1);
  color: var(--secondary);
}

.language-icon {
  background-color: var(--accent-light);
  color: var(--accent);
}

.engineering-icon {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.category-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  flex: 1;
}

.category-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.document-count {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.view-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.view-more i {
  margin-left: 0.25rem;
  transition: var(--transition-normal);
}

.view-more:hover {
  color: var(--secondary);
}

.view-more:hover i {
  transform: translateX(0.25rem);
}

.section-footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition-normal);
}

.view-all-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Featured Documents Section */
.featured-documents {
  padding: 4rem 0;
  background-color: var(--gray-50);
}

.section-header-with-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}

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

.slider-controls {
  display: flex;
  gap: 0.5rem;
}

.slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
  cursor: pointer;
}

.slider-btn:hover {
  transform: translateY(-2px);
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.documents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.document-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.document-card:hover {
  transform: translateY(-0.375rem);
  box-shadow: var(--shadow-md);
}

.document-image {
  position: relative;
  height: 12rem;
}

.document-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.premium {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--accent);
}

.free {
  background-color: var(--success);
  color: var(--white);
}

.document-author {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
  object-fit: cover;
  margin-right: 0.5rem;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
}

.document-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(67, 97, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-normal);
}

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

.view-document-btn {
  background-color: var(--white);
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transform: scale(0.9);
  transition: var(--transition-normal);
}

.view-document-btn:hover {
  transform: scale(1);
}

.document-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.document-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.document-category {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: rgba(59, 130, 246, 0.1);
  color: rgb(37, 99, 235);
}

.it-category {
  background-color: rgba(59, 130, 246, 0.1);
  color: rgb(37, 99, 235);
}

.business-category {
  background-color: rgba(16, 185, 129, 0.1);
  color: rgb(5, 150, 105);
}

.language-category {
  background-color: rgba(139, 92, 246, 0.1);
  color: rgb(124, 58, 237);
}

.document-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.document-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.document-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.document-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-rating {
  display: flex;
  align-items: center;
}

.stars {
  display: flex;
  color: var(--gray-300);
}

.stars i {
  margin-right: 0.125rem;
}

.stars i.fas, .stars i.fa-star-half-alt {
  color: var(--warning);
}

.rating-count {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.document-metrics {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.document-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  background-color: var(--gray-50);
  margin-top: auto;
}

.document-price {
  display: flex;
  align-items: center;
}

.price {
  font-weight: 700;
  color: var(--accent);
}

.document-price.free .price {
  color: var(--success);
}

.price-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.detail-btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition-normal);
}

.detail-btn:hover {
  background-color: var(--secondary);
}

/* Upload Document Section */
.upload-document {
  padding: 4rem 0;
  background-color: var(--white);
}

.upload-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.upload-info {
  text-align: center;
}

.benefits {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
}

.benefit-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.coin-icon {
  background-color: var(--primary-light);
  color: var(--primary);
}

.shield-icon {
  background-color: var(--success-light);
  color: var(--success);
}

.community-icon {
  background-color: var(--accent-light);
  color: var(--accent);
}

.benefit-text {
  text-align: left;
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.benefit-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0;
}

.upload-form-container {
  background-color: var(--gray-50);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: var(--transition-normal);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.file-drop-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.file-drop-area:hover, .file-drop-area.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.drop-message {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.drop-hint {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.browse-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
}

.browse-btn:hover {
  background-color: var(--primary-light);
}

.file-preview {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: var(--white);
  border: 1px solid var(--gray-200);
}

.file-info {
  display: flex;
  align-items: center;
}

.file-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-right: 1rem;
}

.file-details {
  flex: 1;
}

.file-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.file-size {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.remove-file {
  color: var(--error);
  cursor: pointer;
}

.price-toggle {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
}

.price-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-input-group {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-input {
  width: 5rem;
}

.price-range {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
}

.file-input {
  display: none;
}

/* How It Works Section */
.how-it-works {
  padding: 4rem 0;
  background-color: var(--gray-50);
}

.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step {
  text-align: center;
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
}

.step:hover {
  transform: translateY(-0.375rem);
  box-shadow: var(--shadow-md);
}

.step-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 1.5rem;
}

.step-icon-1 {
  background-color: var(--primary-light);
  color: var(--primary);
}

.step-icon-2 {
  background-color: var(--accent-light);
  color: var(--accent);
}

.step-icon-3 {
  background-color: var(--success-light);
  color: var(--success);
}

.step-icon-4 {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-description {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Testimonials Section */
.testimonials {
  padding: 4rem 0;
  background-color: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition-normal);
  border: 1px solid var(--gray-100);
}

.testimonial-card:hover {
  transform: translateY(-0.375rem);
  box-shadow: var(--shadow-md);
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--gray-700);
  position: relative;
}

.testimonial-content::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary-light);
  position: absolute;
  top: -1.5rem;
  left: -0.5rem;
  font-family: serif;
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-image {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-right: 1rem;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-title {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.author-rating {
  display: flex;
  color: var(--warning);
  font-size: 0.875rem;
}

/* Download App Section */
.download-app {
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
}

.download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.download-text {
  margin-bottom: 2rem;
}

.app-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.app-button {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--dark);
  color: var(--white);
  border-radius: var(--radius);
  transition: var(--transition-normal);
}

.app-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.app-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.app-text {
  text-align: left;
}

.app-store {
  font-size: 0.75rem;
  margin-bottom: 0.125rem;
}

.app-name {
  font-weight: 600;
}

.app-preview {
  max-width: 15rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Newsletter Section */
.newsletter {
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
  text-align: center;
}

.newsletter-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.newsletter-description {
  color: #fff;
  margin-bottom: 2rem;
  max-width: 35rem;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  max-width: 30rem;
  margin: 0 auto;
  gap: 1rem;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
}

.newsletter-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.newsletter-button {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.newsletter-button:hover {
  background-color: var(--secondary);
}

@media (min-width: 768px) {
  .newsletter-form {
    flex-direction: row;
    align-items: center;
  }
  
  .newsletter-button {
    flex-shrink: 0;
  }
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: var(--light);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-about {
  margin-bottom: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.footer-logo-icon {
  background-color: var(--light);
  color: var(--primary);
  margin-right: 0.75rem;
}

.footer-description {
  color: var(--gray-400);
  margin-bottom: 1.25rem;
  max-width: 20rem;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light);
  transition: var(--transition-normal);
}

.social-link:hover {
  background-color: var(--primary);
  color: var(--white);
}

.footer-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--white);
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--gray-400);
  transition: var(--transition-normal);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--light);
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: var(--gray-400);
}

.contact-info i {
  margin-right: 0.75rem;
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
  color: var(--gray-500);
  margin-bottom: 1rem;
  text-align: center;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: var(--gray-400);
  font-size: 0.875rem;
  transition: var(--transition-normal);
}

.footer-bottom-links a:hover {
  color: var(--light);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .copyright {
    margin-bottom: 0;
    text-align: left;
  }
}

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

/* Dark Mode Styles */
body.dark-mode {
  background-color: var(--gray-900);
  color: var(--gray-200);
}

body.dark-mode .header,
body.dark-mode .mobile-menu,
body.dark-mode .category-card,
body.dark-mode .document-card,
body.dark-mode .step,
body.dark-mode .testimonial-card,
body.dark-mode .upload-form-container,
body.dark-mode .file-preview {
  background-color: var(--gray-800);
}

body.dark-mode .hero,
body.dark-mode .featured-documents,
body.dark-mode .how-it-works,
body.dark-mode .newsletter,
body.dark-mode .download-app {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(247, 37, 133, 0.05));
}

body.dark-mode .categories {
  background-color: var(--gray-900);
}

body.dark-mode .testimonials {
  background-color: var(--gray-900);
}

body.dark-mode .logo-text,
body.dark-mode .nav-link,
body.dark-mode .section-title,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: var(--white);
}

body.dark-mode .nav-link.active,
body.dark-mode .nav-link:hover {
  color: var(--primary);
}

body.dark-mode .section-subtitle,
body.dark-mode .hero-description,
body.dark-mode .category-description,
body.dark-mode .document-description,
body.dark-mode .step-description,
body.dark-mode .newsletter-description {
  color: var(--gray-400);
}

body.dark-mode .category-pill {
  border-color: var(--gray-700);
  color: var(--gray-300);
}

body.dark-mode .category-pill:hover,
body.dark-mode .category-pill.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

body.dark-mode .testimonial-card {
  border-color: var(--gray-700);
}

body.dark-mode .search-box input,
body.dark-mode .newsletter-input,
body.dark-mode .form-input,
body.dark-mode .form-select {
  background-color: var(--gray-700);
  border-color: var(--gray-700);
  color: var(--white);
}

body.dark-mode .mobile-login-btn {
  background-color: var(--gray-700);
  border-color: var(--gray-600);
  color: var(--white);
}

body.dark-mode .document-footer {
  background-color: var(--gray-700);
  border-color: var(--gray-700);
}

body.dark-mode .footer {
  background-color: var(--gray-800);
}

body.dark-mode .footer-bottom {
  border-color: var(--gray-700);
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
}

.auth-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox input {
  accent-color: var(--primary);
}

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.auth-button {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
}

.auth-button:hover {
  background-color: var(--secondary);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--gray-200);
}

.divider-text {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.social-buttons {
  display: flex;
  gap: 1rem;
}

.social-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  border: 1px solid var(--gray-200);
  background-color: var(--white);
  transition: var(--transition-normal);
}

.social-button:hover {
  background-color: var(--gray-50);
}

.google-btn {
  color: #ea4335;
}

.facebook-btn {
  color: #1877f2;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.auth-link {
  color: var(--primary);
  font-weight: 500;
}

.auth-link:hover {
  color: var(--secondary);
}

.auth-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: none;
}

.auth-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  display: none;
}

/* Document Details Page */
/* .document-details {
  padding: 6rem 0 4rem;
} */

.document-details-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.document-preview {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.document-cover {
  position: relative;
  height: 15rem;
}

.document-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-nav {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.preview-nav::-webkit-scrollbar {
  display: none;
}

.preview-nav-item {
  white-space: nowrap;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
}

.preview-nav-item.active {
  color: var(--primary);
  border-color: var(--primary);
}

.preview-content {
  padding: 2rem;
}


.document-page {
  aspect-ratio: 0.7;
  background-color: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.document-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-info {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.document-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.meta-item {
  min-width: 120px;
}

.meta-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.meta-value {
  font-weight: 500;
}

.download-section {
  background-color: var(--gray-50);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.price-box {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.document-price-large {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.5rem;
}

.document-price-large.free {
  color: var(--success);
}

.price-hint {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.download-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.download-button:hover {
  background-color: var(--secondary);
}

.document-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.action-button {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-600);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
}

.action-button:hover {
  background-color: var(--gray-100);
}

.author-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: var(--gray-50);
  margin-bottom: 2rem;
}

.author-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.author-avatar-large {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-right: 1rem;
}

.author-name-large {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-status {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.author-bio {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.author-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600);
}

 .tabs {
  margin-top: 2rem;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-normal);
}

 .tab-item.active {
  color: var(--primary);
  border-color: var(--primary);
}

/* .tab-content {
  display: none;
} */

.tab-content.active {
  display: block;
}

.tab-section {
  margin-bottom: 2rem;
}

.tab-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
} 

.document-description-full {
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.feature-icon {
  color: var(--success);
  margin-right: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.rating-summary {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.rating-average {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-right: 1.5rem;
}

.rating-bars {
  flex: 1;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rating-label {
  min-width: 2rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.rating-progress {
  flex: 1;
  height: 0.5rem;
  background-color: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background-color: var(--warning);
}

.rating-percent {
  min-width: 2.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: right;
}

.reviews-list {
  margin-top: 2rem;
}

.review-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.reviewer {
  display: flex;
  align-items: center;
}

.reviewer-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-right: 0.75rem;
}

.reviewer-info {
  flex: 1;
}

.reviewer-name {
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.review-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.review-rating {
  color: var(--warning);
}

.review-content {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.review-helpful {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.helpful-button {
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
}

.helpful-button:hover {
  color: var(--primary);
}

.helpful-button.active {
  color: var(--primary);
}

.related-documents {
  margin-top: 4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .document-details-container {
    grid-template-columns: 3fr 2fr;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Upload Document Page */
.upload-page {
  padding: 6rem 0 4rem;
}

.upload-steps {
  display: flex;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.upload-steps::-webkit-scrollbar {
  display: none;
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  position: relative;
  min-width: 150px;
}

.step-item::after {
  content: '';
  position: absolute;
  top: 2rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: var(--gray-300);
  z-index: 1;
}

.step-item:last-child::after {
  display: none;
}

.step-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  position: relative;
  z-index: 2;
}

.step-item.active .step-circle {
  background-color: var(--primary);
  color: var(--white);
}

.step-item.completed .step-circle {
  background-color: var(--success);
  color: var(--white);
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
}

.step-item.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.step-item.completed .step-label {
  color: var(--success);
}

.upload-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.upload-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.upload-card-title i {
  margin-right: 0.75rem;
  color: var(--primary);
}

.upload-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.back-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
}

.back-button:hover {
  background-color: var(--gray-100);
}

.next-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.next-button:hover {
  background-color: var(--secondary);
}

.disabled-button {
  opacity: 0.5;
  cursor: not-allowed;
}

.disabled-button:hover {
  background-color: var(--primary);
}

.upload-guidelines {
  background-color: var(--primary-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.guidelines-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.guidelines-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.guidelines-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.guidelines-item i {
  color: var(--primary);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-option {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.category-option:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.category-option.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.category-option-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.category-option-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.tag-remove {
  margin-left: 0.5rem;
  cursor: pointer;
}

.tag-input input {
  flex: 1;
  min-width: 120px;
  border: none;
  padding: 0.25rem;
  outline: none;
}

.upload-success {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-full);
  background-color: var(--success-light);
  color: var(--success);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.success-message {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

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

/* Utilities */
.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--error);
}

.text-warning {
  color: var(--warning);
}

.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-success-light {
  background-color: var(--success-light);
}

.bg-error-light {
  background-color: rgba(239, 68, 68, 0.1);
}

.bg-warning-light {
  background-color: rgba(245, 158, 11, 0.1);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: 1rem;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* Document Card Fixes */
.document-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.document-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.document-title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 0.5rem 0;
  min-height: auto;
}

.document-description {
  margin-bottom: 1rem;
  flex: 1;
}

.document-footer {
  margin-top: auto;
}

.document-image {
  position: relative;
  height: 12rem;
}

.document-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-container{
  max-width: 800px;
}
