/* main.css - Magendarmpraxis Winterthur */
:root {
  --color-primary: #54934d; /* Original CI Green from logo */
  --color-primary-dark: #44773e; /* Darker variant for contrast/hover */
  --color-secondary: #666666;
  --color-text: #333333;
  --color-bg-body: #ebf0ec; /* Light background for the boxed layout */
  --color-bg-container: #ffffff;
  --color-footer: #333333;
  
  --font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  /* No forced height - let content determine height naturally */
}


body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg-body);
  background-image: url('../images/pattern_background.svg');
  background-position: center top;
  background-attachment: fixed;
  background-repeat: repeat;
  line-height: 1.6;
}

.site-container {
  max-width: 1140px;
  margin: 0 auto;
  background-color: var(--color-bg-container);
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.btn:hover {
  background-color: var(--color-primary-dark);
  color: #fff !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #eee;
}

.site-logo img {
  max-height: 80px;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-navigation a {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-secondary);
  letter-spacing: 0.5px;
}

.main-navigation a:hover,
.main-navigation a.active {
  color: var(--color-primary-dark);
}

/* Main Content */
.site-main {
  flex: 1;
}

/* Hero Section */
.hero {
  position: relative;
  background-color: #ddd; /* Fallback */
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-overlay h1 {
  background: rgba(255, 255, 255, 0.85);
  display: inline-block;
  padding: 1rem 3rem;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0;
  font-size: 2rem;
}

.hero-subtitle-box {
  background: rgba(0,0,0,0.6);
  display: inline-block;
  padding: 5px 15px;
  margin-top: 10px;
}

.hero-subtitle-box p {
  color: white;
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* Features */
.features-section {
  display: flex;
  padding: 4rem 2rem;
  gap: 2rem;
  text-align: center;
}

.feature-card {
  flex: 1;
  padding: 1.5rem;
  position: relative;
}

/* Vertikale Trennlinien entfernt gemäss Audit */

.feature-icon {
  color: var(--color-primary);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.feature-text {
  color: var(--color-primary-dark);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--color-primary-dark);
  color: white;
}

/* Bottom Tiles Section */
.bottom-tiles-section {
  display: flex;
  justify-content: space-between;
  padding: 0 2rem 4rem 2rem;
  gap: 2rem;
}

.bottom-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.tile-title {
  color: var(--color-text);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
  text-align: center;
}

.tile-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.3s ease;
  border-radius: 6px;
}

/* For small images like Dr. Hediger to prevent pixelation */
.bottom-tile .tile-img-small {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
}

.bottom-tile:hover .tile-img {
  opacity: 0.8;
}

/* Footer */
.site-footer {
  background-color: var(--color-footer);
  color: white;
  padding: 3rem 2rem;
  margin-top: auto;
}

.footer-widgets {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.footer-widget {
  flex: 1;
  text-align: center;
}

.footer-widget img {
  display: block;
  margin: 0 auto 1rem auto;
}

.footer-widget h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.footer-widget p, .footer-widget a {
  color: #ccc;
  font-size: 0.9rem;
}

.footer-widget a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: #999;
}

.legal-links {
  margin-top: 0.5rem;
}

.legal-links a {
  color: #bbb;
  font-size: 0.8rem;
}

.legal-links a:hover {
  color: #fff;
}

.legal-links span {
  margin: 0 0.5rem;
  color: #666;
}

/* Legal Pages (Impressum / Datenschutz) */
.legal-intro {
  margin-bottom: 2rem;
  color: var(--color-secondary);
  font-size: 0.95rem;
}

.legal-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dotted #ddd;
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.legal-section p {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
}

.legal-list {
  list-style: none;
  margin: 0.5rem 0 0.75rem 0;
}

.legal-list li {
  padding: 0.4rem 0 0.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  position: relative;
}

.legal-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* =============================================
   Subpage Layout
   ============================================= */

.page-content {
  padding: 3rem 2rem;
}

.content-container {
  max-width: 900px;
  margin: 0 auto;
}

.content-container h1 {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  border-bottom: 1px dotted #ccc;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.content-container h2 {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-primary-dark);
  margin: 1.5rem 0 0.75rem;
}

/* Team Grid (Über uns) */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.team-member {
  flex: 1 1 calc(33% - 2rem);
  text-align: center;
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #e0e0e0;
  margin: 0 auto 1rem;
}

.team-member h3 {
  font-size: 1rem;
  color: var(--color-primary-dark);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-member p {
  font-size: 0.9rem;
  color: var(--color-secondary);
}

/* Praxis Grid */
.praxis-info-grid {
  display: flex;
  gap: 3rem;
  margin-bottom: 2rem;
}

.praxis-info-block {
  flex: 1;
}

.praxis-images {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.praxis-img {
  flex: 1;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.praxis-map {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.praxis-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.praxis-gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}

.praxis-gallery-img:hover {
  opacity: 0.85;
}

/* Angebot two-column layout */
.angebot-body {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.angebot-main {
  flex: 1;
  min-width: 0;
}

.angebot-image {
  flex: 0 0 50%;
  width: 50%;
}

.angebot-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.angebot-list {
  list-style: none;
  margin-bottom: 2rem;
}

.angebot-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dotted #ccc;
  color: var(--color-text);
}

.angebot-list li::before {
  content: '';
}

.angebot-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Info Sections (Subpages) */
.info-sections {
  margin-top: 2rem;
}

.info-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dotted #ddd;
}

.info-section:last-child {
  border-bottom: none;
}

.info-section h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.info-section ul {
  list-style: none;
  margin-top: 0.5rem;
}

.info-section li {
  padding: 0.4rem 0;
  color: var(--color-text);
}

.info-section li::before {
  content: '→ ';
  color: var(--color-primary);
}

/* Accordion */
.accordion {
  margin-top: 2rem;
}

.accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-header {
  display: block;
  padding: 1rem 1.25rem;
  background: #f8f9f8;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background 0.2s ease;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-header::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 300;
}

.accordion-item[open] .accordion-header::after {
  content: '−';
}

.accordion-header:hover {
  background: #eef2ee;
}

.accordion-body {
  padding: 1.25rem;
}

.accordion-body h3 {
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.accordion-body ul {
  list-style: none;
  margin-top: 0.5rem;
}

.accordion-body li {
  padding: 0.35rem 0;
  color: var(--color-text);
}

.accordion-body li::before {
  content: '→ ';
  color: var(--color-primary);
}

/* Anmeldung / Info Grids */
.anmeldung-grid,
.info-grid {
  display: flex;
  gap: 3rem;
  margin-top: 1.5rem;
}

.anmeldung-block,
.info-block {
  flex: 1;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.team-member {
  text-align: center;
}

.team-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: block;
  transition: opacity 0.3s ease;
}

a:hover .team-img {
  opacity: 0.85;
}

.team-member h3 {
  color: var(--color-primary-dark);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.team-member p {
  color: var(--color-secondary);
  line-height: 1.4;
  font-size: 1rem;
}

/* Profile Page */
.profile-container {
  max-width: 900px;
}

.profile-header {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.profile-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.profile-intro h1 {
  margin-bottom: 0.5rem;
}

.profile-section {
  margin-bottom: 2.5rem;
}

.profile-section h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
}

.profile-section ul {
  list-style: none;
}

.profile-section li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted #eee;
  color: var(--color-text);
}

/* =============================================
   Responsive Design
   ============================================= */

/* Hamburger toggle – hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
}

.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--color-primary-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Tablet – max 768px */
@media (max-width: 768px) {

  /* Header & Navigation */
  .site-header {
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    width: 100%;
    border-top: 1px solid #eee;
    margin-top: 1rem;
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid #f0f0f0;
  }

  .main-navigation a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    height: 280px;
  }

  .hero-overlay h1 {
    font-size: 1.3rem;
    padding: 0.75rem 1.5rem;
    letter-spacing: 1px;
  }

  .hero-subtitle-box p {
    font-size: 0.85rem;
  }

  /* Features */
  .features-section {
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 1rem;
  }

  .feature-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
  }

  .feature-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Bottom Tiles */
  .bottom-tiles-section {
    flex-direction: column;
    padding: 0 1.5rem 2.5rem;
    gap: 1.5rem;
  }

  .tile-img {
    height: 180px;
  }

  /* Footer */
  .footer-widgets {
    flex-direction: column;
    gap: 2rem;
  }

  .site-footer {
    padding: 2rem 1.5rem;
  }

  /* Subpage Content */
  .page-content {
    padding: 2rem 1.5rem;
  }

  .content-container h1 {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }

  /* Team Grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .team-img {
    width: 150px;
    height: 150px;
  }

  /* Praxis */
  .praxis-info-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  .praxis-gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .praxis-gallery-img {
    height: 200px;
  }

  /* Anmeldung / Info Grids */
  .anmeldung-grid,
  .info-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Angebot Buttons */
  .angebot-body {
    flex-direction: column;
  }

  .angebot-image {
    display: none;
  }

  .angebot-links {
    flex-direction: column;
  }

  .angebot-links .btn {
    text-align: center;
  }

  /* Profile Page */
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .profile-image img {
    width: 180px;
    height: 180px;
  }

  .profile-intro h1 {
    text-align: center;
  }
}

/* Phone – max 480px */
@media (max-width: 480px) {

  .site-logo img {
    max-height: 55px;
  }

  .hero {
    height: 220px;
  }

  .hero-overlay h1 {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
  }

  .hero-subtitle-box p {
    font-size: 0.75rem;
  }

  .features-section {
    padding: 2rem 1rem;
  }

  .bottom-tiles-section {
    padding: 0 1rem 2rem;
  }

  .page-content {
    padding: 1.5rem 1rem;
  }

  .content-container h1 {
    font-size: 1.2rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .team-img {
    width: 130px;
    height: 130px;
  }

  .profile-image img {
    width: 140px;
    height: 140px;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }

  .footer-widget h3 {
    font-size: 1rem;
  }

  .footer-widget p,
  .footer-widget a {
    font-size: 0.85rem;
  }
}
