/* Reset und Basis-Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: 'Times New Roman', 'Georgia', serif;
  background: 
    /* Alte Papier Textur */
    radial-gradient(circle at 20% 50%, transparent 20%, rgba(255,248,220,0.3) 21%, rgba(255,248,220,0.3) 34%, transparent 35%, transparent),
    linear-gradient(0deg, rgba(0,0,0,.03) 50%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,248,220,0.4) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(218,165,32,0.1) 0%, transparent 50%),
    radial-gradient(circle at 0% 50%, rgba(255,248,220,0.3) 0%, transparent 25%),
    linear-gradient(90deg, rgba(0,0,0,.02) 50%, transparent 50%),
    /* Basis Papierfarbe */
    linear-gradient(180deg, #fefcf0 0%, #faf6e8 100%);
  background-size: 
    100px 100px,
    3px 3px,
    150px 150px,
    200px 200px,
    120px 120px,
    2px 2px,
    100% 100%;
  color: #2c2416;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* Foundation Grid System Ersatz */
.grid-x {
  display: flex;
  flex-flow: row wrap;
}

.grid-margin-x {
  margin-left: -0.9375rem;
  margin-right: -0.9375rem;
}

.expanded {
  max-width: 100%;
}

.callout {
  margin: 0 0 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(10, 10, 10, 0.25);
  border-radius: 0;
  position: relative;
  color: #0a0a0a;
  background-color: white;
}

.callout.secondary {
  background: 
    radial-gradient(circle at 30% 20%, rgba(139,69,19,0.05) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(160,82,45,0.04) 0%, transparent 40%),
    linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
    #f8f4e6;
  color: #2c2416;
  border: 1px solid rgba(139,69,19, 0.15);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 2px 5px rgba(139,69,19,0.1);
}

/* Timeline Styles */
.timeline {
  margin: 30px auto;
  position: relative;
  max-width: 1000px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: 
    linear-gradient(180deg, 
      rgba(139,69,19,0.3) 0%, 
      rgba(160,82,45,0.4) 50%, 
      rgba(139,69,19,0.3) 100%);
  z-index: 1;
  box-shadow: 
    inset 0 0 2px rgba(139,69,19,0.5),
    1px 0 3px rgba(139,69,19,0.1);
}

.timeline-item {
  margin: 40px 0;
  position: relative;
  width: 100%;
}

.timeline-item::after {
  content: '';
  display: table;
  clear: both;
}

.timeline-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: 
    radial-gradient(circle at 30% 30%, #a0522d 0%, #8b4513 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 3px solid #fef9e7;
  box-shadow: 
    0 0 0 3px rgba(139,69,19,0.2),
    0 3px 10px rgba(139,69,19,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.timeline-icon svg {
  fill: white;
  width: 24px;
  height: 24px;
}

.timeline-icon img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.timeline-content {
  width: 45%;
  padding: 20px;
  background: 
    radial-gradient(circle at 80% 20%, rgba(139,69,19,0.03) 0%, transparent 30%),
    radial-gradient(circle at 20% 80%, rgba(160,82,45,0.02) 0%, transparent 25%),
    linear-gradient(135deg, rgba(255,248,220,0.8) 0%, rgba(250,246,232,0.9) 100%);
  border-radius: 8px;
  box-shadow: 
    0 3px 15px rgba(139,69,19,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  border: 1px solid rgba(139,69,19, 0.08);
}

/* Standard: Links positioniert */
.timeline-content {
  float: left;
  margin-right: 55%;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 30px;
  right: -10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-left-color: #fff;
}

/* Rechts positioniert */
.timeline-content.right {
  float: right;
  margin-left: 55%;
  margin-right: 0;
}

.timeline-content.right::before {
  right: auto;
  left: -10px;
  border-left-color: transparent;
  border-right-color: #fff;
}

.timeline-content-date {
  font-size: 20px;
  font-weight: bold;
  color: #8b4513;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 rgba(255,248,220,0.8);
}

.timeline-content-month {
  font-weight: normal;
  text-transform: capitalize;
}

.timeline-content p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: #3d3527;
  text-align: justify;
  font-family: 'Times New Roman', Georgia, serif;
  text-shadow: 0 1px 0 rgba(255,248,220,0.5);
  font-size: 16px;
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

.timeline-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timeline-content a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted #2c3e50;
  cursor: pointer;
}

.timeline-content a:hover {
  color: #34495e;
  border-bottom-style: solid;
}

/* Spezifisch für Modal-Links */
[data-toggle] {
  cursor: pointer;
}

[data-toggle]:hover {
  cursor: pointer;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-icon {
    left: 30px;
    width: 40px;
    height: 40px;
  }
  
  .timeline-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .timeline-icon img {
    width: 24px;
    height: 24px;
  }
  
  .timeline-content,
  .timeline-content.right {
    width: calc(100% - 80px);
    float: none;
    margin-left: 80px;
    margin-right: 0;
  }
  
  .timeline-content::before,
  .timeline-content.right::before {
    left: -10px;
    right: auto;
    border-left-color: transparent;
    border-right-color: #fff;
  }
  
  .timeline-content-date {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .callout {
    padding: 0.5rem;
  }
  
  .timeline {
    margin: 15px auto;
  }
  
  .timeline-item {
    margin: 25px 0;
  }
  
  .timeline-content {
    padding: 15px;
    width: calc(100% - 70px);
    margin-left: 70px;
  }
  
  .timeline-content-date {
    font-size: 14px;
  }
}

/* Modal/Reveal Styles */
.reveal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: 
    radial-gradient(circle at 20% 20%, rgba(139,69,19,0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(160,82,45,0.02) 0%, transparent 30%),
    linear-gradient(135deg, rgba(255,248,220,0.95) 0%, rgba(250,246,232,0.98) 100%);
  border-radius: 8px;
  box-shadow: 
    0 0 30px rgba(139,69,19,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(139,69,19, 0.1);
}

.reveal.open {
  display: block;
}

.reveal p {
  margin-bottom: 18px;
  line-height: 1.8;
  text-align: justify;
  color: #3d3527;
  font-family: 'Times New Roman', Georgia, serif;
  text-shadow: 0 1px 0 rgba(255,248,220,0.5);
  font-size: 16px;
}

.reveal strong {
  color: #8b4513;
  font-size: 20px;
  text-shadow: 1px 1px 0 rgba(255,248,220,0.8);
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: #333;
}

/* Overlay für Modals */
.reveal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.reveal-overlay.open {
  display: block;
}

/* Accessibility */
[aria-hidden="true"] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid #2c3e50;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .timeline::before {
    display: none;
  }
  
  .timeline-icon {
    position: relative;
    left: 0;
    transform: none;
    float: left;
    margin-right: 20px;
  }
  
  .timeline-content,
  .timeline-content.right {
    width: 100%;
    float: none;
    margin: 0;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .timeline-content::before,
  .timeline-content.right::before {
    display: none;
  }
  
  .reveal {
    display: none !important;
  }
}