/* Additions to style.css. Kept in a separate file so style.css (compiled from style.scss) stays untouched. */

/* Page titles keep the original h1 size, while each page keeps a single real <h1> (the name in the sidebar). */
.page-title {
    font-size: 2.5rem;
}

/* Skip link for keyboard users */
.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 8px 16px;
    background: #fff;
    color: #2A4B7C;
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid rgba(42, 75, 124, .65);
    outline-offset: 2px;
}

.sidebar :focus-visible,
.bg-secondary :focus-visible,
.bg-primary :focus-visible,
.hero :focus-visible {
    outline-color: #fff;
}

/* Featured article on the home page */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2A4B7C 0%, #202C45 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 420px;
    padding: 3rem 1.5rem;
}

.hero-inner h2 {
    max-width: 40rem;
}

.hero-label {
    font-size: .9rem;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .8);
}

.hero-icon {
    position: absolute;
    right: -1.5rem;
    bottom: -2.5rem;
    font-size: 15rem;
    color: rgba(255, 255, 255, .07);
    transform: rotate(-12deg);
    pointer-events: none;
}

/* Cover art for posts (replaces photos until real cover images are added) */
.post-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    height: 100%;
    background: linear-gradient(135deg, #2A4B7C 0%, #202C45 100%);
    color: rgba(255, 255, 255, .88);
    font-size: 4rem;
}

.post-cover:hover {
    color: #fff;
    text-decoration: none;
}

.post-cover-lg {
    min-height: 300px;
    font-size: 5rem;
}

/* Cover photo, used instead of .post-cover when a post has an uploaded image */
.post-cover-img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.post-cover-img-lg {
    height: 300px;
}

/* Comfortable reading width for long text */
.article-body {
    max-width: 46rem;
    font-size: 1.05rem;
    line-height: 1.75;
}

.article-body ul {
    padding-left: 1.25rem;
}

.article-body li + li {
    margin-top: .75rem;
}

.post-tag {
    font-size: .85rem;
    font-weight: 600;
    padding: .4rem .7rem;
    margin: 0 .25rem .5rem 0;
}

/* Forms */
.form-feedback:empty {
    display: none;
}

.newsletter-group {
    max-width: 30rem;
}

/* Motion: respect the visitor's setting */
@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        -webkit-animation: none;
        animation: none;
    }

    .wrapper .sidebar,
    .wrapper .content {
        transition: none;
    }
}

/* Markdown output inside blog articles (posts are authored in the CMS as Markdown) */
.article-body h2,
.article-body h3,
.article-body h4 {
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
}

.article-body p {
    margin-bottom: 1.1rem;
}

/* Top profile banner (replaces the old fixed left sidebar) */
.topbar {
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.topbar-logo {
    height: 56px;
    width: auto;
}

.topbar-social .btn {
    padding: .25rem .5rem;
}

@media (max-width: 991.98px) {
    .topbar-actions {
        width: 100%;
        justify-content: space-between !important;
    }
}

/* Services page */
.service-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    text-align: center;
}

