/* Base Styles */
:root {
  --primary-color: #7b1fa2;
  --secondary-color: #00acc1;
  --dark-color: #333;
  --light-color: #f4f4f4;
  --success-color: #28a745;
  --error-color: #dc3545;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Vazirmatn', sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: var(--dark-color);
  direction: rtl;
}

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

a {
  text-decoration: none;
  color: var(--dark-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

h1, h2, h3 {
  margin-bottom: 15px;
  line-height: 1.3;
}

section {
  padding: 60px 0;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #6a1b9a;
  transform: translateY(-3px);
}

/* Header */
header {
  background-color: white;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

nav ul {
  display: flex;
}

nav ul li {
  margin-right: 20px;
}

nav ul li:last-child {
  margin-right: 0;
}

nav ul li a {
  font-weight: 500;
  padding: 10px 5px;
  position: relative;
}

nav ul li a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  bottom: 0;
  right: 0;
  transition: width 0.3s;
}

nav ul li a:hover:after,
nav ul li a.active:after {
  width: 100%;
}

nav ul li a.active {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('public/library.webp');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 100px 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Services Section */
.services {
  background-color: white;
  text-align: center;
}

.services h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

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

.service-card {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

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

.service-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* About Section */
.about {
  background-color: #f8f9fa;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

.about p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: justify;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 50px 0 20px;
}

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

.footer-info h3,
.footer-hours h3 {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.footer-info p,
.footer-hours p {
  margin-bottom: 10px;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Page Header */
.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('public/contact.webp');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 60px 0;
}

.page-header h1 {
  font-size: 3rem;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.contact-details h2,
.contact-form h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

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

.contact-icon {
  font-size: 2rem;
  margin-left: 20px;
  color: var(--primary-color);
}

.contact-text h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.map {
  background-color: white;
}

.map h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

.map-container {
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
  }
  
  .logo {
    margin-bottom: 15px;
  }
  
  nav ul {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: 40px 0;
  }
  
  .services h2,
  .about h2,
  .contact-details h2,
  .contact-form h2,
  .map h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.2rem;
  }
  
  .btn {
    padding: 10px 20px;
  }
  
  .service-card {
    padding: 20px;
  }
}