/**
 * Blog Hero Section Components CSS
 * 
 * Blog hero section styling with breadcrumbs, social sharing, and featured images
 * Extends base card system from cards.css
 * 
 * Contains:
 * - Blog hero container and content
 * - Breadcrumb navigation
 * - Social sharing buttons
 * - Featured image display
 * - Category badges
 * - Responsive design and accessibility
 */

/* ============================
   Blog Hero Section Styles
   ============================ */

/* Blog Hero Container */
body.theme-pt .blog-hero {
    padding: var(--blog-hero-padding);
    background: var(--color-bg-primary);
    position: relative;
}

/* Blog Breadcrumb */
body.theme-pt .blog-breadcrumb .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: var(--breadcrumb-font-size);
}

body.theme-pt .blog-breadcrumb .breadcrumb-item {
    color: var(--color-text-muted);
}

body.theme-pt .blog-breadcrumb .breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

body.theme-pt .blog-breadcrumb .breadcrumb-item a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

body.theme-pt .blog-breadcrumb .breadcrumb-item.active {
    color: var(--color-text-muted);
}

body.theme-pt .blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--breadcrumb-separator-color);
    padding: 0 0.5rem;
}

/* Blog Hero Content */
body.theme-pt .blog-hero-content {
    gap: var(--blog-hero-content-gap);
    min-height: 400px;
    align-items: flex-start !important;
}

@media (min-width: 992px) {
    body.theme-pt .blog-hero-content {
        display: block !important;
        font-size: 0 !important; /* Remove whitespace between inline-block elements */
    }
}

/* Ensure clearfix for floated columns */
body.theme-pt section.blog-hero .row.blog-hero-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Override card styles that force full width - ensure proper Bootstrap grid behavior */
@media (min-width: 992px) {
    body.theme-pt section.blog-hero .row.blog-hero-content .col-lg-6.blog-content-primary {
        flex: 0 0 auto !important;
        width: 50% !important;
        display: inline-block !important;
        vertical-align: top !important;
        position: relative !important;
        font-size: 16px !important; /* Reset font-size */
        max-width: 50% !important;
        flex-basis: 50% !important;
    }

    body.theme-pt section.blog-hero .row.blog-hero-content .col-lg-6.blog-featured-media {
        flex: 0 0 auto !important;
        width: 50% !important;
        display: inline-block !important;
        vertical-align: top !important;
        position: relative !important;
        font-size: 16px !important; /* Reset font-size */
        max-width: 50% !important;
        flex-basis: 50% !important;
    }
}

/* Blog Header */
body.theme-pt .blog-header {
    max-width: 100%;
}

