:root {
  --platinum: #FFFFFF;
  --silver: #C6C9C9;
  --paynes-gray: #2C3E50;
  --silver-2: #BDC3C7;
  --cadet-gray: #34495E;
}

/* Base styles */
body {
  font-family: 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
  color: #333;
  padding-top: 80px; /* Add padding to account for fixed navbar */
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.8s ease-in;
  font-size: 16px;
  scroll-padding-top: 100px; /* Adding scroll padding for anchor links */
}

/* Target-specific styling - this is applied when the element is targeted by a fragment URL */
section:target {
  scroll-margin-top: 120px; /* Extra space to ensure section appears clearly below navbar */
  animation: highlight 1s ease-out;
}

@keyframes highlight {
  from {
    background-color: rgba(44, 62, 80, 0.1); /* Subtle highlight effect */
  }
  to {
    background-color: var(--platinum);
  }
}

body.loaded {
  opacity: 1;
}

/* Navigation styles - FIXED VERSION */
nav {
  width: 100%;
  background-color: var(--paynes-gray);
  color: var(--platinum);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  padding: 0;
}

/* Desktop navigation layout */
.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "title logo menu";
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  position: relative;
}

.nav-logo-title {
  /* Changed from flex to allow independent positioning */
  display: contents;
}

.nav-logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  justify-self: center;
}

.nav-title {
  grid-area: title;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-self: end;
  padding-right: 15px;
}

.nav-menu {
  grid-area: menu;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  align-items: center;
  justify-self: start;
  padding-left: 15px;
}

/* Nav menu item styling with separators for desktop */
.nav-menu li {
  margin: 0;
  position: relative;
}

/* Add pipe separators between menu items in desktop view */
.nav-menu li:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--silver-2);
  opacity: 0.7;
}

.nav-menu-control {
  display: none; /* Hidden by default on desktop */
}

.nav-title a {
  text-decoration: none;
  color: var(--platinum);
  display: block;
}

.nav-title .name {
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1.2;
  display: block;
}

.nav-title .profession {
  font-size: 0.9em;
  font-weight: normal;
  display: block;
  line-height: 1.2;
}

.nav-title .qualification {
  font-size: 0.7em;
  font-weight: lighter;
  display: block;
  line-height: 1.2;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--platinum);
  font-weight: normal;
  transition: color 0.3s;
  padding: 5px 10px;
  border-radius: 4px;
}

