/* style.css - Scoped to avoid Elementor/Theme conflicts */

/* Target the wrapper and its descendants instead of the entire global root */
#drtalavari-site,
#drtalavari-site * {
  box-sizing: border-box;
}

/* We target the wrapper itself to act as the "body" substitute 
   so it doesn't break Elementor's actual global body styles.
*/
#drtalavari-site {
  font-family: 'Vazirmatn', sans-serif;
  background: #fafaf7;
  color: #2d2d2d;
  line-height: 1.9;
}

#drtalavari-site a {
  text-decoration: none;
}

#drtalavari-site .section {
  padding: 70px 8%;
}

/* NAVBAR */
/* =========================
   NAVBAR
========================= */

#drtalavari-site .navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 8%;
  position: relative;
  z-index: 1000;
}

#drtalavari-site .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#drtalavari-site .logo img {
  display: block;
  height: 100px;
  width: auto;
  object-fit: contain;
  transition: transform .3s ease;
}

#drtalavari-site .logo img:hover {
  transform: scale(1.05);
}

#drtalavari-site .nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#drtalavari-site .nav-links li {
  margin: 0;
  padding: 0;
}

#drtalavari-site .nav-links a {
  color: #444;
  font-size: 15px;
  transition: .3s;
  display: block;
}

#drtalavari-site .nav-links a:hover {
  color: #7aaf75;
}

#drtalavari-site .menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 34px;
  color: #5d3c73;
  line-height: 1;
  padding: 0;
}

/* HERO */

#drtalavari-site .hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #edf6ea, #fff8d8, #f3e9ff);
  overflow: hidden;
}

#drtalavari-site .hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 50px 8%;
}

#drtalavari-site .badge {
  background: #dff1d8;
  color: #5d8a58;
  padding: 10px 20px;
  border-radius: 40px;
  display: inline-block;
  margin-bottom: 25px;
  font-size: 14px;
}

#drtalavari-site .hero-text {
  position: relative;
  top: -80px;
}

#drtalavari-site .hero-text h1 {
  font-size: 64px;
  line-height: 1.3;
  color: #5d3c73;
  margin-bottom: 25px;
}

#drtalavari-site .hero-text p {
  font-size: 18px;
  color: #555;
  margin-bottom: 35px;
  max-width: 600px;
}

#drtalavari-site .hero-buttons {
  display: flex;
  gap: 20px;
}

#drtalavari-site .btn-primary {
  background: #7aaf75;
  color: white;
  padding: 14px 34px;
  border-radius: 14px;
  transition: .3s;
}

#drtalavari-site .btn-primary:hover {
  transform: translateY(-3px);
}

#drtalavari-site .btn-secondary {
  border: 1px solid #5d3c73;
  color: #5d3c73;
  padding: 14px 34px;
  border-radius: 14px;
}

/* HERO IMAGE */

#drtalavari-site .hero-image {
  display: flex;
  justify-content: center;
}

#drtalavari-site .image-card {
  width: 420px;
  height: 560px;
  border-radius: 40px;
  background: url('https://drtalavari.ir/wp-content/uploads/2026/06/face.webp');
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* SECTION TITLE */

#drtalavari-site .section-title {
  text-align: center;
  margin-bottom: 60px;
}

#drtalavari-site .section-title span {
  color: #7aaf75;
  font-size: 15px;
}

#drtalavari-site .section-title h2 {
  font-size: 42px;
  color: #5d3c73;
  margin-top: 10px;
}

/* ABOUT */

#drtalavari-site .about-box {
  background: white;
  padding: 50px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  max-width: 900px;
  margin: auto;
}

/* ==========================================
   CLEAN LUXURY SLIDER SYSTEM (FIXED)
========================================== */
#drtalavari-site .premium-services {
  padding: 120px 0;
  background-color: #faf9f6;
  direction: rtl;
  overflow: hidden; 
}

#drtalavari-site .luxury-header {
  text-align: center;
  margin-bottom: 70px;
}

#drtalavari-site .luxury-subtitle {
  font-family: sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #7aaf75;
  display: block;
  margin-bottom: 15px;
}

#drtalavari-site .luxury-title {
  font-size: 36px;
  color: #3a224a;
  font-weight: 700;
}

#drtalavari-site .luxury-title-h4 {
  font-size: 24px;
  color: #3a224a;
  font-weight: 700;
}

/* Swiper Container Fixes */
#drtalavari-site .luxury-swiper {
  width: 100%;
  padding: 0 10% 90px 10% !important; 
  box-sizing: border-box;
  position: relative;
}

/* Card Resiliency */
#drtalavari-site .editorial-card {
  height: auto !important; 
  box-sizing: border-box;
  text-align: right; 
}

