:root {
    --color-base: #30506e;
    --color-white: #ffffff;
    --color-dark-gray: #5c6b73;
    --color-text-gray: #666666;
    --color-charcoal: #43454a;
    --color-rights-blue: #72a1b4;
    --color-sidebar-accent: #47748b;
    --color-sidebar-hover: #7386d5;
    --color-body-olive: #5f7053;
    --color-button-border: rgba(148, 148, 148, 0.5);
    --color-sidebar-panel: rgba(0, 0, 0, 0.75);
    --color-overlay: rgba(0, 0, 0, 0.7);
    --line-pnr: orange;
    --line-lrt1: #fff23b;
    --line-lrt2: #924ac2;
    --line-mrt3: #3f94fc;
    --line-4: #fa66fa;
    --line-5: #7acc54;
    --line-6: #eb9d31;
    --line-7: #963d27;
    --line-8: #754e1b;
    --line-9: #db0000;
    --line-pnr-north: #126e3d;
    --line-pnr-south: #0c5b82;
    --font-display: "Oswald", sans-serif;
    --font-condensed: "Saira Extra Condensed", sans-serif;
    --font-body: Arial, sans-serif;
    --font-narrow: "Arial Narrow", Arial, sans-serif;
    --nav-height: 60px;
}

/* ==================== BASE ==================== */

html {
    scroll-behavior: smooth;
    /* Keep anchor targets clear of the sticky navbar */
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--color-base);
}

a {
    text-decoration: none;
}

.section-title {
    margin: 0;
    color: var(--color-text-gray);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 1rem + 2.1vw, 2.5rem);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

/* Small body text */
.section-text,
.more-btn,
.rights-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.section-text {
    color: var(--color-body-olive);
    text-align: center;
}

/* "Know more" outline button */
.more-btn {
    display: block;
    width: fit-content;
    margin: 1.25rem auto 0;
    padding: 10px 20px;
    border: 1.5px solid var(--color-button-border);
    border-radius: 5px;
    color: var(--color-dark-gray);
    text-align: center;
    transition: transform 0.3s ease-in;
}

.more-btn:hover {
    color: var(--color-dark-gray);
    transform: scale(1.05);
}

/* Cards that grow on hover */
.rights-card,
.line-card {
    margin: 0.5rem;
    padding: 0 15px;
    text-align: center;
    transition: transform 0.3s ease-in;
}

.rights-card:hover,
.line-card:hover {
    transform: scale(1.1);
}

/* ==================== NAVIGATION ==================== */

.site-nav {
    padding: 8px 16px;
    background-color: var(--color-base);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.site-nav .container-fluid {
    position: relative;
    min-height: 44px;
}

.menu-btn {
    position: relative;
    z-index: 1;
}

/* Below desktop the logo sits in the middle of the bar */
.site-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-logo {
    display: block;
    height: 44px;
}

.site-links .nav-link {
    color: var(--color-white);
    font-family: Calibri, var(--font-body);
}

/* Text links: white, underlined on hover */
.site-links .nav-link:hover,
.article-link:hover,
.footer-cta:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.search-form {
    align-items: center;
    gap: 8px;
}

.search-input {
    max-width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--bs-light);
    border-radius: 50rem;
    background: transparent;
    color: var(--color-white);
    text-align: center;
}

.search-input::placeholder {
    color: var(--color-white);
}

.search-input:hover::placeholder {
    color: gray;
}

.search-btn {
    padding: 6px 12px;
    border: none;
    background: none;
    color: var(--color-white);
}

/* ==================== MOBILE MENU ==================== */

.sidebar {
    --bs-offcanvas-width: 250px;
    overflow-y: auto;
    background: var(--color-sidebar-panel);
    color: var(--color-white);
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2);
}

.offcanvas-backdrop {
    --bs-backdrop-bg: var(--color-overlay);
    --bs-backdrop-opacity: 1;
}

.sidebar-header {
    position: relative;
    padding: 20px;
    background: var(--color-base);
}

.sidebar-logo {
    width: 75%;
}

.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border: none;
    background: var(--color-base);
    color: var(--color-white);
    transition: all 0.3s;
}

.sidebar-close:hover {
    background: var(--color-white);
    color: var(--color-sidebar-hover);
}

.sidebar-links {
    margin: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-sidebar-accent);
}

.sidebar-links li {
    padding: 0.5rem;
}

.sidebar-link {
    padding-left: 15px;
    color: var(--color-white);
    font-size: 1.1em;
}

.sidebar-link:hover {
    color: var(--color-sidebar-hover);
}

.sidebar-search {
    display: flex;
    padding: 20px;
}

.sidebar-search .search-input {
    flex: 1;
    width: auto;
    min-width: 0;
}

.sidebar-search .search-btn {
    padding: 6px 0 6px 6px;
}

/* ==================== HOME ==================== */

