:root {
  --primary: #2d3a2e;
  --accent: #bfa16a;
  --dark: #222;
  --light: #f8f8f8;
  --white: #fff;
  --border: #e0e0e0;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary), #1f2620);
  color: var(--white);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container { display: flex; justify-content: space-between; align-items: center; }

/* Brand Name Styling - Handschrift-Stil wie Favicon */
.brand-name {
  font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
  font-style: italic;
  font-weight: normal;
  letter-spacing: 2px;
}

.header-logo .brand-name {
  color: var(--accent);
}

.header-logo h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: 1px; }
.header-logo .tagline { font-size: 0.9rem; font-weight: 300; opacity: 0.9; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  height: 500px;
  background: linear-gradient(rgba(45,58,46,0.7), rgba(45,58,46,0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  width: 110%; 
  height: 110%; 
  object-fit: cover; 
  object-position: center center;
  z-index: 0;
  animation: kenBurnsEffect 30s ease-in-out infinite alternate;
}

/* Ken Burns Effect - langsames Zoom und Pan */
@keyframes kenBurnsEffect {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    transform: translate(-48%, -52%) scale(1.08);
  }
  50% {
    transform: translate(-52%, -50%) scale(1.05);
  }
  75% {
    transform: translate(-50%, -48%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.12);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--white);
  animation: fadeInUp 0.8s ease;
}

.hero-content h2 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 2px 2px 8px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.3rem; font-weight: 300; text-shadow: 1px 1px 4px rgba(0,0,0,0.3); }

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

/* Main */
main { min-height: calc(100vh - 200px); }

