﻿/* Article pages styles. */

/* Shared article helpers */
.analytics-hidden-pixel {
    position: absolute;
    left: -9999px;
}

.article-site-logo {
    display: none;
    height: 40px;
}

.articles-static-navbar {
    background: rgba(44, 62, 80, 0.95);
}

.media-item-wide {
    grid-column: span 2;
}

.article-share-viber {
    border-color: #7360f2;
    color: #7360f2;
}

.related-card-placeholder {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Articles list page. */

.articles-page {
        padding-top: 100px;
        min-height: 100vh;
        background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    }
    
    .articles-header {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #fff;
        padding: 80px 0;
        margin-top: -100px;
        padding-top: 180px;
        text-align: center;
    }
    
    .articles-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 15px;
    }
    
    .category-filters {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 30px;
    }
    
    .category-btn {
        padding: 8px 20px;
        border-radius: 25px;
        background: rgba(255,255,255,0.1);
        color: #fff;
        text-decoration: none;
        transition: all 0.3s;
        border: 1px solid rgba(255,255,255,0.2);
    }
    
    .category-btn:hover, .category-btn.active {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #fff;
    }
    
    .articles-grid {
        padding: 60px 0;
    }
    
    .article-card {
        background: #fff;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .article-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }
    
    .article-card-image {
        position: relative;
        height: 200px;
        overflow: hidden;
    }
    
    .article-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s;
    }
    
    .article-card:hover .article-card-image img {
        transform: scale(1.1);
    }
    
    .article-card-category {
        position: absolute;
        top: 15px;
        left: 15px;
        padding: 5px 12px;
        background: var(--primary-color);
        color: #fff;
        border-radius: 15px;
        font-size: 0.8rem;
    }
    
    .article-card-featured {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        background: gold;
        color: #333;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .article-card-body {
        padding: 25px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .article-card-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .article-card-excerpt {
        color: #666;
        font-size: 0.95rem;
        line-height: 1.6;
        flex-grow: 1;
        margin-bottom: 15px;
    }
    
    .article-card-meta {
        display: flex;
        gap: 15px;
        font-size: 0.85rem;
        color: #999;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .article-card-meta span {
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .no-articles {
        text-align: center;
        padding: 60px 20px;
    }
    
    .no-articles i {
        font-size: 4rem;
        color: #ddd;
        margin-bottom: 20px;
    }

/* Article not found page. */

.article-page {
        padding-top: 100px;
        min-height: 100vh;
        background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    }
    
    .not-found {
        text-align: center;
        padding: 100px 20px;
    }
    
    .not-found i {
        font-size: 5rem;
        color: #ddd;
        margin-bottom: 20px;
    }

/* Article show page. */

body.article-show-page {
        background:
            radial-gradient(circle at 12% 18%, rgba(255, 107, 53, 0.08), transparent 28%),
            radial-gradient(circle at 88% 12%, rgba(44, 62, 80, 0.08), transparent 30%),
            linear-gradient(180deg, #f6f8fb 0%, #ffffff 48%, #f8fafc 100%);
    }

    .article-hero-shell {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at 92% 78%, rgba(255,255,255,0.085), transparent 27%),
            radial-gradient(circle at 2% 16%, rgba(255,107,53,0.19), transparent 28%),
            linear-gradient(90deg, #162232 0%, #24384d 58%, #30445d 100%);
    }

    .article-hero-shell::after {
        content: '';
        position: absolute;
        right: -90px;
        bottom: -110px;
        width: 340px;
        height: 340px;
        border-radius: 50%;
        background: rgba(255,255,255,0.045);
        filter: blur(1px);
        pointer-events: none;
    }

    .article-navbar {
        position: relative;
        z-index: 3;
        min-height: 64px;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
    }

    .article-navbar .container {
        max-width: 1120px;
    }

    .article-navbar .navbar-brand {
        color: #fff;
        min-width: 0;
    }

    .article-navbar .navbar-brand .fw-bold {
        color: #fff;
        display: inline-block;
        white-space: nowrap;
    }

    .article-nav-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .article-nav-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 40px;
        padding: 0 17px;
        border-radius: 999px;
        font-size: 0.9rem;
        font-weight: 800;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        transition:
            transform 0.22s ease,
            box-shadow 0.22s ease,
            background 0.22s ease,
            border-color 0.22s ease,
            color 0.22s ease;
    }

    .article-nav-btn i {
        margin: 0 !important;
        font-size: 0.82rem;
        line-height: 1;
    }

    .article-nav-btn-primary {
        background: #fff;
        color: #182536;
        border: 0;
        box-shadow: 0 10px 24px rgba(255,255,255,0.16);
    }

    .article-nav-btn-secondary {
        color: #fff;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.24);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 24px rgba(0,0,0,0.08);
        backdrop-filter: blur(10px);
    }

    .article-nav-btn-primary:hover,
    .article-nav-btn-primary:focus {
        color: #182536;
        background: #fff;
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(255,255,255,0.24);
    }

    .article-nav-btn-secondary:hover,
    .article-nav-btn-secondary:focus {
        color: #fff;
        background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
        border-color: rgba(255,255,255,0.42);
        transform: translateY(-2px);
        box-shadow:
            0 0 0 4px rgba(255,107,53,0.14),
            0 18px 36px rgba(255,107,53,0.28);
    }
    
    .article-read-progress {
        position: fixed;
        top: 0;
        left: 0;
        width: 0;
        height: 4px;
        z-index: 2000;
        background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
        box-shadow: 0 0 18px rgba(255,107,53,0.55);
    }

    .article-header {
        position: relative;
        z-index: 2;
        color: #fff;
        padding: 50px 0 56px;
        margin-top: 0;
    }

    .article-header .container {
        position: relative;
        z-index: 2;
        max-width: 1120px;
    }

    .article-hero-kicker {
        margin-bottom: 20px;
    }

    .article-hero-panel {
        width: 100%;
        max-width: 100%;
        padding-top: 0;
    }

    .article-hero-eyebrow {
        margin-bottom: 12px;
        color: rgba(255,255,255,0.62);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }
    
    .article-category {
        display: inline-block;
        padding: 5px 11px;
        background: #ff6b35;
        color: #fff;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        margin-bottom: 0;
        border: 1px solid rgba(255,255,255,0.22);
        box-shadow: 0 10px 22px rgba(255,107,53,0.24);
        white-space: nowrap;
    }

    .article-category i {
        font-size: 0.68rem;
    }

    .article-title-row {
        position: relative;
        width: 100%;
        max-width: 100%;
        padding: 26px 0 0 0;
    }

    .article-title-row .article-category {
        position: absolute;
        top: 0;
        right: 0;
        left: auto;
        min-width: max-content;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .article-title-row .article-title {
        max-width: 100%;
    }
    
    .article-title {
        max-width: 100%;
        font-size: clamp(1.55rem, 3vw, 2.8rem);
        font-weight: 900;
        letter-spacing: -0.025em;
        line-height: 1.12;
        margin-top: 0;
        margin-bottom: 28px;
        text-align: center;
    }
    
    .article-meta {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 8px;
    }
    
    .article-meta span {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border: 1px solid rgba(255,255,255,0.16);
        border-radius: 999px;
        background: rgba(255,255,255,0.1);
        color: rgba(255,255,255,0.82);
        font-size: 0.82rem;
        backdrop-filter: blur(8px);
    }

    .article-meta span i {
        font-size: 0.72rem;
    }

    .article-author {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: center;
        gap: 18px;
        width: 100%;
        max-width: 900px;
        margin: 38px auto 0;
        padding: 18px;
        border: 1px solid rgba(255,255,255,0.14);
        border-radius: 28px;
        background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.075));
        box-shadow: 0 24px 60px rgba(0,0,0,0.16);
        backdrop-filter: blur(14px);
    }

    .article-author-photo {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid rgba(255,255,255,0.85);
        box-shadow: 0 12px 28px rgba(0,0,0,0.24);
    }

    .article-author-name {
        font-weight: 700;
        color: #fff;
    }

    .article-author-description {
        opacity: 0.9;
        color: rgba(255,255,255,0.82);
    }
    
    .article-cover {
        margin-top: -60px;
        position: relative;
        z-index: 10;
    }

    .article-cover .container {
        max-width: 900px;
    }
    
    .article-cover img {
        width: 100%;
        max-height: 350px;
        object-fit: cover;
        border-radius: 15px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }
    
    .article-content {
        padding: 54px 0 72px;
        background: #fff;
    }

    .article-content .container {
        max-width: 900px;
    }

    .article-content-card {
        position: relative;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .article-content-card::before {
        content: none;
    }
    
    .article-body {
        font-size: 1.12rem;
        line-height: 1.92;
        color: #344054;
    }
    
    .article-body h2, .article-body h3, .article-body h4 {
        color: #182536;
        margin-top: 38px;
        margin-bottom: 16px;
        font-weight: 850;
        letter-spacing: -0.02em;
    }
    
    .article-body img {
        max-width: 100%;
        height: auto;
        margin: 15px 0;
    }
    
    .article-body img[style*="float: left"],
    .article-body img[align="left"] {
        margin: 5px 25px 15px 0;
    }
    
    .article-body img[style*="float: right"],
    .article-body img[align="right"] {
        margin: 5px 0 15px 25px;
    }
    
    .article-body p img {
        display: block;
        margin: 15px auto;
    }
    
    .article-body p {
        color: #344054;
        font-size: inherit;
        font-weight: 400;
        margin-bottom: 20px;
    }
    
    .article-body ul, .article-body ol {
        margin-bottom: 20px;
        padding-left: 25px;
        color: #344054 !important;
    }
    
    .article-body li,
    .article-body li *,
    .article-body ul *,
    .article-body ol * {
        color: #344054 !important;
        margin-bottom: 10px;
    }

    .article-body li p {
        margin-bottom: 0;
    }

    .article-body li::marker {
        color: #344054 !important;
    }

    .article-body table {
        width: 100% !important;
        max-width: 100%;
        margin: 22px 0;
        overflow: visible;
        border: 0 !important;
        outline: 0 !important;
        border-spacing: 0;
        border-collapse: collapse;
        background: transparent;
        box-shadow: none !important;
        white-space: normal;
    }

    .article-body table thead,
    .article-body table tbody,
    .article-body table tfoot,
    .article-body table tr {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }

    .article-body table th,
    .article-body table td {
        padding: 8px 12px;
        border: 0 !important;
        color: #344054 !important;
        font-size: 0.92rem;
        line-height: 1.45;
        vertical-align: top;
    }

    .article-body table tr:not(:last-child) > * {
        border-bottom: 1px solid #e5e7eb !important;
    }

    .article-body table tr > * + * {
        border-left: 1px solid #e5e7eb !important;
    }

    .article-body table tr:first-child > * {
        border-top: 0 !important;
    }

    .article-body table tr:last-child > * {
        border-bottom: 0 !important;
    }

    .article-body table th {
        background: transparent;
        color: #182536 !important;
        font-weight: 800;
        line-height: 1.35;
    }

    .article-body table tbody tr:nth-child(even) td {
        background: transparent;
    }

    .article-body table tbody tr:hover td {
        background: transparent;
    }
    
    .article-media {
        margin: 40px 0;
    }
    
    .media-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .media-item img {
        width: 100%;
        border-radius: 10px;
        cursor: pointer;
        transition: transform 0.3s ease;
    }
    
    .media-item img:hover {
        transform: scale(1.02);
    }

    .article-carousel {
        overflow: hidden;
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 28px;
        background: #fff;
        box-shadow: 0 22px 60px rgba(24,37,54,0.12);
    }

    .article-carousel .carousel-item img {
        width: 100%;
        height: 420px;
        padding: 18px;
        object-fit: contain;
        background: #fff;
    }

    .article-carousel-caption {
        position: relative;
        padding: 24px 30px 28px;
        color: #344054;
        background: #fff;
        border-top: 1px solid #edf0f4;
    }

    .article-carousel-caption h5 {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
        color: #182536;
        font-size: 1.05rem;
        font-weight: 800;
    }

    .article-carousel-caption h5::before {
        content: '';
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #ff6b35;
    }

    .article-carousel-caption p {
        margin-bottom: 0;
        color: #5f6b7a;
        font-size: 0.96rem;
        line-height: 1.6;
    }

    .article-carousel .carousel-control-prev,
    .article-carousel .carousel-control-next {
        width: 52px;
        opacity: 1;
    }

    .article-carousel .carousel-control-prev-icon,
    .article-carousel .carousel-control-next-icon {
        width: 38px;
        height: 38px;
        border-radius: 999px;
        background-size: 46%;
        background-color: rgba(24, 37, 54, 0.72);
        box-shadow: 0 10px 24px rgba(24,37,54,0.18);
    }

    .article-carousel .carousel-indicators {
        margin-bottom: 14px;
    }

    .article-carousel .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        border: 0;
        border-radius: 999px;
        background-color: rgba(255, 107, 53, 0.38);
        opacity: 1;
    }

    .article-carousel .carousel-indicators .active {
        width: 24px;
        background-color: #ff6b35;
    }

    @media (max-width: 768px) {
        .article-carousel .carousel-item img {
            height: 280px;
            padding: 12px;
        }

        .article-carousel-caption {
            padding: 18px 20px 22px;
        }

        .article-carousel .carousel-control-prev,
        .article-carousel .carousel-control-next {
            width: 44px;
        }
    }
    
    .youtube-embed {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
        overflow: hidden;
        border-radius: 10px;
    }
    
    .youtube-embed iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .related-articles {
        background: #f8f9fa;
        padding: 60px 0;
    }
    
    .related-card {
        background: #fff;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .related-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }
    
    .related-card img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }
    
    .related-card-body {
        padding: 20px;
    }
    
    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #fff;
        text-decoration: none;
        opacity: 0.88;
        transition: opacity 0.3s;
        margin-bottom: 0;
        padding: 8px 14px;
        border: 1px solid rgba(255,255,255,0.14);
        border-radius: 999px;
        background: rgba(255,255,255,0.08);
        backdrop-filter: blur(8px);
    }

    .back-link:hover {
        opacity: 1;
        color: #fff;
    }

    .article-testing-cta {
        margin-top: 48px;
        padding: 32px;
        border-radius: 18px;
        background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
        color: #fff;
        box-shadow: 0 15px 35px rgba(255,107,53,0.25);
    }

    .article-testing-cta * {
        color: #fff;
    }

    .article-testing-cta h4 {
        font-weight: 700;
        margin-bottom: 10px;
        color: #fff;
    }

    .article-testing-cta p {
        opacity: 0.95;
        color: #fff;
    }

    .article-testing-cta .btn {
        color: #fff;
        background: rgba(255,255,255,0.16);
        border: 1px solid rgba(255,255,255,0.55);
        font-weight: 700;
    }

    .article-testing-cta .btn:hover {
        color: #fff;
        background: rgba(255,255,255,0.24);
        border-color: rgba(255,255,255,0.85);
    }

    .article-inline-testing-button {
        text-align: center;
    }

    .article-inline-testing-button .btn {
        background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
        border: none;
        box-shadow: 0 10px 24px rgba(255,107,53,0.22);
        font-weight: 700;
    }

    @media (max-width: 991px) {
        .article-navbar .container,
        .article-header .container,
        .article-content .container,
        .article-cover .container {
            padding-left: 24px;
            padding-right: 24px;
        }

        .article-header {
            padding-top: 42px;
            padding-bottom: 50px;
        }

        .article-title-row {
            padding: 26px 0 0 0;
        }

        .article-title {
            font-size: clamp(1.45rem, 4vw, 2.35rem);
        }

        .article-author {
            max-width: 100%;
        }

        .article-content {
            padding: 46px 0 64px;
        }
    }

    @media (max-width: 768px) {
        .article-header {
            padding-top: 30px;
            padding-bottom: 42px;
        }

        .article-navbar .container {
            gap: 12px;
        }

        .article-nav-actions {
            width: 100%;
            justify-content: space-between;
        }

        .article-nav-actions .btn {
            flex: 1;
            padding: 10px 12px;
        }

        .article-navbar .navbar-brand .fw-bold {
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .article-title-row {
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            gap: 14px;
            padding: 0;
        }

        .article-title-row .article-category {
            position: static;
            max-width: 100%;
            margin-top: 0;
            align-self: center;
        }

        .article-title {
            font-size: clamp(1.45rem, 8vw, 2.05rem);
            line-height: 1.15;
            margin-bottom: 22px;
        }

        .article-hero-eyebrow {
            text-align: center;
            font-size: 0.68rem;
            letter-spacing: 0.12em;
        }

        .article-author {
            grid-template-columns: 58px minmax(0, 1fr);
            padding: 12px;
            border-radius: 20px;
            gap: 12px;
        }

        .article-author-photo {
            width: 58px;
            height: 58px;
        }

        .article-content-card {
            padding: 0;
            border-radius: 0;
        }

        .article-content-card::before {
            content: none;
        }

        .article-meta span {
            font-size: 0.76rem;
            padding: 5px 9px;
        }

        .article-content {
            padding: 36px 0 56px;
        }

        .article-body {
            font-size: 1.02rem;
            line-height: 1.82;
        }

        .article-body table {
            font-size: 0.82rem;
        }

        .article-body table th,
        .article-body table td {
            padding: 8px 7px;
        }
    }

    @media (max-width: 576px) {
        .article-navbar {
            padding-top: 10px;
            padding-bottom: 10px;
        }

        .article-navbar .container,
        .article-header .container,
        .article-content .container,
        .article-cover .container {
            padding-left: 18px;
            padding-right: 18px;
        }

        .article-nav-actions {
            gap: 8px;
        }

        .article-nav-btn {
            min-height: 38px;
            padding: 0 12px;
            font-size: 0.8rem;
        }

        .article-author {
            grid-template-columns: 1fr;
            justify-items: center;
            text-align: center;
            padding: 16px;
        }

        .article-meta {
            justify-content: center;
        }

        .article-title {
            font-size: clamp(1.35rem, 9vw, 1.9rem);
        }

        .article-body table {
            font-size: 0.68rem;
            line-height: 1.35;
        }

        .article-body table th,
        .article-body table td {
            padding: 6px 4px;
        }
    }
