@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary-green: #1e5128;
  --light-green: #4e7c59;
  --accent-green: #6faa6f;
  --dark-green: #0f2a14;
  --cream: #fefcf8;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
  --gradient-light: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
  --soft-white: #fafafa;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --text-primary: var(--text-dark);
}

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

body {
  font-family: "Inter", sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.arabic-text {
  font-family: "Amiri", serif;
  font-weight: 700;
}

/* New modern header with LTR direction */
.header {
  background: var(--white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow);
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
  background: rgba(30, 81, 40, 0.05);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.mobile-menu-btn:hover {
  background: var(--border);
}

/* Completely new hero section design */
.hero {
  position: relative;
  background: var(--gradient-light);
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(30, 81, 40, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(111, 170, 111, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: rgba(30, 81, 40, 0.1);
  color: var(--primary-green);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
  border: 1px solid rgba(30, 81, 40, 0.2);
}

.hero-title {
  margin-bottom: 2rem;
}

.title-main {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-family: "Amiri", serif;
}

.title-sub {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

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

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Completely new compact para cards design */
.paras-section {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.paras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  direction: ltr;
}

.para-card-new {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  display: block;
}

.para-card-new:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-green);
}

.para-thumbnail-new {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  opacity: 0;
  background: var(--border);
}

.para-card-new:hover .thumbnail-img {
  transform: scale(1.05);
}

.play-overlay-new {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.para-card-new:hover .play-overlay-new {
  opacity: 1;
}

.play-btn-new {
  width: 50px;
  height: 50px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary-green);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.para-card-new:hover .play-btn-new {
  transform: scale(1);
}

.para-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gradient-primary);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.para-info-new {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.para-names {
  flex: 1;
}

.para-arabic {
  font-family: "Amiri", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.para-urdu {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.para-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
}

.verses-count {
  background: rgba(30, 81, 40, 0.1);
  color: var(--primary-green);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.surahs-range {
  font-weight: 500;
}

/* Surahs Section Styles */
.surahs-section {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.filter-section {
  padding: 2rem 2rem 0;
  max-width: 1400px;
  margin: 0 auto;
}

.filter-container {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-container h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text-muted);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.filter-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  background: rgba(30, 81, 40, 0.05);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: var(--primary-green);
  color: var(--white);
  box-shadow: var(--shadow);
}

.surahs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  direction: ltr;
}

.surah-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  display: block;
}

.surah-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-green);
}

.surah-thumbnail {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.surah-thumbnail .thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  opacity: 0;
  background: var(--border);
}

.surah-card:hover .thumbnail-img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.surah-card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  width: 60px;
  height: 60px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-green);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.surah-card:hover .play-btn {
  transform: scale(1);
}

.surah-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gradient-primary);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.surah-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.surah-type-badge.makki {
  background: #e8f5e8;
  color: #2d5a2d;
}

.surah-type-badge.madani {
  background: #e8f0ff;
  color: #1e3a8a;
}

.surah-info {
  padding: 1.5rem;
}

.surah-names {
  margin-bottom: 1rem;
}

.surah-arabic {
  font-family: "Amiri", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  text-align: center;
  direction: rtl;
}

.surah-urdu {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-align: center;
  direction: rtl;
}

.surah-english {
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  direction: ltr;
  font-style: italic;
}

.surah-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-light);
  direction: ltr;
}

.surah-meta .verses-count {
  background: rgba(30, 81, 40, 0.1);
  color: var(--primary-green);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.surah-type {
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--border);
}

/* Individual Surah Page Styles */
.surah-header {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: var(--cream);
  direction: ltr;
}

.surah-header .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: background 0.3s ease;
  direction: ltr;
}

.surah-header .back-btn:hover {
  background: var(--light-green);
}

.surah-header .hero-title {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  direction: ltr;
}

.surah-header .arabic-text {
  font-family: "Amiri", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin: 1rem 0;
  direction: rtl;
}

.surah-header .hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  direction: rtl;
}

.surah-header .english-name {
  font-size: 1.2rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 1rem;
  direction: ltr;
}

/* Navigation styles for Surah pages */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  color: var(--text-dark);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  direction: ltr;
}

.nav-btn:hover {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.nav-btn.home-btn {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: var(--primary-green);
}

.nav-btn.home-btn:hover {
  background: var(--light-green);
}

/* Enhanced footer design */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

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

.footer-brand {
  max-width: 400px;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-desc {
  color: #d1d5db;
  line-height: 1.6;
  font-size: 0.95rem;
}

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

.footer-column h4 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.footer-column a {
  display: block;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .title-main {
    font-size: 2.5rem;
  }

  .title-sub {
    font-size: 1.2rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .paras-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .para-info-new {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .para-meta {
    align-items: flex-start;
    text-align: left;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .paras-section {
    padding: 3rem 1rem;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .filter-btn {
    width: 200px;
  }

  .surahs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .surah-thumbnail {
    height: 140px;
  }

  .surah-info {
    padding: 1.25rem;
  }

  .surah-arabic {
    font-size: 1.2rem;
  }

  .surah-header {
    padding: 2rem 1rem;
  }

  .surah-header .hero-title {
    font-size: 2rem;
  }

  .surah-header .arabic-text {
    font-size: 2rem;
  }

  .surah-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .para-thumbnail-new {
    height: 120px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
    margin-bottom: 0;
  }

  .surah-thumbnail {
    height: 120px;
  }

  .surah-number-badge {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  .surah-header .hero-title {
    font-size: 1.8rem;
  }

  .surah-header .arabic-text {
    font-size: 1.8rem;
  }
}

/* Ensure proper text direction for mixed content */
.ltr-content {
  direction: ltr;
  text-align: left;
}

.rtl-content {
  direction: rtl;
  text-align: right;
}

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