/* ============================================
   سایادبیرگران - استایل‌های اختصاصی سایت
   (تکمیل‌کننده Tailwind CDN)
   ============================================ */

:root {
  --gold-400: #D4AF37;
  --gold-500: #C5A028;
  --gold-600: #B08D1A;
  --navy-900: #050E1F;
  --navy-800: #0A1A35;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050E1F; }
::-webkit-scrollbar-thumb { background: #D4AF37; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #B08D1A; }

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

img, video, svg { max-width: 100%; height: auto; }

button, a { min-height: 44px; min-width: 44px; }

#mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

@media (max-width: 768px) {
  input, textarea, select { font-size: 16px; }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::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;
}

.shine-effect:hover::before { left: 100%; }

.gradient-text {
  background: linear-gradient(135deg, #D4AF37 0%, #E8C860 50%, #FBF2D5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  .bg-gray-50 { background-color: white; }
  .text-gray-600 { color: black; }
}

.loading-dots {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loading-dots div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #D4AF37;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) { left: 8px; animation: loading-dots1 0.6s infinite; }
.loading-dots div:nth-child(2) { left: 8px; animation: loading-dots2 0.6s infinite; }
.loading-dots div:nth-child(3) { left: 32px; animation: loading-dots2 0.6s infinite; }
.loading-dots div:nth-child(4) { left: 56px; animation: loading-dots3 0.6s infinite; }

@keyframes loading-dots1 { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes loading-dots3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes loading-dots2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-content {
  line-height: 1.9;
  color: #374151;
  font-size: 16px;
}

.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #0A1A35;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #D4AF37;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #0A1A35;
}

.article-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #0A1A35;
}

.article-content ul,
.article-content ol {
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content li { margin-bottom: 0.5rem; }

.article-content a {
  color: #B08D1A;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover { color: #D4AF37; }

.article-content blockquote {
  border-right: 4px solid #D4AF37;
  background: #FBF2D5;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4B5563;
}

.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content img {
  border-radius: 12px;
  margin: 1.5rem auto;
  display: block;
  max-width: 100%;
  height: auto;
}

.article-content code {
  background: #F3F4F6;
  color: #B08D1A;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  direction: ltr;
  display: inline-block;
}

.article-content pre {
  background: #0A1A35;
  color: #E5E7EB;
  padding: 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  margin-bottom: 1.5rem;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.article-content th,
.article-content td {
  border: 1px solid #E5E7EB;
  padding: 0.75rem;
  text-align: right;
}

.article-content th {
  background: #F9FAFB;
  font-weight: 700;
  color: #0A1A35;
}

.article-content tr:nth-child(even) td { background: #F9FAFB; }

.toc {
  background: #F9FAFB;
  border-right: 4px solid #D4AF37;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.toc h3, .toc h4 {
  font-weight: 700;
  color: #0A1A35;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 0.5rem; }

.toc a {
  color: #4B5563;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  display: inline-block;
}

.toc a:hover { color: #D4AF37; padding-right: 4px; }

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  right: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #D4AF37;
}

.timeline-item {
  position: relative;
  padding-right: 60px;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  right: 24px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #D4AF37;
  z-index: 10;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #D4AF37;
}

.comparison-table { border-collapse: collapse; width: 100%; }

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.comparison-table th {
  background-color: #f9fafb;
  font-weight: bold;
  color: #0A1A35;
}

.comparison-table tr:nth-child(even) { background-color: #f9fafb; }

.site-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 31, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.site-popup-overlay.active { opacity: 1; visibility: visible; }

.site-popup {
  background: white;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.site-popup-overlay.active .site-popup { transform: scale(1) translateY(0); }

.site-popup-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  z-index: 2;
  transition: all 0.2s;
}

.site-popup-close:hover { background: #EF4444; color: white; transform: rotate(90deg); }

.site-popup-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.site-popup-body { padding: 28px; text-align: center; }

.site-popup-title {
  font-size: 22px;
  font-weight: 700;
  color: #0A1A35;
  margin: 0 0 12px;
}

.site-popup-content {
  font-size: 15px;
  color: #4B5563;
  line-height: 1.7;
  margin: 0 0 22px;
}

.site-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #D4AF37, #B08D1A);
  color: #050E1F;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}

.site-popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.cookie-notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 480px;
  margin: 0 auto;
  background: #0A1A35;
  color: white;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 9998;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 14px;
}

.cookie-notice.visible { transform: translateY(0); }
.cookie-notice-icon { color: #D4AF37; flex-shrink: 0; }
.cookie-notice-content { flex: 1; line-height: 1.6; }

.cookie-notice-btn {
  background: #D4AF37;
  color: #050E1F;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.cookie-notice-btn:hover { background: #C5A028; }

.contact-form-error {
  color: #EF4444;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.contact-form-error.show { display: block; }

.contact-form input.is-invalid,
.contact-form textarea.is-invalid { border-color: #EF4444 !important; }

.form-loading { pointer-events: none; opacity: 0.7; }

.form-success-message {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.form-error-message {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.newsletter-message { margin-top: 10px; font-size: 13px; min-height: 20px; }
.newsletter-message.success { color: #10B981; }
.newsletter-message.error { color: #EF4444; }

.comment-reply-btn {
  background: transparent;
  border: none;
  color: #B08D1A;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: color 0.2s;
  padding: 0;
  min-height: auto;
  min-width: auto;
}

.comment-reply-btn:hover { color: #D4AF37; }
.comments-loading { text-align: center; padding: 20px; color: #6B7280; font-size: 14px; }

.social-share { display: flex; gap: 8px; align-items: center; }

.social-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  text-decoration: none;
}

.social-share-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15); }
.social-share-twitter { background: #1DA1F2; }
.social-share-linkedin { background: #0A66C2; }
.social-share-whatsapp { background: #25D366; }
.social-share-telegram { background: #229ED9; }
.social-share-copy { background: #6B7280; }

.related-post-card { transition: all 0.3s; cursor: pointer; }
.related-post-card:hover { transform: translateY(-4px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6B7280;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s;
  min-height: auto;
  min-width: auto;
}

.breadcrumb a:hover { color: #D4AF37; }
.breadcrumb-sep { color: #D1D5DB; }
.breadcrumb-current { color: #B08D1A; font-weight: 600; }

.search-empty { padding: 60px 20px; text-align: center; color: #6B7280; }
.search-empty svg { width: 64px; height: 64px; color: #D1D5DB; margin: 0 auto 16px; }

mark.highlight {
  background: #FBF2D5;
  color: #8F7113;
  padding: 2px 4px;
  border-radius: 4px;
}

#back-to-top { transition: all 0.3s; }
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.skip-link {
  position: absolute;
  top: -100px;
  right: 20px;
  background: #D4AF37;
  color: #050E1F;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus { top: 20px; }

*:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }

@media print {
  header, footer, .fixed, #back-to-top, .social-share, .site-popup-overlay, .cookie-notice { display: none !important; }
  body { background: white; }
  .article-content { font-size: 12pt; }
}