﻿/* =========================================================
   Articles section styles
   Applies to: Blogs.cshtml, BlogDetails.cshtml,
               _FeaturedArticlesPartial.cshtml
   ========================================================= */

/* --- Category link nav bar ------------------------------------- */
.articles-tabs-wrapper {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.articles-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: none;
}

.share-btn-icon-x {
    width: 14px;
    height: 14px;
    display: block;
}

.articles-tabs > li {
    float: none;
    margin: 0;
    padding: 0;
    border: none;
}

.articles-tabs > li > a {
    display: inline-block;
    border: none;
    background: transparent;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    font-size: 15px;
    padding: 18px 24px;
    margin: 0;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.articles-tabs > li > a:hover,
.articles-tabs > li > a:focus {
    background: transparent;
    color: #553179;
    text-decoration: none;
}

.articles-tabs > li.active > a,
.articles-tabs > li.active > a:hover,
.articles-tabs > li.active > a:focus {
    background: transparent;
    color: #553179;
    border-bottom-color: #553179;
}

@media (max-width: 768px) {
    .articles-tabs-wrapper { padding: 0 8px; }
    .articles-tabs > li > a { font-size: 13px; padding: 14px 12px; }
}

/* --- Spotlight tiles ------------------------------------------ */
.articles-spotlight {
    margin-bottom: 24px;
}

.articles-spotlight .spotlight-tile {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    background-color: #1b1b1b;
    background-size: cover;
    background-position: center center;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.articles-spotlight .spotlight-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
}

.articles-spotlight .spotlight-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 24px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 70%, rgba(0,0,0,0) 100%);
    color: #fff;
}

.articles-spotlight .spotlight-title {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.25;
    margin: 0 0 4px 0;
}

.articles-spotlight .spotlight-author {
    color: #e0e0e0;
    margin: 0;
    font-size: 12px;
}

/* --- Section header between spotlight and list ---------------- */
.articles-section-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 8px 0 24px 0;
}

.articles-section-header::before,
.articles-section-header::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #d4d4d4;
}

.articles-section-header > span {
    color: #1a1a1a;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0 6px;
    flex: 0 0 auto;
}

/* --- Article list cards --------------------------------------- */
.article-list-container {
    padding-left: 0;
    list-style: none;
}

.article-list-item {
    position: relative;
    border: 1px solid #ececec !important;
    border-radius: 6px;
    padding: 10px 10px !important;
    margin-bottom: 20px;
    background: #fff;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
}

.article-list-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.article-list-item:hover h2.h3 {
    color: #553179;
}

/* Stretched link — a transparent ::after overlay covering the whole card
   makes anywhere on the row clickable while still allowing text selection. */
.article-list-item .article-stretched-link {
    position: static;
}

.article-list-item .article-stretched-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: transparent;
}

.article-list-item > .row {
    position: relative;
    z-index: 0;
}

.article-list-item .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 -16px;
}

.article-list-item .row > [class^="col-"] {
    padding-left: 16px;
    padding-right: 16px;
}

/* Text column: stretch full height so date hugs the top and
   byline hugs the bottom of the image next to it. */
.article-list-item .row > .col-sm-8,
.article-list-item .row > .col-sm-12 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-list-item .article-body-middle {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 0;
}

@media (max-width: 768px) {
    .article-list-item {
        padding: 20px !important;
    }
}

