* {
    --skeleton-bg: #ddd;
}

body:has(dialog[open]) {
    overflow: hidden;
}

dialog {
    border: none;
    background: none;
    padding: 0;
    border-radius: 10px;

    /* Closed state of the dialog   */
    opacity: 0;
    transform: translateY(100%);
    transition:
      opacity 0.2s ease-out,
      transform 0.2s ease-out,
      overlay 0.2s ease-out allow-discrete,
      display 0.2s ease-out allow-discrete;
}

/* Open state of the dialog  */
dialog[open] {
    opacity: 1;
    transform: translateY(0);
}

@starting-style {
    dialog[open] {
        opacity: 0;
        transform: translateY(100%);
    }
}
  
dialog::backdrop {
    background-color: rgb(0 0 0 / 0%);
    transition:
      display 0.2s allow-discrete,
      overlay 0.2s allow-discrete,
      background-color 0.2s;
}
  
dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 25%);
}

@starting-style {
    dialog[open]::backdrop {
      background-color: rgb(0 0 0 / 0%);
    }
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    padding: 1rem;
}

.secondary-btn {
    padding: 1rem;
    color: var(--primary-color);
    border-radius: 50px;
    border-width: 2px;
    border-style: solid;
    border-color: var(--primary-color);
}

#warta-modal-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background-color: white;
}

#warta-modal-close-btn:hover {
    opacity: 0.5;
}

#warta-modal-content {
    padding: 0.5rem 1rem;
    max-width: 1200px;
    background: white;
}

#warta-modal-content #warta-title {
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
}

#warta-modal-content #warta-section {
    background-color: var(--secondary-color);
    padding: 0.5rem;
    font-weight: 600;
}

#warta-modal-content table {
    border-collapse: collapse;
    width: 100%;
}

#warta-modal-content thead {
    background-color: var(--secondary-color);
}

#warta-modal-content td, #warta-modal-content th {
    padding: 0.5rem;
}

#warta-modal-content tbody tr:nth-child(odd) td {
    background-color: rgba(0, 0, 0, 0.1);
}

#welcome {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 4rem;
    height: 70vh;
    margin-left: 2rem;
    margin-right: 2rem;
    overflow: hidden;
}

#welcome-church-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

#church-name-1 {
    font-family: Domine, sans-serif;
    font-size: 4.5rem;
    font-weight: bold;
}

#church-name-2 {
    font-family: Domine, sans-serif;
    font-size: 3rem;
}

#schedule-btn {
    padding: 1rem;
    color: var(--primary-color);
    border-radius: 50px;
    border-width: 2px;
    border-style: solid;
    border-color: var(--primary-color);
    margin-top: 2rem;
    font-weight: 600;
    font-size: 1.25rem;
    transition: transform 0.05s ease-in;
}

#schedule-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(0.95);
}

#logo-bg {
    height: 100%;
    background-color: var(--primary-color);
    width: 300px;
    object-fit: contain;
    pointer-events: none;
}

#about-bg-img {
    position: absolute;
    pointer-events: none;
    opacity: 0.25;
    right: 0;
    bottom: 0;
    width: 50%;
}

.tab-group {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow: scroll;
    scrollbar-width: none;

    --left-mask-size: 0px;
    --right-mask-size: 0px;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) var(--left-mask-size), rgba(0, 0, 0, 1) calc(100% - var(--right-mask-size)), rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) var(--left-mask-size), rgba(0, 0, 0, 1) calc(100% - var(--right-mask-size)), rgba(0, 0, 0, 0));
}

.tab-group.is-right-overflowing {
    --right-mask-size: 10%;
}

.tab-group.is-left-overflowing {
    --left-mask-size: 10%;
}

.tab-group::-webkit-scrollbar {
    display: none;
}

.tab-group button:hover {
    /* 5% */
    background-color: #6C00000D;
}

.tab-group button:active {
    /* 10% */
    background-color: #6C00001A;
}