.hero {
    --hero-size: clamp(2.5rem, 7.8vw, 7rem);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 0 15px;
    background: url(https://res.cloudinary.com/kennmasing/image/upload/v1589305605/capstone1/homecover-mobile02_brswfu.png) right center / cover no-repeat;
    text-align: center;
}

.hero-title {
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: var(--hero-size);
    font-weight: 500;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hero-sub {
    margin: calc(var(--hero-size) * -0.3) 0 0;
    color: var(--color-white);
    font-family: var(--font-condensed);
    font-size: clamp(1.2rem, 3.33vw, 3rem);
    line-height: 1.5;
}

/* ==================== BILL OF RIGHTS ==================== */

.rights {
    padding: 1rem 0 3rem;
    background-color: var(--color-white);
}

.rights-logo {
    display: block;
    width: 100px;
    height: auto;
    margin: 0 auto 1rem;
}

.rights-row {
    width: 83.333%;
    margin: 0 auto;
}

.rights-card {
    background-color: var(--color-rights-blue);
}

.rights-title {
    margin: 1rem 0 0.75rem;
    overflow-wrap: anywhere;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
}

.rights-icon {
    display: block;
    width: 80px;
    height: auto;
    margin: 0 auto;
    padding: 0 0 1rem;
}

.rights-text {
    padding: 1rem 0;
    color: var(--color-white);
}

/* ==================== MASS TRANSPORT ==================== */

.rail {
    padding: 2rem 0 3rem;
    background-color: var(--color-white);
}

.rail-main {
    padding: 20px;
}

.line-group {
    margin: 0 0 0.5rem;
    padding-top: 1rem;
    color: var(--color-text-gray);
    font-family: var(--font-narrow);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.line-card {
    background-color: var(--color-white);
}

.line-title {
    margin: 0;
    color: var(--color-charcoal);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 50px;
}

/* Coloured rail line marker; each card sets --line */
.line-marker {
    display: inline-block;
    height: 1.5em;
    margin-right: 0.75em;
    border-left: 5px solid var(--line);
    vertical-align: middle;
}

.line-icon {
    display: block;
    width: 75%;
    height: auto;
    margin: 0 auto;
}

.rail-map {
    align-self: center;
    padding: 0 15px;
}

/* ==================== JOIN US / HALALAN 2022 ==================== */

.joinus {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    min-height: 100vh;
    overflow-x: clip;
    padding: 5vh 15px 2rem;
    background: url(https://res.cloudinary.com/kennmasing/image/upload/v1589305564/capstone1/edsatraffic_c5exgh.jpg) center / cover;
    color: var(--color-white);
}

.article-card {
    max-width: 55rem;
}

.article-label,
.article-link {
    display: block;
    padding: 12px 20px;
    color: var(--color-white);
    font-size: 0.8rem;
}

.article-label {
    border-bottom: 1px solid var(--bs-light);
}

.article-link {
    border-top: 1px solid var(--bs-light);
}

.article-quote {
    margin: 0;
    padding: 20px;
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.halalan {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 360px;
}

.halalan-icon {
    width: 86px;
    height: auto;
}

.halalan-text {
    text-align: center;
}

.halalan-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

.halalan-year {
    margin: -0.25em 0 0;
    font-family: var(--font-condensed);
    font-size: 1.75rem;
    font-weight: 700;
}

.halalan-rule {
    margin: 0.25rem 0 0.5rem;
    border-top: 1px solid var(--color-white);
    opacity: 1;
}

.halalan-cta {
    margin: 0;
    font-size: 0.7rem;
}

/* ==================== NACTO ==================== */

.nacto {
    padding: 2rem 15px 3rem;
    background-color: var(--color-white);
}

.nacto-title {
    margin-bottom: 1rem;
}

.nacto-item {
    margin: 0 0 2rem;
    padding: 0 0.5rem;
    text-align: center;
}

.nacto-caption {
    margin: 0;
    color: var(--color-text-gray);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
}

.nacto-gif {
    display: block;
    width: auto;
    height: 35vh;
    margin: 0.5rem auto;
}

/* ==================== CONTACT ==================== */

.contact {
    padding: 3rem 0;
    background: url(https://res.cloudinary.com/kennmasing/image/upload/v1589305801/capstone1/contacts-bg_z60djz.png) center / cover;
    color: var(--color-white);
}

.contact-col {
    padding: 0 12%;
}

.contact > .row,
.nacto > .row {
    width: 100%;
}

.contact-block {
    margin-bottom: 2.5rem;
}

.contact-title {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
}

.contact-sub {
    margin-bottom: 0.5rem;
    font-family: var(--font-condensed);
    font-size: 1.5rem;
}

.contact-heading {
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
}

.contact-text {
    margin: 0;
    font-family: var(--font-body);
}

.social {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.social-link {
    color: var(--color-white);
    font-size: 2rem;
}

.social-link:hover {
    color: var(--color-white);
    opacity: 0.8;
}

.captcha-title {
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 400;
}

.captcha-text {
    margin-bottom: 0.5rem;
    font-family: var(--font-narrow);
}

.captcha-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 325px;
    padding: 20px;
    color: #212529;
}

.captcha-img {
    width: 50px;
    height: 50px;
}

/* ==================== FOOTER ==================== */

.site-footer {
    padding: 16px 30px 20px;
    background-color: var(--color-base);
    color: var(--color-white);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.footer-logo {
    width: 180px;
}

.footer-cta {
    order: 3;
    width: 100%;
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
}

.footer-btn {
    padding: 6px 16px;
}

.footer-social {
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.footer-rule {
    width: 95%;
    margin: 16px auto;
    border-top: 1px solid var(--color-white);
    opacity: 1;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 0.8rem;
    text-align: center;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    order: -1;
    margin: 0;
    font-size: 0.7rem;
}

.footer-legal li + li::before {
    content: "|";
    padding: 0 0.5em;
}

.footer-legal a {
    color: var(--color-white);
}

/* ==================== TABLET (576px / 768px and up) ==================== */

@media (min-width: 576px) {
    .hero {
        background-image: url(https://res.cloudinary.com/kennmasing/image/upload/v1589305510/capstone1/homecover_xnerzl.png);
        background-position: center;
    }
}

@media (min-width: 768px) {
    .halalan {
        max-width: 540px;
    }
}

/* ==================== DESKTOP (992px and up) ==================== */

@media (min-width: 992px) {
    :root {
        --nav-height: 94px;
    }

    .section-text {
        max-width: 75%;
        margin: 0 auto 1.5rem;
    }

    .site-nav {
        padding: 15px 10px;
    }

    .site-brand {
        position: static;
        flex: 0 0 auto;
        transform: none;
    }

    .site-logo {
        height: 64px;
    }

    .site-links {
        flex: 1;
        flex-wrap: nowrap;
        justify-content: center;
        white-space: nowrap;
    }

    .site-links .nav-link {
        padding: 8px 6px;
    }

    .search-form {
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .search-input {
        width: 130px;
    }

    .hero {
        --hero-size: 7rem;
        min-height: 100vh;
    }

    .hero-sub {
        font-size: 3rem;
    }

    .rights {
        min-height: 100vh;
        padding-top: 15vh;
    }

    .rights-intro {
        max-width: 705px;
    }

    .nacto .section-text {
        font-size: 1rem;
    }

    .rights-logo {
        width: 150px;
        margin-bottom: -1rem;
    }

    .rights-title {
        font-size: 1.5rem;
        line-height: 50px;
    }

    .rights-icon {
        width: 50%;
        padding: 1rem 0;
    }

    .more-btn {
        font-size: 1rem;
    }

    .rail {
        min-height: 100vh;
        padding-top: 12vh;
    }

    .line-group {
        margin-bottom: -0.5rem;
        padding: 0 0 0 8px;
        font-size: 1.75rem;
        text-align: left;
    }

    .line-title {
        font-size: 1.5rem;
    }

    .joinus {
        padding-top: 15vh;
    }

    .article-quote {
        font-size: 2.5rem;
    }

    .halalan-icon {
        width: 90px;
    }

    .halalan-title {
        font-size: 2.5rem;
    }

    .halalan-year {
        font-size: 2.3rem;
    }

    .halalan-cta {
        font-size: 0.8rem;
    }

    .nacto {
        display: flex;
        align-items: center;
        min-height: 100vh;
    }

    .nacto-title,
    .nacto-caption {
        color: var(--color-charcoal);
    }

    .nacto-caption {
        font-size: 1.25rem;
    }

    .nacto-item {
        padding: 0 10px;
    }

    .nacto-gif {
        width: 160px;
        max-width: 100%;
        height: auto;
    }

    .contact {
        display: flex;
        align-items: center;
        min-height: 80vh;
        background-attachment: fixed;
    }

    .contact-col {
        padding: 0 6.5%;
    }

    .footer-logo {
        width: 240px;
    }

    .footer-cta {
        order: 0;
        width: auto;
        font-size: 1.2rem;
        font-weight: 400;
    }

    .footer-btn {
        margin-right: 16px;
        padding: 6px 48px;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer-copy {
        padding-left: 16px;
        text-align: left;
    }

    .footer-legal {
        order: 0;
        margin-right: 24px;
        font-family: var(--font-display);
        font-size: 0.9rem;
    }

    .footer-legal li + li::before {
        padding: 0 1.5em;
    }
}

/* ==================== WIDE DESKTOP (1400px and up) ==================== */

@media (min-width: 1400px) {
    .site-brand,
    .search-form {
        flex: 0 0 25%;
    }

    .site-links .nav-link {
        padding: 8px 16px;
    }

    .search-input {
        width: 233px;
    }
}
