/* ==========================================================================
   Dr. Cankay – Oralchirurgie und Implantologie
   Statischer Nachbau der WordPress-Seite (Stand 16.12.2024, Blocksy + Elementor)
   Werte stammen aus dem archivierten Elementor-CSS; Theme-Standards (Typografie,
   Footer) sind aus Blocksy-Defaults abgeleitet, da das Theme-CSS nicht gesichert ist.
   ========================================================================== */

/* ---------- Design-Tokens ---------- */
:root {
  --color-text: #3a4f66;
  --color-heading: #192a3d;
  --color-muted: #54595f;
  --color-surface: #fff;
  --color-footer: #fafbfc;
  --color-on-dark: #fff;
  --color-card-sub: #bfbfbf;
  --color-hotspot: rgb(255 255 255 / 0.6);
  --color-hairline: rgb(25 42 61 / 0.1);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

  --hero-height: 85vh;
  --photo-height: 90vh;
  --card-height: 610px;
  --card-gap: 10px; /* Elementor-Spaltenabstand je Seite */
  --hotspot-size: 24px;

  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(dialog[open], .offcanvas.is-open) {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  margin: 0;
  color: var(--color-heading);
  font-weight: 700;
}

h2 { font-size: 30px; line-height: 1.3; }
h3 { font-size: 25px; line-height: 1.3; }
p  { margin: 0 0 1.5em; }

a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-heading);
  color: var(--color-on-dark);
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid #5073b4;
  outline-offset: 3px;
}

/* ---------- Header (nur Mobil/Tablet: transparenter Menü-Button) ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: none;
  justify-content: flex-end;
  align-items: center;
  height: 70px;
  padding: 0 25px;
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-on-dark);
  cursor: pointer;
}

@media (max-width: 999.98px) {
  .site-header { display: flex; }
}

/* ---------- Off-Canvas-Menü ---------- */
.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.3s;
}
.offcanvas.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.offcanvas__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(18 21 25 / 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.offcanvas.is-open .offcanvas__backdrop { opacity: 1; }

.offcanvas__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(500px, 65vw);
  padding: 80px 40px 40px;
  background: var(--color-surface);
  box-shadow: 0 0 50px rgb(0 0 0 / 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.offcanvas.is-open .offcanvas__panel { transform: none; }

.offcanvas__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-heading);
  cursor: pointer;
}

.offcanvas__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 20px;
  font-weight: 500;
}
.offcanvas__menu a {
  display: block;
  padding: 10px 0;
  color: var(--color-heading);
  text-decoration: none;
}
.offcanvas__menu a:hover { color: var(--color-muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  min-height: var(--hero-height);
  overflow: hidden;
  background: #10161d;
  isolation: isolate;
}

.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Poster (Ladezustand) und Video abgedunkelt, damit der weiße Zahn trägt.
   Das Header-Video von 2023 ist verloren; es läuft der Praxis-Clip von 2018. */
.hero__poster { filter: brightness(0.42) saturate(0.85); }
.hero__video { filter: brightness(0.5) saturate(0.85); }

.hero__tooth {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 1;
  width: 17%;
  height: auto;
  opacity: 0.5;
  transform: translateY(-50%);
}

@media (max-width: 767.98px) {
  .hero__video { display: none; } /* wie im Original: kein Video auf dem Smartphone */
}

/* ---------- Einleitung: Text links, Foto rechts ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 400px;
}

@media (min-width: 768px) {
  .intro { grid-template-columns: 1fr 1fr; }
}

.intro__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12%;
}

.intro__text h2 { margin-bottom: 20px; }

.intro__photo {
  min-height: var(--photo-height);
  background: #8a929c center / cover no-repeat url("../assets/img/team/cankay_Dr-Rasim-Cankay.jpg");
}

/* ---------- Aufklapp-Text (Ersatz für JetTricks "Unfold") ---------- */
.unfold__content {
  max-height: 50px;
  overflow: hidden;
  transition: max-height 300ms var(--ease-out-sine);
}
.unfold.is-open .unfold__content {
  transition: max-height 500ms var(--ease-out-back);
}
.unfold__content p { margin: 0; }

.unfold__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 20px;
  padding: 0 0 10px 2px;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  cursor: pointer;
}
.unfold__btn svg { width: 12px; height: 12px; transition: transform 0.3s ease; }
.unfold.is-open .unfold__btn svg { transform: rotate(180deg); }
.unfold__btn:hover { color: var(--color-heading); }

/* ---------- Team-Karten ---------- */
.team { padding: 0 0 100px; }

.team__row {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .team__row { grid-template-columns: repeat(3, 1fr); }
}

