/* ============================================================
   استایل‌های سفارشی قالب کاشف
   ترکیبی از استایل‌های سایت و تقویم (استخراج‌شده از index.html اپ‌ها)
   ============================================================ */

body {
  font-family: 'Vazirmatn', sans-serif;
  scroll-behavior: smooth;
  margin: 0;
  overflow-x: hidden;
}

/* فاصله اسکرول منو تا زیر هدر ثابت */
#home,
#services,
#about,
#stats,
#contact {
  scroll-margin-top: 5.5rem;
}

/* --- عمومی سایت --- */
.glass-effect {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(88, 28, 135, 0.1);
}
.text-royal-purple { color: var(--kashef-primary); }
.bg-royal-purple { background-color: var(--kashef-primary); }
.hover-purple:hover { color: var(--kashef-accent); }

/* --- تقویم: افکت شیشه‌ای --- */
.glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* --- انیمیشن ورق خوردن تقویم --- */
.flip-container { perspective: 2000px; }

@keyframes real-page-flip {
  0%   { transform: rotateX(-95deg); opacity: 0; transform-origin: top; }
  100% { transform: rotateX(0deg);   opacity: 1; transform-origin: top; }
}
.page-flip-active {
  animation: real-page-flip 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
  backface-visibility: hidden;
}

/* --- سیم‌های فلزی تقویم --- */
.spiral-ring {
  width: 14px;
  height: 44px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 50%, #9ca3af 100%);
  box-shadow:
    1px 3px 6px rgba(0,0,0,0.1),
    inset -1px -1px 2px rgba(0,0,0,0.1),
    inset 1px 1px 2px rgba(255,255,255,0.9);
  position: relative;
  z-index: 40;
  opacity: 0.9;
}
.spiral-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 15%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  border-radius: 20px 20px 0 0;
}
.spiral-hole {
  width: 18px;
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

/* --- انیمیشن‌های شناور فصلی --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-15px); }
}
.floating { animation: float 8s ease-in-out infinite; }

@keyframes floating-element {
  0%   { transform: translate(0, 0) rotate(0deg); }
  33%  { transform: translate(30px, -50px) rotate(10deg); }
  66%  { transform: translate(-20px, 20px) rotate(-10deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.floating-element { animation: floating-element infinite ease-in-out; }

/* --- اسکرول‌بار سفارشی --- */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}

/* --- ریشه اپ‌ها تمام‌عرض --- */
#root { min-height: 60vh; }

/* پنهان‌کردن نوار مدیریت وردپرس روی صفحات اپ در صورت نیاز (اختیاری) */

/* ========== اسلایدر ========== */
.kashef-slider {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 2.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
}
@media (min-width: 640px) { .kashef-slider { height: 400px; } }
@media (min-width: 768px) { .kashef-slider { height: 500px; } }

.kashef-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.kashef-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.kashef-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.kashef-slide-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.18) 45%, transparent);
}
.kashef-slide-caption {
  position: absolute;
  right: 2.5rem;
  bottom: 3rem;
  z-index: 2;
  text-align: right;
  color: #fff;
}
.kashef-slide-kicker {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.kashef-slide-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  text-shadow: 0 8px 24px rgba(0,0,0,.45);
}
@media (min-width: 768px) {
  .kashef-slide-title { font-size: 1.875rem; }
}
.kashef-slide-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 1.25rem;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .3s;
}
.kashef-slider:hover .kashef-slide-nav { opacity: 1; }
.kashef-slide-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.kashef-slide-btn:hover { background: rgba(255,255,255,.4); }
.kashef-slide-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.kashef-slide-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: all .4s;
}
.kashef-slide-dot.is-active {
  width: 28px;
  background: #fff;
}

/* ========== لوگو ========== */
.kashef-header-bar {
  min-height: 88px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}
.kashef-logo {
  display: block;
  object-fit: contain;
  object-position: center right;
  background: transparent;
}
.kashef-logo:not([src]),
.kashef-logo[src=""] {
  display: none;
}
.kashef-logo-header {
  height: 68px;
  width: auto;
  max-width: 320px;
}
.kashef-logo-footer,
.kashef-logo-cal {
  height: 88px;
  width: auto;
  max-width: 360px;
  margin-bottom: 8px;
}
@media (max-width: 767px) {
  .kashef-header-bar { min-height: 72px; }
  .kashef-logo-header { height: 54px; max-width: 220px; }
  .kashef-logo-footer,
  .kashef-logo-cal { height: 72px; max-width: 280px; }
}

/* دکمه بازگشت به بالا — فقط موبایل */
.kashef-back-top {
  display: none;
}
@media (max-width: 767px) {
  .kashef-back-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 55;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: #581c87;
    color: #fff;
    box-shadow: 0 10px 25px rgba(88, 28, 135, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .kashef-back-top svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  .kashef-back-top:active {
    transform: scale(0.94);
    background: #4c1d95;
  }
}
