/*
|--------------------------------------------------------------------------
| The Civil City — Common Application Styles
|--------------------------------------------------------------------------
| Shared styles for the reusable header, footer, page content and
| supplementary vertical panels.
*/

:root {
    --tcc-primary: #0d6efd;
    --tcc-primary-dark: #0a58ca;

    --tcc-heading: #172033;
    --tcc-text: #465267;
    --tcc-muted: #6c757d;

    --tcc-background: #f4f6f9;
    --tcc-surface: #ffffff;
    --tcc-border: #dfe4ec;

    --tcc-footer-background: #172033;
    --tcc-footer-text: #c9d1dd;

    --tcc-border-radius: 0.75rem;
    --tcc-box-shadow: 0 4px 14px rgba(23, 32, 51, 0.06);
}

/* -----------------------------------------------------------------------
   Base styles
------------------------------------------------------------------------ */

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--tcc-background);
    color: var(--tcc-text);
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

a {
    text-underline-offset: 0.2rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* Keyboard accessibility */

.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    padding: 0.75rem 1rem;
    background-color: var(--tcc-surface);
    color: #000000;
    border: 2px solid var(--tcc-primary);
    border-radius: 0.4rem;
}

.skip-link:focus {
    top: 1rem;
}

/* -----------------------------------------------------------------------
   Header
------------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: var(--tcc-surface);
}

.site-header .navbar {
    min-height: 72px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    box-shadow: 0 2px 8px rgba(23, 32, 51, 0.06);
}

.tcc-brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
    white-space: normal;
}

.tcc-brand-name {
    color: var(--tcc-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tcc-brand-tagline {
    margin-top: 0.2rem;
    color: var(--tcc-muted);
    font-size: 0.7rem;
    font-weight: 500;
}

.navbar-nav .nav-link {
    color: var(--tcc-heading);
    font-weight: 600;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--tcc-primary);
}

.navbar-nav .nav-link.active {
    color: var(--tcc-primary);
}

/* -----------------------------------------------------------------------
   Main reusable layout
------------------------------------------------------------------------ */

.site-layout {
    flex: 1;
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.content-card,
.panel-card {
    background-color: var(--tcc-surface);
    border: 1px solid var(--tcc-border);
    border-radius: var(--tcc-border-radius);
    box-shadow: var(--tcc-box-shadow);
}

.content-card {
    padding: 1.5rem;
}

.page-heading {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--tcc-border);
}

.page-eyebrow {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--tcc-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin-bottom: 0.5rem;
    color: var(--tcc-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 750;
}

.page-introduction {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--tcc-text);
    font-size: 1rem;
}

/* -----------------------------------------------------------------------
   Left and right vertical panels
------------------------------------------------------------------------ */

.vertical-panel {
    position: sticky;
    top: 88px;
}

.panel-card {
    overflow: hidden;
}

