
/* ========================================
   KPUM FAI UNSIKA - PUBLIC WEBSITE
======================================== */

:root {
    --maroon: #64162D;
    --maroon-dark: #42101F;
    --maroon-light: #852B45;
    --gold: #C7A66A;
    --cream: #FBF8F4;
    --rose: #F6ECEF;
    --white: #FFFFFF;
    --ink: #30232A;
    --muted: #82747A;
    --line: #EAE0E3;
    --green: #237A5B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body.public-site {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--white);
    color: var(--ink);
    line-height: 1.7;
}

.public-site a {
    text-decoration: none;
    color: inherit;
}

.site-container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

/* NAVBAR */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 46px;
    height: 46px;
    background: var(--maroon);
    color: white;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.brand-copy strong {
    font-size: 17px;
    color: var(--maroon);
}

.brand-copy span {
    font-size: 11px;
    color: var(--muted);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 27px;
}

.desktop-nav a {
    font-size: 13px;
    font-weight: 600;
    color: #65565D;
    transition: color .2s;
}

.desktop-nav a:hover {
    color: var(--maroon);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--maroon);
    color: white !important;
    padding: 11px 19px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}

.nav-cta:hover {
    background: var(--maroon-dark);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
}

/* HERO */

.hero-section {
    background:
        radial-gradient(circle at 85% 20%, #F0DCE1 0, transparent 30%),
        linear-gradient(135deg, #FBF8F4, #F8F0F1);
    padding: 85px 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 65px;
}

.hero-eyebrow,
.section-eyebrow {
    color: var(--maroon-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eyebrow-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
}

.hero-content h1 {
    margin-top: 22px;
    font-size: clamp(40px, 5vw, 65px);
    line-height: 1.13;
    letter-spacing: -2px;
    color: var(--maroon-dark);
}

.hero-content h1 span {
    color: var(--maroon-light);
    display: block;
}

.hero-description {
    margin-top: 22px;
    max-width: 540px;
    color: var(--muted);
    font-size: 15px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.btn-primary,
.btn-outline,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 13px 20px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}

.btn-primary {
    background: var(--maroon);
    color: white !important;
}

.btn-primary:hover {
    background: var(--maroon-dark);
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid #DCC9CE;
    color: var(--maroon);
    background: white;
}

.btn-outline:hover {
    border-color: var(--maroon);
    background: var(--rose);
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 11px;
}

.note-icon {
    width: 20px;
    height: 20px;
    background: #E5F3EC;
    color: var(--green);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: bold;
}

/* HERO VISUAL */

.hero-visual {
    min-height: 440px;
    position: relative;
    display: grid;
    place-items: center;
}

.visual-card {
    position: relative;
    z-index: 2;
    width: min(100%, 390px);
    min-height: 390px;
    padding: 28px;
    color: white;
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 20%, #A34A62, transparent 40%),
        linear-gradient(145deg, #852B45, #42101F);
    box-shadow: 0 30px 65px rgba(66,16,31,.23);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.visual-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    right: -90px;
    bottom: -110px;
}

.visual-top,
.visual-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
    letter-spacing: 1.4px;
    font-weight: 700;
}

.visual-year {
    color: #E9CFA1;
}

.visual-emblem {
    width: 115px;
    height: 115px;
    margin: 18px auto;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #EAD4A8;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 3px;
    box-shadow: 0 0 0 9px rgba(199,166,106,.08);
}

.visual-message {
    text-align: center;
    position: relative;
    z-index: 2;
}

.visual-message > span {
    color: #E8CFA0;
    font-size: 9px;
    letter-spacing: 2px;
}

.visual-message h2 {
    margin: 9px 0;
    font-size: 31px;
    line-height: 1.2;
}

.visual-message p {
    color: #EBDDE0;
    font-size: 11px;
}

.visual-bottom {
    color: #EAD4A8;
}

.visual-decoration {
    position: absolute;
    border-radius: 50%;
}

.decoration-one {
    width: 290px;
    height: 290px;
    border: 1px solid #D7BDBF;
    right: 0;
    top: 10px;
}

.decoration-two {
    width: 190px;
    height: 190px;
    background: #F1DFE2;
    left: 0;
    bottom: 20px;
}

.floating-label {
    position: absolute;
    z-index: 3;
    padding: 12px 17px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(50,20,30,.08);
    color: var(--maroon);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.floating-label span {
    color: var(--gold);
    margin-right: 7px;
}

.label-top {
    top: 55px;
    left: -15px;
}

.label-bottom {
    right: -15px;
    bottom: 60px;
}

/* TRUST STRIP */

.trust-strip {
    background: white;
    border-bottom: 1px solid var(--line);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 25px 0;
    gap: 20px;
}

.trust-grid div {
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    border-left: 2px solid var(--gold);
}

.trust-grid strong {
    font-size: 12px;
    color: var(--maroon);
    letter-spacing: 1px;
}

.trust-grid span {
    font-size: 11px;
    color: var(--muted);
}

/* CONTENT SECTION */

.content-section {
    padding: 85px 0;
    background: white;
}

.section-soft {
    background: var(--cream);
}

.section-heading h2,
.section-title-center h2,
.announcement-intro h2 {
    margin-top: 12px;
    color: var(--maroon-dark);
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.25;
    letter-spacing: -1px;
}

.section-heading h2 span,
.announcement-intro h2 span {
    color: var(--maroon-light);
}

.about-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 80px;
}

.about-content p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 17px;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 30px;
}

.about-values div {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.about-values span {
    color: var(--gold);
    font-weight: 800;
    font-size: 12px;
}

.about-values strong {
    margin-top: 6px;
    color: var(--maroon);
    font-size: 12px;
}

/* TIMELINE */

.section-title-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 42px;
}

.section-title-center p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
}

.timeline-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 24px 19px;
    transition: .25s;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(66,16,31,.08);
    border-color: #D6B6C0;
}