.page-header {
  background: linear-gradient(135deg, var(--primary), #1f2620);
  color: var(--white);
  padding: 3rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  position: sticky;
  top: 80px;
  z-index: 100;
  transition: padding 0.3s ease, box-shadow 0.3s ease, top 0.3s ease;
}

.page-header-compressed {
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-header h2 { 
  font-size: 2.5rem; 
  transition: font-size 0.3s ease;
}

.page-header-compressed h2 {
  font-size: 1.3rem;
}
.content-section { padding: 3rem 0; }

/* Welcome Section */
.welcome-section { background: var(--white); padding: 3rem 0; }
.welcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }

.welcome-card {
  background: var(--light);
  padding: 2rem;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.welcome-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.welcome-card h3 { color: var(--primary); margin-bottom: 1rem; font-size: 1.3rem; }

/* Highlights */
.highlights { background: var(--white); padding: 3rem 0; }
.highlights h2 { text-align: center; margin-bottom: 2rem; color: var(--primary); font-size: 2rem; }

.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.highlight-item {
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.highlight-item:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.highlight-item img { width: 100%; height: 500px; object-fit: cover; object-position: center center; transition: transform 0.3s ease; background: var(--light); display: block; border-radius: 8px 8px 0 0; }
.highlight-item:hover img { transform: scale(1.05); }
.highlight-item h3 { color: var(--primary); padding-top: 1.5rem; font-size: 1.3rem; }
.highlight-item p { padding: 0 1.5rem 1.5rem; color: #666; }

/* Associations */
.associations { background: var(--light); padding: 3rem 0; }
.associations h2 { margin-bottom: 1rem; color: var(--primary); font-size: 2rem; text-align: center; }
.associations-intro { text-align: center; color: #666; font-size: 1.1rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.association-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }

.assoc-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.assoc-logo-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.assoc-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.assoc-logo-link:hover .assoc-logo { transform: scale(1.1); }

.assoc-info { text-align: center; width: 100%; }
.assoc-info h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.assoc-info p { color: #666; font-weight: 500; margin-bottom: 0.5rem; }
.assoc-info small { display: block; color: #999; font-size: 0.9rem; }

@media (max-width: 768px) {
  .association-logos { grid-template-columns: 1fr; }
}

/* About */
.about-content { background: var(--white); padding: 2rem; border-radius: 10px; }
.about-content h3 { color: var(--primary); margin-top: 2rem; margin-bottom: 1rem; font-size: 1.5rem; }
.about-content h3:first-child { margin-top: 0; }

.feature-list { list-style: none; padding: 0; margin: 1rem 0 2rem 0; }
.feature-list li { padding: 0.8rem 0 0.8rem 2rem; position: relative; color: #666; }
.feature-list li:before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: bold; font-size: 1.2rem; }

/* Gallery */
.gallery-filters { 
  display: flex; 
  justify-content: center; 
  gap: 1rem; 
  margin-bottom: 2rem; 
  flex-wrap: wrap; 
}

.filter-btn {
  background: var(--light);
  border: 2px solid var(--border);
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--dark);
}

.filter-btn:hover, .filter-btn.active { 
  background: var(--accent); 
  color: var(--white); 
  border-color: var(--accent); 
}

/* Galleries Overview */
.galleries-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.gallery-card-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-image img {
  transform: scale(1.1);
}

.gallery-card-content {
  padding: 1.5rem;
}

.category-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.category-badge.category-hund {
  background: #e8f5e9;
  color: #2e7d32;
}

.category-badge.category-events {
  background: #e3f2fd;
  color: #1565c0;
}

.gallery-card-content h3 {
  color: var(--primary);
  margin: 0.5rem 0;
  font-size: 1.3rem;
}

.gallery-card-content p {
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Gallery Detail - Subgallery Tabs */
.subgallery-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.subgallery-tab {
  background: transparent;
  border: none;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  bottom: -0.5rem;
}

.subgallery-tab:hover {
  color: var(--accent);
}

.subgallery-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Gallery Images Grid */
.gallery-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.loading, .error, .no-images {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-size: 1.1rem;
}

.gallery-description {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* Legacy Gallery Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  margin: 0;
}

.gallery-item:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 300px; object-fit: cover; transition: all 0.3s ease; }
.gallery-item:hover img { transform: scale(1.1); }

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(45,58,46,0.9));
  color: var(--white);
  padding: 2rem 1rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Dogs */
/* Dogs-Grid wird weiter unten definiert (siehe "Hundeübersicht Grid") */

.dog-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s ease; }
.dog-card:hover { transform: translateY(-8px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.dog-card img { width: 100%; height: 250px; object-fit: cover; }
.dog-card h3 { padding: 1rem 1rem 0; color: var(--primary); font-size: 1.3rem; }
.dog-card p { padding: 0.5rem 1rem; color: #666; font-size: 0.95rem; }
.dog-description { padding: 1rem; border-top: 1px solid var(--border); font-style: italic; color: var(--dark); }

/* Litters */
.litters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin: 2rem 0; }

.litter-card { background: var(--white); padding: 2rem; border-radius: 10px; border-left: 4px solid var(--accent); box-shadow: var(--shadow); transition: all 0.3s ease; }
.litter-card:hover { transform: translateY(-5px); }
.litter-card h3 { color: var(--primary); margin-bottom: 1rem; }
.litter-description { color: #666; margin-top: 1rem; font-style: italic; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }

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

.info-box { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.info-box h4 { color: var(--accent); margin-bottom: 0.5rem; }
.info-box p { color: #666; }
.info-box a { color: var(--accent); text-decoration: none; transition: all 0.3s ease; }
.info-box a:hover { text-decoration: underline; }

/* Forms */
.contact-form { background: var(--light); padding: 2rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; }
.form-group label { color: var(--primary); font-weight: 600; margin-bottom: 0.5rem; }

.form-group input, .form-group textarea {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(191,161,106,0.1);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover { background: #a88c4a; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(191,161,106,0.3); }

/* Footer */
.footer { background: linear-gradient(135deg, var(--primary), #1f2620); color: var(--white); padding: 3rem 0 1rem; margin-top: 3rem; }

.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }

.footer-section h4 { color: var(--accent); margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.7rem; }
.footer-section a { color: var(--white); text-decoration: none; transition: all 0.3s ease; }
.footer-section a:hover { color: var(--accent); }

.footer .brand-name { color: var(--accent); }

.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); opacity: 0.9; }

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  animation: slideInDown 0.4s ease;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .header .container { flex-direction: column; gap: 1rem; }
  .nav-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--primary); padding: 1rem; width: 100%; }
  .nav-menu.active { display: flex; }
  .nav-menu li { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .hero-content h2 { font-size: 2rem; }
  .hero-content p { font-size: 1.1rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .welcome-grid, .highlights-grid, .gallery-grid, .litters-grid { grid-template-columns: 1fr; }
  .page-header h2 { font-size: 2rem; }
  .page-header-compressed h2 { font-size: 1.2rem; }
  .hero { height: 350px; }
  .dog-detail-layout { grid-template-columns: 1fr; }
  .dog-detail-images { position: relative; top: 0; }
  /* dogs-grid wird in spezifischer Media-Query weiter unten behandelt */
}
}

@media (max-width: 768px) {
  /* Hundedetail-Seite: Mobile/Tablet Optimierung für Tabellen */
  .dog-info-table {
    display: block;
  }
  
  .dog-info-table tbody {
    display: block;
  }
  
  .dog-info-table tr {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .dog-info-table td {
    display: block;
    width: 100% !important;
    padding: 0 !important;
    margin: 0;
  }
  
  .dog-info-table td:first-child {
    padding-bottom: 8px !important;
    font-weight: 600;
    color: var(--primary);
  }
  
  .dog-info-table td:last-child {
    padding-left: 0 !important;
  }
  
  /* Badges nicht umbrechen */
  .health-badge {
    white-space: nowrap;
    display: inline-block;
  }
}

@media (max-width: 480px) {
  .header-logo h1 { font-size: 1.4rem; }
  .hero-content h2 { font-size: 1.5rem; }
  .hero-content p { font-size: 1rem; }
  .association-links { flex-direction: column; align-items: center; }
  .assoc-link { width: 100%; max-width: 200px; }
  .page-header h2 { font-size: 1.5rem; }
  .page-header-compressed h2 { font-size: 1rem; }
  
  /* Hundedetail-Seite: Mobile Optimierung */
  .dog-detail-layout {
    gap: 25px;
  }
  
  .info-section {
    padding: 15px;
  }
  
  .info-section h3 {
    font-size: 1.2em;
    margin-bottom: 12px;
  }
  
  .dog-info-table td {
    padding: 6px 3px;
    font-size: 0.9em;
  }
  
  .dog-info-table strong {
    font-size: 0.95em;
  }
  
  .health-badge {
    padding: 3px 10px;
    font-size: 0.85em;
  }
  
  .titles-display {
    gap: 6px;
  }
  
  .title-badge-large {
    padding: 5px 10px;
    font-size: 0.8em;
  }
  
  .dog-gallery-thumbnails {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
  
  .thumbnail {
    height: 70px;
  }
  
  .pedigree-link {
    font-size: 1em;
  }
  
  .dog-official-name {
    font-size: 0.8em;
  }
}

/* Hundeübersicht Grid */
.dogs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive: Bei Tablets (unter 900px) weiterhin 2 Spalten, aber kleinerer Gap */
@media (max-width: 900px) {
    .dogs-grid {
        gap: 20px;
    }
}

/* Responsive: Bei schmalen Geräten (unter 768px) nur noch 1 Spalte */
@media (max-width: 768px) {
    .dogs-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
    }
}

/* Link-Wrapper für klickbare Hundekarten */
.dog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.dog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dog-card-link:hover .dog-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dog-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 12px 12px 0 0;
}

/* Slideshow für Hundebilder */
.dog-slideshow {
    position: relative;
    background: #2d3e2f;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    border-radius: 12px 12px 0 0;
}

.slideshow-image:first-child {
    position: relative;
}

.slideshow-image.active {
    opacity: 1;
}

.dog-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dog-info h3 {
    margin: 0 0 4px 0;
    color: var(--primary);
    font-size: 1.6em;
}

.dog-official-name {
    font-style: italic;
    color: #666;
    font-size: 0.85em;
    margin: 0 0 15px 0;
    transition: font-size 0.3s ease, margin 0.3s ease;
}

.page-header-compressed .dog-official-name {
    font-size: 0.7em;
    margin: 0;
}

.dog-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.badge {
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.dog-details-list {
    margin: 0 0 15px 0;
    padding: 0;
    list-style: none;
    flex-grow: 1;
}

.dog-details-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 0.88em;
}

.dog-details-list li:last-child {
    border-bottom: none;
}

.dog-details-list strong {
    color: #333;
    font-weight: 600;
    min-width: 100px;
}

.dog-details-list span {
    color: #666;
    text-align: right;
}

.dog-titles {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.title-badge {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.dog-card-footer {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.dog-card-footer .btn-primary {
    width: 100%;
    max-width: 250px;
    padding: 10px 24px;
    font-size: 0.95em;
}

/* Hundedetail-Seite */
.dog-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.dog-detail-images {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.dog-main-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.dog-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.dog-main-image:hover img {
    transform: scale(1.05);
}

.dog-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary);
}

.dog-detail-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.info-section h3 {
    margin-top: 0;
    color: var(--primary);
    margin-bottom: 15px;
}

.dog-info-table {
    width: 100%;
    border-collapse: collapse;
}

.dog-info-table tr {
    border-bottom: 1px solid #e0e0e0;
    display: block;
    padding: 12px 0;
}

.dog-info-table tr:last-child {
    border-bottom: none;
}

.dog-info-table td {
    display: block;
    padding: 0;
    width: 100%;
}

.dog-info-table td:first-child {
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #666;
}

.health-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-block;
    white-space: nowrap;
}

.health-a,
.health-a1,
.health-a2 {
    background: #4caf50;
    color: white;
}

.health-b,
.health-b1,
.health-b2 {
    background: #8bc34a;
    color: white;
}

.health-c {
    background: #ffc107;
    color: #333;
}

.health-frei {
    background: #4caf50;
    color: white;
}

.titles-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.title-badge-large {
    background: #2d5a2f;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

.external-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.external-link:hover {
    text-decoration: underline;
}

.pedigree-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.pedigree-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.pedigree-link svg {
    transition: transform 0.3s ease;
}

.pedigree-link:hover svg {
    transform: translateX(4px);
}

.judge-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

.dog-description-full {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.dog-description-full h3 {
    color: var(--primary);
    margin-top: 0;
}

.dog-description-full p {
    line-height: 1.8;
    color: #555;
}

.back-link {
    text-align: center;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin: 0;
    padding: 1.5rem 0 1rem 0;
    background: transparent;
}

.breadcrumb-item {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    color: #999;
    font-size: 1rem;
    font-weight: 300;
    user-select: none;
}

.breadcrumb-current {
    color: var(--dark);
    font-weight: 600;
}

@media (max-width: 480px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 1rem 0 0.75rem 0;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s;
    border-radius: 8px;
}

@keyframes zoomIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 20px;
    user-select: none;
    transition: background-color 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255,255,255,0.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ========================================
   STAMMBAUM / PEDIGREE CANVAS
   ======================================== */

.pedigree-canvas-wrapper {
    margin-top: 2rem;
    background-color: #f7fafc;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#pedigree-canvas {
    display: block;
    width: 100%;
    height: 800px;
    border-radius: 4px;
    background: #ffffff;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#pedigree-canvas:active {
    cursor: grabbing;
}

.pedigree-info {
    background-color: #e6fffa;
    border-left: 4px solid #38b2ac;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.pedigree-info p {
    margin: 0;
    color: #234e52;
}

.pedigree-info strong {
    color: #1a202c;
}

/* ========================================
   STAMMBAUM / PEDIGREE (OLD - kann entfernt werden)
   ======================================== */
.pedigree-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.generation-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.generation-selector span {
    font-weight: 600;
    color: #555;
}

.gen-btn {
    padding: 8px 16px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gen-btn:hover {
    background: var(--accent);
    color: white;
}

.gen-btn.active {
    background: var(--primary);
    color: white;
}

.pedigree-tree-wrapper {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.pedigree-tree {
    display: inline-flex;
    min-width: 100%;
}

.pedigree-node {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0;
}

.node-content {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 200px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.node-content:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.node-content.male {
    border-color: #4a90e2;
    background: linear-gradient(to bottom, #fff 0%, #f0f7ff 100%);
}

.node-content.female {
    border-color: #e24a90;
    background: linear-gradient(to bottom, #fff 0%, #fff0f7 100%);
}

.root-node .node-content {
    background: linear-gradient(135deg, var(--primary), #3a4a3e);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
    min-width: 250px;
}

.root-node .node-zb,
.root-node .node-gender {
    color: rgba(255,255,255,0.9);
}

.node-name {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 4px;
    color: #333;
}

.root-node .node-name {
    color: white;
    font-size: 1.1em;
}

.node-zb {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 2px;
}

.node-gender {
    font-size: 1.2em;
    color: #999;
    position: absolute;
    top: 8px;
    right: 10px;
}

.node-children {
    display: flex;
    flex-direction: column;
    margin-left: 40px;
    position: relative;
}

.child-branch {
    position: relative;
}

/* Verbindungslinien */
.child-branch::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    width: 40px;
    height: 2px;
    background: #ccc;
}

.node-children::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ccc;
}

.father-branch::before {
    top: 50%;
}

.mother-branch::before {
    top: 50%;
}

/* Responsive */
@media (max-width: 768px) {
    .pedigree-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .generation-selector {
        justify-content: center;
    }
    
    .node-content {
        min-width: 150px;
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .root-node .node-content {
        min-width: 180px;
    }
    
    .node-children {
        margin-left: 25px;
    }
    
    .child-branch::before {
        left: -25px;
        width: 25px;
    }
    
    .node-children::before {
        left: -25px;
    }
}


