/* Modern Medical Slider Styles - Minimal Classic Edition */
:root{
  --bg:#0a0f2a; /* پس‌زمینه آبی خیلی پر رنگ و تیره */
  --glass: rgba(255,255,255,0.10);
  --accent:#22d3ee; /* سیان */
  --accent-2:#60a5fa; /* آبی */
  --warning:#fbbf24; /* زرد تماس */
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Prevent white flash on slider load */
#persian-slider {
  min-height: 100vh;
  display: block;
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  overflow: hidden !important;
}

/* اسلایدر */
.slider{
  position: relative; 
  overflow: hidden; 
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent !important; /* حذف پس‌زمینه */
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Vazirmatn", "IRANSans", sans-serif;
  contain: layout style paint;
  transform: translateZ(0); /* Hardware acceleration */
  opacity: 1 !important;
  visibility: visible !important;
}

.slide{
  position: absolute; 
  inset: 0; 
  display: grid; 
  grid-template-columns: 1fr 1fr; /* Fixed desktop layout - equal columns */
  gap: 3rem; /* Increased gap for better desktop spacing */
  align-items: center; 
  padding: clamp(16px, 4vw, 48px); 
  opacity: 0; 
  pointer-events: none;
  z-index: 2;
  transform: translateZ(0); /* Hardware acceleration */
  will-change: opacity, transform;
  contain: layout style paint;
  background: transparent !important; /* حذف پس‌زمینه */
  transition: opacity 0.5s ease-in-out;
}

.slide.active{
  opacity: 1; 
  pointer-events: auto;
}

/* کارت متن گلس مورفیسم */
.card{
  background: rgba(255,255,255,0.1); 
  border: 1px solid rgba(255,255,255,0.08); 
  border-radius: 24px; 
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  padding: clamp(16px, 2.5vw, 28px);
  max-width: 100%; /* Allow full width on desktop */
  margin: 0; /* Remove auto margin */
  position: relative;
  z-index: 10;
  transform: translateZ(0); /* Hardware acceleration */
  will-change: transform, opacity;
  contain: layout style paint;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0,0,0,.4);
}

.card h2{
  font-weight: 800; 
  font-size: clamp(22px, 3.2vw, 40px); 
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); 
  -webkit-background-clip: text; 
  background-clip: text; 
  color: transparent;
  margin-bottom: 1rem;
  contain: layout style paint;
}

.card p{
  line-height: 2; 
  color: #e5efff;
  margin-bottom: 1rem;
  contain: layout style paint;
}

.card .text-sm {
  font-size: 0.875rem;
}

.card .font-semibold {
  font-weight: 600;
}

.card .text-sky-300 {
  color: #7dd3fc;
}

.card .text-cyan-300 {
  color: #67e8f9;
}

.card .text-amber-300 {
  color: #fcd34d;
}

.card .border {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card .rounded-xl {
  border-radius: 0.75rem;
}

.card .p-3 {
  padding: 0.75rem;
}

.card .font-bold {
  font-weight: 700;
}

.card .grid {
  display: grid;
}

.card .gap-3 {
  gap: 0.75rem;
}

/* Simple FNA Slider Styles */
.service-description {
  text-align: center;
  margin-bottom: 1.5rem;
}

.service-description > p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e5efff;
  margin: 0 0 0.5rem 0;
}

/* Contact info styling - smaller boxes */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.contact-card h4 {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-weight: 600;
}

.contact-card p {
  font-size: 0.7rem;
  margin-bottom: 0.1rem;
  line-height: 1.2;
  color: #e5efff;
}

/* Mobile Responsive for Simple FNA */
@media (max-width: 768px) {
  .service-description > p {
    font-size: 1.19rem;
  }
  
  .contact-card {
    padding: 0.6rem;
  }
  
  .contact-card h4 {
    font-size: 1.05rem;
  }
  
  .contact-card p {
    font-size: 0.91rem;
  }
}

@media (max-width: 480px) {
  .service-description > p {
    font-size: 1.12rem;
  }
  
  .contact-card {
    padding: 0.5rem;
  }
  
  .contact-card h4 {
    font-size: 0.98rem;
  }
  
  .contact-card p {
    font-size: 0.84rem;
  }
}



/* Mobile Responsive for FNA sections */
@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .step {
    padding: 0.5rem;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .fna-benefits,
  .preparation-note,
  .process-note,
  .recovery-time {
    padding: 0.5rem;
  }
  
  .fna-benefits li,
  .preparation-checklist li,
  .aftercare-instructions li {
    font-size: 0.9rem;
  }
  

}

/* مدیای کناری (SVG) */
.media-wrap{
  position: relative; 
  min-height: 400px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; /* Remove padding that might cause white space */
  contain: layout style paint;
  border: none;
  outline: none;
  transition: transform 0.3s ease;
}

.media-wrap:hover {
  transform: none;
}