.timeline-number {
    width: 39px;
    height: 39px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--rose);
    color: var(--maroon);
    font-weight: 800;
    font-size: 13px;
}

.timeline-card h3 {
    margin-top: 18px;
    color: var(--maroon-dark);
    font-size: 15px;
}

.timeline-card p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.section-footnote {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    margin-top: 24px;
}

/* CANDIDATES */

.candidate-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 35px;
}

.candidate-heading p {
    max-width: 580px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.candidate-label {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 9px 15px;
    color: var(--maroon);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.candidate-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.candidate-category {
    background: var(--maroon);
    color: white;
    border-radius: 15px;
    padding: 27px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: .25s;
}

.candidate-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(66,16,31,.15);
}

.category-gold {
    background: #F5EFE3;
    color: var(--maroon-dark);
    border: 1px solid #E9DCC3;
}

.category-icon {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
}

.category-gold .category-icon {
    border-color: #D7C49F;
}

.candidate-category > div:nth-child(2) {
    margin-top: 20px;
}

.candidate-category > div > span {
    font-size: 9px;
    letter-spacing: 1.5px;
    opacity: .8;
}

.candidate-category h3 {
    margin: 5px 0 8px;
    font-size: 21px;
}

.candidate-category p {
    max-width: 440px;
    font-size: 12px;
    opacity: .85;
}

.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,.2);
    margin-top: 25px;
    padding-top: 15px;
    font-size: 10px;
    font-weight: 700;
}

.category-gold .category-footer {
    border-color: #DCCFB9;
}

.candidate-empty,
.announcement-empty {
    text-align: center;
    padding: 35px 20px;
    border: 1px dashed #DCCBD0;
    background: #FCF9FA;
    border-radius: 13px;
}

.candidate-empty {
    margin-top: 22px;
}

.empty-symbol {
    color: var(--gold);
    font-size: 25px;
    margin-bottom: 8px;
}

.candidate-empty strong,
.announcement-empty strong {
    display: block;
    color: var(--maroon);
    font-size: 14px;
}

.candidate-empty p,
.announcement-empty p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

/* ANNOUNCEMENT */

.announcement-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.announcement-intro p {
    margin-top: 15px;
    color: var(--muted);
    font-size: 13px;
}

.announcement-empty {
    padding: 50px 25px;
}

/* CTA */

