@import url('https://cdn.fontcdn.ir/Font/Persian/Yekan/Yekan.css');

:root {
  --alien-lime: #D8FF3F;
  --nebula-purple: #6253FF;
  --flamingo-sand: #FF6A95;
  --vapor-grey: #E6E6EB;
  --ember-orange: #FF9234;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Yekan', sans-serif;
  background-color: var(--vapor-grey);
  color: #333;
  line-height: 1.7;
}

.site-logo {
    display: inline-block; 
  margin: 0 auto 1rem;
  transition: transform 0.3s;
}



.site-logo:hover {
  transform: scale(1.1);
}

.main-header {
  background-color: var(--nebula-purple);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
}

.main-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
}

.main-header p {
  margin: 0;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--alien-lime);
}

/* navigation */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.top-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.top-nav a:hover {
  color: var(--alien-lime);
}

/* hamburger */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  z-index: 10;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: white;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
}

.nav-toggle-label span::before {
  content: '';
  top: -10px;
}

.nav-toggle-label span::after {
  content: '';
  top: 10px;
}

@media (max-width: 768px) {
  .top-nav {
    display: none;
    flex-direction: column;
    background: var(--nebula-purple);
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    padding: 1rem;
    z-index: 5;
  }

  .nav-toggle:checked + .nav-toggle-label + .top-nav {
    display: flex;
  }

  .nav-toggle-label {
    display: block;
  }
}

/* post list */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.post-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 4px solid var(--nebula-purple);
}

.post-info {
  padding: 1rem;
  flex-grow: 1;
}

.post-info h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  color: var(--nebula-purple);
}

.post-info p {
  font-size: 1rem;
  color: #555;
  margin: 0;
}

.post-tags {
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--alien-lime);
  color: #333;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.main-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #666;
  background-color: var(--vapor-grey);
  margin-top: 3rem;
}

/* contact form */
.contact-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.contact-form {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 2rem;
}

.contact-form h2 {
  color: #6253FF;
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Yekan', sans-serif;
  transition: border 0.3s;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  background: #6253FF;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Yekan', sans-serif;
  font-size: 1rem;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.contact-form button:hover {
  background: #4d3dff;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}



/* منوی بالا */
.menu {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.menu ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2rem;
}

.menu a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s;
}

.menu a:hover {
  color: var(--alien-lime);
}

/* آیکن همبرگر */
.menu-icon {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

/* مخفی کردن چک‌باکس */
.menu-toggle {
  display: none;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
    background: var(--nebula-purple);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 3rem 0;
  }

  .menu ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .menu-toggle:checked ~ .menu {
    display: flex;
  }

  .menu-icon {
    display: flex;
  }
}


.search-form {
  max-width: 400px;
  margin: 2rem auto;
  display: flex;
}

.search-form input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  font-family: inherit;
}

.search-form button {
  background: var(--nebula-purple);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}
.search-form {
  display: flex;
  justify-content: center;
  margin: 2rem auto;
  max-width: 400px;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  direction: ltr; /* مهم برای چرخش ترتیب دکمه و فیلد */
}

.search-form input[type="text"] {
  border: none;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  flex: 1;
  outline: none;
  direction: rtl; /* برای متن فارسی داخل input */
}

.search-form button {
  background-color: var(--ember-orange);
  color: white;
  border: none;
  padding: 0 1.2rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
}

.search-form button:hover {
  background-color: #cc741e;
}
