/* Ghost Bootstrap Theme - Material Design Custom Styles */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* Material Design Color Palette */
    --md-blue: #1976D2;
    --md-blue-light: #42A5F5;
    --md-blue-dark: #1565C0;
    --md-grey: #424242;
    --md-grey-light: #9E9E9E;
    --md-grey-lighter: #BDBDBD;
    --md-grey-lightest: #E0E0E0;
    --md-white: #FFFFFF;
    --md-surface: #F5F5F5;
    --md-error: #D32F2F;
    --md-success: #388E3C;
    --md-warning: #F57C00;
    --md-info: #0097A7;
    
    /* Theme Variables */
    --primary-color: var(--md-blue);
    --secondary-color: var(--md-grey);
    --success-color: var(--md-success);
    --danger-color: var(--md-error);
    --warning-color: var(--md-warning);
    --info-color: var(--md-info);
    --dark-color: var(--md-grey);
    --light-color: var(--md-surface);
    
    /* Elevation/Shadow */
    --shadow-1: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
    --shadow-2: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    --shadow-4: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
    --shadow-8: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--gh-font-body, 'Roboto', sans-serif);
    line-height: 1.6;
    color: var(--md-grey);
    background-color: var(--md-white);
    font-size: var(--font-size-base, 16px);
    font-weight: 400;
    letter-spacing: 0.5px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gh-font-heading);
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--md-grey);
}

h1 { font-size: 2.125rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

a {
    color: var(--md-blue);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-weight: 500;
}

a:hover {
    color: var(--md-blue-dark);
}

/* Navigation - Material Design */
.navbar {
    box-shadow: var(--shadow-2);
    border-bottom: 1px solid var(--md-grey-lightest);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    background-color: var(--header-bg, #FFFFFF) !important;
}

.navbar.sticky-top {
    box-shadow: var(--shadow-4);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--header-text, #212529) !important;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--header-text, #212529) !important;
    transition: color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--md-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--md-blue);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section - Material Design */
.hero-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--md-blue) 0%, var(--md-blue-dark) 100%);
    color: var(--md-white);
    border-radius: 0;
    box-shadow: var(--shadow-4);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="20" fill="rgba(255,255,255,.05)"/><circle cx="80" cy="80" r="20" fill="rgba(255,255,255,.1)"/></svg>');
    pointer-events: none;
}

.hero-section h1 {
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Post Cards - Material Design */
.card {
    border: none;
    border-radius: 4px;
    box-shadow: var(--shadow-1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    background-color: var(--md-white);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-8);
}

.card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--md-grey);
    font-weight: 500;
    letter-spacing: -0.5px;
}

.card-text {
    color: var(--md-grey-light);
    line-height: 1.6;
}

.card-footer {
    background-color: var(--md-surface);
    border-top: 1px solid var(--md-grey-lightest);
    border-radius: 0 0 4px 4px;
}

/* Buttons - Material Design */
.btn {
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-transform: uppercase;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-1);
}

.btn:hover,
.btn:focus {
    box-shadow: var(--shadow-4);
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--md-blue);
    border-color: var(--md-blue);
    color: var(--md-white);
}

.btn-primary:hover {
    background-color: var(--md-blue-dark);
    border-color: var(--md-blue-dark);
}

.btn-outline-primary {
    color: var(--md-blue);
    border-color: var(--md-blue);
}

.btn-outline-primary:hover {
    background-color: var(--md-blue);
    border-color: var(--md-blue);
    color: var(--md-white);
}

/* Post Content */
.post-content {
    max-width: 920px;
    margin: 2rem auto;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--md-grey);
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--md-grey-lightest);
    color: var(--md-grey-light);
    font-size: 0.875rem;
}

.post-preview {
    display: block;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--md-grey-lightest);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.post-preview:hover {
    transform: translateX(4px);
}

/* Content */
.gh-content {
    line-height: 1.8;
    letter-spacing: 0.3px;
}

.gh-content > p {
    margin-bottom: 1.5rem;
    color: var(--md-grey-light);
}