/* Blog Title */
body.theme-pt .blog-title {
    font-size: var(--blog-title-size);
    font-weight: var(--blog-title-weight);
    line-height: var(--blog-title-line-height);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

/* Blog Meta */
body.theme-pt .blog-meta {
    gap: var(--space-lg) !important;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

body.theme-pt .blog-meta span,
body.theme-pt .blog-meta div {
    font-size: var(--blog-meta-size);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

body.theme-pt .blog-meta .fa {
    color: var(--color-primary);
    font-size: 14px;
}

/* ============================
   Blog Categories and Badges
   ============================ */

/* Blog Categories */
body.theme-pt .blog-categories {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

body.theme-pt .badge-category {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
}

body.theme-pt .badge-buyer-questions {
    background-color: var(--badge-buyer-questions) !important;
    color: white !important;
}

body.theme-pt .badge-seller-questions {
    background-color: var(--badge-seller-questions) !important;
    color: white !important;
}

body.theme-pt .badge-market-insights {
    background-color: var(--badge-market-insights) !important;
    color: white !important;
}

body.theme-pt .badge-category:not([class*="badge-"]) {
    background-color: var(--badge-default) !important;
    color: white !important;
}

/* ============================
   Blog Content Elements
   ============================ */

/* Blog Excerpt */
body.theme-pt .blog-excerpt {
    font-size: var(--blog-excerpt-size);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

body.theme-pt .blog-excerpt p {
    margin-bottom: var(--space-md);
}

body.theme-pt .blog-excerpt p:last-child {
    margin-bottom: 0;
}

/* ============================
   Social Sharing
   ============================ */

/* Social Sharing */
body.theme-pt .blog-social-share {
    display: flex;
    align-items: center;
    gap: var(--social-link-gap);
    flex-wrap: wrap;
}

body.theme-pt .blog-social-share .share-label {
    font-size: var(--blog-meta-size);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-right: var(--space-xs);
}

body.theme-pt .blog-social-share .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--social-link-size);
    height: var(--social-link-size);
    border-radius: var(--social-link-border-radius);
    text-decoration: none;
    color: white;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow-sm);
}

body.theme-pt .blog-social-share .social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

body.theme-pt .blog-social-share .social-link.twitter {
    background-color: #1da1f2;
}

body.theme-pt .blog-social-share .social-link.twitter:hover {
    background-color: #0d8bd9;
}

body.theme-pt .blog-social-share .social-link.facebook {
    background-color: #1877f2;
}

body.theme-pt .blog-social-share .social-link.facebook:hover {
    background-color: #166fe5;
}

body.theme-pt .blog-social-share .social-link.linkedin {
    background-color: #0a66c2;
}

body.theme-pt .blog-social-share .social-link.linkedin:hover {
    background-color: #004182;
}

/* ============================
   Featured Media (Image and Video)
   ============================ */

/* Featured Media Container */
body.theme-pt .blog-featured-media {
    position: relative;
    display: flex;
    align-items: center;
}

/* Featured Image (legacy support) */
body.theme-pt .blog-featured-image {
    position: relative;
    display: flex;
    align-items: center;
}

/* Full height media column for 50/50 layout */
body.theme-pt .blog-featured-media.col-lg-6 {
    height: 100%;
    min-height: 400px;
}

/* Legacy: Full height image column for 3-column layout */
body.theme-pt .blog-featured-image.col-lg-3 {
    height: 100%;
    min-height: 400px;
}

/* Video Container */
body.theme-pt .blog-video-container {
    position: relative;
    width: 100%;
    margin: 0;
    cursor: pointer;
}

body.theme-pt .blog-featured-media.col-lg-6 .blog-video-container {
    height: 100%;
}

body.theme-pt .blog-video-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-radius: var(--blog-image-border-radius);
    box-shadow: var(--blog-image-shadow);
    transition: var(--card-transition);
}

body.theme-pt .blog-featured-media.col-lg-6 .blog-video-thumbnail {
    height: 100%;
    aspect-ratio: unset;
}

body.theme-pt .blog-video-container .play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

body.theme-pt .blog-video-container:hover .play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

body.theme-pt .blog-video-container:hover .blog-video-thumbnail {
    transform: scale(1.02);
}

/* Image Container (fallback) */
body.theme-pt .blog-image-container {
    position: relative;
    width: 100%;
    margin: 0;
}

/* Full height container for narrow column */
body.theme-pt .blog-featured-image.col-lg-3 .blog-image-container {
    height: 100%;
}

body.theme-pt .blog-featured-media.col-lg-6 .blog-image-container {
    height: 100%;
}

body.theme-pt .blog-featured-img {
    width: 100%;
    height: auto;
    aspect-ratio: var(--blog-image-aspect-ratio);
    object-fit: cover;
    object-position: center;
    border-radius: var(--blog-image-border-radius);
    box-shadow: var(--blog-image-shadow);
    transition: var(--card-transition);
}

/* Full height image styling for narrow column */
body.theme-pt .blog-featured-image.col-lg-3 .blog-featured-img {
    height: 100%;
    aspect-ratio: unset;
}


body.theme-pt .blog-image-caption {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
}

/* ============================
   Blog Hero Responsive Design
   ============================ */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    body.theme-pt .blog-hero-content {
        min-height: 450px;
    }
    
    body.theme-pt .blog-title {
        font-size: 42px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    body.theme-pt .blog-hero {
        padding: var(--blog-hero-padding-mobile);
    }
    
    body.theme-pt .blog-hero-content {
        gap: var(--space-xl);
        min-height: auto;
    }
    
    body.theme-pt .blog-content-primary {
        order: 1;
    }
    
    body.theme-pt .blog-featured-image {
        order: 2;
        margin-top: var(--space-lg);
    }
    
    body.theme-pt .blog-meta {
        justify-content: flex-start;
    }
    
    /* On mobile/tablet, allow columns to stack naturally */
    body.theme-pt .blog-hero .col-lg-6.blog-content-primary,
    body.theme-pt .blog-hero .col-lg-6.blog-featured-media {
        width: 100% !important;
    }
    
    /* Legacy support for old column classes */
    body.theme-pt .blog-hero .col-lg-9.blog-content-primary,
    body.theme-pt .blog-hero .col-lg-3.blog-featured-image {
        width: 100% !important;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767.98px) {
    body.theme-pt .blog-hero {
        padding: var(--space-xl) 0;
    }
    
    body.theme-pt .blog-breadcrumb {
        margin-bottom: var(--space-md);
    }
    
    body.theme-pt .blog-breadcrumb .breadcrumb {
        flex-wrap: wrap;
    }
    
    body.theme-pt .blog-title {
        font-size: 28px;
        margin-bottom: var(--space-md);
    }
    
    body.theme-pt .blog-meta {
        gap: var(--space-md) !important;
        margin-bottom: var(--space-md);
    }
    
    body.theme-pt .blog-excerpt {
        font-size: var(--font-size-md);
        margin-bottom: var(--space-lg);
    }
    
    body.theme-pt .blog-social-share {
        justify-content: flex-start;
    }
    
    body.theme-pt .blog-featured-image {
        margin-top: var(--space-md);
    }
    
    body.theme-pt .blog-featured-img {
        aspect-ratio: 4/3;
    }
}

/* Small Mobile (up to 575px) */
@media (max-width: 575.98px) {
    body.theme-pt .blog-breadcrumb .breadcrumb-item {
        font-size: 12px;
    }
    
    body.theme-pt .blog-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    body.theme-pt .blog-meta {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-sm) !important;
    }
    
    body.theme-pt .social-link-size {
        --social-link-size: 36px;
    }
}

/* ============================
   Blog Hero Accessibility
   ============================ */

/* Focus states */
body.theme-pt .blog-breadcrumb a:focus,
body.theme-pt .blog-social-share .social-link:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    body.theme-pt .blog-featured-img,
    body.theme-pt .blog-social-share .social-link {
        transition: none;
    }
    
    body.theme-pt .blog-featured-img:hover,
    body.theme-pt .blog-social-share .social-link:hover {
        transform: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    body.theme-pt .blog-meta .fa {
        color: var(--color-text-primary);
    }
    
    body.theme-pt .blog-social-share .social-link {
        border: 2px solid var(--color-text-primary);
    }
}