:root {
    --blue: #0062FB;
    --black: #131315;
    --black-rgb: 19, 19, 21;
    --neon-green: #D8FF00;
    --gray: #EDEDEB;
    --dark-grey: #cacaca;
    --darker-grey: #505050;
    --white: #FFFFFF;
    --white-rgb: 255, 255, 255;
}

/* -------------  Custom Font Styles ------------- */
@font-face {
    font-family: 'Aeonik-Regular';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/aeonik-regular.ttf') format('ttf');
    src: url('fonts/aeonik-regular.woff') format('woff');
}

@font-face {
    font-family: 'Aeonik-Medium';
    font-style: normal;
    font-weight: 600;
    src: url('fonts/aeonik-medium.ttf') format('ttf');
    /* Assuming you have a medium font file */
    src: url('fonts/aeonik-medium.woff') format('woff');
    /* Assuming you have a medium font file */
}



/* -------------  Globale Resets und Basis-Styles ------------- */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    min-width: 220px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: transparent;
    background-color: transparent;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Aeonik-Regular', sans-serif;
}

h1,
h2,
h3,
h4 {
    padding: 0;
    margin: 0;
}

h1 {
    color: var(--blue);
    font-size: clamp(4rem, 15vw + 1rem, 12.5rem);
    font-weight: 400;
    line-height: 0.75;
}

h2 {
    color: var(--blue);
    font-size: clamp(2.5rem, 8vw + 1rem, 5.25rem);
    font-weight: 500;
    line-height: 1;
}

h3 {
    color: var(--black);
    font-size: clamp(1.75rem, 4vw + 1rem, 2.75rem);
    font-weight: 500;
    line-height: 0.9;
}

h4 {
    color: var(--dark-grey);
    font-size: clamp(1.5rem, 4vw + 1rem, 2.75rem);
    font-weight: 500;
}

p {
    color: var(--black);
    font-family: 'Aeonik-Regular', sans-serif;
    font-size: clamp(1rem, 1vw + 0.5rem, 1.3125rem);
}

a {
    color: var(--black);
    text-decoration: none;
}

a:-webkit-any-link {
    color: var(--black);
    text-decoration: none;
}

#iframe-container {
    padding-left: 5vw;
    padding-right: 5vw;
}

.multiple-select-text {
    color: var(--darker-grey);
    padding-bottom: 16px;
}

.filter-tags-container {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    opacity: 0;
    transform: translateY(15px);
    transition-property: opacity, transform, background-color;
    transition-duration: 0.3s, 0.3s, 0.15s;
    transition-timing-function: ease, ease-in-out;
    transition-delay: 0s, 0s, 0s;
    background-color: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 60px;
    padding: 18px 30px;
    cursor: pointer;
}

.pill {
    opacity: 1;
    transform: translateY(0);
    transition-property: opacity, transform, background-color;
    transition-duration: 0.4s, 0.4s, 0.15s;
    transition-timing-function: ease-out, ease-out, ease-in-out;
}

.pill p {
    font-family: 'Aeonik-Medium', sans-serif;
    font-size: 18px;
    /* Corrected font property */
    color: var(--white);
    transition: color 0.35s ease-in-out;
}

.pill:hover {
    background-color: var(--white);
    transform: translateY(0);
    transition-property: background-color, transform;
    transition-duration: 0.25s, 0.1s;
    transition-timing-function: ease-in-out, ease-out;
    transition-delay: 0s, 0s !important;
}

.pill:hover p {
    color: var(--blue);
}

.pill.active {
    background-color: var(--neon-green);
}

.pill.active p {
    color: var(--blue);
}

.pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--dark-grey);
    /* Adjusted for disabled state */
}

.pill.disabled p {
    color: var(--darker-grey);
    /* Adjusted for disabled state */
}


.posts-grid-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 9px;
}

.post-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(var(--black-rgb), 0.1);
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    color: var(--white);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-3.5px);
    box-shadow: 0 12px 24px rgba(var(--black-rgb), 0.25);
}

