/* ============================================
   Poetry Platform - Premium Modern Design
   Professional, Clean, and Beautiful
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Color Palette - Professional & Vibrant */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;

  /* Neutrals - Better Contrast */
  --dark: #0a0f1e;
  --dark-light: #1a1f35;
  --dark-lighter: #2a2f45;
  --gray: #64748b;
  --gray-light: #cbd5e1;
  --light: #f1f5f9;
  --white: #ffffff;

  /* Gradients - Stunning */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);

  /* Typography Scale */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;

  --font-xs: 0.75rem; /* 12px */
  --font-sm: 0.875rem; /* 14px */
  --font-base: 1rem; /* 16px */
  --font-lg: 1.125rem; /* 18px */
  --font-xl: 1.25rem; /* 20px */
  --font-2xl: 1.5rem; /* 24px */
  --font-3xl: 2rem; /* 32px */
  --font-4xl: 2.5rem; /* 40px */
  --font-5xl: 3.5rem; /* 56px */

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Shadows - Professional */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--dark);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Premium Animated Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 20px; /* Standardized */
  font-weight: 700;
}
h2 {
  font-size: 18px; /* Standardized */
  font-weight: 600;
}
h3 {
  font-size: 16px; /* Standardized */
  font-weight: 600;
}
h4 {
  font-size: 14px; /* Standardized */
  font-weight: 600;
}
h5 {
  font-size: 14px; /* Standardized */
  font-weight: 500;
}
h6 {
  font-size: 14px; /* Standardized */
  font-weight: 500;
}

p {
  font-size: var(--font-base);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  color: var(--gray-light);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--secondary);
}

.urdu-text {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  direction: ltr;
  color: var(--white);
  white-space: pre-wrap;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-6);
}

/* ============================================
   Navigation - Premium Design
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-5) 0;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  padding: var(--space-3) 0;
  background: rgba(10, 15, 30, 0.95);
  box-shadow: var(--shadow-lg);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: var(--font-2xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-brand:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.navbar-menu {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  align-items: center;
}

.navbar-menu a {
  color: var(--gray-light);
  font-weight: 500;
  font-size: var(--font-base);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--white);
  background: rgba(102, 126, 234, 0.15);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: var(--font-2xl);
  cursor: pointer;
  padding: var(--space-2);
}

/* ============================================
   Buttons - Premium Design
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--font-base);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.5;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-sm);
}

.btn-lg {
  padding: 0.75rem 2rem; /* Reduced vertical padding */
  font-size: 1.1rem;
}

/* ============================================
   Cards - Premium Design
   ============================================ */
.card {
  background: linear-gradient(135deg, rgba(26, 31, 53, 0.8) 0%, rgba(42, 47, 69, 0.6) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition-normal);
  z-index: 0;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(102, 126, 234, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  margin-bottom: var(--space-6);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.3;
  color: var(--white);
}

.card-body {
  margin-bottom: var(--space-6);
  font-size: var(--font-base);
  line-height: 1.8;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--font-sm);
  color: var(--gray-light);
}

/* ============================================
   Hero Section - Stunning Design
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20) 0;
  position: relative;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientMove 10s ease infinite;
}

@keyframes gradientMove {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, rgba(10, 15, 30, 0.8) 100%);
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1s ease;
  position: relative;
  z-index: 1;
}

/* Hero improvements */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive fluid typography */
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray-light);
  margin-bottom: var(--space-8);
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Premium Button Styling */
.btn {
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.875rem !important; /* Smaller text for professional look */
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px; /* Slightly squarer is more professional than full pill */
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 0.95rem !important;
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4), 0 2px 4px -1px rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Grid System
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Forms - Premium Design
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: rgba(26, 31, 53, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--white);
  font-family: inherit;
  font-size: var(--font-base);
  transition: var(--transition-fast);
  line-height: 1.5;
}

.form-control::placeholder {
  color: var(--gray);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: rgba(26, 31, 53, 0.9);
}

textarea.form-control {
  min-height: 200px;
  resize: vertical;
  line-height: 1.7;
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}

.mt-2 {
  margin-top: var(--space-4);
}
.mt-3 {
  margin-top: var(--space-6);
}
.mt-4 {
  margin-top: var(--space-8);
}
.mt-5 {
  margin-top: var(--space-12);
}

.mb-2 {
  margin-bottom: var(--space-4);
}
.mb-3 {
  margin-bottom: var(--space-6);
}
.mb-4 {
  margin-bottom: var(--space-8);
}
.mb-5 {
  margin-bottom: var(--space-12);
}

.py-3 {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.py-4 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.py-5 {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 18px !important; /* Slightly smaller on tablet */
  }
  h2 {
    font-size: 16px !important;
  }
  h3 {
    font-size: 14px !important;
  }

  .hero-title {
    font-size: 24px;
  }
  .hero-subtitle {
    font-size: 16px;
  }

  .navbar-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-8);
    gap: var(--space-4);
    transition: var(--transition-normal);
  }

  .navbar-menu.active {
    left: 0;
  }

  .navbar-menu a {
    font-size: var(--font-lg);
    padding: var(--space-4);
    width: 100%;
    text-align: center;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 16px !important; /* Even smaller on mobile */
  }
  h2 {
    font-size: 14px !important;
  }

  .hero-title {
    font-size: 20px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: var(--space-16) 0;
  }

  /* Stats grid - 2x2 on mobile */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Modern Stats Cards */
  .stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
  }

  .stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
  }

  .stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
  }

  .stat-icon {
    font-size: 1.5rem !important;
  }

  .stat-label {
    font-size: 0.75rem !important;
  }
}

/* Search wrapper styles */
.search-wrapper {
  position: relative;
  display: flex;
  gap: 0.5rem;
}

.hero-search-input {
  flex: 1;
  padding: 1.25rem 1.5rem !important;
  font-size: 1.1rem !important;
  border-radius: 50px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

.hero-search-btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .search-wrapper {
    flex-direction: column;
  }

  .hero-search-input {
    padding: 1rem 1.25rem !important;
    font-size: 1rem !important;
  }

  .hero-search-btn {
    width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-search-input {
    padding: 0.875rem 1rem !important;
    font-size: 0.9rem !important;
  }

  .hero-search-btn .btn-text {
    display: inline;
  }
}

/* ============================================
   Loading Animation
   ============================================ */
.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
