/**
 * MX Blog Plugin Styles
 * Version: 1.0.1
 */

/* Mobile Viewport Fix */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }
    
    /* Prevent any content from extending beyond viewport */
    .mx-blog-archive,
    .mx-blog-posts-grid,
    .mx-blog-post-item,
    .mx-blog-content,
    .mx-blog-thumbnail,
    .mx-blog-thumbnail img {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}



/* Archive Grid Layout */
.mx-blog-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mx-blog-filter-section {
    margin-bottom: 30px;
    text-align: center;
}

.mx-blog-category-dropdown {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.mx-blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.mx-blog-post-item {
    background: white;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.mx-blog-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.mx-blog-thumbnail {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.mx-blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mx-blog-thumbnail:hover img {
    transform: scale(1.05);
}

.mx-blog-no-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.mx-blog-content {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.mx-blog-date {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.mx-blog-title {
    margin: 0 0 15px 0;
    font-size: inherit;
    line-height: 1.4;
}

.mx-blog-title h3 {
    margin: 0;
    /* Font family, weight, size, and text-transform now controlled via admin settings */
}

.mx-blog-title a {
    text-decoration: none;
    transition: color 0.3s ease;
    /* Color and hover color now controlled via admin settings */
}

.mx-blog-byline {
    font-family: 'Rubik', sans-serif;
    font-size: 1em;
    color: #000;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 15px;
    flex: 1;
}

.mx-blog-read-more {
    margin-top: auto;
}

.mx-blog-read-more-link {
    font-family: 'Rubik', sans-serif;
    color: #A7925F;
    text-decoration: none;
    font-weight: 400;
    font-size: 1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mx-blog-read-more-link:hover {
    color: #A7925F;
}

.mx-blog-read-more-link:hover .mx-blog-read-more-text {
    text-decoration: underline;
}

.mx-blog-read-more-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.mx-blog-read-more-link:hover .mx-blog-read-more-arrow {
    transform: translateX(5px);
}

/* Pagination */
.mx-blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.mx-blog-prev,
.mx-blog-next {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.mx-blog-prev:hover,
.mx-blog-next:hover {
    background: #005a87;
    color: white;
}

.mx-blog-page-info {
    font-weight: 600;
    color: #333;
}

/* Single Post Layout */
.mx-blog-single {
    max-width: 100%;
}

.mx-blog-hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.mx-blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 150px);
}

/* Title Section */
.mx-blog-title-section {
    max-width: 800px;
    margin: 10px auto 0px;
    padding: 5px 20px;
    text-align: center;
}

.mx-blog-title-content {
    max-width: 600px;
    margin: 0 auto;
}

.mx-blog-post-title {
    /* Font styles removed - controlled by Typography Settings */
    margin: 0 0 20px 0;
    color: #333;
    text-transform: uppercase;
}

.mx-blog-post-byline {
    /* Font size removed - controlled by Typography Settings */
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

.mx-blog-post-date {
    font-size: 1rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Share Section */
.mx-blog-share-section {
    max-width: 800px;
    margin: 0px auto 10px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.mx-blog-share-title {
    margin: 0 0 20px 0;
    color: #333;
}

.mx-blog-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mx-blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    color: #A7925F;
    text-decoration: none;
    border: 2px solid #A7925F;
    border-radius: 50%;
    transition: transform 0.3s ease;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
}

.mx-blog-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(167, 146, 95, 0.3);
}

/* Post Content */
.mx-blog-post-content {
    font-family: 'Rubik', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 20px;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 75px;
}

.mx-blog-post-content h1,
.mx-blog-post-content h2,
.mx-blog-post-content h3,
.mx-blog-post-content h4,
.mx-blog-post-content h5,
.mx-blog-post-content h6 {
    font-family: 'Libre Baskerville', serif;
    margin: 30px 0 20px 0;
    color: #333;
}

.mx-blog-post-content p {
    margin-bottom: 12px;
}

.mx-blog-post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 5px !important;
}

/* Breadcrumb Integration Styles - Full Width */
.mx-blog-breadcrumbs-container {
    width: 100vw;
    margin: 0;
    padding: 10px 0 10px 25px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Ensure breadcrumbs break out of any parent container constraints */
.mx-blog-archive .mx-blog-breadcrumbs-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Override mx-breadcrumbs default styles to ensure consistency */
.mx-blog-breadcrumbs-container .mx-breadcrumbs {
    margin: 0 !important;
    padding: 0 !important;
    /* Let mx-breadcrumbs plugin handle font-size, colors, etc. */
    /* This ensures we inherit all global mx-breadcrumbs settings */
}

/* Archive breadcrumb styles */
.mx-blog-archive .mx-blog-breadcrumbs-container {
    background: #fff;
}

/* Single post breadcrumb styles */
.mx-blog-single .mx-blog-breadcrumbs-container {
    background: #fff;
}

/* Responsive breadcrumb styles - maintain full width */
@media (max-width: 768px) {
    .mx-blog-breadcrumbs-container {
        padding: 10px 0 10px 20px; /* Slightly less left padding on tablet */
    }
}

@media (max-width: 480px) {
    .mx-blog-breadcrumbs-container {
        padding: 10px 0 10px 15px; /* Less left padding on mobile */
    }
}

/* Loading State */
.mx-blog-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mx-blog-no-posts {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Category Hero Section */
.mx-blog-category-hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 0 !important;
    top: 0;
}

/* Remove any spacing from parent containers */
.mx-blog-archive {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no spacing from WordPress theme containers */
.mx-blog-category-hero:first-child {
    margin-top: 0 !important;
}

/* Stories Section */
.mx-blog-stories-section {
    margin-top: 100px;
    margin-bottom: 100px;
    text-align: center;
    padding: 0 20px;
}

.mx-blog-stories-content {
    max-width: 800px;
    margin: 0 auto;
}

.mx-blog-stories-title {
    /* Font styles removed - controlled by Typography Settings */
    color: #333;
    margin: 0 0 30px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mx-blog-stories-byline {
    /* Font styles removed - controlled by Typography Settings */
    color: #666;
    line-height: 1.6;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.mx-blog-category-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 150px, transparent calc(100% - 150px), rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.mx-blog-category-hero-content {
    text-align: left;
    color: white;
    padding: 100px;
    max-width: none;
}

.mx-blog-category-hero-title {
    /* Font styles removed - controlled by Typography Settings */
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.mx-blog-category-hero-description {
    /* Font styles removed - controlled by Typography Settings */
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mx-blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mx-blog-hero-title {
        font-size: 2rem;
    }
    
    .mx-blog-hero-byline {
        font-size: 1rem;
    }
    
    .mx-blog-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mx-blog-share-btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .mx-blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