.gh-content > h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--md-grey);
}

.gh-content > h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.25px;
    color: var(--md-grey);
}

.gh-content > blockquote {
    border-left: 4px solid var(--md-blue);
    padding-left: 1.5rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--md-grey-light);
    background-color: var(--md-surface);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 4px 4px 0;
}

.gh-content > pre {
    background-color: var(--md-grey);
    color: var(--md-white);
    border: none;
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-2);
}

.gh-content > code {
    background-color: var(--md-surface);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    font-size: 0.9em;
    color: var(--md-error);
    font-family: 'Courier New', monospace;
}

.gh-content > pre > code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Call-to-Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--md-blue-light) 0%, var(--md-blue) 100%);
    color: var(--md-white);
    padding: 3rem 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-4);
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-section h2 {
    color: var(--md-white);
    font-weight: 300;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.cta-image {
    border-radius: 4px;
    box-shadow: var(--shadow-2);
    margin-bottom: 1.5rem;
}

/* Author Box */
.author-box {
    background-color: var(--md-surface);
    padding: 2rem;
    border-radius: 4px;
    border-left: 4px solid var(--md-blue);
    box-shadow: var(--shadow-1);
    margin: 2rem 0;
}

.author-box img {
    margin-right: 1rem;
    border-radius: 50%;
    border: 2px solid var(--md-blue);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.author-box img:hover {
    transform: scale(1.1);
}

.author-box strong {
    color: var(--md-grey);
    font-weight: 500;
}

.author-box p {
    color: var(--md-grey-light);
}

/* Tags */
.post-tags {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: var(--md-blue);
    color: var(--md-white);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: var(--shadow-1);
}

.badge:hover {
    background-color: var(--md-blue-dark);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
    background-color: var(--md-surface);
    padding: 3rem 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    box-shadow: var(--shadow-1);
}

.related-posts h3 {
    color: var(--md-grey);
    font-weight: 400;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Footer - Material Design */
footer {
    margin-top: 4rem;
    background-color: var(--footer-bg, #212529);
    color: var(--footer-text, #FFFFFF);
    padding: 3rem 0 1rem;
}

footer h5 {
    color: var(--footer-text, #FFFFFF);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

footer a:hover {
    color: var(--md-blue-light);
    text-decoration: none;
}

footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Slider overlay and caption styling */
.featured-slider .carousel-item {
    position: relative;
}

.featured-slider .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
}

.featured-slider .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 1rem;
    border-radius: 0.25rem;
}

.featured-slider .carousel-caption h5,
.featured-slider .carousel-caption p {
    color: #fff;
}

/* Text truncation for card excerpts */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured slider full-width styling */
.featured-slider .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Recommendations favicon color and alignment */
.recommendation-favicon {
    color: var(--footer-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-favicon img {
    flex-shrink: 0;
}

/* Bold footer headings */
footer h5 {
    font-weight: 600;
}

/* Koenig editor width styles for Ghost theme requirements */
.kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-width-wide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--footer-text, #FFFFFF);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: var(--shadow-1);
}

.social-icons a:hover {
    background-color: var(--md-blue);
    color: var(--md-white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-4);
}

/* Author Stats */
.stat-box {
    background-color: var(--md-surface);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-align: center;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-4);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--md-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--md-grey-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.pagination {
    justify-content: center;
    margin-top: 3rem;
    gap: 0.25rem;
}

.page-link {
    color: var(--md-blue);
    border: 1px solid var(--md-grey-lightest);
    border-radius: 4px;
    margin: 0 2px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-weight: 500;
}

.page-link:hover {
    color: var(--md-white);
    background-color: var(--md-blue);
    border-color: var(--md-blue);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
}

.page-link.active {
    background-color: var(--md-blue);
    border-color: var(--md-blue);
    color: var(--md-white);
}

.page-item.disabled .page-link {
    color: var(--md-grey-lighter);
    background-color: var(--md-surface);
    border-color: var(--md-grey-lightest);
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 1.75rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .related-posts {
        padding: 1.5rem 1rem;
    }
}