.chip-tab.selected {
    background-color: var(--primary-color) !important;
    color: white;
}

.square-tab.selected {
    font-weight: bold;
    border-left-width: 8px;
}

.chip-tab, .square-tab {
    flex-shrink: 0;
}

.tab-content {
    display: none;
}

#tentang-kami p, #tentang-kami strong, #tentang-kami li, #tentang-kami summary {
    font-size: 1.125rem;
    line-height: 1.8;
}

#tentang-kami li {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

#tentang-kami-tab-group {
    margin-top: 1rem;
}

#tentang-kami-tab-group:has(#visi-tab.selected) ~ #visi,
#tentang-kami-tab-group:has(#beban-doa-tab.selected) ~ #beban-doa,
#tentang-kami-tab-group:has(#pengakuan-iman-grii-tab.selected) ~ #pengakuan-iman-grii,
#tentang-kami-tab-group:has(#pengakuan-iman-penginjilan-tab.selected) ~ #pengakuan-iman-penginjilan,
#visi-tab-group:has(#sebelum-gerakan-tab.selected) ~ #sebelum-gerakan,
#visi-tab-group:has(#gerakan-reformed-dalam-sejarah-tab.selected) ~ #gerakan-reformed-dalam-sejarah,
#visi-tab-group:has(#panggilan-gerakan-reformed-injili-tab.selected) ~ #panggilan-gerakan-reformed-injili
{
    display: block;
}

#panggilan-gerakan-reformed-injili-details {
    margin-left: 2rem;
}

#panggilan-gerakan-reformed-injili-details summary {
    text-decoration: underline;
    cursor: pointer;
    width: fit-content;
}

.chip-tab {
    font-weight: bold;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 50px;
    border-width: 1px;
    border-style: solid;
    border-color: var(--primary-color);
}

.square-tab {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-width: 1px;
    border-style: solid;
    border-color: var(--primary-color);
}

#quote-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 5rem;
}

#quote-box {
    background-color: var(--primary-color);
    padding: 5rem 3rem;
    width: 35%;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#quote-box p {
    font-weight: bold;
    font-size: 1.75rem;
    text-align: right;
    margin-top: 0;
}

#quote-box span {
    font-size: 1.5rem;
}

#activity-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-end;
    justify-content: center;
    margin-top: -4rem;
    z-index: 1;
    position: relative;
}

#activity-schedule-container {
    display: grid;
    grid-template-columns: max-content max-content;
    row-gap: 2rem;
    column-gap: 6rem;
}

#activity-schedule-1 {
    display: flex;
    flex-direction: column;
    padding-right: 3rem;
    border-right: 1px rgba(0, 0, 0, 0.1) solid;
    gap: 2rem;
}

#activity-schedule-2 {
    display: flex;
    flex-direction: column;
    padding-left: 3rem;
    gap: 2rem
}

.activity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem
}

.activity-name {
    font-weight: bold;
    font-size: 1.5rem;
    position: relative;
}

.activity-name::before {
    content: "";
    margin-right: 0.5rem;
    border-left-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-left-width: 2px;
    border-right-width: 2px;
    border-style: solid;
}

.activity-schedule {
    display: flex;
    flex-direction: column;
    gap: 0.25rem
}

.activity-schedule span {
    font-size: 1.25rem;
    color: rgba(0, 0, 0, 0.5);
}

.h-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.section {
    position: relative;
    background-color: white;
    padding-left: 3rem;
    padding-right: 3rem;
    padding-bottom: 4rem;
    border-top-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 0;
    border-right-width: 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.25);
}

.section-title {
    display: inline-block;
    position: relative;
    font-family: Domine, 'serif';
    font-size: 2rem;
    z-index: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    margin-top: -12px;
}

.section-title::before {
    content: "";
    position: absolute;
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--primary-color);
    left: -10px;
    top: 0;
    z-index: -1;
}

.section-content {
    margin: auto;
    position: relative;
}

.jadwal-container {
    display: flex;
    flex-direction: column;
}