.cta-section {
    background:
        radial-gradient(circle at 85% 10%, #853B52, transparent 35%),
        var(--maroon-dark);
    color: white;
    padding: 65px 0;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.cta-inner > div > span {
    color: #E6C990;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.cta-inner h2 {
    max-width: 570px;
    margin-top: 10px;
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.25;
}

.cta-inner p {
    max-width: 550px;
    margin-top: 12px;
    color: #E9D8DE;
    font-size: 13px;
}

.btn-light {
    flex-shrink: 0;
    background: white;
    color: var(--maroon) !important;
}

.btn-light:hover {
    background: #F3E5E9;
    transform: translateY(-3px);
}

/* FOOTER */

.site-footer {
    background: #2F111D;
    color: white;
    padding-top: 55px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr .8fr;
    gap: 60px;
    padding-bottom: 40px;
}

.footer-brand .brand-mark {
    background: var(--gold);
    color: var(--maroon-dark);
}

.footer-brand .brand-copy strong {
    color: white;
}

.footer-brand .brand-copy span {
    color: #D9C3CB;
}

.footer-description {
    max-width: 310px;
    margin-top: 17px;
    color: #CBB8BF;
    font-size: 12px;
}

.footer-grid h3 {
    margin-bottom: 15px;
    font-size: 13px;
    color: #E6C990;
}

.footer-grid > div > a {
    display: block;
    margin-top: 10px;
    color: #D8C7CD;
    font-size: 12px;
}

.footer-grid > div > a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 19px;
    padding-bottom: 19px;
    color: #CBB8BF;
    font-size: 11px;
}

/* TABLET */

@media (max-width: 950px) {

    .desktop-nav {
        gap: 14px;
    }

    .desktop-nav a {
        font-size: 11px;
    }

    .hero-grid {
        gap: 30px;
    }

    .timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        gap: 40px;
    }
}

/* MOBILE */

