@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
  --primary-color: #7b1e1e;   
  --Background: linear-gradient(135deg, #fff3e0, #f1e0dc); 
  --card-bg: #ffffff;       
  --text: #10375C;
}

body {
  font-family: 'Vazir', sans-serif;
  background: var(--Background);
  margin: 0;
  padding: 0;
  direction: rtl;
  color: var(--text);
}

nav {
  text-align: center;
  padding: 20px;
}
nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
nav a:hover::after {
  width: 100%;
}

h1 {
  text-align: center;
  color: var(--primary-color);
  font-size: 2rem;
  margin-top: 10px;
}
p.intro {
  text-align: center;
  color: var(--text);
  max-width: 600px;
  margin: 10px auto 30px;
}


.courses {
  display: flex;
  flex-direction: row;      
  flex-wrap: nowrap;  
  gap: 20px;
  padding: 0 20px 40px;
  overflow-x: auto;       
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  padding: 20px;
}

.course-container {
  flex-shrink: 0;      
  scroll-snap-align: start;
}

.card {
  background: var(--card-bg);
  color: var(--text);
  border-radius: 12px;
  padding: 20px;
  width: 280px;        
  height: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card:hover {
  transform: translateY(-8px);
}

.title-line {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.btn {
  margin-top: 15px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  align-self: flex-end;
}
.btn:hover {
  background-color: #eba7a7; 
  color: var(--primary-color);
  transform: scale(1.05);
}
/* ریسپانسیو */
@media (max-width: 600px) {
  h1 {
    font-size: 1.6rem;
  }
  p.intro {
    font-size: 14px;
    line-height: 1.7;
    padding: 0 10px;
  }

  .courses {
    display: grid;                        
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px;                            
    padding: 0 10px 24px;
    padding: 20px;
  }

  .course-container {
    width: 100%;                        
  }

  .card {
    width: 100%;                       
    font-size: 0.9em;
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
  }

  .btn {
    font-size: 0.85em;
    padding: 8px 14px;
  }
}