/* Videos page: responsive 16:9 embed for the YouTube playlist */
.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Services page: clickable cards that expand to show samples + WhatsApp CTA */
.service-toggle {
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: .375rem;
    background: #fff;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.service-toggle:hover,
.service-toggle:focus {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.service-chevron {
    transition: transform .2s ease;
    color: #6c757d;
    flex: 0 0 auto;
}

.service-toggle[aria-expanded="true"] .service-chevron {
    transform: rotate(180deg);
}

.service-panel {
    border: 1px solid rgba(0, 0, 0, .1);
    border-top: 0;
    border-bottom-left-radius: .375rem;
    border-bottom-right-radius: .375rem;
}

@media (max-width: 575.98px) {
    .service-toggle {
        flex-wrap: wrap;
    }

    .service-toggle .service-icon {
        margin-bottom: .5rem;
    }
}

/* Services page: expandable service panels */
.service-card {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .25rem;
    margin-bottom: 1rem;
    background: #fff;
}

.service-toggle {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 1.25rem;
    background: none;
    border: 0;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.service-toggle:hover {
    background: rgba(42, 75, 124, .05);
}

.service-toggle .service-chevron {
    margin-left: auto;
    padding-left: 1rem;
    align-self: center;
    transition: transform .2s ease;
}

.service-toggle[aria-expanded="true"] .service-chevron {
    transform: rotate(180deg);
}

.service-panel {
    padding: 0 1.25rem 1.25rem;
}

.service-sample img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .service-toggle .service-chevron {
        transition: none;
    }
}

/* Section heading with corner brackets (Home > Latest Articles) */
.section-title {
    position: relative;
    display: inline-block;
    margin: 0 0 2rem 1rem;
    padding: .6rem 1.1rem;
    font-size: 2rem;
    font-weight: 800;
    color: #202C45;
}

.section-title::before,
.section-title::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid #2A4B7C;
}

.section-title::before {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
}

.section-title::after {
    right: 0;
    bottom: 0;
    border-left: 0;
    border-top: 0;
}

/* Article cards (Home and Blog) */
.post-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    transition: box-shadow .2s ease, transform .2s ease;
}

.post-card:hover,
.post-card:focus-within {
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.post-card-media {
    position: relative;
    overflow: hidden;
}

.post-card .post-cover,
.post-card .post-cover-img {
    display: flex;
    width: 100%;
    height: 210px;
    min-height: 0;
    object-fit: cover;
}

.post-card-tag {
    position: absolute;
    left: .75rem;
    bottom: .75rem;
    padding: .25rem .65rem;
    background: #2A4B7C;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.post-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.25rem;
}

.post-card-title {
    margin: 0 0 .75rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-card-title a {
    color: #202C45;
}

.post-card-title a:hover {
    color: #2A4B7C;
    text-decoration: none;
}

.post-card-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0 0 1.25rem;
    font-size: .95rem;
    color: #6c757d;
}

.post-card-footer {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, .1);
}

.post-card-avatar {
    width: 36px;
    height: 36px;
    margin-right: .75rem;
    border-radius: 50%;
    object-fit: cover;
}

.post-card-author {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.2;
    color: #202C45;
}

.post-card-date {
    display: block;
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6c757d;
}

@media (prefers-reduced-motion: reduce) {
    .post-card {
        transition: none;
    }

    .post-card:hover,
    .post-card:focus-within {
        transform: none;
    }
}

/* Category sub-nav (shown under the main nav on Home, Blog, and category pages) */
.category-nav {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.category-nav-inner {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.category-nav-link {
    flex: 0 0 auto;
    padding: .85rem 1.1rem;
    color: #495057;
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.category-nav-link:hover {
    color: #2A4B7C;
    text-decoration: none;
}

.category-nav-link.active {
    color: #202C45;
    background: rgba(42, 75, 124, .08);
    border-bottom-color: #2A4B7C;
}

/* Video tiles (Videos page) */
.video-tile {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.video-tile-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #202C45;
}

.video-tile-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-tile-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .6);
    border-radius: 50%;
    color: #fff;
    font-size: .9rem;
    transition: background .2s ease, transform .2s ease;
}

.video-tile:hover .video-tile-play,
.video-tile:focus .video-tile-play {
    background: #2A4B7C;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-tile-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: .6rem;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #202C45;
}

/* Video modal player */
#videoModal .modal-content {
    overflow: hidden;
}

#videoModal .close {
    position: absolute;
    top: .25rem;
    right: .5rem;
    z-index: 1;
    opacity: .85;
    text-shadow: none;
}

#videoModal .close:hover {
    opacity: 1;
}

#videoModalEmbed:empty {
    display: none;
}

#videoModalEmbed .video-embed,
#videoModalEmbed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .video-tile-play {
        transition: none;
    }
}