.jadwal-box {
    background-color: var(--primary-color);
    padding: 1rem;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 2px white solid;
}

.jadwal-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.jadwal-text {
    font-size: 1.25rem;
    color: white;
    opacity: 0.75;
}

.jadwal-bg-img {
    opacity: 0.25;
    width: 100%;
    aspect-ratio: 333 / 97;
    margin-top: -3rem;
    pointer-events: none;
}

#activity-slideshow {
    width: 400px;
    height: 400px;
}

.slideshow {
    display: flex;
    position: relative;
}

.slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    height: 100%;
    width: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

.slideshow img.focused {
    opacity: 1;
}

.slider {
    display: flex;
    width: 400px;
    height: 80px;
    overflow: scroll;
    scrollbar-width: none;
    position: relative;
    border-top: 4px white solid;
}

.slider::-webkit-scrollbar {
    display: none;
}

button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
}

.slider-button {
    width: 80px;
    height: 80px;
    opacity: 0.5;
    transition: opacity 0.5s ease;
    flex-shrink: 0;
}

.slider-button img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    vertical-align: middle;
    background-color: var(--skeleton-bg);
}

.slider-button.focused {
    opacity: 1;
}

.slider-button:hover {
    opacity: 1;
}

.slider-container {
    position: relative;
}

.slider-container #next-slide-btn, .slider-container #prev-slide-btn {
    background-color: var(--primary-color);
    border-radius: 100%;
    display: flex;
    align-self: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.slider-container #next-slide-btn[data-has-next="false"] {
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    pointer-events: none;
}

.slider-container #prev-slide-btn[data-has-prev="false"] {
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    pointer-events: none;
}

.slider-container #prev-slide-btn {
    transition: opacity 0.3s ease, transform 0.3s ease;
    left: 8px;
}

.slider-container #prev-slide-btn img, .slider-container #next-slide-btn img {
    width: 24px;
    height: 24px;
}

.slider-container #next-slide-btn {
    transition: opacity 0.3s ease, transform 0.3s ease;
    right: 8px;
}

#warta h2, #ringkasan-khotbah h2 {
    margin-bottom: 0.5rem;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.17em;
    font-weight: 600;
    position: relative;
    margin-left: 1.5rem;
}

#warta h2::before, #ringkasan-khotbah h2::before {
    content: "";
    border-left: 2.5px var(--primary-color) solid;
    height: 80%;
    vertical-align: middle;
    transform: skewX(-30deg) translateY(-50%);
    top: 50%;
    left: -1.5rem;
    position: absolute;
    margin-right: 1rem;
}

#warta {
    margin-top: 3rem;
}

#ringkasan-khotbah {
    margin-top: 2rem;
}

#ringkasan-khotbah-list, #warta-list {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: scroll;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

#ringkasan-khotbah-list::-webkit-scrollbar, #warta-list::-webkit-scrollbar {
    display: none;
}

.ringkasan-khotbah-container, .warta-container {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    align-items: center;
    gap: 1rem;
    border: 0.5px rgba(0, 0, 0, 0.25) solid;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: 0.2s transform ease;
    cursor: pointer;
}

.ringkasan-khotbah-container:hover, .warta-container:hover {
    transform: scale(1.05);
}

.ringkasan-khotbah-file, .warta-date {
    display: flex;
    flex-direction: column;
}

.warta-date {
    font-size: 1rem;
}

.ringkasan-khotbah-file span:nth-child(1) {
    color: black;
}

.ringkasan-khotbah-file span:nth-child(2) {
    color: rgba(0, 0, 0, 0.5);
}

.ringkasan-khotbah-container .download-icon, .warta-container .show-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.ringkasan-khotbah-img, .warta-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

#grii-hero {
    font-size: 24rem;
    display: block;
    text-align: center;
    font-family: Domine, serif;
    color: rgba(0, 0, 0, 0.25);
    margin-bottom: -6rem;
    margin-top: -5rem;
    position: relative;
    z-index: -1;
    user-select: none;
}