@media (max-width: 760px) {

    .site-container {
        width: min(100% - 32px, 540px);
    }

    .nav-inner {
        min-height: 68px;
    }

    .desktop-nav,
    .nav-cta {
        display: none;
    }

    .mobile-menu {
        display: block;
        position: relative;
    }

    .mobile-menu summary {
        list-style: none;
        cursor: pointer;
        border: 1px solid var(--line);
        border-radius: 9px;
        padding: 7px 12px;
        color: var(--maroon);
        font-size: 21px;
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu-panel {
        position: absolute;
        top: 45px;
        right: 0;
        width: 215px;
        background: white;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 15px 35px rgba(50,20,30,.13);
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-panel a {
        padding: 10px;
        color: var(--ink);
        font-size: 13px;
        border-radius: 7px;
    }

    .mobile-menu-panel a:hover {
        background: var(--rose);
        color: var(--maroon);
    }

    .hero-section {
        padding: 55px 0 45px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .hero-content h1 {
        font-size: clamp(39px, 11vw, 52px);
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-visual {
        min-height: 370px;
    }

    .visual-card {
        width: min(85%, 350px);
        min-height: 340px;
        padding: 23px;
    }

    .visual-message h2 {
        font-size: 27px;
    }

    .visual-emblem {
        width: 95px;
        height: 95px;
    }

    .label-top {
        left: 0;
        top: 35px;
    }

    .label-bottom {
        right: 0;
        bottom: 30px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .content-section {
        padding: 60px 0;
    }

    .about-grid,
    .announcement-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .about-values {
        gap: 7px;
    }

    .about-values div {
        padding: 10px;
    }

    .about-values strong {
        font-size: 10px;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
    }

    .candidate-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .candidate-category-grid {
        grid-template-columns: 1fr;
    }

    .candidate-category {
        min-height: 230px;
        padding: 22px;
    }

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

}

/* SMALL MOBILE */

@media (max-width: 380px) {

    .brand-copy span {
        font-size: 9px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions a {
        width: 100%;
    }

    .visual-card {
        width: 90%;
    }

    .floating-label {
        font-size: 8px;
        padding: 9px 11px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid > div:first-child {
        grid-column: auto;
    }
}

/* =====================================
   DYNAMIC KPUM HERO BANNER
===================================== */

.hero-slide {
    display: none;
}

.hero-slide.is-active {
    display: block;
    animation: heroBannerFade .45s ease;
}

@keyframes heroBannerFade {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-hero-visual {
    width: 100%;
    min-height: 420px;
    overflow: hidden;
    border-radius: 22px;
    background: #F1E5E8;
    box-shadow: 0 25px 55px rgba(66,16,31,.12);
}

.dynamic-banner-picture {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
}

.dynamic-banner-picture img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 22px;
}

/* SLIDER CONTROL */

.hero-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.hero-carousel-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid #E6D7DC;
    border-radius: 50%;
    background: white;
    color: #64162D;
    font-size: 17px;
    cursor: pointer;
    transition: .2s;
}

.hero-carousel-arrow:hover {
    background: #64162D;
    color: white;
}

.hero-carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #D9C5CC;
    cursor: pointer;
    transition: .25s;
}

.hero-carousel-dot.active {
    width: 25px;
    background: #64162D;
}

/* MOBILE */

@media (max-width: 760px) {

    .dynamic-hero-visual {
        min-height: 290px;
        border-radius: 15px;
    }

    .dynamic-banner-picture {
        min-height: 290px;
    }

    .dynamic-banner-picture img {
        min-height: 290px;
        border-radius: 15px;
    }

    .hero-carousel-controls {
        margin-top: 18px;
    }

}


/* =====================================
   FINAL RESPONSIVE REFINEMENT KPUM
===================================== */

/* Desktop layout */
.site-container {
    width: min(1200px, calc(100% - 48px));
}

.hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(28px, 4vw, 56px);
}

.hero-content,
.hero-visual,
.hero-slide {
    min-width: 0;
}

.hero-content h1 {
    font-size: clamp(42px, 4.5vw, 62px);
    line-height: 1.08;
    letter-spacing: -1.5px;
    overflow-wrap: anywhere;
}

.hero-description {
    max-width: 55ch;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Desktop banner ratio */
.dynamic-hero-visual {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
}

.dynamic-banner-picture {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
}

.dynamic-banner-picture img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

/* Mobile refinement */
@media (max-width: 760px) {

    .site-container {
        width: min(540px, calc(100% - 32px));
    }

    .nav-inner {
        min-height: 68px;
        gap: 12px;
    }

    .site-brand {
        min-width: 0;
        flex: 1;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-copy span {
        overflow-wrap: anywhere;
    }

    .mobile-menu {
        flex: 0 0 auto;
    }

    .mobile-menu summary {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        padding: 0;
    }

    .mobile-menu-panel {
        max-width: calc(100vw - 32px);
    }

    .hero-section {
        padding: 44px 0 38px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .hero-content h1 {
        font-size: clamp(34px, 9vw, 46px);
        line-height: 1.12;
        letter-spacing: -1px;
    }

    .hero-description {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .dynamic-hero-visual {
        aspect-ratio: 4 / 5;
        max-height: 460px;
        min-height: 0;
    }

    .dynamic-banner-picture,
    .dynamic-banner-picture img {
        aspect-ratio: 4 / 5;
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 380px) {

    .site-container {
        width: calc(100% - 28px);
    }

    .brand-copy span {
        font-size: 9px;
    }
}


/* =========================================
   PUBLIC ANNOUNCEMENT - DESKTOP FULL WIDTH
========================================= */

.announcement-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* Judul pengumuman */
.announcement-grid > .announcement-intro {
    max-width: 760px;
}

/* Daftar pengumuman melebar penuh */
.announcement-grid > .announcement-list {
    width: 100%;
    min-width: 0;
}

/* Tetap responsif di tablet dan HP */
@media (max-width: 800px) {
    .announcement-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
}


/* =========================================
   PUBLIC CANDIDATE INFORMATION
========================================= */

.candidate-contest-list {
    display: grid;
    gap: 28px;
    width: 100%;
}

.candidate-contest-card {
    background: #ffffff;
    border: 1px solid #eadde1;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 8px 25px rgba(65, 15, 34, 0.04);
}

.candidate-contest-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eee5e8;
    margin-bottom: 22px;
}

.candidate-contest-header > div:last-child {
    min-width: 0;
}

.candidate-contest-header h3 {
    color: #481224;
    font-size: 19px;
    margin: 5px 0;
}

.candidate-contest-header span {
    color: #956276;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.candidate-contest-header p {
    color: #84747b;
    font-size: 13px;
    margin: 5px 0 0;
}

.candidate-entry-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 300px), 1fr)
    );
    gap: 20px;
}

.candidate-entry-card {
    border: 1px solid #eee3e7;
    border-radius: 16px;
    padding: 20px;
    min-width: 0;
}

.candidate-entry-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.candidate-entry-number span {
    color: #927b84;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
}

.candidate-entry-number strong {
    background: #7b1837;
    color: #ffffff;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 13px;
}

.candidate-member-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 145px), 1fr)
    );
    gap: 18px;
}

