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

body {
  font-family: "Cairo", sans-serif;
  line-height: 1.6;
  color: #333;
  direction: rtl;
  text-align: right;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Amiri", serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2c3e50;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: #666;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #3498db;
  border: 2px solid #3498db;
}

.btn-secondary:hover {
  background: #3498db;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid #2c3e50;
  color: #2c3e50;
}

.btn-outline:hover {
  background: #2c3e50;
  color: white;
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-logo i {
  margin-left: 10px;
  color: #3498db;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-right: 30px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 10px 0;
}

.nav-link:hover {
  color: #3498db;
}

/* Mobile Navigation */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 120px 0 80px;
  display: flex;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%233498db" opacity="0.1"><polygon points="1000,0 1000,100 0,100"/></svg>')
    no-repeat;
  background-size: cover;
}

.hero-content {
  flex: 1;
  padding-right: 50px;
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: 3rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #3498db;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
}

.hero-image i {
  font-size: 15rem;
  color: #3498db;
  opacity: 0.8;
}

/* Section Titles */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: #2c3e50;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 2px;
}

/* Services Section */
.services {
  padding: 80px 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f8f9fa;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card i {
  font-size: 3rem;
  color: #3498db;
  margin-bottom: 20px;
}

.service-card h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.service-card p {
  color: #666;
  line-height: 1.7;
}

/* Books Section */
.books {
  padding: 80px 0;
  background: #f8f9fa;
}

.books-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.category-card {
  background: white;
  padding: 30px 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-right: 4px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  border-right-color: #3498db;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-card i {
  font-size: 2.5rem;
  color: #3498db;
  margin-bottom: 20px;
}

.category-card h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Membership Section*/
.membership {
  padding: 20px 0;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
}

.membership .section-title {
  color: white;
}

.membership-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 4 كولونات ثابتة */
  gap: 20px; /* المسافة بين الكروت */
  margin-top: 50px;
}
.cover {
  height: 240px;
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.plan-card {
  background: white;
  color: #333;
  padding: 20px 15px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card.featured {
  transform: scale(1.05);
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.plan-card.featured .btn-primary {
  background: white;
  color: #3498db;
}

.plan-card:hover {
  transform: translateY(-10px);
}

.plan-card.featured:hover {
  transform: translateY(-10px) scale(1.05);
}

.plan-header {
  margin-bottom: 30px;
  position: relative;
}

.plan-header h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.price {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3498db;
}

.plan-card.featured .price {
  color: white;
}

.badge {
  position: absolute;
  top: -20px;
  right: -10px;
  background: #e74c3c;
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.8rem;
  transform: rotate(15deg);
}

.plan-features {
  list-style: none;
  margin-bottom: 30px;
}

.plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}

.plan-card.featured .plan-features li {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.plan-features li i {
  color: #27ae60;
  margin-left: 10px;
  font-size: 1.1rem;
}

.plan-card.featured .plan-features li i {
  color: white;
}
.book-cover {
  margin: 15px 0;
}
.book-cover img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
}
.author {
  font-size: 1rem;
  color: #666;
}
.view-all {
    display: block;
    margin: 40px auto 0;
    padding: 12px 30px;
    background: #3498db;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    width: fit-content;
}

.view-all:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}


/* Contact Section */
.contact {
  padding: 80px 0;
  background: white;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 50px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-item i {
  font-size: 1.5rem;
  color: #3498db;
  margin-left: 15px;
  margin-top: 5px;
}

.contact-item h4 {
  margin-bottom: 5px;
  color: #2c3e50;
}

.contact-form {
  background: #f8f9fa;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  font-family: "Cairo", sans-serif;
  direction: rtl;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: 400;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-left: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-left: 8px;
}

.link {
  color: #3498db;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.footer-logo i {
  margin-left: 10px;
  color: #3498db;
}

.footer-section h4 {
  margin-bottom: 20px;
  color: white;
  font-size: 1.2rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #3498db;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #3498db;
  transform: translateY(-2px);
}

.footer-contact p {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: #bdc3c7;
}

.footer-contact i {
  margin-left: 10px;
  color: #3498db;
  width: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #bdc3c7;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header h3 {
  margin: 0;
  color: white;
}

.close {
  color: white;
  float: left;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  opacity: 0.7;
}

.membership-form {
  padding: 30px;
}

.modal-footer {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  padding: 20px 30px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 0 0 15px 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    right: -100%;
    top: 70px;
    flex-direction: column;
    background-color: #2c3e50;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-item {
    margin: 10px 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 0 50px;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 40px;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .hero-image i {
    font-size: 8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .books-categories {
    grid-template-columns: 1fr;
  }

  .membership-plans {
    grid-template-columns: 1fr;
  }

  .plan-card.featured {
    transform: none;
  }

  .plan-card.featured:hover {
    transform: translateY(-5px);
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-footer {
    flex-direction: column;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

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

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .btn {
    padding: 10px 25px;
    font-size: 14px;
  }

  .contact-form {
    padding: 25px 20px;
  }

  .membership-form {
    padding: 20px;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-footer {
    padding: 15px 20px;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

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

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 1rem;
}
.mt-4 {
  margin-top: 1.5rem;
}
.mt-5 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mb-5 {
  margin-bottom: 3rem;
}

.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 1rem;
}
.p-4 {
  padding: 1.5rem;
}
.p-5 {
  padding: 3rem;
}