.post-item.hero-item {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 7;
    position: relative;
    overflow: hidden;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-item.hero-item:hover .hero-background-image img {
    transform: scale(1.1);
}

.post-item-card {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    overflow: hidden;
}

.post-item-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    grid-column-start: 1;
    grid-column-end: 4;
    overflow: hidden;
}

.post-item-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--card-bg-image);
    background-size: cover;
    background-position: center;
    z-index: -3;
    transition: transform 0.6s cubic-bezier(0.2, 0.4, 0.4, 0.9);
}

.post-item-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--white-rgb), 0);
    z-index: -2;
    transition: background-color 0.55s ease-in-out;
    pointer-events: none;
}

.post-item:hover .post-item-content::before {
    transform: scale(1.15) rotate(4deg);
}

.post-item:hover .post-item-content.has-details::after {
    background-color: rgba(var(--white-rgb), 0.85);
}

.post-item-content h3 {
    position: relative;
    display: block;
    padding-bottom: 5px;
    max-width: fit-content;
    font-size: clamp(1.75rem, 4vw + 1rem, 2.75rem);
    line-height: 1.2;
    color: var(--black);
    /* Ensure h3 text is visible */
}

.h3-title-medium {
    font-size: clamp(1.5rem, 3.5vw + 0.8rem, 2.4rem) !important;
    line-height: 1.25 !important;
}

.h3-title-small {
    font-size: clamp(1.25rem, 3vw + 0.6rem, 2rem) !important;
    line-height: 1.3 !important;
}

.h3-title-xsmall {
    font-size: clamp(1rem, 2.5vw + 0.5rem, 1.75rem) !important;
    line-height: 1.35 !important;
}

.post-item-content h3::after {
    content: '';
    position: absolute;
    height: 12px;
    background-color: var(--neon-green);
    bottom: 6px;
    left: 0;
    right: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.post-item:hover .post-item-content h3::after {
    transform: scaleX(1);
}

.cta-button {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 400;
    font-size: 0.9em;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
    background-color: var(--neon-green);
    color: var(--black);
    transition: transform 0.4s ease-in-out, background-color 0.3s, box-shadow 0.3s ease, color 0.3s ease-in-out;
}

.cta-button p {
    /* Ensure p inside cta button inherits color */
    color: var(--black);
    transition: color 0.3s ease-in-out;
}

.cta-button:hover {
    background-color: var(--black);
    color: var(--neon-green);
    /* Adjusted hover text color */
    box-shadow: 0 6px 12px rgba(var(--black-rgb), 0.12);
    transform: scale(1.05);
}

.cta-button:hover p {
    color: var(--neon-green);
    /* Adjusted hover text color */
}

.post-item-card.hero-card {
    border-radius: 12px;
    padding: 8px;
}

.post-item-card.hero-card .post-item-content {
    border-radius: 12px;
    grid-column-start: 3;
    grid-column-end: 4;
}

.card-details-text {
    position: relative;
    font-size: clamp(0.85rem, 1.2vw + 0.4rem, 1rem);
    color: var(--darker-grey);
    /* Adjusted for better readability */
    line-height: 1.4;
    margin-top: 12px;
    margin-bottom: 18px;
    opacity: 0;
    transform: translateX(-16px);
    transition-delay: 0.6s;
    /* Keeping original delay */
    transition: opacity 0.4s ease-out 0.15s, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s;
    max-height: 65%;
    /* From original */
}

.post-item:hover .card-details-text {
    opacity: 1;
    transform: translateX(0);
}

/* ------------- Load More Button Styles ------------- */
.load-more-button-container {
    text-align: center;
    padding: 25px 0;
    /* Increased padding for better spacing */
    min-height: 70px;
    /* Give it some space even if button is not there initially */
}

.load-more-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px 10px 24px;
    background-color: var(--neon-green);
    color: var(--black);
    border: none;
    border-radius: 50px;
    font-family: 'Aeonik-Medium', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(var(--black-rgb), 0.1);
}

.load-more-button:hover {
    color: var(--neon-green);
    background-color: var(--black);
    transform: translateY(-1px);
}