.candidate-member {
    min-width: 0;
    text-align: center;
}

.candidate-photo {
    display: block;
    width: 100%;
    max-width: 180px;
    height: 190px;
    object-fit: cover;
    object-position: center;
    border-radius: 13px;
    margin: 0 auto 12px;
    background: #f4edf0;
}

.candidate-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 180px;
    height: 190px;
    margin: 0 auto 12px;
    background: #f5edf0;
    border-radius: 13px;
    color: #927b84;
    font-size: 12px;
}

.candidate-position {
    display: inline-block;
    color: #8a2948;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 7px;
}

.candidate-member h4 {
    color: #481224;
    font-size: 15px;
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

.candidate-member > p {
    color: #897982;
    font-size: 12px;
    margin: 0;
}

.candidate-biography {
    color: #766970;
    font-size: 12px;
    line-height: 1.7;
    text-align: left;
    margin-top: 12px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.candidate-material {
    border-top: 1px solid #eee5e8;
    padding-top: 16px;
    margin-top: 18px;
}

.candidate-material h4 {
    color: #7b1837;
    font-size: 14px;
    margin: 0 0 8px;
}

.candidate-material p {
    color: #766970;
    font-size: 13px;
    line-height: 1.8;
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.candidate-empty-category {
    background: #faf6f7;
    border-radius: 12px;
    padding: 20px;
    color: #897982;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 600px) {

    .candidate-contest-card {
        padding: 17px;
        border-radius: 15px;
    }

    .candidate-contest-header {
        gap: 12px;
    }

    .candidate-contest-header h3 {
        font-size: 16px;
    }

    .candidate-entry-card {
        padding: 15px;
    }

    .candidate-photo,
    .candidate-photo-placeholder {
        height: 165px;
    }
}


/* =========================================
   PUBLIC CANDIDATE - COMPACT GRID
   Desktop : 4 kandidat
   Tablet  : 2 kandidat
   Mobile  : 1 kandidat
========================================= */

/* DAFTAR KATEGORI PEMILIHAN */
.public-site #calon .candidate-contest-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

/* KARTU KATEGORI */
.public-site #calon .candidate-contest-card {
    width: 100%;
    min-width: 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #eadde1;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(65, 15, 34, 0.04);
}

/* HEADER KATEGORI */
.public-site #calon .candidate-contest-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eee5e8;
}

.public-site #calon .candidate-contest-header .category-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
}

.public-site #calon .candidate-contest-header > div:last-child {
    min-width: 0;
}

.public-site #calon .candidate-contest-header h3 {
    color: #481224;
    font-size: 17px;
    line-height: 1.45;
    margin: 5px 0;
}

.public-site #calon .candidate-contest-header span {
    color: #956276;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.public-site #calon .candidate-contest-header p {
    color: #84747b;
    font-size: 12px;
    margin: 5px 0 0;
}

/* GRID KANDIDAT - DESKTOP 4 KOLOM */
.public-site #calon .candidate-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    align-items: stretch;
    width: 100%;
}

/* KARTU SETIAP KANDIDAT */
.public-site #calon .candidate-entry-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #eee3e7;
    border-radius: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.public-site #calon .candidate-entry-card:hover {
    border-color: #d6a9b8;
    box-shadow: 0 8px 22px rgba(65, 15, 34, .07);
}

/* NOMOR URUT */
.public-site #calon .candidate-entry-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.public-site #calon .candidate-entry-number span {
    color: #927b84;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
}

.public-site #calon .candidate-entry-number strong {
    flex-shrink: 0;
    background: #7b1837;
    color: #ffffff;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 11px;
}

