/* ================================================
   Redesigning Materials and Life 2026 — Custom Styles
   (Tailwind handles utility classes via CDN)
   ================================================ */

/* Material Icons */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* ── Accordion ── */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.accordion-content.open {
  opacity: 1;
  transition: max-height 0.7s ease-in, opacity 0.4s ease-in;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-icon.rotated {
  transform: rotate(180deg);
}


/* ── Active nav link highlight ── */
.nav-active {
  background-color: rgba(0, 35, 111, 0.08);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
}

/* ── Offset anchors for fixed nav ── */
section[id],
.accordion-header {
  scroll-margin-top: 6rem;
}


/* ── Search result highlight flash ── */
@keyframes highlightFlash {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 35, 111, 0.03);
  }
  30%, 70% {
    box-shadow: 0 0 0 4px rgba(255, 185, 95, 0.7), 0 8px 32px rgba(255, 185, 95, 0.4);
  }
}

.flash-highlight {
  animation: highlightFlash 4s ease-in-out;
}


/* ── Print: 展開所有手風琴內容、隱藏導航列 ── */
@media print {
  nav {
    position: relative !important;
  }

  .accordion-content {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  .accordion-icon {
    display: none !important;
  }

  .accordion-header {
    cursor: default;
  }
}
