/**
 * Quran Styles
 */

/* Hero Section */
.quran-hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 2rem 0;
  position: relative;
}

.quran-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(to bottom right, transparent 49%, white 50%);
}

/* Filters */
.quran-filters {
  margin-top: -2rem;
  position: relative;
  z-index: 10;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Surah Cards */
.quran-surahs-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.quran-surah-card {
  display: flex;
  background-color: #e6f2ff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(255, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.quran-surah-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.6);
}

.surah-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  background-color: #3b82f6;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.surah-content {
  flex: 1;
  padding: 1rem;
}

.surah-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.surah-title a {
  color: #1e40af;
  text-decoration: none;
}

.surah-title a:hover {
  text-decoration: underline;
}

.surah-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.surah-type {
  padding: 0.25rem 0.5rem;
  background-color: #e0f2fe;
  color: #0369a1;
  border-radius: 9999px;
}

.verses-count {
  padding: 0.25rem 0.5rem;
  background-color: #dcfce7;
  color: #166534;
  border-radius: 9999px;
}

.surah-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.surah-pdf-link,
.surah-audio-link,
.surah-view-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.surah-pdf-link {
  background-color: #ef4444;
  color: white;
}

.surah-pdf-link:hover {
  background-color: #dc2626;
}

.surah-audio-link {
  background-color: #10b981;
  color: white;
}

.surah-audio-link:hover {
  background-color: #059669;
}

.surah-view-link {
  background-color: #3b82f6;
  color: white;
}

.surah-view-link:hover {
  background-color: #2563eb;
}

/* Empty State */
.quran-empty-state {
  padding: 2rem;
  text-align: center;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Single Surah Page */
.single-surah-page .surah-header {
  margin-top: -2rem;
  position: relative;
  z-index: 10;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.surah-number-badge {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3b82f6;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 9999px;
}

/* Surah PDF Button */
.surah-pdf-button {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  margin: 15px 0;
  transition: background-color 0.3s ease;
}

.surah-pdf-button:hover {
  background-color: #45a049;
  color: white;
}

/* PDF Viewer Container */
.surah-pdf-viewer-container {
  margin: 20px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.surah-pdf-viewer-container h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.5em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

/* PDF Viewer */
.pdf-viewer {
  width: 100%;
  min-height: 600px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #3b82f6;
  color: white;
}

.pdf-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f1f5f9;
  padding: 1rem;
  min-height: 500px;
  position: relative;
}

.pdf-canvas {
  max-width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-loading,
.pdf-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem;
  background-color: white;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-error {
  color: #ef4444;
}

/* Audio Player */
.quran-audio-player {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.audio-title {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e40af;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .quran-surahs-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .surah-actions {
    flex-direction: column;
  }

  .surah-pdf-link,
  .surah-audio-link,
  .surah-view-link {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .quran-filters .grid {
    grid-template-columns: 1fr;
  }

  .pdf-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .pdf-viewer {
    min-height: 400px;
  }
}

@media screen and (max-width: 480px) {
  .pdf-viewer {
    min-height: 300px;
  }

  .surah-pdf-button {
    display: block;
    text-align: center;
  }
}
