@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;700&family=Almarai:wght@300;400;700&display=swap');

:root {
  --primary-color: #2e7d32;
  --secondary-color: #4caf50;
  --dark-green: #1b5e20;
  --light-green: #81c784;
  --gold-color: #d4af37;
  --cream-color: #f1f8e9; 
  --text-color: #263238; 
  --text-light: #f8f8f8; 
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Almarai', sans-serif;
  background-color: var(--cream-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.6;
}

/* هدر اصلی */
.main-header {
  background: linear-gradient(135deg, var(--dark-green), var(--primary-color));
  color: var(--text-light);
  padding: 2rem 0;
  text-align: center;
  overflow: hidden;
}


.header-content h1 {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* منوی ناو */
.main-nav {
  background-color: rgba(0, 0, 0, 0.15);
  padding: 1rem 0;
  margin-top: 1.5rem;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.main-nav a.active {
  background-color: var(--gold-color);
  color: var(--dark-green);
  font-weight: bold;
}

/* کانتینر اصلی */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* صفحه اصلی */
.intro-section {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border-right: 4px solid var(--gold-color);
}

.intro-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.8rem;
}

.search-section {
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
}

.search-box {
  display: flex;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1rem;
  background-color: white;
}

.search-box button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-box button:hover {
  background-color: var(--secondary-color);
}

/* کارت‌ها */
.featured-proverbs {
  margin-bottom: 3rem;
}

.featured-proverbs h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 2rem;
}

.proverb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.proverb-card {
  position: relative;
  height: 250px;
  perspective: 1000px;
  cursor: pointer;
}

.proverb-card:hover .card-front {
  transform: rotateY(180deg);
}

.proverb-card:hover .card-back {
  transform: rotateY(0deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-front {
  background: linear-gradient(135deg, white, var(--cream-color));
  transform: rotateY(0deg);
  border: 1px solid var(--light-green);
}

.card-back {
  background: linear-gradient(135deg, var(--light-green), var(--secondary-color));
  color: white;
  transform: rotateY(180deg);
}

.card-front h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.4rem;
}

.card-front p {
  color: var(--dark-green);
  font-style: italic;
}

/* گالری */
.gallery-section {
  margin-bottom: 3rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-header h2 {
  color: var(--primary-color);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.gallery-header h2 i {
  color: var(--gold-color);
}

.gallery-header p {
  color: var(--text-color);
  font-size: 1.1rem;
}

.proverb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

.gallery-card {
  position: relative;
  height: 350px;
  perspective: 1000px;
  cursor: pointer;
}

.gallery-card:hover .card-image {
  transform: rotateY(180deg);
  opacity: 0;
}

.gallery-card:hover .card-content {
  transform: rotateY(0deg);
  opacity: 1;
}

.card-image, .card-content {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: all 0.6s ease;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image img{
    width: 100%;
    height: 100%;
}

.card-content {
  background: white;
  padding: 3.5rem;
  transform: rotateY(180deg);
  opacity: 0;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  color: var(--primary-color);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.card-content .english {
  color: #666;
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.details-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.details-btn:hover {
  background-color: var(--dark-green);
  transform: translateY(-2px);
}

.rating {
  color: var(--gold-color);
  font-size: 0.9rem;
}

.gallery-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

/* دیوار تعاملی */
.interactive-wall-section {
  margin-bottom: 3rem;
}

.wall-header {
  text-align: center;
  margin-bottom: 2rem;
}

.wall-header h2 {
  color: var(--primary-color);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.wall-header h2 i {
  color: var(--gold-color);
}

.wall-header p {
  color: var(--text-color);
  font-size: 1.1rem;
}

.wall-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.submission-form {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.form-group label i {
  margin-left: 5px;
  color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--light-green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reset-btn {
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reset-btn:hover {
  background-color: #e8f5e9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* فوتر */
.main-footer {
  background: linear-gradient(135deg, var(--dark-green), var(--primary-color));
  color: var(--text-light);
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-icons a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--gold-color);
  transform: translateY(-3px);
}

.main-footer p {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-section, .search-section, .featured-proverbs, 
.gallery-section, .interactive-wall-section {
  animation: fadeIn 0.6s ease-out forwards;
}