/* ========================================
   Sinapax PACS - Marp Theme (Optimized)
   Brand Colors: #0056a7 (Blue), #2c3e50 (Dark)
   ======================================== */

/* ===== FONT IMPORTS ===== */
@font-face {
  font-family: 'IRANSansWeb';
  src: url('/assets/fonts/IRANSansWeb.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'BTitrBd';
  src: url('/assets/fonts/BTitrBd.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'BNazanin';
  src: url('/assets/fonts/BNazanin.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'IranSansDN';
  src: url('/assets/fonts/iransansdn.woff2') format('woff2');
  font-display: swap;
}

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

section {
  font-family: 'IRANSansWeb', 'Segoe UI', sans-serif;
  direction: rtl;
  background: linear-gradient(135deg, #f8f5e8 0%, #ffffff 100%);
  color: #2c3e50;
  font-size: 1.1rem;
  line-height: 1.8;
  padding: 5px 60px;
  animation: fadeIn 0.5s ease-out;
}

/* ===== HEADINGS ===== */
h1 {
  font-family: 'BTitrBd', 'IRANSansWeb', sans-serif;
  font-size: 3rem;
  color: #0056a7;
  margin-bottom: 10px;
  text-align: center;
}

h2 {
  font-family: 'BTitrBd', 'IRANSansWeb', sans-serif;
  font-size: 2.2rem;
  color: #0056a7;
  border-bottom: 4px solid #0056a7;
  padding-bottom: 12px;
  margin-bottom: 5px;
  margin-top: 10px;
}

h3 {
  font-family: 'BTitrBd', 'IRANSansWeb', sans-serif;
  font-size: 1.6rem;
  color: #2c3e50;
  margin: 10px 0 0px 0;
}

h4 {
  font-family: 'IRANSansWeb', sans-serif;
  font-size: 1.3rem;
  color: #0056a7;
  font-weight: bold;
  margin: 15px 0 8px 0;
}

/* ===== TEXT ===== */
p {
  font-size: 1.4rem;
  padding-right: 10px;
  text-align: justify;
}

ul, ol {
  font-size: 1.3rem;
  padding-right: 40px;
}

ul {
  padding-bottom: 20px;
}

a {
  color: #0056a7;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

a:hover {
  border-bottom-color: #0056a7;
}

/* ===== LEAD SLIDE ===== */
section.lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

section.lead h1 {
  font-size: 4rem;
  margin-bottom: 10px;
}

section.lead h2 {
  font-family: 'BNazanin', 'IRANSansWeb', sans-serif;
  font-size: 2.5rem;
  color: #2c3e50;
  border-bottom: none;
  margin-bottom: 5px;
}

section.lead p {
  font-family: 'IranSansDN', 'IRANSansWeb', sans-serif;
  font-size: 1.4rem;
  color: #555;
  text-align: center;
}

/* ===== TABLES ===== */
table {
  font-size: 0.95rem;
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
}

th {
  background: #0056a7;
  color: #ffffff;
  font-weight: bold;
  padding: 12px 18px;
  text-align: center;
}

td {
  padding: 10px 18px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

tr:nth-child(even) { background: #f8f9fa; }
tr:hover { background: #eef5fb; }

/* ===== IMAGES ===== */
img {
  max-width: 90%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(100, 100, 50, 0.1);
  padding: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* ===== CODE ===== */
code {
  font-family: 'Courier New', monospace;
  background: #f1f3f5;
  padding: 2px 10px;
  border-radius: 6px;
  color: #0056a7;
}

pre {
  background: #f1f3f5;
  padding: 15px 20px;
  border-radius: 10px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-size: 0.9rem;
}

/* ===== BLOCKQUOTE ===== */
blockquote {
  font-family: 'BNazanin', 'IRANSansWeb', sans-serif;
  font-size: 1.3rem;
  color: #2c3e50;
  border-right: 6px solid #0056a7;
  padding: 15px 25px;
  margin: 20px 0;
  background: #f0f7ff;
  border-radius: 8px;
}

/* ===== PAGE NUMBER ===== */
section::after {
  font-size: 0.85rem;
  color: #adb5bd;
  content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
}

/* ===== LAYOUTS ===== */

/* Two Column */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  height: 72vh;
  margin-top: 5px;
}

.columns .right img {
  max-width: 100%;
  max-height: 72vh;
}

/* Full Image */
section.full-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

section.full-image img {
  max-width: 90%;
  max-height: 75vh;
}

/* Horizontal (Text above, Image below) */
section.horizontal {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

section.horizontal .content {
  text-align: center;
  margin-bottom: 20px;
}

section.horizontal .content h2 {
  border-bottom: none;
  margin-bottom: 5px;
}

section.horizontal .content p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 0;
}

section.horizontal img {
  max-width: 90%;
  max-height: 55vh;
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section {
    padding: 25px 30px;
    font-size: 1rem;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  table { font-size: 0.8rem; }
  td, th { padding: 6px 10px; }
  img { max-width: 100%; }
}

/* ===== PRINT ===== */
@media print {
  section {
    background: #ffffff !important;
  }

  img, .pain-point, .solution-point, .box {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}