/* Enhanced Blog Cards Design - Matching Article Style */

/* Sticky Header - Following main site design */
header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(158, 42, 69, 0.88);
    height: 100px;
    z-index: 1000;
    transition: all 0.3s ease;
    display: block;
}

header.sticky-header::after {
    content: '';
    display: table;
    clear: both;
}

/* Logo - vertically centered */
header.sticky-header .logo {
    position: absolute;
    display: block;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    background-image: url(/media/logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 33;
}

/* Right buttons - vertically centered */
header.sticky-header .rb {
    position: absolute;
    display: block;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    width: auto;
    height: auto;
    z-index: 33;
}

header.sticky-header .rb-buttons {
    display: block;
}

header.sticky-header .rb-buttons>.btn {
    margin: 0;
    font-size: 16px;
    padding: 0px 25px;
    line-height: 52px;
    height: 52px;
    min-width: 180px;
    display: inline-block;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

header.sticky-header .rb-buttons>.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header.sticky-header .rb-buttons>.btn:first-child {
    margin-right: 30px;
}

/* Body padding to account for fixed header */
body {
    padding-top: 120px;
}

/* Hide the progress/flow bar on blog pages */
.flowBarContainer,
.flowBar {
    display: none !important;
}

/* Wrapper adjustment for fixed header */
.wrapper {
    padding-top: 0;
    position: relative;
    min-height: 100vh;
}

/* Breadcrumb and Category Section */
.blog-navigation {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 20px;
    margin: 20px 0 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-radius: 5px;
}

.blog-navigation-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Category Selector - matching main site select style */
.category-selector-inline {
    order: 1;
}

.category-selector-inline select {
    background-color: #35af6b;
    color: #fff;
    font-size: 18px;
    padding: 0 40px 0 10px;
    line-height: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5" stroke="white" stroke-width="2" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.category-selector-inline select:hover {
    background-color: #2d9358;
}

.category-selector-inline select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(53, 175, 107, 0.3);
}

.category-selector-inline option {
    background-color: #35af6b;
    color: #fff;
}

/* Breadcrumb inline */
.breadcrumb-inline {
    order: 2;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.8rem;
    line-height: 1.4;
}

.breadcrumb-inline a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-inline a:hover {
    color: #35af6b;
    text-decoration: underline;
}

.breadcrumb-inline span {
    color: #35af6b;
    font-weight: 600;
}

/* Remove old breadcrumb styling */
.blogBreadcrumb {
    display: none !important;
}

/* Ensure breadcrumb links remain visible */
.blogBreadcrumb a {
    color: #fff !important;
    text-decoration: none;
}

.blogBreadcrumb a:hover {
    color: #35af6b !important;
    text-decoration: underline;
}

/* Ensure container has enough width for 3 columns */
.blogMainContainer {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    padding-top: 20px !important;
}

/* Blog Cards Container - Using CSS Grid for precise 3 columns */
.blogMainContainer .blogs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px;
    margin-top: 30px;
    width: 100%;
}

/* Individual Blog Card - Glass Morphism Effect */
.blogMainContainer .blogs .blog {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100% !important;
    margin: 0 !important;
}

/* Glass reflection effect */
.blogMainContainer .blogs .blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.blogMainContainer .blogs .blog:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(53, 175, 107, 0.2);
}

/* Card Image Container */
.blogMainContainer .blogs .blog .imageContainer {
    width: 100%;
    padding-bottom: 60%;
    position: relative;
    margin: 0;
    overflow: hidden;
}

.blogMainContainer .blogs .blog .imageContainer .image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.blogMainContainer .blogs .blog:hover .imageContainer .image {
    transform: scale(1.1);
}

/* Card Content */
.blogMainContainer .blogs .blog .card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Card Title */
.blogMainContainer .blogs .blog .title {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.blogMainContainer .blogs .blog .title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #35af6b 0%, rgba(53, 175, 107, 0) 100%);
    border-radius: 2px;
}

