/*
 * Blog Article Styles - Czech Blue Theme
 * Czechs Online - KritekCmsBundle
 */

/* Czech flag blue color */
:root {
    --czech-blue: #11457E;
    --czech-blue-light: #1a5ba8;
    --czech-blue-dark: #0d3461;
}

/* Main Article Title (h1) - Using Czech Blue */
.article-title {
    color: var(--czech-blue) !important;
    font-weight: 700 !important;
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Article Subtitle/Abstract (node.contentSummary) */
.article-subtitle {
    font-size: 1.25rem !important;
    line-height: 1.7 !important;
    color: #2c3e50 !important;
    font-weight: 400 !important;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid var(--czech-blue);
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem !important;
}

/* Article Body Content Headings */
.content-body h1,
.content-body h2,
.content-body h3 {
    color: var(--czech-blue);
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.content-body h1 {
    font-size: 2rem;
    border-bottom: 3px solid var(--czech-blue);
    padding-bottom: 0.75rem;
    margin-top: 3rem;
}

.content-body h2 {
    font-size: 1.625rem;
    border-left: 5px solid var(--czech-blue);
    padding-left: 1.25rem;
    background: linear-gradient(90deg, rgba(17, 69, 126, 0.05) 0%, transparent 100%);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0 0.25rem 0.25rem 0;
}

.content-body h3 {
    font-size: 1.375rem;
    position: relative;
    padding-left: 1rem;
}

.content-body h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background-color: var(--czech-blue);
    border-radius: 3px;
}

/* Enhanced typography for article body */
.content-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333;
}

.content-body p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

.content-body strong,
.content-body b {
    color: var(--czech-blue-dark);
    font-weight: 600;
}

.content-body a {
    color: var(--czech-blue);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.content-body a:hover {
    color: var(--czech-blue-light);
}

/* Lists styling */
.content-body ul,
.content-body ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.content-body blockquote {
    border-left: 5px solid var(--czech-blue);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Related articles section */
.related-articles h3,
.section-title {
    color: var(--czech-blue) !important;
}

.related-articles .article-title {
    font-size: 1.5rem;
    line-height: 1.2;
}

/* Widget titles in sidebar */
.widget-title {
    color: var(--czech-blue) !important;
    border-bottom: 2px solid var(--czech-blue);
    padding-bottom: 0.5rem;
}

/* First paragraph styling (if no explicit abstract) */
.content-body > p:first-child {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #2c3e50;
}

/* Free article teaser */
.free-article-preview {
    margin-bottom: 0;
}

.free-article-fade {
    position: relative;
    max-height: 8rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 58%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 58%, rgba(0, 0, 0, 0) 100%);
}

.free-article-fade::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4.5rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 72%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

.free-article-login {
    background: linear-gradient(135deg, rgba(17, 69, 126, 0.08) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-color: rgba(17, 69, 126, 0.18) !important;
}

.free-article-login .lead {
    color: #2c3e50;
}

@media (min-width: 992px) {
    .free-article-fade {
        max-height: 10rem;
    }

    .free-article-fade::after {
        height: 5rem;
    }
}

/* Category badge styling - Czech Blue */
.article-category .badge.bg-primary {
    background-color: var(--czech-blue) !important;
}

/* Images in content */
.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem auto;
    display: block;
}

/* Code blocks */
.content-body pre,
.content-body code {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-family: 'Courier New', monospace;
}

.content-body pre {
    padding: 1rem;
    overflow-x: auto;
}

/* Tables */
.content-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.content-body table th {
    background-color: var(--czech-blue);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.content-body table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.content-body table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Reading experience enhancements */
@media (min-width: 992px) {
    .content-body {
        font-size: 1.125rem;
    }

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

    .content-body h2 {
        font-size: 1.75rem;
    }

    .content-body h3 {
        font-size: 1.5rem;
    }
}