.nav-menu a:hover {
  color: var(--silver-2);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu a.active {
  border-bottom: 2px solid var(--platinum);
}

.mobile-menu-button {
  display: none; /* Hidden on desktop by default */
  background: none;
  border: none;
  color: var(--platinum);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s ease;
}

.mobile-menu-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Mobile navigation layout */
@media (max-width: 768px) {
  .nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo title menu-control" "nav-menu nav-menu nav-menu";
    align-items: center;
    padding: 10px;
  }
  
  .nav-logo-title {
    display: contents; /* Disables flex in grid layout */
  }
  
  .nav-logo {
    grid-area: logo;
    justify-self: start;
  }
  
  .nav-title {
    grid-area: title;
    justify-self: center;
    text-align: center;
    margin: 0;
  }
  
  .nav-menu-control {
    grid-area: menu-control;
    justify-self: end;
    display: block;
  }
  
  .nav-menu {
    grid-area: nav-menu;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0;
    width: 100%; /* Ensure menu takes full width */
    padding: 0; /* Reset padding */
  }
  
  .nav-menu.active {
    max-height: 300px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    margin-top: 10px;
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  
  /* Remove pipe separators in mobile view */
  .nav-menu li:not(:last-child)::after {
    display: none;
  }
  
  .nav-menu a {
    display: block;
    padding: 12px;
    border-radius: 0;
    width: 100%; /* Make links take full width */
    box-sizing: border-box; /* Include padding in width calculation */
    text-align: center; /* Ensure text is centered */
  }
  
  .mobile-menu-button {
    display: block;
    font-size: 1.3rem;
  }
  
  .logo {
    width: 50px;
    height: 50px;
  }
  
  .nav-title .name {
    font-size: 1em;
  }
  
  .nav-title .profession {
    font-size: 0.8em;
  }
  
  .nav-title .qualification {
    font-size: 0.6em;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  section {
    padding: 15px;
    border-radius: 8px;
  }
  
  .psychotherapie-content img {
    width: 180px;
    height: 180px;
  }
  
  .logo {
    width: 40px;
    height: 40px;
  }
  
  .nav-title .name {
    font-size: 0.9em;
  }
  
  .nav-title .profession {
    font-size: 0.7em;
  }
  
  .nav-title .qualification {
    font-size: 0.5em;
  }
}

/* Content section styles */
section {  
  padding: 30px;
  max-width: 1100px;
  margin: 20px auto;
  background-color: var(--platinum);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid var(--silver-2);
  text-align: center;
}

h1, h2 {
  font-size: 2.0em;
  margin-top: 0;
}

h3 {
  margin-top: 0.5em;
}

.psychotherapie-content {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.psychotherapie-content img {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  object-fit: contain; /* Changed from 'cover' to 'contain' to show the whole head */
  display: block;
  border: 7px solid transparent;
  background-origin: border-box;
  padding: 5px;
  transition: transform 0.3s ease;
}

.psychotherapie-content img:hover {
  transform: scale(1.02);
}

.psychotherapie-text {
  max-width: 600px;
  text-align: left;
  flex: 1;
  min-width: 280px;
}

.erstgespraech-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--platinum);
  text-decoration: none;
  background-color: var(--paynes-gray);
  border: 2px solid var(--paynes-gray);
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.erstgespraech-link:hover {
  background-color: var(--platinum);
  color: var(--paynes-gray);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.erstgespraech-link:active {
  transform: translateY(0);
}

footer {
  background-color: var(--paynes-gray);
  color: var(--platinum);
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer a {
  color: var(--platinum);
  text-decoration: none;
  transition: color 0.3s;
  padding: 5px;
}

footer a:hover {
  color: var(--silver-2);
  text-decoration: underline;
}

/* Info sections */
.info-section {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px; /* Adding top margin for better spacing when following contact buttons */
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.info-section h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
}

.info-section h2:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--silver-2) 20%, var(--silver-2) 80%, transparent);
  border-radius: 2px;
}

.praxis-images {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.praxis-images figure {
  margin: 0;
  text-align: center;
  max-width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #f9f9f9;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.praxis-images figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.praxis-images img {
  width: 100%; /* Make images fill the entire figure width */
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 3px solid white;
}

.praxis-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.praxis-images figcaption {
  margin-top: 12px;
  font-size: 0.95em;
  color: #555;
  font-style: italic;
  line-height: 1.4;
}

.praxis-welcome {
  font-size: 1.3em;
  color: var(--paynes-gray);
  margin: 15px 0 25px;
  font-weight: 500;
  text-align: center;
  padding: 0 10px;
  font-style: italic;
  line-height: 1.5;
  border-bottom: 1px dashed var(--silver-2);
  padding-bottom: 15px;
}

.praxis-note {
  background-color: #f0f5f9;
  padding: 15px;
  border-radius: 8px;
  margin: 25px 0 15px;
  border-left: 4px solid var(--silver-2);
  text-align: left;
  font-size: 0.95em;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.praxis-directions {
  margin-top: 15px;
  color: #444;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .praxis-images figure {
    max-width: 100%;
  }
  
  .praxis-welcome {
    font-size: 1.2em;
  }
  
  .praxis-images img {
    width: 100%; /* Ensure images take full width in mobile view as well */
    max-width: 100%; /* Remove the previous 350px limitation */
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .praxis-images {
    gap: 15px;
  }
  
  .praxis-welcome {
    font-size: 1.1em;
  }
  
  .praxis-note {
    padding: 12px;
    font-size: 0.9em;
  }
}

@media (max-width: 768px) {
  .praxis-images figure {
    max-width: 100%;
  }
  
  .praxis-welcome {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  .praxis-images {
    gap: 15px;
  }
  
  .praxis-welcome {
    font-size: 1em;
  }
  
  .praxis-note {
    padding: 12px;
    font-size: 0.9em;
  }
}

.info-section-box {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  flex: 1 1 280px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--silver-2);
}

.info-section-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.info-section-box h2 {
  color: var(--paynes-gray);
  border-bottom: 2px solid var(--silver-2);
  padding-bottom: 8px;
  margin-top: 0;
}

#info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 30px;
}

/* Style for quotes */
cite {
  font-style: italic;
  color: #555;
  display: block;
  margin: 15px 0;
  padding: 10px;
  border-left: 4px solid var(--silver-2);
  background-color: #f9f9f9;
}

/* Responsive design for different screen sizes */
@media (max-width: 992px) {
  section {
    padding: 25px;
    margin: 15px;
  }
  
  .psychotherapie-content img {
    width: 200px;
    height: 200px;
  }
  
  .nav-container {
    padding: 8px 15px;
  }
  
  .nav-menu {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  section {
    padding: 20px;
    padding-top: 60px;
  }
  
  .psychotherapie-content {
    flex-direction: column;
    gap: 25px;
  }
  
  .psychotherapie-text {
    text-align: center;
  }
  
  h1, h2 {
    font-size: 1.6em;
  }
  
  .info-section-box {
    flex: 1 1 100%;
  }
  
  .praxis-images {
    flex-direction: column;
    align-items: center;
  }
  
  .praxis-images img {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  section {
    padding: 15px;
    border-radius: 8px;
  }
  
  .psychotherapie-content img {
    width: 180px;
    height: 180px;
  }
}

/* Accessibility improvements */
:focus {
  outline: 2px solid var(--paynes-gray);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--paynes-gray);
  color: white;
  padding: 8px;
  z-index: 1001;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Logo styles */
.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: block;
}

.logo:hover {
  transform: scale(1.05);
}

/* Contact section styles */
.welcome-text {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 25px;
  text-align: center;
  color: var(--paynes-gray);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Adding style for contact-info-container */
.contact-info-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  margin: 30px 0;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  background-color: #f9f9f9;
  padding: 18px;
  border-radius: 10px;
  border-left: 4px solid var(--paynes-gray);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  font-size: 28px;
  margin-right: 15px;
  color: var(--paynes-gray);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Circle background styling */
  background-color: #f0f5f9;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.contact-icon:hover, .contact-link:hover .contact-icon {
  transform: scale(1.1);
  background-color: #e4eaf1;
  color: #2e5984;
}

.contact-icon:active, .contact-link:active .contact-icon {
  transform: scale(0.95);
  background-color: #d8e1ec;
}

.contact-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.contact-icon-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.contact-detail {
  flex: 1;
}

.contact-label {
  margin: 0 0 8px 0;
  font-weight: bold;
  color: var(--paynes-gray);
  font-size: 1.1em;
}

.contact-value {
  margin: 0;
  word-break: break-word;
}

.contact-link {
  color: var(--cadet-gray);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  border-bottom: 1px dotted transparent;
  font-weight: 500;
}

.contact-link:hover {
  color: var(--paynes-gray);
  border-bottom-color: var(--paynes-gray);
}

.reassurance-text {
  font-style: italic;
  background-color: #f0f5f9;
  padding: 18px;
  border-radius: 8px;
  margin: 25px auto;
  text-align: center;
  border-left: 4px solid var(--silver-2);
  max-width: 800px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Style for contact buttons */
.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px; /* Adding bottom margin to create space between buttons and praxis section */
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--paynes-gray);
  color: var(--platinum);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  gap: 10px;
  border: 2px solid var(--paynes-gray);
}

.contact-button:hover {
  background-color: var(--platinum);
  color: var(--paynes-gray);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-button:active {
  transform: translateY(0);
}

.button-icon {
  font-size: 1.2em;
}