.blogMainContainer .blogs .blog .title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.blogMainContainer .blogs .blog .title a:hover {
    color: #35af6b;
}

/* Card Lead Text */
.blogMainContainer .blogs .blog .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Read More Button */
.blogMainContainer .blogs .blog .btn {
    background: rgba(53, 175, 107, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(53, 175, 107, 0.3);
    color: #fff;
    padding: 14px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-end;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.blogMainContainer .blogs .blog .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.blogMainContainer .blogs .blog .btn:hover {
    background: rgba(53, 175, 107, 0.4);
    border-color: rgba(53, 175, 107, 0.6);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(53, 175, 107, 0.4);
}

.blogMainContainer .blogs .blog .btn:hover::before {
    left: 100%;
}

/* Category Badge */
.blogMainContainer .blogs .blog .category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(53, 175, 107, 0.9);
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 1.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Date Badge - Hidden */
.blogMainContainer .blogs .blog .date-badge {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blogMainContainer .blogs {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 991px) {
    /* Mobile header adjustments - following main site */
    header.sticky-header {
        background-color: rgba(158, 42, 69, 0.88);
        height: 70px;
    }
    
    header.sticky-header .logo {
        top: 50%;
        transform: translateY(-50%);
        left: 5px;
        width: 50px;
        height: 50px;
    }
    
    header.sticky-header .rb {
        top: 50%;
        transform: translateY(-50%);
        bottom: auto;
        right: 9px;
    }
    
    header.sticky-header .rb-buttons>.btn {
        margin-left: 0;
        margin-right: 0;
        min-width: initial;
        font-size: 12px;
        padding: 8px 12px;
        line-height: 16px;
        height: initial;
        font-weight: 700;
        border-radius: 2px;
    }
    
    header.sticky-header .rb-buttons>.btn:first-child {
        margin-right: 10px;
    }
    
    body {
        padding-top: 80px;
    }
    
    /* Blog navigation mobile - single line */
    .blog-navigation {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px;
        gap: 10px;
    }
    
    .blog-navigation-left {
        flex-direction: row;
        align-items: center;
        width: 100%;
        gap: 10px;
        justify-content: space-between;
    }
    
    .category-selector-inline {
        flex: 0 0 auto;
        order: 2;
    }
    
    .category-selector-inline select {
        width: auto;
        min-width: 120px;
        max-width: 150px;
        font-size: 14px;
        height: 32px;
        line-height: 32px;
        padding: 0 30px 0 8px;
    }
    
    .breadcrumb-inline {
        order: 1;
        text-align: left;
        padding: 0;
        font-size: 1.6rem;
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 768px) {
    /* Blog cards mobile */
    .blogMainContainer .blogs {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .blogMainContainer .blogs .blog .title {
        font-size: 1.6rem;
    }
    
    .blogMainContainer .blogs .blog .lead {
        font-size: 1.4rem;
    }
    
    .blogMainContainer .blogs .blog .date-badge {
        font-size: 1.4rem;
    }
    
    .blogMainContainer .blogs .blog .category-badge {
        font-size: 1.4rem;
    }
}

@media (max-width: 575px) {
    .blog-navigation {
        padding: 8px;
        gap: 8px;
    }
    
    .category-selector-inline select {
        font-size: 16px;
        min-width: 120px;
        max-width: 150px;
        height: 36px;
        line-height: 36px;
    }
    
    .breadcrumb-inline {
        font-size: 1.4rem;
    }
    
    /* Hide "Főoldal ›" on very small screens to save space */
    .breadcrumb-inline a:first-child,
    .breadcrumb-inline > a:first-child + span {
        display: none;
    }
    
    @media (max-width: 400px) {
        .breadcrumb-inline {
            display: none;
        }
        
        .category-selector-inline {
            flex: 1 1 auto;
        }
        
        .category-selector-inline select {
            width: 100%;
            max-width: 100%;
        }
    }
}