/* ========================================
   1. NOTES LIST & EXCERPT STYLING
   ======================================== */
.notes-list {
  margin: 0 auto;
}

.note-excerpt {
  line-height: 0;
  transition: background-color 0.3s ease;
  cursor: pointer;
  padding: 2rem;
}

.note-header {
  padding: 0rem;
}

.note-title-area {
  display: block;
}

.note-excerpt-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
}

.toggle-note {
  margin-left: 1rem;
  padding: 0;
  cursor: pointer;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.toggle-note.active {
  transform: rotate(45deg);
}

.note-content {
  overflow: hidden;
  transition: height 0.3s ease;
}

/* ========================================
   2. COVER DISPLAY & TRANSITIONS
   ======================================== */
.cover-display {
  transition: opacity 0.6s ease-in-out;
}

.cover-display .img {
  transition: opacity 0.6s ease-in-out;
}

.cover-display img {
  transition: opacity 0.6s ease-in-out;
  opacity: 1;
}

.cover-display.fade-out {
  opacity: 0.3;
}

/* ========================================
   3. PAGE TRANSITION OVERLAY
   ======================================== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* ========================================
   4. GRID LAYOUT SYSTEM
   ======================================== */
section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  margin: 20px 0;
}

div.column {
  grid-column: span var(--span, 6);
}

/* ========================================
   5. BLOCK TYPE MARGINS
   ======================================== */
.block-type-text,
.block-type-eat,
.block-type-gallery,
.block-type-sms-text,
.block-type-code,
.block-type-video {
  margin-bottom: var(--margin-medium-bottom);
}

.block-type-heading,
.block-type-image,
.block-type-karte {
  margin-bottom: calc(var(--margin-medium-bottom) * 0.75);
}

/* ========================================
   6. KARTE BLOCK STYLING
   ======================================== */
.karte-block {
  margin-bottom: var(--margin-medium-bottom);
}

.karte-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--margin-small-bottom);
}

.karte-table th,
.karte-table td {
  padding: 0;
  text-align: left;
  border-bottom: none;
}

.karte-table th {
  font-weight: inherit;
  background: none;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
}

.karte-table td {
  font-size: inherit;
  line-height: inherit;
}

/* ========================================
   7. KARTE TABLE COLUMNS
   ======================================== */
.karte-offer {
  width: 60%;
}

.karte-price-external,
.karte-price-internal {
  width: 20%;
  text-align: right;
  font-weight: 500;
}

.karte-table th.karte-price-external,
.karte-table th.karte-price-internal {
  text-align: right;
}

.karte-price-external h2,
.karte-price-internal p {
  margin: 0;
  text-align: right;
}

/* ========================================
   8. KARTE MARGIN RESET (CRITICAL)
   ======================================== */
.karte-offer h2,
.karte-offer p,
.karte-offer h2 p,
.karte-price-external h2,
.karte-price-internal h2 {
  margin: 0 !important;
  padding: 0 !important;
}

.karte-offer h2 p {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* ========================================
   9. KARTE VERTICAL ALIGNMENT
   ======================================== */
.karte-table td.karte-price-external,
.karte-table td.karte-price-internal {
  vertical-align: bottom;
}

.karte-table tr.karte-spacer td {
  height: 0.75rem;
}

.karte-price-internal {
  color: inherit;
  font-style: normal;
}

/* ========================================
   10. KARTE DESKTOP FONT STYLING
   ======================================== */
.karte-offer h2 {
  font-family: var(--font-family-faktpro) !important;
  font-size: var(--font-size-large) !important;
  line-height: var(--line-height-large) !important;
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */
@media screen and (max-width: 60rem) {
  /* Grid Layout */
  section {
    grid-template-columns: 1fr;
  }
  
  div.column {
    grid-column: span 1;
  }

  /* Cover Display */
  .cover-display .img {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
  }

  .cover-display .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Karte Table Mobile */
  .karte-table {
    font-size: var(--font-size-normal-mobile);
  }
  
  .karte-table th,
  .karte-table td {
    padding: 0.25rem 0;
  }

  /* Karte Mobile Font Sizing */
  .karte-block h2,
  .karte-table h2,
  .karte-price-external h2,
  .karte-price-internal h2 {
    font-family: var(--font-family-faktpro) !important;
    font-size: var(--font-size-large-mobile) !important;
    line-height: var(--line-height-large) !important;
  }

  .karte-offer h2 {
    font-family: var(--font-family-faktpro) !important;
    font-size: 1.5rem !important;
    line-height: var(--line-height-large) !important;
  }

  .karte-offer h2 p {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }

  /* Block Type Mobile Margins */
  .block-type-text,
  .block-type-eat,
  .block-type-image,
  .block-type-gallery,
  .block-type-karte,
  .block-type-sms-text,
  .block-type-code,
  .block-type-video {
    margin-bottom: calc(var(--margin-medium-bottom) * 0.75);
  }
  
  .block-type-heading {
    margin-bottom: var(--margin-small-bottom);
  }
}