.media{
  position: relative; 
  width: 100%; 
  height: auto;
  max-width: 100%; 
  max-height: 80vh;
  margin-inline: auto; 
  filter: none; /* Remove drop shadow */
  object-fit: contain;
  transform: translateZ(0); /* Hardware acceleration */
  will-change: transform, opacity;
  contain: layout style paint;
  border: none;
  outline: none;
  transition: transform 0.3s ease;
}

.media:hover {
  transform: none;
}

/* Image specific styles */
.media[src*=".png"], .media[src*=".jpg"], .media[src*=".jpeg"], .media[src*=".webp"] {
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none; /* Remove white border */
  transform: translateZ(0); /* Hardware acceleration */
  will-change: transform;
}

.media[src*=".png"]:hover, .media[src*=".jpg"]:hover, .media[src*=".jpeg"]:hover, .media[src*=".webp"]:hover {
  transform: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

/* دکمه‌ها */
.nav-btn{
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  width: 44px; 
  height: 44px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1); 
  border: 1px solid rgba(255,255,255,.2); 
  cursor: pointer; 
  transition: all 0.3s ease;
  z-index: 100;
  transform: translateZ(0); /* Hardware acceleration */
  will-change: background-color, transform;
  contain: layout style paint;
}

.nav-btn:hover{
  background: rgba(255,255,255,.2);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.prev{
  right: 14px;
}

.next{
  left: 14px;
}

/* Desktop Indicators - دایره‌های انتخاب اسلاید برای دسکتاپ */
.desktop-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: none; /* مخفی در حالت پیش‌فرض */
  gap: 12px;
  z-index: 100;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.desktop-indicator:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.desktop-indicator.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.desktop-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
}

.desktop-indicator.active::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ریسپانسیو */
@media (max-width: 1024px){
  .slide:not(:first-child){
    grid-template-columns: 1fr; 
    gap: 1.25rem;
  }
  .media{
    max-width: 100%;
    max-height: 60vh;
  }
  .slide:not(:first-child) .card{
    max-width: 95%;
    margin: 0 auto;
  }
  
  /* Hide desktop indicators on tablet and mobile */
  .desktop-indicators {
    display: none !important;
  }
}

@media (max-width: 640px){
  .slide{
    padding: 16px 14px 72px;
  }
  .media{
    max-width: 340px;
  }
  .dots{
    bottom: 12px;
  }
}

/* Center content on first slide for large screens */
@media (min-width: 1024px) {
  .slide:first-child {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
  }
  
  .slide:first-child .media-wrap {
    display: none;
  }
  
  .slide:first-child .card {
    max-width: 60%; /* کاهش عرض برای تناسب بهتر */
    margin: 0 auto;
    padding: clamp(32px, 5vw, 64px); /* افزایش padding برای ظاهر بهتر */
  }
  
  .slide:first-child .card h2 {
    font-size: clamp(32px, 4.5vw, 56px); /* افزایش اندازه فونت */
    margin-bottom: 2rem;
    line-height: 1.2;
  }
  
  .slide:first-child .card .subtitle {
    font-size: clamp(20px, 3vw, 28px); /* افزایش اندازه subtitle */
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.4;
  }
  
  .slide:first-child .card p {
    font-size: clamp(18px, 2vw, 22px); /* افزایش اندازه متن */
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }
  
  .slide:first-child .card .service-description > p {
    font-size: clamp(18px, 2vw, 22px) !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
  }
  
  .slide:first-child .card .contact-info {
    margin-top: 2rem !important;
    gap: 1rem !important;
  }
  
  .slide:first-child .card .contact-card {
    padding: 1rem !important;
  }
}

/* Fix for small desktop screens (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .slide:first-child {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    padding: clamp(20px, 3vw, 40px);
  }
  
  .slide:first-child .media-wrap {
    display: none;
  }
  
  .slide:first-child .card {
    max-width: 80%;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px);
  }
  
  .slide:first-child .card h2 {
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 1.5rem;
    line-height: 1.2;
  }
  
  .slide:first-child .card .subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.4;
  }
  
  .slide:first-child .card p {
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }
  
  .slide:first-child .card .service-description > p {
    font-size: clamp(16px, 1.8vw, 20px) !important;
    line-height: 1.6 !important;
    margin-bottom: 0.75rem !important;
  }
  
  .slide:first-child .card .contact-info {
    margin-top: 1.5rem !important;
    gap: 0.75rem !important;
  }
  
  .slide:first-child .card .contact-card {
    padding: 0.75rem !important;
  }
}
  
  .slide:first-child .card .contact-card h4 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .slide:first-child .card .contact-card p {
    font-size: 0.9rem !important;
    margin-bottom: 0.3rem !important;
  }
}

/* Desktop-specific improvements */
@media (min-width: 1025px) {
  .slide {
    grid-template-columns: 1fr 1fr; /* Equal columns for better balance */
    gap: 4rem; /* More spacing on desktop */
    padding: clamp(24px, 5vw, 64px);
  }
  
  .card {
    padding: clamp(24px, 3vw, 36px);
    max-width: 100%;
  }
  
  .card h2 {
    font-size: clamp(28px, 3.5vw, 48px);
    margin-bottom: 1.5rem;
  }
  
  .card p {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.8;
  }
  
  .media-wrap {
    min-height: 500px;
  }
  
  .media {
    max-height: 70vh;
  }
  
  .nav-btn {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }
  
  .nav-btn.prev {
    right: 24px;
  }
  
  .nav-btn.next {
    left: 24px;
  }
  
  /* Desktop indicators styling */
  .desktop-indicators {
    bottom: 40px;
    gap: 16px;
    padding: 16px 24px;
  }
  
  .desktop-indicator {
    width: 16px;
    height: 16px;
  }
  
  .desktop-indicator::before {
    width: 8px;
    height: 8px;
  }
}

