/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* --- BLOG REDESIGN STYLES --- */

/* GLOBAL FONT RESET FOR BLOG PAGES */
body.blog,
body.archive,
body.page-template-template-custom-blog,
body.page-template-blogi-page-template,
body.single-post {
    background-color: #f0f2f5 !important;
    font-family: 'Poppins', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* Force fonts on all elements inside our container to override theme defaults */
.blog-redesign-container,
.blog-redesign-container h1,
.blog-redesign-container h2,
.blog-redesign-container h3,
.blog-redesign-container h4,
.blog-redesign-container h5,
.blog-redesign-container h6,
.blog-redesign-container p,
.blog-redesign-container a,
.blog-redesign-container span,
.blog-redesign-container li,
.blog-redesign-container input,
.blog-redesign-container button,
.blog-redesign-container .elementor-widget-container {
    font-family: 'Poppins', sans-serif !important;
}

/* Main Container - STRICTLY BOXED */
.blog-redesign-container {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 40px !important;
    max-width: 1140px !important;
    /* Standard desktop width */
    width: 100% !important;
    margin: 40px auto !important;
    /* Centers the container */
    padding: 0 20px !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* Ensure parent containers don't force full width if possible */
.elementor-section.elementor-section-boxed>.elementor-container {
    max-width: 1140px !important;
}

@media (max-width: 768px) {
    .blog-redesign-container {
        grid-template-columns: 1fr !important;
        padding: 0 15px !important;
    }
}

/* Blog Posts Column */
.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100% !important;
}

/* Post Card */
.blog-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Slight shadow to pop from bg */
}

/* Single Post Specifics */
.single-post-card {
    margin-bottom: 0;
    /* Single post content usually takes up the whole column */
}

.post-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    max-height: 500px;
    aspect-ratio: 16 / 9;
    background-color: #e0e0e0;
    /* Allow taller images for single post */
}

.post-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure image covers area without stretching */
    display: block;
    transition: transform 0.3s ease;
}

.blog-post-card:not(.single-post-card):hover .post-thumbnail-wrapper img {
    transform: scale(1.02);
}

.post-category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #F8C301;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
}

/* Post Content */
.post-content-wrapper {
    padding: 30px;
    /* Default padding for loop */
}

.single-post-card .post-content-wrapper {
    padding: 40px;
    /* More padding inside card for single post */
}

.post-title {
    font-size: 32px;
    /* Differentiate H1 for single post */
    margin: 10px 0 20px 0;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

/* If it's the index page, keep it smaller */
.blog-posts-list .post-title {
    font-size: 24px;
    font-weight: 600;
}


.post-title a {
    text-decoration: none;
    color: #333;
    /* Darker title link */
    transition: color 0.2s;
}

.post-title a:hover {
    color: #2D6CC8;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #888;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    font-weight: 500;
}

.post-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more-link {
    display: inline-block;
    color: #2D6CC8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
}

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

/* Single Post Body Content */
.single-post-card .post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.single-post-card .post-content p {
    margin-bottom: 20px;
}

.single-post-card .post-content h2,
.single-post-card .post-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #222;
    font-weight: 700;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.tag-label {
    font-weight: bold;
    color: #333;
}

/* Sidebar */
.blog-redesign-sidebar {
    padding-left: 20px;
    min-width: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 40px;
    align-self: start;
}

/* Widget Styles for Dynamic Sidebars */
.sidebar-widget,
.widget {
    margin-bottom: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget-title,
.widgettitle {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
    letter-spacing: 1px;
}

/* Search Widget (Standard WP) */
.widget_search .search-form {
    display: flex;
}

.widget_search label {
    width: 100%;
}

.widget_search .search-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-family: 'Poppins', sans-serif !important;
}

.widget_search .search-submit {
    padding: 10px 15px;
    background-color: #4A90E2;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-family: 'Poppins', sans-serif !important;
}

/* Tag Cloud Widget (Standard WP) */
.tagcloud,
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-link,
.tag-link {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #eee;
    color: #666;
    font-size: 11px !important;
    /* Override inline font sizes from WP */
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s;
    font-weight: 500;
}

.tag-cloud-link:hover,
.tag-link:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Recent Posts Widget (Standard WP) */
.widget_recent_entries ul,
.recent-posts-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_recent_entries li,
.recent-posts-widget li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 15px;
}

.widget_recent_entries li:last-child {
    border-bottom: none;
}

.widget_recent_entries a,
.recent-posts-widget a {
    text-decoration: none;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s;
}

.widget_recent_entries a:hover {
    color: #2D6CC8;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 600;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: #4A90E2;
    color: #fff;
    border-color: #4A90E2;
}

/* --- LANGUAGE SWITCHER --- */
.bh-lang-switcher {
    display: none;
    /* hidden until JS injects into correct place */
    align-items: center;
    gap: 2px;
    margin-left: 20px;
    background: #e9ecef;
    border-radius: 6px;
    padding: 3px;
    vertical-align: middle;
}

.bh-lang-item {
    display: inline-block;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    line-height: 1;
    cursor: pointer;
}

.bh-lang-active {
    background: #F8C301;
    color: #02394A;
    cursor: default;
}

.bh-lang-link {
    color: #02394A !important;
    background: transparent;
}

.bh-lang-link:hover {
    color: #fff !important;
    background: #02394A;
}

/* Desktop: show original, hide mobile clone */
@media (min-width: 1025px) {
    #bh-lang-switcher-mobile {
        display: none !important;
    }
}

/* Mobile: hide desktop switcher, show clone inside mobile flyout menu */
@media (max-width: 1024px) {
    #bh-lang-switcher {
        display: none !important;
    }

    #bh-lang-switcher-mobile {
        display: inline-flex !important;
        margin: 25px 20px 15px;
        background: rgba(255, 255, 255, 0.15);
    }

    #bh-lang-switcher-mobile .bh-lang-link {
        color: #fff !important;
    }

    #bh-lang-switcher-mobile .bh-lang-link:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #F8C301 !important;
    }
}