/* Layout and components. Colours come from the --brand-* variables in the theme file. */

body {
    background: #fff;
    font-feature-settings: "ss01";
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display-5, .display-6 {
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: -.015em;
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2000;
    padding: .5rem 1rem;
    background: #fff;
    border-radius: var(--bs-border-radius);
}

/* ---------- Header ---------- */
.site-header {
    border-top: 4px solid var(--brand-accent-bright);
}

.navbar-sg {
    background: var(--brand-dark);
    --bs-navbar-padding-y: .65rem;
    --bs-navbar-color: rgba(255, 255, 255, .82);
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
}

.navbar-sg .navbar-brand {
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.brand-text {
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
}

.brand-text strong {
    font-weight: 800;
    color: #fff;
}

.navbar-sg .nav-link {
    font-weight: 600;
    font-size: .95rem;
    position: relative;
}

@media (min-width: 1200px) {
    .navbar-sg .nav-link.active::after {
        content: "";
        position: absolute;
        left: .5rem;
        right: .5rem;
        bottom: -.15rem;
        height: 3px;
        border-radius: 3px;
        background: var(--brand-accent-bright);
    }
}

@media (max-width: 1199.98px) {
    .navbar-sg .navbar-collapse {
        padding-bottom: .5rem;
    }

    .navbar-sg .nav-link.active {
        color: #fff;
        border-left: 3px solid var(--brand-accent-bright);
        padding-left: .75rem;
    }
}

/* ---------- Home hero ---------- */
.hero-sg {
    position: relative;
    background: var(--brand-hero-gradient);
    color: #fff;
    overflow: hidden;
}

.hero-sg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/orchid-pattern.svg") repeat;
    background-size: 220px;
    opacity: .07;
    pointer-events: none;
}

.hero-content {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 1rem;
    z-index: 1;
}

.hero-sg h1 {
    color: #fff;
}

.hero-sg .lead {
    color: rgba(255, 255, 255, .88);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .8rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .85rem;
    font-weight: 600;
}

.hero-skyline {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -1rem;
    position: relative;
}

.quick-spec {
    background: #fff;
    color: var(--bs-body-color);
    border-radius: var(--bs-border-radius-xl);
    box-shadow: 0 1.25rem 3rem rgba(10, 16, 34, .35);
    padding: 1.5rem;
    position: relative;
}

.quick-spec h2 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--brand-primary);
}

.quick-spec .spec-num {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.1;
}

.quick-spec .spec-label {
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.quick-spec .spec-cell {
    background: var(--brand-sand);
    border-radius: var(--bs-border-radius);
    padding: .75rem .9rem;
    height: 100%;
}

.quick-spec-photo {
    width: 96px;
    flex: 0 0 96px;
}

/* ---------- Guide page hero ---------- */
.page-hero {
    position: relative;
    background: var(--brand-page-hero-gradient);
    color: #fff;
    padding: 2.5rem 0 3rem;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60%;
    background: url("../img/singapore-skyline.svg") center bottom / cover no-repeat;
    opacity: .16;
    pointer-events: none;
}

/* Keep the heading, text and icon above the skyline layer. */
.page-hero > .container {
    z-index: 1;
}

.page-hero h1 {
    color: #fff;
}

.page-hero .lead {
    color: rgba(255, 255, 255, .88);
    max-width: 52rem;
}

.hero-meta {
    color: rgba(255, 255, 255, .72);
}

.hero-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 .5rem 1.25rem rgba(200, 16, 46, .35);
}

.breadcrumb-light {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, .5);
    --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .75);
    font-size: .875rem;
}

.breadcrumb-light a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb-light a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .hero-icon {
        display: none;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: 4rem 0;
}

.section-sand {
    background: var(--brand-sand);
}

.section-title {
    margin-bottom: .5rem;
}

.section-kicker {
    color: var(--brand-orchid);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    margin-bottom: .5rem;
}

.divider-orchid {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0;
}

.divider-orchid::before,
.divider-orchid::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(164, 48, 122, .35), transparent);
}

.divider-orchid img {
    width: 28px;
    height: 28px;
}

/* ---------- Guide cards ---------- */
.guide-card {
    position: relative;
    border: 1px solid rgba(20, 33, 61, .08);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: 0 .25rem 1rem rgba(20, 33, 61, .06);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.guide-card:hover,
.guide-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.75rem rgba(20, 33, 61, .12);
    border-color: var(--bs-primary-border-subtle);
}