/* CRITICAL: Desktop overrides for mobile classes */
@media (min-width: 769px) {
  /* Override mobile slide classes on desktop */
  .mobile-slide {
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
    padding: clamp(16px, 4vw, 48px) !important;
    padding-top: 0 !important;
    align-items: center !important;
    justify-items: stretch !important;
  }
  
  .mobile-card {
    max-width: 100% !important;
    margin: 0 !important;
    padding: clamp(16px, 2.5vw, 28px) !important;
    border-radius: 24px !important;
  }
  
  .mobile-card h2 {
    font-size: clamp(22px, 3.2vw, 40px) !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  .mobile-card .subtitle {
    font-size: clamp(18px, 2.5vw, 24px) !important;
    margin-bottom: 1rem !important;
  }
  
  .mobile-card p {
    font-size: clamp(16px, 1.5vw, 18px) !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
  }
  
  .mobile-media-wrap {
    min-height: 400px !important;
    max-height: 80vh !important;
    margin-top: 0 !important;
  }
  
  .mobile-media {
    max-height: 80vh !important;
    border-radius: 20px !important;
  }
  
  .mobile-nav-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
  }
  
  .mobile-nav-btn.prev {
    right: 14px !important;
    left: auto !important;
  }
  
  .mobile-nav-btn.next {
    left: 14px !important;
    right: auto !important;
  }
  
  .mobile-indicators {
    position: absolute !important;
    bottom: 1rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 10px !important;
    z-index: 100 !important;
    padding: 0.5rem !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .mobile-indicator {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 6px !important;
    margin: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
  }
  
  .mobile-indicator.active {
    background: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.2) !important;
  }
  
  .mobile-indicator:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.1) !important;
  }
  
  .mobile-progress-container {
    display: none !important;
  }
  
  /* Show desktop indicators */
  .desktop-indicators {
    display: flex !important;
  }
  
  /* Override any conflicting styles from other CSS files */
  html body #persian-slider .slider .slide .card .service-description {
    text-align: center !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Special styling for first slide on desktop */
  html body #persian-slider .slider .slide:first-child .card {
    max-width: 60% !important;
    margin: 0 auto !important;
    padding: clamp(32px, 5vw, 64px) !important;
  }
  
  html body #persian-slider .slider .slide:first-child .card h2 {
    font-size: clamp(32px, 4.5vw, 56px) !important;
    margin-bottom: 2rem !important;
    line-height: 1.2 !important;
  }
  
  html body #persian-slider .slider .slide:first-child .card .subtitle {
    font-size: clamp(20px, 3vw, 28px) !important;
    margin-bottom: 2.5rem !important;
    line-height: 1.4 !important;
  }
  
  html body #persian-slider .slider .slide:first-child .card .service-description > p {
    font-size: clamp(18px, 2vw, 22px) !important;
    line-height: 1.8 !important;
    margin-bottom: 1rem !important;
  }
  
  html body #persian-slider .slider .slide .card .service-description > p {
    font-size: clamp(16px, 1.5vw, 18px) !important;
    line-height: 1.8 !important;
    color: #e5efff !important;
    margin: 0 0 0.5rem 0 !important;
  }
  
  html body #persian-slider .slider .slide .card .contact-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
  }
  
  html body #persian-slider .slider .slide .card .contact-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }
  
  html body #persian-slider .slider .slide .card .contact-card h4 {
    font-size: 0.8rem !important;
    margin-bottom: 0.2rem !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
  }
  
  html body #persian-slider .slider .slide .card .contact-card p {
    font-size: 0.7rem !important;
    margin-bottom: 0.1rem !important;
    line-height: 1.2 !important;
    color: #e5efff !important;
  }
}

/* Minimal classic animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply minimal animations */
.slide.active .card {
  animation: fadeInUp 0.8s ease-out;
}

.slide.active .media-wrap {
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.slide.active .media {
  animation: fadeInScale 0.8s ease-out 0.4s both;
}

/* Smooth transitions */
.slide {
  transition: opacity 0.5s ease-in-out;
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn {
  transition: all 0.3s ease;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .slide,
  .card,
  .media,
  .nav-btn {
    transition: none !important;
    animation: none !important;
  }
}

/* Optimize for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card {
    border-width: 0.5px;
  }
  
  .nav-btn {
    border-width: 0.5px;
  }
}