/* GRID PROFIL ANGGOTA */
.public-site #calon .candidate-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 10px;
    align-items: start;
}

.public-site #calon .candidate-member {
    min-width: 0;
    text-align: center;
}

/* FOTO KANDIDAT */
.public-site #calon .candidate-photo,
.public-site #calon .candidate-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 120px;
    height: 140px;
    margin: 0 auto 10px;
    border-radius: 10px;
}

.public-site #calon .candidate-photo {
    object-fit: cover;
    object-position: center top;
}

.public-site #calon .candidate-photo-placeholder {
    background: #faf4f6;
    color: #927b84;
    font-size: 10px;
    text-align: center;
    padding: 8px;
}

/* INFORMASI ANGGOTA */
.public-site #calon .candidate-position {
    display: inline-block;
    color: #8a2948;
    font-size: 9px;
    font-weight: 800;
    margin-bottom: 6px;
}

.public-site #calon .candidate-member h4 {
    color: #481224;
    font-size: 12px;
    line-height: 1.45;
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

.public-site #calon .candidate-member > p {
    color: #897982;
    font-size: 10px;
    line-height: 1.5;
    margin: 0;
}

.public-site #calon .candidate-biography {
    color: #766970;
    font-size: 10px;
    line-height: 1.6;
    text-align: left;
    margin-top: 9px;
    overflow-wrap: anywhere;
}

/* VISI DAN MISI */
.public-site #calon .candidate-material {
    border-top: 1px solid #eee5e8;
    padding-top: 12px;
    margin-top: 14px;
}

.public-site #calon .candidate-material h4 {
    color: #7b1837;
    font-size: 12px;
    margin: 0 0 7px;
}

.public-site #calon .candidate-material p {
    color: #766970;
    font-size: 11px;
    line-height: 1.65;
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* KATEGORI BELUM ADA KANDIDAT */
.public-site #calon .candidate-empty-category {
    background: #faf6f7;
    border-radius: 12px;
    padding: 18px;
    color: #897982;
    font-size: 12px;
}

/* =========================================
   TABLET DAN LAPTOP KECIL
========================================= */

@media (max-width: 1199px) {

    .public-site #calon .candidate-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .public-site #calon .candidate-contest-card {
        padding: 19px;
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .public-site #calon .candidate-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-site #calon .candidate-contest-card {
        padding: 15px;
        border-radius: 14px;
    }

    .public-site #calon .candidate-contest-header {
        gap: 11px;
    }

    .public-site #calon .candidate-contest-header h3 {
        font-size: 15px;
    }

    .public-site #calon .candidate-entry-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .public-site #calon .candidate-entry-card {
        padding: 14px;
    }

    .public-site #calon .candidate-member-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .public-site #calon .candidate-photo,
    .public-site #calon .candidate-photo-placeholder {
        max-width: 130px;
        height: 150px;
    }

}

/* =========================================
   PUBLIC CANDIDATE - TOGGLE VISI MISI
   + MOBILE PHOTO ALIGNMENT
========================================= */

/* KARTU KANDIDAT */
.public-site #calon .candidate-entry-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid #eadde1;
    border-radius: 18px;
    background: #fff;
}

/* GRID ANGGOTA */
.public-site #calon .candidate-member-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
}

/* ITEM ANGGOTA */
.public-site #calon .candidate-member {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* FOTO */
.public-site #calon .candidate-photo,
.public-site #calon .candidate-photo-placeholder {
    width: 150px;
    height: 170px;
    border-radius: 14px;
    margin: 0 auto 14px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.public-site #calon .candidate-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f1f3;
    color: #8b6f79;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

/* LABEL POSISI */
.public-site #calon .candidate-position {
    display: inline-block;
    margin-bottom: 8px;
    color: #8b2144;
    font-size: 12px;
    font-weight: 700;
}

/* NAMA */
.public-site #calon .candidate-member h4 {
    margin: 0 0 6px;
    color: #491223;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

/* PRODI */
.public-site #calon .candidate-member > p {
    margin: 0;
    color: #7c6d73;
    font-size: 13px;
    line-height: 1.6;
}

/* TOGGLE VISI MISI */
.public-site #calon .candidate-material-toggle {
    margin-top: 18px;
    border-top: 1px solid #eadde1;
    padding-top: 14px;
}