.team__cell { padding: var(--card-gap); }

.card {
  position: relative;
  min-height: var(--card-height);
  margin: 0;
  overflow: hidden;
  background: #6b7480;
  cursor: default;
}

.card__bg,
.card__overlay {
  position: absolute;
  inset: 0;
  transition-duration: 1500ms;
}

.card__bg {
  background: center / cover no-repeat;
  filter: saturate(0) blur(0);
  transform: scale(1.2) translateX(-5%);
  transition-property: transform, filter;
  transition-timing-function: ease;
}

.card__overlay {
  background: rgb(0 0 0 / 0);
  transition-property: background-color;
}

.card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  padding: 0 0 50px 50px;
  text-align: left;
}

.card__name {
  margin: 0;
  color: var(--color-on-dark);
  font-size: 35px;
  line-height: 1.2;
}

.card__role {
  color: var(--color-card-sub);
  font-size: 15px;
  font-weight: 300;
  text-transform: uppercase;
}

/* Name und Rolle gleiten erst beim Hover von links ein */
.card__name,
.card__role {
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 1000ms ease, transform 1000ms ease;
}

.card:hover .card__bg,
.card:focus-visible .card__bg,
.card.is-active .card__bg {
  filter: saturate(1) blur(1px);
  transform: scale(1.2) translateX(5%);
}
.card:hover .card__overlay,
.card:focus-visible .card__overlay,
.card.is-active .card__overlay {
  background: rgb(0 0 0 / 0.56);
}
.card:hover :is(.card__name, .card__role),
.card:focus-visible :is(.card__name, .card__role),
.card.is-active :is(.card__name, .card__role) {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .team { padding: 50px 25px; }
  .card { min-height: 300px; }
  .card__content { padding: 0 0 50px 20px; }
}

@media (max-width: 767.98px) {
  .team { padding: 50px 20px; }
  .card__content { padding: 0 0 60px 40px; }
}

/* ---------- Leistungen mit Hotspots ---------- */
.services h2 { text-align: center; }
.services__title { margin-top: 55px; }
.services__title--gallery { margin: 55px 0 35px; }

.hotspots {
  position: relative;
  width: max(46%, 222px); /* Elementor: Container 46 %, mind. 222 px */
  margin: 20px auto;
}
.hotspots img { width: 100%; height: auto; }

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--hotspot-size);
  height: var(--hotspot-size);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  /* Elementor positioniert über left/top und verschiebt um denselben Prozentwert */
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(calc(var(--x) * -1%), calc(var(--y) * -1%));
}

.hotspot__inner,
.hotspot__outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-hotspot);
}
.hotspot__outer {
  animation: hotspot-expand 2s ease-out infinite;
}
.hotspot:hover .hotspot__inner { background: #fff; }

@keyframes hotspot-expand {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Slideshow unter "Impressionen": Überblendung 0,5 s, 5 s pro Bild, Zoom ("Ken Burns") wie im Original */
.impressions {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #1a1a1a;
}
.impressions__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 500ms ease;
  will-change: opacity, transform;
}
.impressions__slide.is-active { opacity: 1; }
.impressions__slide.is-active,
.impressions__slide.is-leaving { animation: impressions-zoom 5.5s linear forwards; }
@keyframes impressions-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}

/* ---------- Leistungs-Popups ---------- */
.service-dialog {
  width: 640px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  overflow: auto;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 2px 8px 23px 3px rgb(0 0 0 / 0.2);
}
.service-dialog[open] { animation: dialog-fade 1.2s ease both; }
.service-dialog::backdrop {
  background: rgb(0 0 0 / 0.8);
  animation: dialog-fade 1.2s ease both;
}

.service-dialog__body { padding: 50px; }
.service-dialog__body h3 { margin-bottom: 20px; }
.service-dialog__body p:last-child { margin-bottom: 0; }

.service-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-heading);
  cursor: pointer;
}

@keyframes dialog-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-footer);
  text-align: center;
}
.site-footer__main { padding: 60px 20px 20px; }
.site-footer__main p { margin: 0 0 1.5em; }
.site-footer__legal {
  padding: 15px 20px 25px;
  border-top: 1px solid var(--color-hairline);
  font-size: 14px;
}
.site-footer__legal p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 20px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.legal h1 { margin-bottom: 24px; font-size: 32px; }
.legal p { margin: 0 0 1em; }
.legal ul { margin: 0 0 1em; padding-left: 1.4em; list-style: disc; }
.legal li { margin-bottom: 0.3em; }
.legal__back { margin-top: 40px; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .impressions__slide.is-active,
  .impressions__slide.is-leaving { animation: none !important; }
}