.guide-card .card-body {
    padding: 1.5rem 1.5rem 2.75rem;
}

.guide-card .card-title {
    color: var(--brand-dark);
    font-weight: 700;
}

.card-arrow {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    color: var(--brand-primary);
    font-size: 1.2rem;
    transition: transform .15s ease;
}

.guide-card:hover .card-arrow {
    transform: translateX(4px);
}

.icon-bubble {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    background: var(--brand-primary-soft);
    color: var(--brand-primary);
    font-size: 1.4rem;
}

.visa-card {
    border: 1px solid rgba(20, 33, 61, .1);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(20, 33, 61, .05);
}

.visa-card h3 a {
    color: var(--brand-dark);
    text-decoration: none;
}

.visa-card h3 a:hover {
    color: var(--brand-primary);
}

/* Long dropdowns (foreign visas) split into two columns on desktop */
@media (min-width: 1200px) {
    .dropdown-menu-cols {
        column-count: 2;
        column-gap: 0;
        min-width: 30rem;
    }

    .dropdown-menu-cols li {
        break-inside: avoid;
    }
}

/* ---------- Article ---------- */
.article {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.article > h2,
.article section > h2 {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    scroll-margin-top: 6rem;
}

.article > h2::after,
.article section > h2::after {
    content: "";
    display: block;
    width: 3rem;
    height: 4px;
    margin-top: .6rem;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-orchid));
}

.article h3 {
    margin-top: 1.75rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.article .intro {
    font-size: 1.15rem;
    color: #3A4256;
}

.article ul li,
.article ol li {
    margin-bottom: .35rem;
}

.toc {
    background: var(--brand-sand);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.toc p {
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--brand-dark);
}

.toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 575.98px) {
    .toc ol {
        columns: 1;
    }
}

.toc a {
    text-decoration: none;
}

/* Spec tables */
.spec-table-wrap {
    border: 1px solid rgba(20, 33, 61, .1);
    border-radius: var(--bs-border-radius-lg);
    overflow: hidden;
    margin: 1.25rem 0;
}

.table-spec {
    font-size: .98rem;
}

.table-spec th {
    width: 36%;
    background: var(--brand-sand);
    color: var(--brand-dark);
    font-weight: 700;
}

.table-spec td,
.table-spec th {
    padding: .8rem 1rem;
}

.table-spec tr:last-child th,
.table-spec tr:last-child td {
    border-bottom: 0;
}

.table-compare {
    font-size: .92rem;
}

.table-compare thead th {
    background: var(--brand-dark);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.table-compare tbody th {
    font-weight: 700;
    color: var(--brand-dark);
    min-width: 11rem;
}

.table-compare td {
    min-width: 7.5rem;
}

/* Callouts */
.callout {
    border-left: 4px solid;
    border-radius: 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.callout-title {
    font-weight: 700;
    margin-bottom: .35rem;
}

.callout-body > :last-child {
    margin-bottom: 0;
}

.callout-official {
    border-color: var(--brand-dark);
    background: var(--brand-official-soft);
}

.callout-official .callout-title {
    color: var(--brand-dark);
}

.callout-tip {
    border-color: var(--brand-orchid);
    background: var(--brand-orchid-soft);
}

.callout-tip .callout-title {
    color: #7C2259;
}

.callout-warning {
    border-color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.callout-warning .callout-title {
    color: var(--brand-primary-darker);
}

/* Do / Don't lists */
.dd-card {
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.25rem .75rem;
}

.dd-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: .5rem;
}

.dd-do {
    background: var(--brand-green-soft);
}

.dd-do .dd-title {
    color: var(--brand-green);
}

.dd-dont {
    background: var(--brand-primary-soft);
}

.dd-dont .dd-title {
    color: var(--brand-primary-darker);
}

.dd-list {
    padding-left: 1.1rem;
    font-size: .98rem;
}

/* Sample photos */
.photo-example {
    margin: 0;
    text-align: center;
}

.photo-frame {
    position: relative;
    border-radius: .5rem;
    padding: .4rem;
    background: #fff;
    box-shadow: 0 .25rem .9rem rgba(20, 33, 61, .12);
    border: 3px solid transparent;
}

.is-ok .photo-frame {
    border-color: var(--brand-green);
}

.is-no .photo-frame {
    border-color: var(--brand-primary);
}

.photo-frame svg,
.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 35 / 45;
    border-radius: .25rem;
    outline: 1px solid rgba(20, 33, 61, .12);
}

.photo-badge {
    position: absolute;
    top: -.65rem;
    right: -.65rem;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .2);
}

