/* Refinements for the original foundation template. Section order and content stay in the views. */
:root {
    --lf-gold: #ffb526;
    --lf-green: #1a685b;
    --lf-ink: #163d36;
    --lf-muted: #697a75;
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
.foundation-site { background: #fff; color: var(--lf-muted); font-family: "Open Sans", "Segoe UI", sans-serif; line-height: 1.75; }
.foundation-site h1, .foundation-site h2, .foundation-site h3,
.foundation-site h4, .foundation-site h5, .foundation-site h6 { color: var(--lf-ink); letter-spacing: -.025em; line-height: 1.2; }
.foundation-site p { line-height: 1.8; }
.foundation-site .display-6 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
.foundation-site .btn { border-radius: 8px; font-weight: 600; transition: background .2s, box-shadow .2s, transform .2s; }
.foundation-site .btn:hover { transform: translateY(-2px); box-shadow: 0 7px 18px #173f3514; }
.foundation-site .btn-primary { color: #163d36; background: var(--lf-gold); border-color: var(--lf-gold); }
.foundation-site .btn-primary:hover { background: #ffc34f; border-color: #ffc34f; }
.foundation-site .btn-secondary { background: var(--lf-green); border-color: var(--lf-green); color: #fff; }
.foundation-site .form-control { border-radius: 8px; }
.foundation-site a:focus-visible, .foundation-site button:focus-visible,
.foundation-site input:focus-visible, .foundation-site select:focus-visible { outline: 3px solid #d99810; outline-offset: 4px; }
.foundation-site .top-bar {
    margin: 0 !important;
    padding: 22px max(24px, calc((100% - 1140px) / 2));
    background: #155a50 !important;
}
.foundation-site .top-bar > .row { margin: 0; align-items: center; }
.foundation-site .top-bar .foundation-logo { display: block; width: 204px; height: 68px; overflow: hidden; }
.foundation-site .top-bar img { width: 268px; max-width: none; max-height: none; height: auto; transform: translate(-32px, -62px); }
.foundation-site .top-bar .col-lg-8 > .row { align-items: center; }
.foundation-site .top-bar .col-lg-8 > .row > .col-lg-4:first-child { flex: 0 0 3%; width: 3%; }
.foundation-site .top-bar .col-lg-8 > .row > .col-lg-4 { flex: 0 0 43%; width: 43%; }
.foundation-site .top-bar .col-lg-8 > .row > .col-lg-4:last-child { flex: 0 0 54%; width: 54%; }
.foundation-site .top-bar .btn-square { border-radius: 50%; width: 38px; height: 38px; background: #ffffff12 !important; color: var(--lf-gold) !important; }
.foundation-site .top-bar .btn-square i { color: var(--lf-gold) !important; font-size: 14px; }
.foundation-site .top-bar h6 { font-family: inherit; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px !important; }
.foundation-site .top-bar span { display: block; font-size: 11px; line-height: 1.7; max-width: 310px; color: #e0ebe7 !important; }
.foundation-site .navigation-shell { position: sticky; top: 0; z-index: 1020; background: #fff !important; box-shadow: 0 2px 12px #183c350b; border-bottom: 1px solid #e8ede8; }
.foundation-site .nav-bar { padding: 0 max(24px, calc((100% - 1140px) / 2)); }
.foundation-site .navbar { min-height: 68px; background: #fff !important; padding-left: 0 !important; padding-right: 0 !important; }
.foundation-site .navbar .navbar-nav { gap: 25px; }
.foundation-site .navbar .navbar-nav .nav-link { margin: 0; padding: 23px 0; color: #597168; font-family: inherit; font-size: 12px; font-weight: 600; border-bottom: 3px solid transparent; }
.foundation-site .navbar .navbar-nav .nav-link:hover, .foundation-site .navbar .navbar-nav .nav-link.active { color: #1a685b; border-bottom-color: var(--lf-gold); }
.foundation-site .navbar .btn-square { background: #edf3ef; border-color: #edf3ef; color: #245a4d; border-radius: 50%; width: 33px; height: 33px; font-size: 13px; }
.foundation-site .navbar-toggler { background: #1a685b; border: 0; padding: 8px 10px; border-radius: 7px; }
.foundation-site .navbar h4 { font-size: 16px; }
.foundation-site .header-carousel { background: linear-gradient(110deg, #fffaf0e8, #fffdf7ed), url(../img/bg.jpg) center / cover; padding: 40px 0 70px !important; }
.foundation-site .header-carousel .container { padding-top: 25px !important; padding-bottom: 25px !important; }
.foundation-site .header-carousel .display-1 { font-size: clamp(2.6rem, 4.7vw, 4.4rem); line-height: 1.12; text-transform: none !important; letter-spacing: -.045em; font-weight: 700; }
.foundation-site .carousel-text { padding-right: 14px; }
.foundation-site .carousel-text > p { font-size: 16px !important; color: #61766d; max-width: 470px; margin-top: 24px; margin-bottom: 30px !important; }
.foundation-site .carousel-text .d-flex { flex-wrap: wrap; gap: 10px; }
.foundation-site .carousel-text .btn { padding: 14px 23px !important; font-size: 13px; }
.foundation-site .carousel-img { border-radius: 18px; overflow: hidden; box-shadow: 0 20px 45px #173f3512; }
.foundation-site .carousel-img img { width: 100%; height: 370px !important; object-fit: cover; }
.foundation-site .header-carousel .owl-nav { display: flex; gap: 9px; top: auto; bottom: 12px; left: 50%; transform: translateX(-50%); }
.foundation-site .header-carousel .owl-nav button.owl-prev,
.foundation-site .header-carousel .owl-nav button.owl-next { width: 36px; height: 36px; border: 1px solid #dddfd3; border-radius: 50%; background: #fff; color: #245a4d; font-size: 21px; margin: 0; }
.foundation-site .carousel-pause { position: absolute; bottom: 14px; right: max(24px, calc((100% - 1140px) / 2)); padding: 5px 10px; border: 0; background: transparent; color: #62756b; font-size: 11px; z-index: 2; }
.foundation-site .owl-carousel:not(.owl-loaded) { display: block; }
.foundation-site .header-carousel:not(.owl-loaded) > .container:not(:first-child) { display: none; }
.foundation-site .section-title { font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.foundation-site #main-content > .container-fluid.py-5 { padding-top: 70px !important; padding-bottom: 70px !important; }
.foundation-site .about-img { border-radius: 16px; overflow: hidden; }
.foundation-site .about-img::before, .foundation-site .about-img::after { width: 16%; height: 40px; }
.foundation-site .service-title { border-radius: 12px; padding: 32px; }
.foundation-site .service-item { padding: 8px; border-radius: 12px; transition: background .2s, transform .2s; }
.foundation-site .service-item:hover { background: #fffaf0; transform: translateY(-4px); }
.foundation-site .service-item .btn-square { border-radius: 16px; }
.foundation-site .donation-item, .foundation-site .event-item, .foundation-site .team-item { border-radius: 13px; overflow: hidden; border: 1px solid #edf0e8; box-shadow: 0 8px 30px #173f3508; }
.foundation-site .donation-item:hover, .foundation-site .event-item:hover { transform: translateY(-5px); box-shadow: 0 14px 32px #173f3514; }
.foundation-site .donation-item img, .foundation-site .event-item img, .foundation-site .team-item img { transition: transform .45s; }
.foundation-site .donation-item:hover img, .foundation-site .event-item:hover img { transform: scale(1.025); }
.foundation-site .banner-inner { border-radius: 16px; overflow: hidden; }
.foundation-site .banner-inner::before { border-top-width: 80px; border-right-width: 80px; }
.foundation-site .banner-inner::after { border-bottom-width: 80px; border-left-width: 80px; }
.foundation-site .btn-play, .foundation-site .btn-play::before, .foundation-site .btn-play::after { border-radius: 50%; }
.foundation-site .footer { background: #124a42; }
.foundation-site .footer p, .foundation-site .footer .btn-link, .foundation-site .footer span { color: #c2d5cd; font-size: 13px; }
.foundation-site .footer .btn-link { text-align: left; }
.foundation-site .footer .btn-link:hover { color: #ffbc3c; }
.foundation-site .footer h4 { font-size: 20px; }
.foundation-site .footer img { border-radius: 6px; }
.foundation-site .footer .border-top { border-color: #ffffff20 !important; }
.foundation-site .back-to-top { border-radius: 50%; width: 43px; height: 43px; right: 20px; bottom: 20px; font-size: 16px; }
.registration-site .button.primary { background: #1a685b; color: #fff; }
.registration-site .button.secondary { background: #fff; border-color: #dce4dc; color: #1a685b; }
.registration-site .page-section { background: #fff; }
.registration-site .qr-page .qr-card { border: 1px solid #e3e8e0; border-radius: 10px; padding: 20px 12px 25px; background: #fff; }
.registration-site .student-qr-image { display: block; width: 100%; max-width: 232px; height: auto; margin: 0 auto 12px; }
.registration-site .qr-card h2 { margin: 0 0 7px; font-size: 17px; font-family: inherit; font-weight: 650; }
.registration-site .qr-card .school-name { margin: 0; min-height: 0; font-size: 13px; color: #697a75; }
@media (min-width: 1400px) { .foundation-site .container { max-width: 1200px; } }
@media (max-width: 991.98px) {
    .foundation-site .top-bar { padding: 16px 24px; }
    .foundation-site .top-bar .foundation-logo { margin: auto; }
    .foundation-site .navbar .navbar-nav { gap: 0; margin-top: 0; border-top: 0; padding: 10px 0; }
    .foundation-site .navbar .navbar-nav .nav-link { padding: 12px 0; border-bottom-width: 1px; }
    .foundation-site .header-carousel { padding-top: 15px !important; }
    .foundation-site .header-carousel .container { padding-left: 24px; padding-right: 24px; }
    .foundation-site .header-carousel .row { --bs-gutter-y: 30px; }
    .foundation-site .carousel-text { padding: 0; }
    .foundation-site .carousel-img img { height: 350px !important; }
    .foundation-site .carousel-pause { right: 20px; }
}
@media (max-width: 575.98px) {
    .foundation-site .top-bar { padding: 10px 18px; }
    .foundation-site .nav-bar { padding: 0 20px; }
    .foundation-site .navbar { min-height: 57px; }
    .foundation-site .header-carousel .display-1 { font-size: 38px; }
    .foundation-site .carousel-text > p { font-size: 14px !important; margin-top: 18px; }
    .foundation-site .carousel-text .btn { padding: 12px 15px !important; font-size: 12px; }
    .foundation-site .carousel-img img { height: 260px !important; }
    .foundation-site #main-content > .container-fluid.py-5 { padding-top: 42px !important; padding-bottom: 42px !important; }
    .foundation-site .btn-play { flex-shrink: 0; transform: scale(.75); }
    .foundation-site .btn-play + h3 { font-size: 19px; margin-left: 20px !important; }
    .foundation-site .section-title::after { max-width: calc(100% + 40px); left: -20px; }
    .foundation-site .section-title::before { max-width: calc(100% + 30px); left: -15px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .foundation-site *, .foundation-site *::before, .foundation-site *::after { animation: none !important; transition: none !important; }
    .foundation-site .wow { visibility: visible !important; }
}
@media print {
    .foundation-site .top-bar, .foundation-site .navigation-shell, .foundation-site .footer,
    .foundation-site .back-to-top, .foundation-site #spinner, .foundation-site .no-print { display: none !important; }
    .registration-site .qr-page .qr-card { padding: 4mm 2mm; border: 0; border-radius: 0; }
    .registration-site .student-qr-image { width: 48mm; height: 48mm; margin: 0 auto 2mm; }
    .registration-site .qr-card h2 { font-size: 11pt; }
    .registration-site .qr-card .school-name { font-size: 9pt; }
}
.foundation-site .back-to-top.is-visible { display: flex; }
.foundation-site .top-bar .col-lg-8 > .row > .col-lg-4:first-child { padding: 0; min-width: 0; }
/* Camera feedback remains within the camera, above the live video. */
.registration-site .scanner-panel .camera-shell { min-height: 370px; padding-bottom: 112px; }
.registration-site .scanner-panel #camera-placeholder { bottom: 112px; padding: 18px; }
.registration-site .camera-feedback {
    position: absolute; z-index: 5; bottom: 0; left: 0; right: 0;
    min-height: 110px; display: flex; align-items: center; gap: 14px;
    padding: 18px; background: #eef4f0; color: #173e34;
    border-top: 3px solid #81a493; overflow-wrap: anywhere;
}
.registration-site .camera-feedback > span {
    display: grid; place-items: center; flex: 0 0 38px; height: 38px;
    border: 2px solid currentColor; border-radius: 50%; font-size: 24px; font-weight: 700;
}
.registration-site .camera-feedback strong { display: block; font-size: 19px; line-height: 1.25; }
.registration-site .camera-feedback p { margin: 6px 0 0; color: inherit; font-size: 15px; line-height: 1.5; }
.registration-site .camera-feedback[data-type="success"] { background: #dcfce7; color: #14532d; border-color: #22c55e; }
.registration-site .camera-feedback[data-type="warning"] { background: #fff3c4; color: #713f12; border-color: #eab308; }
.registration-site .camera-feedback[data-type="error"] { background: #fee2e2; color: #7f1d1d; border-color: #ef4444; }
.registration-site .attendance-scroll { max-height: 640px; border: 1px solid #d6e0da; border-radius: 9px; margin-top: 14px; }
.registration-site .attendance-table { width: 100%; min-width: 570px; table-layout: fixed; border-collapse: separate; border-spacing: 0; color: #163d36; }
.registration-site .attendance-table th {
    position: sticky; top: 0; z-index: 1; padding: 16px 14px; background: #1a685b;
    color: #fff; font-size: 14px; font-weight: 700; border-bottom: 2px solid #124b40;
}
.registration-site .attendance-table th:nth-child(1) { width: 34%; }
.registration-site .attendance-table th:nth-child(2) { width: 38%; }
.registration-site .attendance-table th:nth-child(3),
.registration-site .attendance-table th:nth-child(4) { width: 14%; }
.registration-site .attendance-table td { padding: 17px 14px; font-size: 15px; line-height: 1.55; border-bottom: 1px solid #dce5de; vertical-align: middle; color: #203c33; }
.registration-site .attendance-table td:first-child { font-weight: 650; }
.registration-site .attendance-table td:nth-child(4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.registration-site .attendance-table tbody tr:nth-child(even) { background: #f1f6f3; }
.registration-site .attendance-table tbody tr:hover { background: #e7f1eb; }
.registration-site .attendance-panel #list-status { color: #3e6555; font-size: 12px; }
@media (min-width: 1000px) {
    .registration-site .registration-grid { grid-template-columns: minmax(330px, .8fr) minmax(0, 1.5fr); }
}
@media (max-width: 999px) {
    .registration-site .registration-grid { grid-template-columns: minmax(0, 1fr); }
}
.registration-site .event-strip h2 { color: #fff; }

.registration-site .attendance-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.registration-site .attendance-toolbar .field {
    flex: 1 1 220px;
}
.registration-site .attendance-toolbar form {
    margin: 0;
}

/* On narrow screens each attendance row becomes a labelled, readable card. */
@media screen and (max-width: 640px) {
    .registration-site .attendance-scroll {
        max-height: none;
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .registration-site .attendance-table {
        display: block;
        min-width: 0;
        width: 100%;
    }

    /* Keep column headers available to assistive technology. */
    .registration-site .attendance-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .registration-site .attendance-table tbody {
        display: grid;
        gap: 14px;
        width: 100%;
    }

    .registration-site .attendance-table tbody tr {
        display: block;
        min-width: 0;
        border: 1px solid #d6e0da;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

    .registration-site .attendance-table tbody tr:nth-child(even) {
        background: #f5f8f6;
    }

    .registration-site .attendance-table td {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
        width: auto;
        max-width: none;
        padding: 12px 14px;
        font-size: 14px;
        line-height: 1.6;
        white-space: normal;
        overflow-wrap: anywhere;
        border-bottom: 1px solid #e6ece7;
    }

    .registration-site .attendance-table td::before {
        color: #527061;
        font-size: 12px;
        font-weight: 650;
    }

    .registration-site .attendance-table td:nth-child(1)::before {
        content: "SISWA";
    }

    .registration-site .attendance-table td:nth-child(2)::before {
        content: "Sekolah";
    }

    .registration-site .attendance-table td:nth-child(3)::before {
        content: "Kelas";
    }

    .registration-site .attendance-table td:nth-child(4)::before {
        content: "Jam";
    }

    .registration-site .attendance-table td:last-child {
        border-bottom: 0;
    }

    .registration-site .attendance-table td[colspan] {
        display: block;
        font-weight: 400;
    }

    .registration-site .attendance-table td[colspan]::before {
        content: none;
    }

    .registration-site .attendance-toolbar .field,
    .registration-site .attendance-toolbar form,
    .registration-site .attendance-toolbar .button {
        width: 100%;
    }

    .registration-site .attendance-panel .pagination {
        justify-content: space-between;
    }
}