#drtalavari-site .card-media {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  border-radius: 10px;
}

#drtalavari-site .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#drtalavari-site .media-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(58,34,74,0) 50%, rgba(58,34,74,0.4) 100%);
  opacity: 0.6;
}

#drtalavari-site .editorial-num {
  position: absolute;
  top: 25px; left: 25px;
  font-family: serif;
  font-size: 20px;
  color: #fff;
  opacity: 0.6;
}

#drtalavari-site .card-content {
  padding: 25px 5px 0 5px;
}

#drtalavari-site .card-content h3 {
  font-size: 24px;
  color: #3a224a;
  margin-bottom: 8px;
  font-weight: 700;
}

#drtalavari-site .service-tag {
  font-size: 11px;
  color: #7aaf75;
  display: block;
  margin-bottom: 15px;
}

#drtalavari-site .card-description {
  font-size: 14.5px;
  color: #666;
  line-height: 1.9;
  margin-bottom: 25px;
  text-align: justify;
}

#drtalavari-site .editorial-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #3a224a;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

#drtalavari-site .arrow-icon {
  width: 20px;
  height: 24px;
  fill: none;
  stroke: #7aaf75;
  stroke-width: 2;
  transform: scaleX(-1); 
}

/* Controls Alignment */
#drtalavari-site .slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

#drtalavari-site .luxury-pagination.swiper-pagination-progressbar {
  position: relative !important;
  width: 65% !important;
  height: 2px !important;
  background: rgba(93, 60, 115, 0.1) !important;
  top: 0 !important; 
}

#drtalavari-site .luxury-pagination .swiper-pagination-progressbar-fill {
  background: #7aaf75 !important;
}

#drtalavari-site .navigation-buttons {
  display: flex;
  gap: 15px;
}

/* Bulletproof Next/Prev Button Rules */
#drtalavari-site .luxury-next, 
#drtalavari-site .luxury-prev {
  position: static !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  border: 1px solid rgba(58, 34, 74, 0.2);
  border-radius: 50%;
  color: #3a224a !important;
  cursor: pointer;
}

#drtalavari-site .luxury-next::after, 
#drtalavari-site .luxury-prev::after {
  font-size: 14px !important;
  font-family: swiper-icons !important;
}

/* ========================================
   GALLERY SECTION (FIXED & SMOOTHED)
======================================== */

#drtalavari-site .gallery {
    padding: 100px 0;
    width: min(1400px, 92%); /* Ensures alignment within Elementor containers */
    margin: 0 auto;
}

#drtalavari-site .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

#drtalavari-site .gallery-item {
    position: relative;
    overflow: hidden;
    height: 380px; /* Increased slightly for a better visual portrait aspect ratio */
    border-radius: 30px;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.12),
        0 8px 20px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
    background: #e2e8f0; /* Soft fallback background while images load */
}

#drtalavari-site .gallery-item:hover {
    transform: translateY(-6px);
}

/* Base rules for both images inside the item */
#drtalavari-site .gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease, opacity 1s ease-in-out;
}

/* Subtle luxury overlay on top of images */
#drtalavari-site .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(122,175,117,0.1),
        rgba(93,60,115,0.15)
    );
    pointer-events: none;
    z-index: 3; /* Must sit above both images */
}

#drtalavari-site .gallery-item:hover img {
    transform: scale(1.04);
}

/* --- ANIMATION CONTROLS --- */

#drtalavari-site .gallery-item .before {
    z-index: 1;
    animation: drtalavariShowBefore 7s infinite ease-in-out;
}

#drtalavari-site .gallery-item .after {
    z-index: 2;
    animation: drtalavariShowAfter 7s infinite ease-in-out;
}

/* Stagger timings targeting item cards so they don't blend at the exact same fraction of a second */
#drtalavari-site .gallery-grid .gallery-item:nth-child(2) .before,
#drtalavari-site .gallery-grid .gallery-item:nth-child(2) .after {
    animation-delay: 1.5s;
}

#drtalavari-site .gallery-grid .gallery-item:nth-child(3) .before,
#drtalavari-site .gallery-grid .gallery-item:nth-child(3) .after {
    animation-delay: 3s;
}

/* Seamless Crossfade Keyframes */
@keyframes drtalavariShowBefore {
    0%, 40%, 90%, 100% { opacity: 1; }
    50%, 80% { opacity: 0; }
}

@keyframes drtalavariShowAfter {
    0%, 40%, 90%, 100% { opacity: 0; }
    50%, 80% { opacity: 1; }
}

/* CTA */

#drtalavari-site .cta {
  padding: 120px 8%;
}

