/* css/blog.css */

body.blog-page {
    background-color: var(--bg-color) !important;
}

.blog-page .header {
    background-color: var(--header-bg) !important;
}

.blog-page .nav-btn.albert-btn {
    background-color: var(--albert-btn-bg) !important;
}

.blog-page .nav-btn.albert-btn:hover .albert-icon {
    filter: brightness(0) invert(1) !important;
}

[data-theme="dark"] .blog-page .nav-btn.albert-btn:hover .albert-icon {
    filter: brightness(0) !important;
}

.blog-page .nav-btn:hover,
.blog-page .nav-btn.active {
    color: var(--bg-color) !important;
    background-color: var(--text-color) !important;
}

.blog-page .nav-logo {
    opacity: 1;
    pointer-events: auto;
    top: 50%;
    transform: translate(-50%, -50%);
}

[data-theme="dark"] .blog-page .nav-logo {
    filter: brightness(0) invert(1) !important;
}

.blog-page {
    background-color: #ffffff;
    background-image: none;
}

/* ── Centered Logo Navbar ── */
.header--blogpost {
    background-color: var(--header-bg);
    border-bottom: 2px solid var(--text-color);
}

.header--blogpost .header-inner {
    position: relative;
}

.header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
}

.nav-logo--visible {
    height: 39px;
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    pointer-events: auto;
}

.blog-main {
    padding-top: 140px;
    padding-bottom: 100px;
    max-width: 1728px;
    margin: 0 auto;
    padding-left: 50px;
    padding-right: 50px;
}

.blog-title-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-bottom: 50px;
    overflow: hidden;
}

.blog-title-marquee {
    display: flex;
    width: max-content;
    animation: marquee-horizontal 80s linear infinite;
}

.blog-title-set {
    display: flex;
    align-items: center;
    gap: 4vw;
    padding-right: 4vw;
}