.is-ok .photo-badge {
    background: var(--brand-green);
}

.is-no .photo-badge {
    background: var(--brand-primary);
}

.photo-example figcaption {
    margin-top: .6rem;
    font-size: .92rem;
    line-height: 1.4;
}

.is-ok figcaption strong {
    color: var(--brand-green);
}

.is-no figcaption strong {
    color: var(--brand-primary-darker);
}

/* Dimension diagram */
.diagram {
    background: var(--brand-sand);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}

.diagram img {
    max-width: 100%;
    height: auto;
}

.diagram figcaption {
    font-size: .9rem;
    color: var(--bs-secondary-color);
    margin-top: .5rem;
}

/* Steps */
.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.steps > li {
    position: relative;
    padding-left: 3.25rem;
    margin-bottom: 1.25rem;
}

.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: .1rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--brand-primary);
}

/* ---------- Sidebar ---------- */
.sidebar-sticky {
    position: sticky;
    top: 6rem;
    display: grid;
    gap: 1.25rem;
}

.side-card {
    border: 1px solid rgba(20, 33, 61, .1);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    background: #fff;
}

.side-title {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: .75rem;
}

.qf-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(20, 33, 61, .12);
    font-size: .93rem;
}

.qf-row:last-child {
    border-bottom: 0;
}

.qf-row dt {
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.qf-row dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
    color: var(--brand-dark);
}

.related-list li a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .25rem;
    text-decoration: none;
    color: var(--brand-dark);
    font-weight: 600;
    border-radius: .4rem;
}

.related-list li a:hover {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-darker);
}

.related-list .bi {
    color: var(--brand-primary);
}

/* CTA card */
.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--bs-border-radius-xl);
    padding: 1.5rem;
    color: #fff;
    background:
        radial-gradient(circle at 110% -10%, rgba(164, 48, 122, .65), transparent 55%),
        linear-gradient(150deg, var(--brand-dark) 0%, var(--brand-dark-2) 100%);
}

.cta-orchid {
    position: absolute;
    right: -10px;
    top: -10px;
    opacity: .9;
}

.cta-kicker {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #F7B9D9;
}

.cta-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: .5rem;
    padding-right: 3.5rem;
}

.cta-text {
    color: rgba(255, 255, 255, .82);
    font-size: .93rem;
}

.cta-wide {
    padding: 2rem 2.25rem;
}

.cta-wide .cta-title {
    font-size: 1.6rem;
}

/* Sources */
.sources-card {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--bs-border-radius-lg);
    background: var(--brand-official-soft);
}

.sources-card h2 {
    color: var(--brand-dark);
    letter-spacing: .06em;
}

.sources-card li {
    margin-bottom: .35rem;
    font-size: .95rem;
}

/* FAQ */
.faq-accordion {
    --bs-accordion-active-bg: var(--brand-primary-soft);
    --bs-accordion-active-color: var(--brand-primary-darker);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(200, 16, 46, .2);
    --bs-accordion-border-radius: var(--bs-border-radius-lg);
    --bs-accordion-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
}

.faq-accordion .accordion-button {
    font-weight: 700;
}

.faq-accordion .accordion-body > :last-child {
    margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 5rem;
    color: rgba(255, 255, 255, .8);
}

.footer-skyline {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: -1px;
    background: #fff;
}

.footer-body {
    background: var(--brand-dark);
    padding: 2rem 0 2.5rem;
}

.footer-brand {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .85);
}

.footer-brand strong {
    color: #fff;
}

.footer-heading {
    color: #fff;
    font-weight: 700;
    margin-bottom: .75rem;
}

.footer-links li {
    margin-bottom: .4rem;
    font-size: .93rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-rule {
    border-color: rgba(255, 255, 255, .2);
    margin: 2rem 0 1.25rem;
}

.footer-disclaimer {
    color: rgba(255, 255, 255, .65);
}

/* ---------- Print ---------- */
@media print {
    .site-header,
    .site-footer,
    .sidebar-sticky,
    .cta-card,
    .page-hero::after {
        display: none !important;
    }

    .page-hero {
        background: none;
        color: #000;
        padding: 0;
    }

    .page-hero h1,
    .page-hero .lead {
        color: #000;
    }
}