.public-site #calon .candidate-material-summary {
    list-style: none;
    cursor: pointer;
    color: #7b1837;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.public-site #calon .candidate-material-summary::-webkit-details-marker {
    display: none;
}

.public-site #calon .candidate-material-summary::before {
    content: "▶";
    font-size: 11px;
    transition: transform .2s ease;
    color: #7b1837;
}

.public-site #calon .candidate-material-toggle[open] .candidate-material-summary::before {
    transform: rotate(90deg);
}

.public-site #calon .candidate-material-content {
    margin-top: 14px;
}

.public-site #calon .candidate-material {
    border-top: 1px solid #f0e5e8;
    padding-top: 14px;
    margin-top: 14px;
}

.public-site #calon .candidate-material:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.public-site #calon .candidate-material h4 {
    margin: 0 0 10px;
    color: #7b1837;
    font-size: 16px;
    font-weight: 700;
}

.public-site #calon .candidate-material p {
    margin: 0;
    color: #6f6268;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
    word-break: break-word;
}

/* DESKTOP / TABLET */
@media (min-width: 768px) {
    .public-site #calon .candidate-member-grid {
        grid-template-columns: 1fr;
    }

    .public-site #calon .candidate-photo,
    .public-site #calon .candidate-photo-placeholder {
        width: 160px;
        height: 180px;
    }
}

/* MOBILE */
@media (max-width: 767px) {
    .public-site #calon .candidate-entry-card {
        padding: 16px;
        border-radius: 16px;
    }

    .public-site #calon .candidate-entry-number {
        align-items: flex-start;
    }

    .public-site #calon .candidate-member {
        align-items: center;
        text-align: center;
    }

    .public-site #calon .candidate-photo,
    .public-site #calon .candidate-photo-placeholder {
        width: 124px;
        height: 150px;
        margin: 0 auto 12px;
    }

    .public-site #calon .candidate-material-summary {
        font-size: 13px;
    }

    .public-site #calon .candidate-material h4 {
        font-size: 15px;
    }

    .public-site #calon .candidate-material p {
        font-size: 13px;
        line-height: 1.75;
    }
}


/* ==========================================
   KANDIDAT - RESPONSIVE GRID
   Desktop: 4 kolom
   Mobile : 3 kolom
========================================== */

#calon .candidate-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

#calon .candidate-entry-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #eadde1;
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Nomor kandidat */
#calon .candidate-entry-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 14px;
}

#calon .candidate-entry-number span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .7px;
    color: #907780;
}

#calon .candidate-entry-number strong {
    background: #801839;
    color: #fff;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    white-space: nowrap;
}

/* Profil kandidat */
#calon .candidate-member-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

#calon .candidate-member {
    min-width: 0;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#calon .candidate-photo,
#calon .candidate-photo-placeholder {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    object-position: center top;
    border-radius: 11px;
    margin: 0 auto 10px;
}

#calon .candidate-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f0f2;
    font-size: 11px;
    color: #806d75;
}

#calon .candidate-position {
    font-size: 11px;
    font-weight: 700;
    color: #8b2144;
    margin-bottom: 6px;
}

#calon .candidate-member h4 {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

#calon .candidate-member > p {
    font-size: 12px;
    color: #80717a;
    margin: 0;
    line-height: 1.5;
}

/* Toggle visi misi */
#calon .candidate-material-toggle {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee3e7;
}

#calon .candidate-material-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #801839;
    font-size: 12px;
    font-weight: 700;
}

#calon .candidate-material-summary::-webkit-details-marker {
    display: none;
}

#calon .candidate-material-summary::before {
    content: "▶";
    font-size: 10px;
    transition: transform .2s ease;
}

#calon .candidate-material-toggle[open]
.candidate-material-summary::before {
    transform: rotate(90deg);
}

#calon .candidate-material-content {
    margin-top: 12px;
}

#calon .candidate-material {
    padding: 12px 0;
    border-top: 1px solid #eee3e7;
}

#calon .candidate-material h4 {
    color: #801839;
    font-size: 13px;
    margin: 0 0 7px;
}

#calon .candidate-material p {
    color: #71636b;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Tablet */