.blog-title-set span {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1;
    font-size: clamp(4.533rem, 11vw, 11.333rem);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.blog-title-shape {
    width: clamp(2.267rem, 5.1vw, 5.667rem);
    height: auto;
}

[data-theme="dark"] .blog-title-shape {
    filter: brightness(0) invert(1);
}

@keyframes marquee-horizontal {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Featured Section */
.blog-featured {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 35px;
    margin-bottom: 110px;
}

.featured-post {
    flex: 1.2;
    background: #C0D6ED;
    /* Signature blue */
    color: var(--text-color);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1.5px solid var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-post:hover {
    background: #a8c4e5;
    transform: translateY(-2px);
}

[data-theme="dark"] .featured-post {
    background-color: #131A2B;
    /* Harmonized dark blue */
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
}

.featured-tags {
    display: flex;
    gap: 10px;
}

.tag {
    border: 1px solid var(--text-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-style: oblique;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: clamp(2.333rem, 2.6vw, 3.867rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    max-width: 85%;
}

@media (max-width: 768px) {
    .featured-title {
        max-width: 100%;
    }
}

.featured-excerpt {
    font-family: var(--font-body);
    font-size: 1.067rem;
    font-weight: 300;
}

.ask-albert-section {
    display: flex;
    gap: 20px;
    align-items: end;
    max-width: 250px;
    margin-left: auto;
}

.ask-albert-content {
    flex: 1;
}

.ask-albert-title {
    font-family: var(--font-heading);
    font-size: 2.667rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
}

.ask-albert-text {
    font-family: var(--font-body);
    font-size: 1.067rem;
    font-weight: 300;
    margin-bottom: 15px;
}

.ask-albert-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.333rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1.5px solid var(--text-color);
    padding-bottom: 2px;
}

.ask-albert-section .read-more.albert-btn {
    font-size: 14pt;
}

/* Filters */
.blog-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    font-family: var(--font-heading);
    font-size: 1.067rem;
}

.filter-categories {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-dropdown-wrapper {
    display: none;
}

.filter-tag {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    transition: all 0.3s ease;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--text-color);
    color: var(--bg-color);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    /* Prevent shrinking */
    justify-content: flex-end;
}

.search-input-wrapper {
    position: relative;
    border: 1px solid var(--text-color);
    border-radius: 20px;
    padding: 0 16px;
    /* Vertical padding handled by height */
    display: flex;
    align-items: center;
    width: 350px;
    /* Fixed width on desktop */
    height: 40px;
    box-sizing: border-box;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: inherit;
    width: 100%;
}

.search-input::placeholder {
    color: rgba(15, 20, 35, 0.5);
}

[data-theme="dark"] .search-input::placeholder {
    color: rgba(244, 241, 238, 0.5);
}

.search-icon {
    margin-left: 10px;
    flex-shrink: 0;
}


.search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-color);
    border: 1.5px solid var(--text-color);
    list-style: none;
    padding: 4px 0;
    margin: 0;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.suggestion-item {
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.suggestion-type {
    font-size: 0.867rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.4;
    white-space: nowrap;
    min-width: 60px;
    flex-shrink: 0;
}

.suggestion-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .suggestion-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.suggestion-item mark {
    background: transparent;
    font-weight: 800;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    border: 1.5px solid var(--text-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    margin-right: -1.5px;
    margin-bottom: -1.5px;
    opacity: 0;
    animation: cardFadeIn 0.4s ease forwards;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.3s ease;
}

.blog-card:hover {
    background: #e1dcd8;
    /* Lighter blue */
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(15, 20, 35, 0.08);
    z-index: 5;
}

[data-theme="dark"] .blog-card:hover {
    background: rgba(244, 241, 238, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.933rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.card-tag {
    border: 1px solid var(--text-color);
    padding: 2px 10px;
    border-radius: 20px;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.blog-card:hover .card-image {
    filter: grayscale(0%);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.card-excerpt {
    font-family: var(--font-body);
    font-size: 1.133rem;
    flex-grow: 1;
    margin-bottom: 40px;
}

.card-footer {
    display: flex;
    gap: 30px;
    font-family: var(--font-heading);
    font-size: 0.933rem;
}

.card-footer strong {
    font-weight: 700;
    margin-right: 5px;
}

/* Card read-more link */
.card-read-more {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    position: relative;
}

.card-read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-color);
    transition: width 0.25s ease;
}

.card-read-more:hover {
    opacity: 1;
}

.card-read-more:hover::after {
    width: 100%;
}

/* No-results message */
.blog-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    animation: cardFadeIn 0.4s ease forwards;
}

.no-results-icon {
    font-size: 4rem;
    opacity: 0.3;
    font-family: var(--font-heading);
}

.no-results-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.5;
    text-align: center;
}

/* "Andere Einträge" section */
.blog-other-section {
    margin-top: 80px;
}

.blog-other-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--text-color);
    opacity: 0.5;
}

/* Footer alignment */

@media (max-width: 1393px) {
    .filter-search {
        gap: 40px;
    }
}


/* Responsive */
@media (max-width: 1024px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .category-tags {
        display: none !important;
    }

    .category-dropdown-wrapper {
        display: block !important;
        width: 100%;
        margin-top: 10px;
    }

    .category-dropdown {
        width: 100%;
        height: 45px;
        /* Unified height */
        padding: 0 15px;
        border: 1.5px solid var(--text-color);
        border-radius: 30px;
        background-color: var(--bg-color);
        color: var(--text-color);
        font-family: var(--font-main);
        font-size: 1.2rem;
        font-weight: 600;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230F1423' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        cursor: pointer;
        outline: none;
        box-sizing: border-box;
    }

    [data-theme="dark"] .category-dropdown {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23F4F1EE' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    }

    .search-input-wrapper {
        width: 350px;
        height: 45px;
        /* Unified height to match dropdown */
        max-width: none;
        margin-top: 10px;
        margin-right: auto;
        border-radius: 100px;
    }

    .filter-search {
        width: 100%;
        gap: 40px;
    }

    .category-dropdown:focus {
        border-color: var(--text-color);
    }

    .ask-albert-section {
        display: none !important;
    }

    .featured-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding-top: 120px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .blog-title-set span {
        font-size: clamp(2.55rem, 12.75vw, 5.1rem);
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card {
        margin-right: 0;
    }

    .category-tags {
        display: none !important;
    }

    .featured-post {
        padding: 30px 20px;
    }

    .search-input-wrapper {
        width: 100%;
        height: 45px;
        /* Unified height to match dropdown */
        max-width: none;
        margin-top: 10px;
    }

}

@media (max-width: 430px) {
    .featured-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .featured-tags {
        flex-direction: row;
        flex-wrap: wrap;
    }
}