@import "tailwindcss";

@theme {
  --font-sans: var(--font-vazir), "Vazirmatn", Tahoma, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 92% 4%, rgba(13, 128, 98, 0.07), transparent 28%),
    radial-gradient(circle at 5% 92%, rgba(234, 166, 26, 0.065), transparent 24%),
    linear-gradient(180deg, #f9fbf8 0%, #f0f5f1 54%, #edf3ef 100%);
  background-attachment: fixed;
  color: #172f28;
}

/* اسکرول‌بار ظریف */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef3ec; }
::-webkit-scrollbar-thumb { background: linear-gradient(#047857, #065f46); border-radius: 8px; border: 2px solid #eef3ec; }

::selection { background: #fbbf24; color: #064e3b; }

/* ---------- بافت و تزئینات ---------- */
.pattern-dots {
  background-image: radial-gradient(rgba(6, 78, 59, 0.14) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.pattern-hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(251, 191, 36, 0.16), transparent 60%),
    radial-gradient(800px 420px at 5% 110%, rgba(16, 185, 129, 0.18), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(6, 78, 59, 0.55), rgba(4, 47, 35, 0.92)),
    linear-gradient(135deg, #064e3b, #022c22);
}
.arabesque {
  background-image:
    repeating-linear-gradient(45deg, rgba(251, 191, 36, 0.05) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-45deg, rgba(251, 191, 36, 0.05) 0 2px, transparent 2px 18px);
}

/* ---------- انیمیشن‌ها ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes floaty {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-9px) }
}
@keyframes tickerIn {
  0% { opacity: 0; transform: translateY(100%) }
  12%, 88% { opacity: 1; transform: translateY(0) }
  100% { opacity: 1; transform: translateY(0) }
}
@keyframes slideZoom {
  from { transform: scale(1.06) }
  to { transform: scale(1) }
}
@keyframes popIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.95) }
  100% { opacity: 1; transform: translateY(0) scale(1) }
}
@keyframes shimmer {
  0% { background-position: -500px 0 }
  100% { background-position: 500px 0 }
}
@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45) }
  50% { box-shadow: 0 0 0 12px rgba(251, 191, 36, 0) }
}
.anim-fade-up { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both }
.anim-fade-in { animation: fadeIn 0.6s ease both }
.anim-float { animation: floaty 5s ease-in-out infinite }
.anim-pop { animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both }
.anim-slide-zoom { animation: slideZoom 6s ease-out both }
.anim-pulse-soft { animation: pulseSoft 2.4s ease-in-out infinite }
.d1 { animation-delay: 0.08s } .d2 { animation-delay: 0.16s } .d3 { animation-delay: 0.24s } .d4 { animation-delay: 0.32s }

/* اطلاعیه چرخان */
.ticker-item { animation: tickerIn 4.2s ease both }

/* کارت گلس */
.glass {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* دکمه خانوادهٔ طلایی */
.btn-gold {
  background: linear-gradient(135deg, #a85b00, #713b00);
  color: #fff !important;
  box-shadow: 0 6px 18px -6px rgba(113, 59, 0, 0.5);
}
.btn-gold:hover { filter: brightness(1.08); }

/* قاب لوح سپاس */
.cert-frame {
  border: 3px solid #b45309;
  outline: 6px double rgba(180, 83, 9, 0.4);
  outline-offset: 6px;
  background:
    radial-gradient(600px 200px at 50% -10%, rgba(251, 191, 36, 0.18), transparent),
    #fffdf5;
}

/* چاپ کارنامه */
@media print {
  body { background: white !important; }
  .no-print { display: none !important; }
  .print-card { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* جدول ریزشکلاتی */
input[type="datetime-local"] { direction: ltr; text-align: right; }

/* گرید برنامهٔ هفتگی */
.sched-cell { transition: 0.15s; }
.sched-cell:focus { border-color: #059669; }

/* ---------- نسخهٔ نهایی فوق‌خوانا ---------- */
body {
  background: #f1f4f2 !important;
  color: #111827 !important;
}
.glass, [class*="bg-white"] {
  color: #111827;
  border-color: #aebdb7 !important;
}
:where(.glass, [class*="bg-white"]) :where(p, label, li, summary, td, th, small):not([class*="text-white"]) {
  color: #374151 !important;
  opacity: 1 !important;
}
:where(.glass, [class*="bg-white"]) :where(h1, h2, h3, h4, strong):not([class*="text-white"]) {
  color: #052e24 !important;
  opacity: 1 !important;
}
.btn-gold {
  color: #fff !important;
  background: linear-gradient(135deg, #854900, #663700) !important;
}
input, select, textarea {
  background-color: #fff !important;
  color: #111827 !important;
  border-color: #7b9188 !important;
  -webkit-text-fill-color: #111827 !important;
}
input::placeholder, textarea::placeholder {
  color: #4b5563 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #4b5563 !important;
}
[class*="text-emerald-800/"], [class*="text-emerald-900/"] { color: #374151 !important; opacity: 1 !important; }
[class*="text-amber-800/"] { color: #684000 !important; opacity: 1 !important; }
.pattern-hero, .pattern-hero :where(h1, h2, h3, p, span, a) { color: #fff !important; opacity: 1 !important; }
.pattern-hero [class*="text-emerald-100/"] { color: #f0fff9 !important; }
.pattern-hero [class*="text-white"] { color: #fff !important; }

@media (prefers-contrast: more) {
  body { color: #000 !important; background: #fff !important; }
  .glass, [class*="bg-white"] { border-color: #111 !important; }
}

/* رنگ اختصاصی سه متن بالای صفحهٔ اصلی */
.home-public-header {
  background: linear-gradient(145deg, #f8fbff 0%, #eaf3fb 52%, #f4f8f6 100%) !important;
  color: #111827 !important;
  border-bottom: 1px solid #b9cbd8;
}
.home-public-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(45deg, rgba(11, 58, 120, 0.035) 25%, transparent 25%, transparent 75%, rgba(11, 58, 120, 0.035) 75%);
  background-size: 34px 34px;
}
.home-public-header .site-eyebrow {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}
.home-public-header .site-eyebrow svg { color: #073b7a !important; }
.home-public-header .site-school-title {
  color: #073b7a !important;
  -webkit-text-fill-color: #073b7a !important;
  text-shadow: none !important;
}
.home-public-header .site-motto {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}
.home-public-header [class*="bg-white/10"] {
  color: #073b7a !important;
  background: #fff !important;
  border: 1px solid #9db7ce !important;
}
.home-public-header [class*="bg-white/10"] svg { color: #073b7a !important; }