@media (max-width: 1100px) {
    #calon .candidate-entry-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

/* HP */
@media (max-width: 767px) {
    #calon .candidate-entry-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    #calon .candidate-entry-card {
        padding: 9px;
        border-radius: 12px;
    }

    #calon .candidate-entry-number {
        gap: 3px;
        margin-bottom: 10px;
    }

    #calon .candidate-entry-number span {
        font-size: 8px;
        letter-spacing: 0;
    }

    #calon .candidate-entry-number strong {
        font-size: 9px;
        padding: 5px 6px;
        border-radius: 6px;
    }

    #calon .candidate-member-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #calon .candidate-photo,
    #calon .candidate-photo-placeholder {
        width: 100%;
        max-width: none;
        aspect-ratio: 3 / 4;
        height: auto;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    #calon .candidate-position {
        font-size: 8px;
        line-height: 1.3;
    }

    #calon .candidate-member h4 {
        font-size: 10px;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    #calon .candidate-member > p {
        font-size: 9px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    #calon .candidate-material-toggle {
        margin-top: 10px;
        padding-top: 9px;
    }

    #calon .candidate-material-summary {
        font-size: 9px;
        gap: 4px;
    }

    #calon .candidate-material-summary::before {
        font-size: 8px;
    }

    #calon .candidate-material h4 {
        font-size: 10px;
    }

    #calon .candidate-material p {
        font-size: 9px;
        line-height: 1.5;
    }

    #calon .candidate-biography {
        font-size: 9px;
        line-height: 1.4;
    }
}


/* =========================================
   RESPONSIVE KANDIDAT KPUM FAI
========================================= */

/* DESKTOP */
@media (min-width: 1200px) {
    .public-site #calon .candidate-entry-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 1199px) {
    .public-site #calon .candidate-entry-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 767px) {

    /* GRID OTOMATIS */
    .public-site #calon .candidate-entry-grid {
        display: grid;
        grid-template-columns: repeat(
            auto-fit,
            minmax(90px, 1fr)
        );
        gap: 10px;
        width: 100%;
        align-items: stretch;
    }

    /* KARTU KANDIDAT */
    .public-site #calon .candidate-entry-card {
        min-width: 0;
        width: 100%;
        padding: 11px 9px;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
    }

    /* NOMOR URUT */
    .public-site #calon .candidate-entry-number {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 12px;
    }

    .public-site #calon .candidate-entry-number span {
        font-size: 8px;
        letter-spacing: .5px;
        line-height: 1.4;
    }

    .public-site #calon .candidate-entry-number strong {
        font-size: 10px;
        padding: 6px 8px;
        white-space: nowrap;
        border-radius: 7px;
    }

    /* FOTO DAN PROFIL */
    .public-site #calon .candidate-member-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .public-site #calon .candidate-member {
        min-width: 0;
        text-align: center;
    }

    .public-site #calon .candidate-photo,
    .public-site #calon .candidate-photo-placeholder {
        display: block;
        width: 100%;
        max-width: 88px;
        height: 116px;
        margin: 0 auto 9px;
        object-fit: cover;
        border-radius: 10px;
    }

    .public-site #calon .candidate-position {
        display: block;
        font-size: 9px;
        line-height: 1.4;
        margin-bottom: 5px;
    }

    .public-site #calon .candidate-member h4 {
        font-size: 12px;
        line-height: 1.35;
        margin: 5px 0;
        overflow-wrap: anywhere;
    }

    .public-site #calon .candidate-member p {
        font-size: 10px;
        line-height: 1.4;
        margin: 4px 0;
        overflow-wrap: anywhere;
    }

    .public-site #calon .candidate-biography {
        font-size: 10px;
        line-height: 1.4;
    }

    /* VISI MISI */
    .public-site #calon .candidate-entry-card summary {
        cursor: pointer;
        font-size: 11px;
        line-height: 1.4;
        padding-top: 10px;
        overflow-wrap: normal;
    }

    .public-site #calon .candidate-material {
        padding: 10px 0;
    }

    .public-site #calon .candidate-material h4 {
        font-size: 11px;
    }

    .public-site #calon .candidate-material p {
        font-size: 10px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
}
