@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
  /* Surgical/Medical Theme Colors */
  --primary-color: #00897b; /* Surgical Teal */
  --primary-dark: #00695c;
  --accent-color: #26a69a;
  --secondary-color: #4db6ac;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  
  /* Backgrounds */
  --bg-color: #e0f2f1; /* Light sterile teal */
  --bg-secondary: #ffffff; /* Clean white for contrast */
  
  /* Text */
  --text-color: #263238; /* Dark Blue Grey */
  --text-light: #546e7a;
  --text-muted: #78909c;
  
  --card-radius: 1.5rem;
  --card-radius-sm: 0.75rem;
  --transition-speed: 0.3s;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00897b 0%, #004d40 100%);
  --gradient-secondary: linear-gradient(135deg, #4db6ac 0%, #00796b 100%);
  --gradient-accent: linear-gradient(135deg, #80cbc4 0%, #26a69a 100%);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Vazir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  /* Subtle medical grid pattern */
  background-image: 
    linear-gradient(rgba(0, 137, 123, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 137, 123, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  margin: 0;
  padding: 0;
  direction: rtl;
  color: var(--text-color);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Medical Heartbeat Loader */
#loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease;
}

.loader-content {
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.heartbeat-loader {
  width: 200px;
  height: 100px;
  margin-bottom: 1rem;
}

.heartbeat-loader polyline {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: heartbeat 2s linear infinite;
  filter: drop-shadow(0 0 8px rgba(38, 166, 154, 0.8));
}

@keyframes heartbeat {
  0% { stroke-dashoffset: 300; }
  40% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -300; }
}

.loader-text {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 1px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Modern Header */
header {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::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="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100 0,50"/></svg>');
  background-size: cover;
  background-position: bottom;
}

.header-content {
  position: relative;
  z-index: 2;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header p {
  font-size: 1.3rem;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--card-radius);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  backdrop-filter: blur(10px);
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Modern Navigation */
nav {
  background: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

nav a {
  padding: 0.75rem 1.5rem;
  border-radius: var(--card-radius-sm);
  background: transparent;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all var(--transition-speed);
  border: 2px solid transparent;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-speed);
  transform: translateX(-50%);
}

nav a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

nav a:hover::before {
  width: 100%;
}

/* Modern Main Content */
main {
  padding: 4rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.card {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-secondary);
  color: var(--text-light);
  position: relative;
  padding-right: 1.5rem;
}

.card li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--success-color);
  font-weight: bold;
}

.card li:last-child {
  border-bottom: none;
}

/* Educational Content Styles */
.educational-section {
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.educational-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.educational-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.educational-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.educational-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
}

.educational-card:hover::before {
  transform: scaleX(1);
}

.educational-card h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.educational-card .card-icon {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.9rem;
}

.educational-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.educational-card .topics {
  list-style: none;
  padding: 0;
  margin: 0;
}

.educational-card .topics li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-secondary);
  color: var(--text-light);
  position: relative;
  padding-right: 1.2rem;
  font-size: 0.9rem;
}

.educational-card .topics li::before {
  content: '•';
  position: absolute;
  right: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.educational-card .topics li:last-child {
  border-bottom: none;
}

/* Pagination System */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.75rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--card-radius-sm);
  background: white;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 2.5rem;
  justify-content: center;
}

.pagination-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pagination-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-btn:disabled:hover {
  background: white;
  color: var(--primary-color);
  transform: none;
}

.pagination-info {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0 1rem;
}

/* Article Card Styles */
.article-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  transform: scaleX(0);
  transition: transform var(--transition-speed);
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary-color);
}