#drtalavari-site .cta-content {
  background: linear-gradient(135deg, #7aaf75, #5d3c73);
  border-radius: 40px;
  text-align: center;
  padding: 80px 40px;
  color: white;
}

#drtalavari-site .cta-content h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

#drtalavari-site .cta-content p {
  margin-bottom: 35px;
}

/* FOOTER */

#drtalavari-site .footer {
  background: #fff;
  padding: 80px 8% 30px;
}

#drtalavari-site .footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 40px;
  margin-bottom: 40px;
}

#drtalavari-site .footer h3,
#drtalavari-site .footer h4 {
  color: #5d3c73;
  margin-bottom: 15px;
}

#drtalavari-site .copyright {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 25px;
  text-align: center;
  color: #666;
}

/* ===== Gallery Section Specific Fixes ===== */

#drtalavari-site #gallery1 {
  padding: 100px 0;
  background: #f8fafc;
}

#drtalavari-site #gallery1 .gallery-grid1 {
  width: min(1400px, 92%);
  margin: 0 auto;
}

#drtalavari-site #gallery1 .about-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease;
}

#drtalavari-site #gallery1 .about-box:hover {
  transform: translateY(-6px);
}

#drtalavari-site #gallery1 .about-box img {
  display: block;
  width: 100%;
  height: 650px; 
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
}

#drtalavari-site #gallery1 .about-box:hover img {
  transform: scale(1.03);
}


/* ==========================================
   RESPONSIVE / MEDIA QUERIES (SCOPED INSIDE)
========================================== */

@media (max-width: 980px) {
  #drtalavari-site .hero-content {
    grid-template-columns: 1fr;
  }

  #drtalavari-site .hero-text h1 {
    font-size: 46px;
  }

  #drtalavari-site .image-card {
    width: 100%;
    max-width: 420px;
  }

  #drtalavari-site .gallery-grid {
    grid-template-columns: 1fr;
  }


  #drtalavari-site .navbar {
    padding: 20px 5%;
  }

  #drtalavari-site .logo img {
    height: 70px;
  }

  #drtalavari-site .menu-toggle {
    display: block;
  }

  #drtalavari-site .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,.12);
    overflow: hidden;
  }

  #drtalavari-site .nav-links.active {
    display: flex;
  }

  #drtalavari-site .nav-links li {
    width: 100%;
  }

  #drtalavari-site .nav-links a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0,0,0,.05);
    text-align: center;
  }

  #drtalavari-site .nav-links li:last-child a {
    border-bottom: none;
  }
}

@media (max-width: 992px) {
  #drtalavari-site #gallery1 .about-box img {
    height: 500px;
  }
}

@media (max-width: 768px) {
  #drtalavari-site .luxury-swiper {
    padding: 0 5% 60px 5% !important;
  }
  #drtalavari-site .card-media {
    height: 360px;
  }
  #drtalavari-site .slider-controls {
    width: 90%;
    flex-direction: column;
    gap: 25px;
  }
  #drtalavari-site .luxury-pagination.swiper-pagination-progressbar {
    width: 100% !important;
  }
  #drtalavari-site #gallery1 .about-box {
    border-radius: 18px;
  }
  #drtalavari-site #gallery1 .about-box img {
    height: 320px;
  }
}
/* ========================================
   DYNAMIC GALLERY TEXT LABELS
======================================== */

/* Base styling for labels */
#drtalavari-site .gallery-item .label-text {
    position: absolute;
    top: 20px;
    right: 20px; /* Aligned nicely for RTL orientation */
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px); /* Modern subtle glassmorphism effect */
    -webkit-backdrop-filter: blur(4px);
    color: #3a224a; /* Matches your luxury dark tone purple */
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    pointer-events: none; /* Mouse actions drop straight through to underlying card */
    transition: opacity 1s ease-in-out;
}

/* Tie the text badges to the same exact loop animations as the images */
#drtalavari-site .gallery-item .label-before {
    z-index: 4; /* Keeps labels safely sitting above the dark image overlays */
    animation: drtalavariShowBefore 7s infinite ease-in-out;
}

#drtalavari-site .gallery-item .label-after {
    z-index: 5;
    animation: drtalavariShowAfter 7s infinite ease-in-out;
}

/* Sync the staggered starting times so cards fade out-of-sync with neighbors */
#drtalavari-site .gallery-grid .gallery-item:nth-child(2) .label-before,
#drtalavari-site .gallery-grid .gallery-item:nth-child(2) .label-after {
    animation-delay: 1.5s;
}

#drtalavari-site .gallery-grid .gallery-item:nth-child(3) .label-before,
#drtalavari-site .gallery-grid .gallery-item:nth-child(3) .label-after {
    animation-delay: 3s;
}
