/* =====================================================
   MAD BLOG PAGE
===================================================== */

.mad-blog-page {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

.mad-blog-page__container {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
}


/* =====================================================
   HERO
===================================================== */

.mad-blog-hero {
    position: relative;
    padding: 55px 0 35px;
    overflow: hidden;
}

.mad-blog-hero__grid {
    min-height: 320px;

    display: grid;
    grid-template-columns:
        minmax(0, 0.86fr)
        minmax(420px, 1.14fr);

    align-items: center;
    gap: 30px;
}

.mad-blog-hero__content {
    position: relative;
    z-index: 2;
}

.mad-blog-hero__label {
    width: fit-content;
    min-height: 31px;
    margin-bottom: 32px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #D946EF;

    border: 1px solid rgba(217, 70, 239, 0.25);
    border-radius: 20px;

    background: rgba(217, 70, 239, 0.06);

    font-family: "Courier New", monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mad-blog-hero__label-icon {
    color: #D946EF;
    font-size: 12px;
}

.mad-blog-hero__title {
    max-width: 620px;
    margin: 0 0 20px;

    color: #F8FAFC;

    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(38px, 4vw, 58px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.mad-blog-hero__title span {
    background: linear-gradient(
        90deg,
        #C084FC 0%,
        #D946EF 55%,
        #F472B6 100%
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    color: transparent;
}

.mad-blog-hero__description {
    max-width: 560px;
    margin: 0;

    color: #94A3B8;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

.mad-blog-hero__line {
    width: 42px;
    height: 2px;
    margin: 30px 0 24px;

    background: linear-gradient(
        90deg,
        #A78BFA,
        transparent
    );
}

.mad-blog-hero__stats {
    display: flex;
    align-items: stretch;
    gap: 28px;
}

.mad-blog-stat {
    min-width: 88px;
}

.mad-blog-stat + .mad-blog-stat {
    padding-left: 28px;
    border-left: 1px solid rgba(248, 250, 252, 0.10);
}

.mad-blog-stat strong {
    display: block;
    margin-bottom: 5px;

    color: #D946EF;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.mad-blog-stat span {
    color: #94A3B8;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
}

.mad-blog-hero__visual {
    position: relative;
    min-height: 300px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.mad-blog-hero__visual::before {
    content: "";

    position: absolute;
    inset: 8%;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(217, 70, 239, 0.15),
        rgba(59, 130, 246, 0.06) 45%,
        transparent 72%
    );

    filter: blur(20px);
}

.mad-blog-hero__visual img {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 600px;
    max-height: 330px;

    display: block;

    object-fit: contain;

    filter:
        drop-shadow(0 0 25px rgba(217, 70, 239, 0.16));
}


/* =====================================================
   FEATURED ARTICLE
===================================================== */

.mad-featured-blog {
    padding: 10px 0 28px;
}

.mad-featured-blog__card {
    min-height: 300px;
    padding: 22px;

    display: grid;
    grid-template-columns:
        minmax(0, 0.92fr)
        minmax(400px, 1.08fr);

    align-items: stretch;
    gap: 28px;

    overflow: hidden;

    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 14px;

    background: rgba(14, 11, 28, 0.45);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow:
        inset 0 0 35px rgba(109, 40, 217, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.24);
}

.mad-featured-blog__content {
    min-width: 0;
    padding: 4px 4px 4px 2px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mad-featured-blog__badge {
    width: fit-content;
    min-height: 26px;
    margin-bottom: 18px;
    padding: 0 10px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #F472B6;

    border: 1px solid rgba(217, 70, 239, 0.55);
    border-radius: 4px;

    background: rgba(217, 70, 239, 0.08);

    font-family: "Courier New", monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mad-featured-blog__category,
.mad-blog-page-card__category {
    width: fit-content;
    min-height: 21px;
    margin-bottom: 11px;
    padding: 0 8px;

    display: inline-flex;
    align-items: center;

    color: #C084FC;

    border-radius: 3px;
    background: rgba(139, 92, 246, 0.16);

    font-family: "Courier New", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mad-featured-blog__title {
    max-width: 500px;
    margin: 0 0 12px;

    color: #F8FAFC;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.35;
}

.mad-featured-blog__excerpt {
    max-width: 520px;
    margin: 0 0 24px;

    color: #94A3B8;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.7;
}

.mad-featured-blog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.mad-featured-blog__author {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    color: #94A3B8;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
}

.mad-featured-blog__author img {
    width: 25px;
    height: 25px;

    display: block;
    object-fit: contain;
}

.mad-featured-blog__separator {
    color: rgba(248, 250, 252, 0.30);
}

.mad-featured-blog__button,
.mad-blog-page-card__button {
    min-height: 36px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    color: #F8FAFC;

    border: 1px solid rgba(217, 70, 239, 0.60);
    border-radius: 6px;

    background: rgba(14, 11, 28, 0.65);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.mad-featured-blog__button svg,
.mad-blog-page-card__button svg {
    width: 14px;
    height: 14px;

    color: #F472B6;
}

.mad-featured-blog__button:hover,
.mad-blog-page-card__button:hover {
    transform: translateY(-2px);

    color: #FFFFFF;
    border-color: #F472B6;
    background: rgba(217, 70, 239, 0.12);
}

.mad-featured-blog__image {
    min-width: 0;
    min-height: 250px;

    display: block;
    overflow: hidden;

    border-radius: 10px;

    background: #090711;
}

.mad-featured-blog__image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition: transform 0.45s ease;
}

.mad-featured-blog__card:hover
.mad-featured-blog__image img {
    transform: scale(1.035);
}


/* =====================================================
   FILTERS
===================================================== */

.mad-blog-listing {
    padding: 0 0 90px;
}

.mad-blog-filters {
    margin: 0 0 24px;

    display: grid;
    grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
}

.mad-blog-search {
    min-height: 42px;
    padding: 0 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    border: 1px solid rgba(139, 92, 246, 0.20);
    border-radius: 7px;

    background: rgba(14, 11, 28, 0.45);
}

.mad-blog-search svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;

    color: #94A3B8;
}

.mad-blog-search input {
    width: 100%;
    height: 40px;

    border: 0;
    outline: 0;

    color: #F8FAFC;
    background: transparent;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
}

.mad-blog-search input::placeholder {
    color: #64748B;
}

.mad-blog-search button {
    padding: 0;

    border: 0;

    color: #94A3B8;
    background: transparent;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;

    cursor: pointer;
}

.mad-blog-topics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.mad-blog-topic {
    min-height: 39px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #CBD5E1;

    border: 1px solid rgba(139, 92, 246, 0.20);
    border-radius: 7px;

    background: rgba(14, 11, 28, 0.45);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.mad-blog-topic:hover,
.mad-blog-topic.is-active {
    color: #F8FAFC;
    border-color: rgba(217, 70, 239, 0.75);
    background: rgba(217, 70, 239, 0.10);

    box-shadow:
        0 0 12px rgba(217, 70, 239, 0.10);
}


/* =====================================================
   BLOG GRID
===================================================== */

.mad-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.mad-blog-page-card {
    min-width: 0;
    min-height: 410px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;

    background: rgba(14, 11, 28, 0.45);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow:
        inset 0 0 28px rgba(109, 40, 217, 0.03),
        0 16px 45px rgba(0, 0, 0, 0.20);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.mad-blog-page-card:hover {
    transform: translateY(-4px);

    border-color: rgba(217, 70, 239, 0.46);

    box-shadow:
        inset 0 0 30px rgba(217, 70, 239, 0.04),
        0 22px 55px rgba(0, 0, 0, 0.27);
}

.mad-blog-page-card__image {
    width: 100%;
    height: 185px;

    display: block;
    overflow: hidden;

    background: #090711;
}

.mad-blog-page-card__image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition: transform 0.4s ease;
}

.mad-blog-page-card:hover
.mad-blog-page-card__image img {
    transform: scale(1.045);
}

.mad-blog-page-card__body {
    padding: 15px 15px 14px;

    display: flex;
    flex-direction: column;
    flex: 1;
}

.mad-blog-page-card__title {
    margin: 0 0 10px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.mad-blog-page-card__title a {
    color: #F8FAFC;
    text-decoration: none;

    transition: color 0.25s ease;
}

.mad-blog-page-card__title a:hover {
    color: #F472B6;
}

.mad-blog-page-card__excerpt {
    margin: 0 0 16px;

    color: #94A3B8;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.65;
}

.mad-blog-page-card__footer {
    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mad-blog-page-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;

    color: #64748B;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 9px;
}

.mad-blog-page-card__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mad-blog-page-card__date svg {
    width: 13px;
    height: 13px;
}


/* =====================================================
   PAGINATION
===================================================== */

.mad-blog-pagination {
    margin-top: 28px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mad-blog-pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #CBD5E1;

    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 7px;

    background: rgba(14, 11, 28, 0.45);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    text-decoration: none;
}

.mad-blog-pagination .page-numbers.current,
.mad-blog-pagination .page-numbers:hover {
    color: #FFFFFF;
    border-color: #D946EF;
    background: rgba(217, 70, 239, 0.12);
}

.mad-blog-empty {
    padding: 50px 20px;

    color: #94A3B8;

    border: 1px solid rgba(139, 92, 246, 0.20);
    border-radius: 12px;

    background: rgba(14, 11, 28, 0.40);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-align: center;
}


/* =====================================================
   TABLET
===================================================== */

@media only screen and (max-width: 1024px) {

    .mad-blog-page__container {
        width: min(100% - 48px, 960px);
    }

    .mad-blog-hero__grid {
        grid-template-columns:
            minmax(0, 0.9fr)
            minmax(360px, 1.1fr);
    }

    .mad-featured-blog__card {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(320px, 0.95fr);
    }

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

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


/* =====================================================
   MOBILE
===================================================== */

@media only screen and (max-width: 767px) {

    .mad-blog-page__container {
        width: calc(100% - 32px);
    }

    .mad-blog-hero {
        padding-top: 35px;
    }

    .mad-blog-hero__grid {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .mad-blog-hero__content {
        order: 2;
    }

    .mad-blog-hero__visual {
        order: 1;
        min-height: 230px;
    }

    .mad-blog-hero__label {
        margin-bottom: 22px;
    }

    .mad-blog-hero__title {
        font-size: clamp(34px, 10vw, 44px);
    }

    .mad-blog-hero__description {
        font-size: 14px;
    }

    .mad-featured-blog__card {
        padding: 14px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mad-featured-blog__content {
        order: 2;
    }

    .mad-featured-blog__image {
        order: 1;
        min-height: 230px;
    }

    .mad-featured-blog__title {
        font-size: 21px;
    }

    .mad-featured-blog__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .mad-blog-topics {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;

        scrollbar-width: none;
    }

    .mad-blog-topics::-webkit-scrollbar {
        display: none;
    }

    .mad-blog-topic {
        flex: 0 0 auto;
    }

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

    .mad-blog-page-card__image {
        height: 220px;
    }
}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media only screen and (max-width: 420px) {

    .mad-blog-page__container {
        width: calc(100% - 24px);
    }

    .mad-blog-hero__title {
        font-size: 34px;
    }

    .mad-blog-hero__stats {
        gap: 20px;
    }

    .mad-blog-stat + .mad-blog-stat {
        padding-left: 20px;
    }

    .mad-featured-blog__image {
        min-height: 190px;
    }

    .mad-featured-blog__author {
        align-items: flex-start;
    }

    .mad-blog-page-card__image {
        height: 190px;
    }

    .mad-blog-page-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .mad-blog-page-card__button {
        width: 100%;
    }
}