.article-card:hover::before {
  transform: scaleX(1);
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.article-title {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.article-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
  margin-right: 1rem;
}

.article-summary {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--primary-color);
  border-radius: var(--card-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.article-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more-btn {
  padding: 0.5rem 1rem;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: var(--card-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Search and Filter */
.search-filter-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--bg-secondary);
  border-radius: var(--card-radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition-speed);
}

.search-box:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--bg-secondary);
  border-radius: var(--card-radius-sm);
  font-size: 0.9rem;
  background: white;
  color: var(--text-color);
  cursor: pointer;
  transition: all var(--transition-speed);
  font-family: vazir;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Modern Contact Buttons */
.contact-section {
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-top: 2rem;
}

.contact-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border: none;
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: all var(--transition-speed);
  text-align: right;
  direction: rtl;
  font-family: inherit;
  background: white;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.contact-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.contact-btn:hover::before {
  left: 100%;
}

.contact-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.contact-btn:active {
  transform: translateY(-2px);
}

.contact-btn .icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.email-btn .icon {
  background: var(--gradient-primary);
}

.telegram-btn .icon {
  background: var(--gradient-accent);
}

.location-btn .icon {
  background: var(--gradient-secondary);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-info strong {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.contact-info small {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 400;
}

/* Modern Footer */
footer {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

footer::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="white" opacity="0.1"><polygon points="0,100 1000,50 1000,100 0,100"/></svg>');
  background-size: cover;
  background-position: top;
}

.footer-content {
  position: relative;
  z-index: 2;
  
}

footer p {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

/* Login / Form Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0, 137, 123, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-primary);
}

.login-header {
  margin-bottom: 2rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  background: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-color);
  font-size: 2.5rem;
  border: 2px solid var(--primary-color);
}

.login-title {
  color: var(--primary-dark);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.login-subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: right;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--card-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-speed);
  background: var(--bg-secondary);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.1);
}

.btn-login {
  width: 100%;
  padding: 1rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--card-radius-sm);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  margin-top: 1rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* News Carousel Styles */
.news-carousel-section {
  margin: 2rem 0;
  padding: 1rem 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-item {
  min-width: 100%;
  position: relative;
  height: 400px;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 2rem;
  text-align: right;
}

.carousel-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.carousel-content p {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}

.carousel-btn.prev {
  left: 1rem;
}

.carousel-btn.next {
  right: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1.1rem;
  }
  
  .nav-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .nav-container a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .educational-grid {
    grid-template-columns: 1fr;
  }
  
  .educational-card {
    padding: 1.25rem;
  }
  
  .educational-card h3 {
    font-size: 1.1rem;
  }
  
  .educational-card p {
    font-size: 0.85rem;
  }
  
  .educational-card .topics li {
    font-size: 0.85rem;
  }
  
  .search-filter-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-box, .filter-select {
    min-width: 100%;
  }
  
  .pagination-container {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  
  .pagination-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    min-width: 2rem;
  }
  
  .article-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .article-date {
    margin-right: 0;
  }
  
  .article-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .article-meta {
    gap: 0.5rem;
  }
  
  .contact-buttons {
    grid-template-columns: 1fr;
  }
  
  .contact-btn {
    padding: 1rem;
  }
  
  .contact-btn .icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .contact-info strong {
    font-size: 1rem;
  }
  
  .contact-info small {
    font-size: 0.8rem;
  }
  
  .video-embed iframe {
    height: 250px;
  }

  footer p {
    white-space: nowrap;
    font-size: 0.8rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Post Detail Specific Styles */
.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  transition: opacity var(--transition-speed);
}

.breadcrumb a:hover {
  opacity: 0.7;
}

.back-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--card-radius);
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-speed);
  backdrop-filter: blur(10px);
  margin-top: 1rem;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.article-header {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  overflow: hidden;
  display: block;
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta .icon {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: white;
}

.article-summary {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  font-style: italic;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--card-radius-sm);
  border-right: 4px solid var(--primary-color);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  line-height: 1.8;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-content h3 {
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: justify;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-right: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.highlight-box {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid #7dd3fc;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
}

.highlight-box::before {
  content: '💡';
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

.highlight-box h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.warning-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 1px solid #fbbf24;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
}

.warning-box::before {
  content: '⚠️';
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

.warning-box h4 {
  color: var(--warning-color);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.steps-container {
  margin: 2rem 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  border-right: 4px solid var(--primary-color);
}

.step-number {
  width: 2rem;
  height: 2rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.step-content p {
  margin: 0;
  color: var(--text-color);
}

.navigation-section {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--card-radius-sm);
  font-weight: 500;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-btn.secondary {
  background: var(--gradient-accent);
}

/* Video Section */
.video-section {
  background: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}

.video-container {
  max-width: 800px;
  margin: 2rem auto;
}

.video-placeholder {
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  padding: 3rem 2rem;
  border: 2px dashed var(--primary-color);
  text-align: center;
  transition: all var(--transition-speed);
}

.video-placeholder:hover {
  background: var(--bg-color);
  border-color: var(--accent-color);
}

.video-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.video-placeholder h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.video-placeholder p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.video-upload-info {
  background: white;
  border-radius: var(--card-radius-sm);
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.video-upload-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.video-embed {
  margin: 1.5rem 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}

.video-embed iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}

.h_iframe-aparat_embed_frame {
  position: relative;
}

.h_iframe-aparat_embed_frame .ratio {
  display: block;
  width: 100%;
  height: auto;
}

.h_iframe-aparat_embed_frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--card-radius);
}

.search-box::-webkit-input-placeholder {
  font-family: Vazir;
}

.subject {
    font-family: Vazir;
}

.pagination-btn {
    font-family: Vazir;
}

.btn-login {
    font-family: Vazir;
}

@media (max-width: 768px) {
  .video-embed iframe {
    height: 250px;
  }
}
/* Profile Page Styles */
.profile-header {
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-secondary);
    margin-bottom: 30px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
}
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}
.profile-name {
    margin-top: 20px;
    font-size: 2em;
    color: var(--text-color);
}
.profile-bio {
    margin-top: 10px;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.profile-posts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.post-card {
    background: var(--bg-secondary);
    border-radius: var(--card-radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed);
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Profile Edit Styles */
.edit-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 137, 123, 0.2);
}
.btn-save {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background var(--transition-speed);
}
.btn-save:hover {
    background: var(--primary-dark);
}
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Profile Page Styles */
.profile-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.profile-header {
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  background: var(--bg-color);
}

.profile-picture-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.profile-info {
  flex: 1;
  min-width: 250px;
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.profile-username {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.profile-bio {
  color: var(--text-light);
  line-height: 1.8;
  background: var(--bg-color);
  padding: 1rem 1.5rem;
  border-radius: var(--card-radius-sm);
  border-left: 4px solid var(--primary-color);
}

.profile-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg-color);
  justify-content: flex-start;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.posts-section {
  background: var(--bg-secondary);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.posts-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.posts-section-title .icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.user-posts-grid {
  display: grid;
  gap: 1.5rem;
}

.user-post-card {
  background: var(--bg-color);
  border-radius: var(--card-radius-sm);
  padding: 1.5rem;
  transition: all var(--transition-speed) ease;
  border-left: 4px solid var(--primary-color);
}

.user-post-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.user-post-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.user-post-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.user-post-title a:hover {
  color: var(--primary-color);
}

.user-post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.user-post-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.user-post-summary {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.user-post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-post-tag {
  background: var(--bg-secondary);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--primary-color);
}

.no-posts {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.no-posts-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-info {
    text-align: center;
  }

  .profile-bio {
    border-left: none;
    border-top: 4px solid var(--primary-color);
  }

  .profile-stats {
    justify-content: center;
  }
}