footer {
    display: flex;
    flex-direction: row;
    background-color: var(--primary-color);
    color: white;
    padding: 3rem;
    padding-bottom: 5rem;
}

footer a {
    color: white;
    width: fit-content;
}

.footer-content {
    display: flex;
    flex-direction: row;
    margin: auto;
    width: 100%;
    gap: 2rem;
}

.footer-section {
    display: flex;
    flex: 1;
    justify-content: center;
}

.footer-section > div {
    display: flex;
    flex-direction: column;
}

.footer-section #church-name {
    font-weight: bold;
}

#footer-social-media {
    display: grid;
    grid-template-columns: max-content max-content;
    margin-top: 1rem;
    gap: 0.5rem;
    column-gap: 2rem;
}

#footer-external-link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    column-gap: 1rem;
}

#footer-offering {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#footer-offering > div {
    display: flex;
    flex-direction: column;
}

#footer-offering .offering-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.25rem;
}

a[target=_blank] {
    border-bottom: 1px white solid;
}

a[target=_blank]::after {
    content: url("assets/images/icons/arrow_outward.svg");
    vertical-align: middle;
    margin-left: 0.25rem;
    display: inline-block;
    width: 24px;
    height: 24px;
}

footer p {
    margin-top: 0;
    font-weight: bold;
}

.social-media {
    border-bottom: none !important;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.social-media::after {
    content: none !important;
}

footer a:hover {
    opacity: 0.75;
}

.whatsapp::before {
    content: "";
    background: url("assets/images/icons/whatsapp.svg") no-repeat;
    background-size: contain;
    background-position: center;
    vertical-align: text-bottom;
    display: inline-block;
    margin-right: 0.5rem;
    height: 24px;
    width: 24px;
}

.facebook::before {
    content: "";
    background: url("assets/images/icons/facebook.svg") no-repeat;
    background-size: contain;
    background-position: center;
    vertical-align: text-bottom;
    display: inline-block;
    margin-right: 0.5rem;
    height: 24px;
    width: 24px;
}

.instagram::before {
    content: "";
    background: url("assets/images/icons/instagram.svg") no-repeat;
    background-size: contain;
    background-position: center;
    vertical-align: text-bottom;
    display: inline-block;
    margin-right: 0.5rem;
    height: 24px;
    width: 24px;
}

.warta-skeleton, .khotbah-skeleton {
    height: 67px;
    width: 280px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton {
    background: linear-gradient(90deg, var(--skeleton-bg) 40%, #efefef, var(--skeleton-bg) 60%) right / 300% 100%;
    animation: skeleton-loading 1.5s linear infinite;
}

@keyframes skeleton-loading {
    to {
      background-position: left;
    }
}

@media only screen and (min-width: 768px) {
    .section-content, .footer-content {
        max-width: 1200px;
    }
}

/* Laptop, larger tablets in landscape, and small desktops */
@media only screen and (max-width: 1279px) {
    #activity-container {
        margin-top: -5rem;
    }

    .footer-content {
        gap: 3rem;
        flex-direction: column;
    }

    .footer-section {
        justify-content: unset;
    }

    #quote-box {
        width: 50%;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    #quote-container {
        padding: 0;
    }

    #grii-hero {
        font-size: 16rem;
        margin-top: -3rem;
        margin-bottom: -4rem;
    }
}

@media only screen and (max-width: 1124px) {
    #activity-schedule-container {
        column-gap: 3rem;
    }

    #about-bg-img {
        width: 75%;
    }

    #quote-box {
        width: 100%;
        padding: 3rem 1rem;
        align-items: flex-start;
    }

    #quote-box p {
        font-size: 1.5rem;
        text-align: left;
    }

    #quote-box span {
        font-size: 1.125rem;
    }

    #quote-container {
        align-items: unset;
        margin-bottom: 2rem;
        flex-direction: row;
    }
}

