/* ==========================================================================
   NAZ ALTUN PILATES - ÖZEL KURUMSAL & LÜKS STİL DOSYASI
   Renk Paleti:
   - Primary (Mor): #7025CD / #8B3DFF
   - Accent (Turkuaz/Mint): #02A8B5 / #3ED2DE
   - Background Light: #FAFAFD / #F5F3FA
   - Dark Text: #141124
   ========================================================================== */

:root {
  --color-primary: #7025CD;
  --color-primary-light: #8B3DFF;
  --color-primary-soft: #F4EEFD;
  --color-primary-dark: #50169A;
  --color-accent: #02A8B5;
  --color-accent-light: #3ED2DE;
  --color-accent-soft: #E6FAFC;
  --color-dark: #120F24;
  --color-dark-muted: #575270;
  --color-bg-light: #FAF9FE;
  --color-card-bg: #FFFFFF;
  --color-border: #E8E3F3;
  --gradient-brand: linear-gradient(135deg, #7025CD 0%, #02A8B5 100%);
  --gradient-glow: linear-gradient(135deg, rgba(112, 37, 205, 0.15) 0%, rgba(2, 168, 181, 0.15) 100%);
  --shadow-subtle: 0 4px 20px rgba(20, 17, 36, 0.04);
  --shadow-card: 0 12px 35px -5px rgba(112, 37, 205, 0.08);
  --shadow-hover: 0 20px 45px -5px rgba(112, 37, 205, 0.18);
  --shadow-button: 0 10px 25px -5px rgba(112, 37, 205, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Global Reset & Base (Benchmarked with ddm.tr & seculife.net) */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--color-dark);
  background-color: var(--color-bg-light);
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative;
  background-color: var(--color-bg-light);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Universal safe word-breaking on mobile to prevent wide words from pushing containers */
p, span, a, li, button, input, label, select, textarea, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-break: break-word;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Typography Enhancements */
.font-display {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #7025CD 0%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glassmorphism Styles */
.glass-header {
  background: rgba(250, 249, 254, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232, 227, 243, 0.7);
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(112, 37, 205, 0.07);
}

/* Nav & Header Spacing Protection */
header nav a {
  white-space: nowrap;
  display: inline-block;
}

header .btn-member,
header .btn-register,
header .btn-secondary,
header .btn-primary,
header button {
  white-space: nowrap;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 227, 243, 0.8);
}

/* Custom Buttons */
.btn-primary {
  background: var(--gradient-brand);
  color: #FFFFFF !important;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(112, 37, 205, 0.45);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--color-primary) !important;
  border: 1.5px solid rgba(112, 37, 205, 0.25);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-member {
  background: #1E1736;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
}

.btn-member:hover {
  background: #2D2350;
  border-color: var(--color-accent-light);
  box-shadow: 0 8px 20px rgba(30, 23, 54, 0.35);
  transform: translateY(-2px);
}

.btn-register {
  background: linear-gradient(135deg, #7025CD 0%, #02A8B5 100%);
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(112, 37, 205, 0.3);
  transition: var(--transition-smooth);
}

.btn-register:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 28px rgba(2, 168, 181, 0.4);
  transform: translateY(-2px);
}

/* Badge & Tag */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-purple {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(112, 37, 205, 0.2);
}

.badge-cyan {
  background-color: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid rgba(2, 168, 181, 0.25);
}

/* Hover Cards */
.interactive-card {
  transition: var(--transition-smooth);
  border: 1px solid var(--color-border);
}

.interactive-card:hover {
  transform: translateY(-6px);
  border-color: rgba(112, 37, 205, 0.3);
  box-shadow: var(--shadow-hover);
}

/* Glow Background Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.orb-purple {
  background: radial-gradient(circle, rgba(112, 37, 205, 0.4) 0%, rgba(112, 37, 205, 0) 70%);
}

.orb-cyan {
  background: radial-gradient(circle, rgba(2, 168, 181, 0.35) 0%, rgba(2, 168, 181, 0) 70%);
}

/* Floating Elements Animation */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-delay {
  animation: floatSlow 6s ease-in-out infinite 2s;
}

/* Marquee Running Strip */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 26s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

/* Filter Tab Styles */
.program-tab {
  transition: var(--transition-smooth);
}

.program-tab.active {
  background: var(--color-primary);
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(112, 37, 205, 0.3);
}

/* FAQ Accordion */
.faq-item {
  transition: var(--transition-smooth);
  border: 1px solid var(--color-border);
}

.faq-item.open {
  border-color: var(--color-primary);
  background-color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(112, 37, 205, 0.06);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.faq-item.open .faq-content {
  max-height: 400px;
  opacity: 1;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #F4F2F9;
}

::-webkit-scrollbar-thumb {
  background: #C4B9E3;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Floating WhatsApp & Back to Top */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.action-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
}

.whatsapp-float {
  background: #25D366;
  color: #FFFFFF;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.45);
}

.scroll-top-btn {
  background: #FFFFFF;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  transform: translateY(-3px);
}

/* Image Aspect & Overlay */
.img-zoom-wrapper {
  overflow: hidden;
}

.img-zoom-wrapper img {
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.img-zoom-wrapper:hover img {
  transform: scale(1.06);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background: #19142E;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 99px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: toastFade 0.4s ease forwards;
}

@keyframes toastFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT & METRICS (BENCHMARKED WITH ddm.tr & seculife.net)
   ========================================================================== */

/* Max Container Safety */
.container,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-4xl,
.max-w-3xl,
.max-w-2xl,
.max-w-xl,
.max-w-lg,
.max-w-md,
.max-w-sm,
.max-w-\[1440px\] {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 1280px) {
  .max-w-7xl {
    max-width: 80rem !important; /* 1280px */
  }
  .max-w-\[1440px\] {
    max-width: 1440px !important;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .max-w-7xl,
  .max-w-\[1440px\] {
    max-width: 1024px !important;
  }
}

/* Tablet & Large Mobile (<= 991px) */
@media (max-width: 991px) {
  header nav {
    display: none !important;
  }

  /* Spacing */
  section {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  #anasayfa {
    padding-top: 28px !important;
    padding-bottom: 56px !important;
  }

  .px-4, .px-6, .px-8, .sm\:px-6, .lg\:px-8 {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Standard Mobile (<= 767px) - Core fix for edge overflow */
@media (max-width: 767px) {
  /* Hide decorative blurred orbs that trigger document scroll on WebKit & Blink */
  .orb {
    display: none !important;
  }

  /* Prevent transform overflow on floating elements */
  .animate-float,
  .animate-float-delay {
    animation: none !important;
    transform: none !important;
  }

  /* Section vertical spacing matching ddm.tr & seculife.net */
  section {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }

  #anasayfa {
    padding-top: 20px !important;
    padding-bottom: 44px !important;
  }

  /* Container padding */
  .px-4, .px-6, .px-8, .sm\:px-6, .lg\:px-8 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Headings typography clamp */
  h1, .font-display.text-4xl, .font-display.text-5xl, .font-display.text-6xl {
    font-size: clamp(1.85rem, 6.5vw, 2.4rem) !important;
    line-height: 1.2 !important;
  }

  h2, .font-display.text-3xl, .font-display.text-4xl, .font-display.text-5xl {
    font-size: clamp(1.45rem, 5.2vw, 1.95rem) !important;
    line-height: 1.25 !important;
  }

  h3, .font-display.text-2xl {
    font-size: clamp(1.2rem, 4vw, 1.45rem) !important;
    line-height: 1.3 !important;
  }

  /* Floating action buttons */
  .floating-actions {
    bottom: 16px !important;
    right: 16px !important;
    gap: 10px !important;
  }

  .action-circle-btn {
    width: 46px !important;
    height: 46px !important;
  }

  .action-circle-btn svg,
  .action-circle-btn i {
    width: 22px !important;
    height: 22px !important;
  }

  /* Drawer width safety */
  #mobile-menu {
    width: 86% !important;
    max-width: 330px !important;
  }

  /* Marquee sizing on mobile */
  .marquee-content span {
    font-size: 0.85rem !important;
  }

  /* Modal responsive sizing */
  #appointment-modal > div {
    width: 95% !important;
    padding: 20px 16px !important;
    margin: 12px !important;
  }
}

/* Small Mobile (<= 575px) */
@media (max-width: 575px) {
  /* Header padding safety - prevent edge clipping on very narrow screens */
  header .max-w-\[1440px\] {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  #anasayfa {
    padding-top: 16px !important;
    padding-bottom: 36px !important;
  }

  .px-4, .px-6, .px-8, .sm\:px-6, .lg\:px-8 {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Make sure all flex button groups stack cleanly without horizontal scroll */
  .btn-primary, .btn-secondary, .btn-member, .btn-register {
    max-width: 100% !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   PWA INSTALL SMART BANNER & GUIDE MODAL (pilates.seculife.net modeli)
   ========================================================================== */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 98;
  background: rgba(18, 15, 36, 0.96);
  color: #FFFFFF;
  border: 1px solid rgba(62, 210, 222, 0.35);
  border-radius: 16px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 40px -10px rgba(18, 15, 36, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 390px;
  animation: pwaBannerIn 0.35s ease;
}
.pwa-install-banner.visible { display: flex; }
@keyframes pwaBannerIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(112, 37, 205, 0.35);
}
.pwa-banner-icon img { width: 100%; height: 100%; object-fit: contain; }
.pwa-banner-text { flex: 1; min-width: 0; }
.pwa-banner-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.25;
}
.pwa-banner-text span {
  display: block;
  font-size: 0.74rem;
  color: #A8A3C2;
  margin-top: 2px;
}
.pwa-banner-btn {
  background: var(--gradient-brand);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.pwa-banner-close {
  background: transparent;
  border: none;
  color: #7A7594;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.pwa-banner-close:hover { color: #F8FAFC; }

.pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 15, 36, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pwa-modal-backdrop.active { display: flex; }
.pwa-modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
}
.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #FAF9FE;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: #3A3550;
  line-height: 1.5;
}
.pwa-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .pwa-install-banner {
    left: 16px;
    right: 74px; /* sağdaki WhatsApp butonuna yer bırak */
    bottom: 16px;
    max-width: none;
    padding: 10px 12px;
    gap: 10px;
  }
  .pwa-banner-text span { font-size: 0.7rem; }
}