.load-more-button:active {
    transform: translateY(0px);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--dark-grey);
}

.load-more-button:disabled:hover {
    background-color: var(--dark-grey);
    transform: translateY(0px);
}

.load-more-button .load-more-text {
    margin-right: 10px;
    text-transform: uppercase;
}

.load-more-button .arrow-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--black);
    border-radius: 50%;
}

.load-more-button:hover .arrow-icon-container {
    background-color: var(--white);
}

.load-more-button .arrow-icon-container::before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-style: solid;
    border-color: var(--white);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    position: relative;
    top: -1.5px;
}

.load-more-button:hover .arrow-icon-container::before {
    border-color: var(--black);
}

@media (max-width: calc(850px + 10vw)) {
    .filter-tags-container {
        margin-bottom: 24px;
        gap: 8px;
    }

    .posts-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-item {
        aspect-ratio: 1 / 1;
    }

    .post-item.hero-item {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 9;
    }

    .post-item-card.hero-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .post-item-card.hero-card .post-item-content.hero-content {
        grid-column-start: 2;
        grid-column-end: 3;
    }

    .post-item-card.hero-card .post-item-content.hero-content-left {
        grid-column-start: 1;
        grid-column-end: 2;
    }

    .post-item-card.hero-card .post-item-content.hero-content-center-small {
        grid-column-start: 1;
        grid-column-end: 3;
        text-align: center;
    }

    .post-item.hero-item .post-item-content h3 {
        font-size: clamp(1.5rem, 3.5vw + 0.8rem, 2.2rem);
    }

    .card-details-text {
        overflow: clip;
    }
}


@media (max-width: calc(600px + 10vw)) {
    .filter-tags-container {
        margin-bottom: 16px;
        gap: 8px;
    }

    .pill {
        padding: max(2.5vw, 6px) max(4vw, 12px);
    }

    .pill p {
        font-size: 14px;
        /* Adjusted from original 'font:18px' which is not standard for just size */
    }

    .posts-grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .post-item {
        background-color: var(--white);
        aspect-ratio: 2 / 1;
    }

    .post-item.hero-item {
        aspect-ratio: 2 / 1;
    }

    .post-item-content {
        padding: 15px;
        position: relative;
        padding-right: calc(50% + 20px);
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 1vw;
    }

    .post-item-content::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        left: auto;
        width: 50%;
        height: 100%;
        background-image: var(--card-bg-image);
        background-size: cover;
        background-position: center;
        z-index: 0;
    }

    .card-details-text {
        opacity: 1;
        transform: none;
        color: var(--darker-grey);
        display: -webkit-box;
        -webkit-line-clamp: 7;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: normal;
        height: 100%;
        max-height: none;
        margin: 0px;
        font-size: 2.75vw;
        line-height: 1.3;
        margin-bottom: 1.5vw;
    }

    .post-item.hero-item .post-item-content::before {
        background-image: none !important;
        display: none;
    }

    .post-item.hero-item .post-item-content {
        background-color: var(--white);
        padding: 20px;
    }

    .post-item.hero-item .post-item-content::after {
        display: none;
    }

    .post-item.hero-item .post-item-content h3,
    .post-item.hero-item .post-item-content .card-details-text {
        color: var(--black);
    }

    .h3-title-large, .h3-title-medium, .h3-title-small, .h3-title-xsmall {
        font-size: clamp(1rem, 2.5vw + 0.5rem, 1.75rem) !important;
        line-height: 1.35 !important;
    }

    .post-item-content h3::after {
        height: 8px;
        bottom: 6px;
    }

    @media (max-width: calc(410px + 10vw)) {
        .post-item-content {
            padding-right: calc(45% + 20px);
        }

        .cta-button {
            padding: 6px 12px;
        }

        .cta-button p {
            font-size: 3.5vw;
        }
    }
}

/* ------------- Loader Styles ------------- */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    min-height: 200px;
}

.loader-container p {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--darker-grey);
}

.loader {
    border: 4px solid var(--gray);
    /* Lighter border for loader */
    border-top: 4px solid var(--blue);
    /* Blue spinner part */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}