@media only screen and (max-width: 1020px) {
    .activity-name {
        font-size: 1.25rem;
    }

    .activity-name::before {
        border-right-width: 1px;
    }

    .activity-schedule span {
        font-size: 1.15rem;
    }

    #activity-slideshow {
        width: 350px;
        height: 350px;
    }

    .slider {
        width: 350px;
        height: 70px;
    }

    .slider-button {
        width: 70px;
        height: 70px;
    }

    #activity-schedule-container {
        row-gap: 1.25rem;
    }
}

@media only screen and (max-width: 1000px) {
    #church-name-1 {
        font-size: 3.5rem;
    }

    #church-name-2 {
        font-size: 2.25rem;
    }

    #welcome {
        margin-right: 0;
    }
}

@media only screen and (max-width: 895px) {
    #activity-container {
        margin-top: -6rem;
        flex-direction: column;
        align-items: center;
    }

    #activity-schedule-container {
        grid-template-columns: max-content max-content max-content max-content;
        column-gap: 1rem;
    }

    .jadwal-bg-img {
        margin-top: -2rem;
    }
}

@media only screen and (max-width: 820px) {
    #activity-schedule-container {
        grid-template-columns: max-content max-content max-content;
        column-gap: 2rem;
    }
}

/* Tablets & larger smartphone */
@media only screen and (max-width: 768px) {
    .jadwal-bg-img {
        margin-top: -1rem;
    }

    #activity-container {
        margin-top: -5rem;
    }

    .activity-name {
        font-size: 1.125rem;
    }

    .activity-schedule span {
        font-size: 1.075rem;
    }

    #grii-hero {
        font-size: 12rem;
        margin-top: -2.25rem;
        margin-bottom: -3rem;
    }

    #church-name-1 {
        font-size: 2rem;
    }
    
    #church-name-2 {
        font-size: 1.25rem;
    }

    #schedule-btn {
        font-size: 1rem;
        margin-top: 1rem;
        padding: 0.5rem 0.75rem;
    }

    #welcome {
        flex-direction: column-reverse;
        justify-content: flex-end;
        height: 40vh;
        gap: 0;
        margin: 0;
    }

    #welcome-church-name {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    #logo-bg {
        width: 100%;
        height: 35px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .section {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0.75rem 1.25rem;
    }

    #tentang-kami p, #tentang-kami strong, #tentang-kami li, #tentang-kami summary {
        font-size: 1rem;
    }

    #tentang-kami-tab-group {
        margin-top: 0.5rem;
    }

    #about-bg-img {
        width: 100%;
    }

    #activity-slideshow {
        width: 300px;
        height: 300px;
    }

    .slider {
        width: 300px;
        height: 60px;
    }
    
    .slider-button {
        width: 60px;
        height: 60px;
    }

    #activity-schedule-container {
        column-gap: 1.25rem;
    }

    #warta {
        margin-top: 1.5rem;
    }

    #ringkasan-khotbah {
        margin-top: 1rem;
    }

    #warta h3::before, #ringkasan-khotbah h3::before {
        height: 60%;
        left: -1.25rem;
    }

    footer {
        padding: 2rem 1rem;
    }

    #footer-social-media {
        grid-template-columns: max-content;
        gap: 1rem;
    }
}

@media only screen and (max-width: 600px) {
    #activity-schedule-container {
        grid-template-columns: max-content max-content;
    }
}

/* Smaller smartphones */
@media only screen and (max-width: 480px) {
    #activity-container {
        margin-top: -3rem;
    }

    #grii-hero {
        font-size: 8rem;
        margin-top: -1.5rem;
        margin-bottom: -2rem;
    }
}

@media only screen and (max-width: 400px) {
    #location {
        margin-right: 5rem;
    }
}

@media only screen and (max-height: 768px) and (max-width: 768px) {
    #welcome {
        height: 50vh;
    }
}

@media only screen and (max-height: 545px) {
    #welcome {
        height: 99vh;
    }
}