.article-list-item .article-thumb {
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.article-list-item .article-time {
    color: #9a9a9a;
    font-size: 12px;
    text-transform: lowercase;
    margin: 0 0 6px 0;
}

.article-list-item h2.h3 {
    font-size: 24px;
    font-weight: 900;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.article-list-item h2.h3 a {
    color: inherit;
    font-weight: inherit;
}
.article-list-item h2.h3 a:hover { color: #553179; text-decoration: none; }

.article-list-item .article-summary {
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.article-list-item .article-byline {
    color: #9a9a9a;
    font-size: 13px;
    margin: 0 0 4px 0;
}

.article-list-item .article-byline strong { color: #222; }

.article-list-item .article-read-more {
    font-size: 13px;
    color: #553179;
    font-weight: 600;
}

/* --- Banner placeholders -------------------------------------- */
.articles-banner-vertical {
    display: block;
    min-height: 600px;
    margin-bottom: 20px;
}

.articles-banner-vertical img {
    width: 100%;
    height: auto;
}

/* Fixed side-rail banners — sit outside the Bootstrap container, so they
   don't consume any columns of the main content grid. */
.articles-banner-side {
    position: fixed;
    top: 120px;
    width: 160px;
    max-width: 160px;
    z-index: 10;
    min-height: 0;
    margin: 0;
}

.articles-banner-side-left  { left: 20px; }
.articles-banner-side-right { right: 20px; }

.articles-banner-side img {
    width: 100%;
    height: auto;
    display: block;
}

/* Only show side rails when the viewport has room outside a ~1200px
   container (container + 2 × banner width + buffer). */
@media (max-width: 1500px) {
    .articles-banner-side { display: none !important; }
}

.articles-banner-horizontal {
    display: block;
    min-height: 90px;
    margin: 16px 0;
    text-align: center;
}

.articles-outer-banner {
    margin-bottom: 20px;
}

/* Collapse the wrapping row when the banner anchor inside is empty,
   so an unused slot doesn't push the page down. Uses :has() (supported
   in all modern evergreen browsers). */
.articles-outer-banner:has(.articles-banner-horizontal[href=""]),
.articles-outer-banner:has(.articles-banner-horizontal:not([href])) {
    display: none;
}

.articles-outer-banner + .articles-page .panel {
    margin-top: 0;
}

.articles-banner-horizontal img {
    max-width: 100%;
    height: auto;
}

/* Collapse banner anchors when no banner has been configured (href is still
   empty or missing). banners.js sets href to a real URL once a banner loads,
   which lets the slot reappear. */
.articles-banner-vertical[href=""],
.articles-banner-vertical:not([href]),
.articles-banner-horizontal[href=""],
.articles-banner-horizontal:not([href]) {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.articles-banner-vertical img[src=""],
.articles-banner-horizontal img[src=""] {
    display: none;
}

.article-banner-item {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* --- Featured Articles carousel (homepage) -------------------- */
.featured-articles-container h2 {
    color: #553179;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.featured-articles-slider {
    /* Arrows inherit global .slick-prev / .slick-next styles from style.css
       to match the Hot Jobs carousel. */
}

/* Make every slide stretch to the height of the tallest in the row */
.featured-articles-slider .slick-track {
    display: flex !important;
    align-items: stretch;
}

.featured-articles-slider .slick-slide {
    height: auto;
    display: flex !important;
}

.featured-articles-slider .slick-slide > div {
    display: flex;
    width: 100%;
}

.featured-article-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-article-card .featured-article-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.featured-article-card .featured-article-summary {
    flex: 1 1 auto;
}

.featured-article-card:hover {
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.featured-article-image {
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    background-size: cover;
    background-position: center center;
    background-color: #1b1b1b;
}

.featured-article-body {
    padding: 16px 18px;
}

.featured-article-title {
    margin: 0 0 6px 0;
    font-weight: 700;
    line-height: 1.3;
    font-size: 16px;
    color: #222;
    min-height: 2.6em;
}

.featured-article-date,
.featured-article-author {
    color: #9a9a9a;
    margin: 0 0 6px 0;
    font-size: 12px;
}

.featured-article-author strong { color: #222; }

.featured-article-summary {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

/* --- Article detail page -------------------------------------- */
.blog-detail-page .panel-body {
    padding: 36px 44px;
}

.blog-detail-byline {
    color: #6f6f6f;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.blog-detail-byline strong { color: #1a1a1a; }
.blog-detail-byline .byline-divider { margin: 0 10px; color: #cfcfcf; }

.blog-detail-title {
    color: #553179;
    font-weight: 900;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    margin: 0 0 24px 0;
}

.blog-detail-page .post-description {
    font-size: 17px;
    line-height: 1.75;
    color: #2a2a2a;
}

.blog-detail-page .post-description p { margin: 0 0 16px 0; }

.blog-detail-page .post-description h1,
.blog-detail-page .post-description h2,
.blog-detail-page .post-description h3,
.blog-detail-page .post-description h4 {
    color: #553179;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 28px;
    margin-bottom: 12px;
}

/* Media inside the article body fills the full content width without
   stretching beyond its natural aspect ratio. */
.blog-detail-page .post-description img,
.blog-detail-page .post-description iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    display: block;
    border-radius: 4px;
}

.blog-detail-page .post-description iframe { aspect-ratio: 16 / 9; }

/* --- Share buttons -------------------------------------------- */
.blog-detail-share {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #ececec;
}

.blog-detail-share strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 15px;
}

.share-buttons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #553179;
    color: #fff !important;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.share-btn:hover,
.share-btn:focus {
    background: #3f2459;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.share-copy-flash {
    color: #553179;
    font-size: 13px;
    margin-left: 4px;
    font-weight: 600;
}

/* --- Related articles sidebar --------------------------------- */
.blog-detail-aside { padding-left: 12px; }

.related-articles {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 16px;
}

.related-articles-heading {
    background: #553179;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.06em;
    margin: -16px -16px 14px -16px;
    padding: 12px 16px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.related-article-card {
    display: block;
    margin-bottom: 16px;
    color: #1a1a1a;
    text-decoration: none;
}

.related-article-card:last-child { margin-bottom: 0; }

.related-article-card:hover { color: #553179; text-decoration: none; }

.related-article-image {
    width: 100%;
    height: 0;
    padding-bottom: 56%;
    background-size: cover;
    background-position: center center;
    background-color: #1b1b1b;
    border-radius: 4px;
    margin-bottom: 8px;
}

.related-article-title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

@media (max-width: 991px) {
    .blog-detail-aside { padding-left: 15px; margin-top: 24px; }
}

@media (max-width: 991px) {
    .articles-banner-vertical { min-height: 0; }
}

@media (max-width: 768px) {
    .blog-detail-page .panel-body { padding: 20px; }
    .articles-spotlight .spotlight-tile { padding-bottom: 60%; }
    .article-list-item .article-thumb { max-height: 180px; }
    .featured-articles-slider { padding: 0 30px; }
}
