.custom-accordion {
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.accordion-header {
    padding: 15px;
    position: relative;
    /*cursor: pointer;*/
}

.accordion-header h2 {
    color: #1e0606;
}

.accordion-header .intro-preview {
    /*color: #1e0606;*/
    font-size: 18px;
    margin-top: 10px;
}

.accordion-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
}

.accordion-toggle p {
    margin: 0;
    text-align: center;
}

.accordion-toggle .arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-top: 10px;
    border-right: 3px solid #1e0606;
    border-bottom: 3px solid #1e0606;
    transform: rotate(45deg);
    transition: transform 0.3s ease, margin-top 0.3s ease;
}

.arrow:hover {
    transform: scale(1.25) rotate(45deg);
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none;
    padding: 0 15px 15px 15px;
}

.accordion-content.expanded {
    display: block;
}

.video-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.timeline {
    position: relative;
    margin: 40px 0;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #c72e40;
    transform: translateX(-50%);
}

#young-cliff-bernice {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    margin: 20px auto;
}

#young-cliff-bernice img {
    margin: 0 10px;
    width: auto;
    max-width: 250px; /* Controls maximum image size */
    height: auto;
    border-radius: 2.5%;
}

#young-cliff-bernice figcaption {
    flex-basis: 100%; /* Makes caption take full width below images */
    margin-top: 10px;
    font-size: 14px;
    color: #1e0606;
    text-align: center;
}

.centered-image {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 20px auto; /* Center the figure within its container */
}

.centered-image img {
    max-width: 100%; /* Make sure the image is responsive */
    height: auto;
    margin-bottom: 10px; /* Adds space between the image and the caption */
    border-radius: 2.5%;
}

.centered-image figcaption {
    font-size: 14px;
    color: #1e0606;
    text-align: center;
}


.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-in-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.right {
    justify-content: flex-end;
}

.timeline-item .timeline-content {
    width: 45%;
    padding: 15px 20px;
    background-color: #fdfdfc;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 5px #fdfdfc solid;
    border-radius: 50%;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.3);
    background-color: #c72e40;
}

@media (max-width: 768px) {
    .timeline-item .timeline-content {
        width: 90%;
        margin: 0 auto;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        justify-content: center;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item.left::before, .timeline-item.right::before {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .timeline-item.left, .timeline-item.right {
        left: auto;
        right: auto;
    }
}

lite-youtube {
    background-color: #000;
    position: relative;
    display: block;
    contain: content;
    background-position: center center;
    background-size: cover;
    cursor: pointer;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 5px;
}

/* gradient */
lite-youtube::before {
    content: attr(data-title);
    display: block;
    position: absolute;
    top: 0;
    /* Pixel-perfect port of YT's gradient PNG, using https://github.com/bluesmoon/pngtocss plus optimizations */
    background-image: linear-gradient(180deg, rgb(0 0 0 / 67%) 0%, rgb(0 0 0 / 54%) 14%, rgb(0 0 0 / 15%) 54%, rgb(0 0 0 / 5%) 72%, rgb(0 0 0 / 0%) 94%);
    height: 99px;
    width: 100%;
    font-family: "YouTube Noto",Roboto,Arial,Helvetica,sans-serif;
    color: hsl(0deg 0% 93.33%);
    text-shadow: 0 0 2px rgba(0,0,0,.5);
    font-size: 18px;
    padding: 25px 20px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

lite-youtube:hover::before {
    color: white;
}

/* responsive iframe with a 16:9 aspect ratio
    thanks https://css-tricks.com/responsive-iframes/
*/
lite-youtube::after {
    content: "";
    display: block;
    padding-bottom: calc(100% / (16 / 9));
}
lite-youtube > iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
}

/* play button */
lite-youtube > .lty-playbtn {
    display: block;
    /* Make the button element cover the whole area for a large hover/click target… */
    width: 100%;
    height: 100%;
    /* …but visually it's still the same size */
    background: no-repeat center/68px 48px;
    /* YT's actual play button svg */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
    position: absolute;
    cursor: pointer;
    z-index: 1;
    filter: grayscale(100%);
    transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
    border: 0;
}

lite-youtube:hover > .lty-playbtn,
lite-youtube .lty-playbtn:focus {
    filter: none;
}

/* Post-click styles */
lite-youtube.lyt-activated {
    cursor: unset;
}
lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated > .lty-playbtn {
    opacity: 0;
    pointer-events: none;
}

.lyt-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