.panel-heading {
    padding: 0.8rem 1rem;
    background-color: #eef4ff;
    color: var(--tcc-heading);
    border-bottom: 1px solid var(--tcc-border);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.panel-description {
    padding: 1rem 1rem 0;
    margin: 0;
    color: var(--tcc-text);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Advertisement panel */



.advertisement-placeholder {
    min-height: 460px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(
            45deg,
            #fafbfc,
            #fafbfc 10px,
            #f2f4f7 10px,
            #f2f4f7 20px
        );
}

.advertisement-placeholder-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
}

.advertisement-label {
    color: var(--tcc-heading);
    font-size: 0.85rem;
    font-weight: 700;
}

.advertisement-description {
    color: var(--tcc-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Content link panel */

.panel-link-list {
    padding: 0.75rem;
    margin: 0;
    list-style: none;
}

.panel-link-item + .panel-link-item {
    border-top: 1px solid var(--tcc-border);
}

.panel-link {
    display: block;
    padding: 0.75rem 0.5rem;
    color: var(--tcc-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.35rem;
}

.panel-link:hover,
.panel-link:focus {
    color: var(--tcc-primary);
    background-color: #f7f9fc;
}

.panel-empty-message {
    padding: 1rem;
    color: var(--tcc-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* -----------------------------------------------------------------------
   A1 — Top advertisement slider
------------------------------------------------------------------------ */

.top-advertisement-section {
    width: 100%;
    padding: 0.75rem 0 0.4rem;
    background-color: var(--tcc-background);
}

/*
 * Keep the advertisement centred instead of stretching it across
 * the complete browser width.
 */
.top-advertisement-section > .container-fluid {
    width: 100%;
    max-width: 1440px;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

.top-advertisement-frame {
    position: relative;
    width: 100%;
    min-height: 108px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid var(--tcc-border);
    border-radius: 0.65rem;
    box-shadow: var(--tcc-box-shadow);
}

.advertisement-disclosure {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    z-index: 10;
    padding: 0.16rem 0.4rem;
    background-color: rgba(255, 255, 255, 0.94);
    color: #445066;
    border: 1px solid rgba(68, 80, 102, 0.12);
    border-radius: 0.25rem;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.top-advertisement-carousel,
.top-advertisement-carousel .carousel-inner,
.top-advertisement-carousel .carousel-item,
.top-advertisement-link,
.top-advertisement-link picture {
    width: 100%;
    min-height: 108px;
}

.top-advertisement-carousel .carousel-item {
    overflow: hidden;
}

.top-advertisement-link {
    position: relative;
    display: block;
    overflow: hidden;
    background-color: #eef1f5;
    text-decoration: none;
}

.top-advertisement-link picture {
    display: block;
}

.top-advertisement-media {
    display: block;
    width: 100%;
    height: 108px;
    object-fit: cover;
    object-position: center;
    background-color: #eef1f5;
}

.top-advertisement-video {
    border: 0;
}

.top-advertisement-cta {
    position: absolute;
    right: 0.85rem;
    bottom: 0.7rem;
    z-index: 3;
    padding: 0.42rem 0.75rem;
    background-color: rgba(0, 52, 139, 0.94);
    color: #ffffff;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}

.top-advertisement-cta:hover,
.top-advertisement-cta:focus {
    background-color: var(--tcc-primary-dark);
    color: #ffffff;
}

.top-advertisement-carousel .carousel-control-prev,
.top-advertisement-carousel .carousel-control-next {
    width: 2.75rem;
    opacity: 0.75;
}

.top-advertisement-carousel .carousel-control-prev:hover,
.top-advertisement-carousel .carousel-control-next:hover {
    opacity: 1;
}

.top-advertisement-carousel .carousel-control-prev-icon,
.top-advertisement-carousel .carousel-control-next-icon {
    width: 1.3rem;
    height: 1.3rem;
}

.top-advertisement-carousel .carousel-indicators {
    margin-bottom: 0.2rem;
}

.top-advertisement-carousel .carousel-indicators button {
    width: 1.2rem;
    height: 0.16rem;
    margin-right: 0.18rem;
    margin-left: 0.18rem;
    border: 0;
}

/* Large desktop screens */

@media (min-width: 1600px) {
    .top-advertisement-section > .container-fluid {
        max-width: 1500px;
    }
}

/* Tablet */

@media (max-width: 991.98px) {
    .top-advertisement-section {
        padding-top: 0.65rem;
    }

    .top-advertisement-section > .container-fluid {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .top-advertisement-frame,
    .top-advertisement-carousel,
    .top-advertisement-carousel .carousel-inner,
    .top-advertisement-carousel .carousel-item,
    .top-advertisement-link,
    .top-advertisement-link picture {
        min-height: 90px;
    }

    .top-advertisement-media {
        height: 90px;
    }

    .top-advertisement-cta {
        right: 0.7rem;
        bottom: 0.55rem;
        padding: 0.35rem 0.65rem;
        font-size: 0.68rem;
    }
}

/* Mobile */

@media (max-width: 575.98px) {
    .top-advertisement-section {
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
    }

    .top-advertisement-section > .container-fluid {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .top-advertisement-frame {
        border-radius: 0.5rem;
    }

    .top-advertisement-frame,
    .top-advertisement-carousel,
    .top-advertisement-carousel .carousel-inner,
    .top-advertisement-carousel .carousel-item,
    .top-advertisement-link,
    .top-advertisement-link picture {
        min-height: 72px;
    }

    .top-advertisement-media {
        height: 72px;
        object-position: center;
    }

    .top-advertisement-cta {
        right: 0.45rem;
        bottom: 0.4rem;
        padding: 0.26rem 0.5rem;
        font-size: 0.6rem;
    }

    .advertisement-disclosure {
        top: 0.25rem;
        left: 0.25rem;
        padding: 0.12rem 0.3rem;
        font-size: 0.48rem;
    }

    .top-advertisement-carousel .carousel-control-prev,
    .top-advertisement-carousel .carousel-control-next {
        width: 2rem;
    }

    .top-advertisement-carousel .carousel-control-prev-icon,
    .top-advertisement-carousel .carousel-control-next-icon {
        width: 1rem;
        height: 1rem;
    }

    .top-advertisement-carousel .carousel-indicators {
        display: none;
    }
}
/* -----------------------------------------------------------------------
   Common content components
------------------------------------------------------------------------ */

.calculator-placeholder {
    min-height: 280px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px dashed var(--tcc-border);
    border-radius: var(--tcc-border-radius);
    background-color: #fafbfc;
}

.feature-card {
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background-color: #fafbfc;
    border: 1px solid var(--tcc-border);
    border-radius: 0.6rem;
}

.feature-card strong {
    color: var(--tcc-heading);
}

.feature-card span {
    color: var(--tcc-text);
    font-size: 0.875rem;
}

/* -----------------------------------------------------------------------
   Footer
------------------------------------------------------------------------ */

.site-footer {
    padding: 1.25rem 0;
    background-color: var(--tcc-footer-background);
    color: #ffffff;
}

.footer-brand {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.footer-tagline {
    margin-top: 0.2rem;
    color: var(--tcc-footer-text);
    font-size: 0.8rem;
}

.footer-navigation {
    margin-bottom: 0.35rem;
}

.footer-link {
    display: inline-block;
    margin-left: 1rem;
    color: #ffffff;
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-link:hover,
.footer-link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.footer-copyright {
    color: var(--tcc-footer-text);
    font-size: 0.8rem;
}

/* -----------------------------------------------------------------------
   Responsive adjustments
------------------------------------------------------------------------ */

@media (max-width: 991.98px) {
    .vertical-panel {
        position: static;
    }

    .advertisement-placeholder {
        min-height: 150px;
    }

    .site-layout {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .navbar-nav {
        padding-top: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .site-header .navbar {
        min-height: 64px;
    }

    .tcc-brand-name {
        font-size: 0.95rem;
    }

    .tcc-brand-tagline {
        max-width: 230px;
        font-size: 0.65rem;
    }

    .content-card {
        padding: 1rem;
    }

    .footer-link {
        margin-right: 0.35rem;
        margin-left: 0.35rem;
    }
}