/*
Theme Name: VPN Secure
Theme URI: https://www.vpnsecure.me/
Author: VPN Secure
Description: Blog theme for the VPNSecure.me security blog, matching the VPN Secure public site design (Figma frames 2134:16548 / 2095:73 for the index and 2117:488 / 2123:74 for articles). Mobile-first, desktop layout from 1200px.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 8.1
License: Proprietary
Text Domain: vpnsecure
*/

/* ---------------------------------- fonts --------------------------------- */

@font-face {
    font-family: 'Neue Kaine';
    src: url('./fonts/NeueKaine-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Kaine';
    src: url('./fonts/NeueKaine-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Kaine';
    src: url('./fonts/NeueKaine-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Display';
    src: url('./fonts/InterDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Display';
    src: url('./fonts/InterDisplay-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Display';
    src: url('./fonts/InterDisplay-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Display';
    src: url('./fonts/InterDisplay-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------- base ---------------------------------- */

:root {
    --vpns-dark: #0A011A;
    --vpns-muted: #71658B;
    --vpns-lavender: #C0B0DB;
    --vpns-footer-bg: #EFEBFF;
    --vpns-gradient: linear-gradient(90deg, #AC70EF 0%, #F27FBE 50%, #FFB681 100%);
    --vpns-purple: #8650FF;
    --vpns-container: 1440px;
    --vpns-article: 1000px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter Display', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--vpns-dark);
    background: #fff;
    /* the main site's app.css makes body a centered flex column — undo */
    display: block;
    min-width: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Neue Kaine', 'Inter Display', sans-serif;
    margin: 0;
    line-height: normal;
}

p {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--vpns-container);
    margin: 0 auto;
    padding: 0 16px;

    @media screen and (min-width: 1200px) {
        padding: 0 40px;
    }
}

/* app.css turns .container into a 12-col grid (the footer chrome needs
   that) — undo it for the blog's own sections only */
.site-main .container {
    display: block;
}

/* --------------------------------- buttons -------------------------------- */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 24px;
    border: 0;
    border-radius: 16px;

    font-family: 'Inter Display', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

.btn.pink {
    background: var(--vpns-gradient);
    box-shadow: 0px 0px 11px 0px rgba(255, 255, 255, 1) inset;
}

.btn.dark-pill {
    color: #fff;
    background: radial-gradient(163.55% 70.2% at 50% 50%, #250C56 0%, #090212 100%);
    box-shadow: 0px 0px 11px 0px rgba(255, 255, 255, 0.40) inset;
    border-radius: 24px;
}

.read-more {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 15px 28px;
    border-radius: 16px;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
}

.read-more.pink {
    color: #fff;
    background: var(--vpns-gradient);
    box-shadow: 0px 0px 11px 0px rgba(255, 255, 255, 1) inset;
}

.read-more.outline {
    border: 1px solid transparent;
    background-image: linear-gradient(white, white), var(--vpns-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    color: #F27FBE;
}

.read-more.outline span {
    background: var(--vpns-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -------------------------------- hero area ------------------------------- */
/* Background comes from the main site's header.css (#desktop-bg / #header). */

#desktop-bg.blog {
    position: relative;
    color: #fff;
}

#desktop-bg.blog #header {
    padding-bottom: 40px;

    @media screen and (min-width: 1200px) {
        padding-bottom: 64px;
    }
}

/* -------------------------------- post meta ------------------------------- */

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;

    font-size: 15px;
    color: var(--vpns-muted);
}

.post-meta .post-author,
.post-meta .post-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.post-meta a {
    color: inherit;
    text-decoration: none;
}

/* ------------------------------ blog index hero ---------------------------- */

.blog-hero {
    max-width: var(--vpns-container);
    margin: 0 auto;
    padding: 24px 16px 0;

    @media screen and (min-width: 1200px) {
        padding: 40px 40px 0;
    }
}

.blog-hero h1 {
    color: #F6F0FF;
    font-size: 36px;
    font-weight: 700;
    text-align: center;

    @media screen and (min-width: 1200px) {
        font-size: 48px;
    }
}

.blog-hero h1 .thin {
    font-weight: 400;
}

.blog-hero .subtitle {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: var(--vpns-lavender);

    @media screen and (min-width: 1200px) {
        font-size: 16px;
    }
}

.blog-hero .btn.pink {
    margin: 24px auto 0;
    width: fit-content;
    display: flex;
}

/* featured post inside the dark hero */

.featured-post {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;

    @media screen and (min-width: 1200px) {
        flex-direction: row;
        align-items: center;
        gap: 48px;
        margin-top: 48px;
        max-width: 1220px;
        margin-left: auto;
        margin-right: auto;
    }
}

.featured-post .featured-thumb {
    display: block;
    flex: none;

    @media screen and (min-width: 1200px) {
        width: 50%;
    }
}

.featured-post .featured-thumb img,
.featured-post .thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9.6;
    object-fit: cover;
    border-radius: 24px;
}

.featured-post .thumb-placeholder {
    background: var(--vpns-gradient);
}

.featured-post .post-meta {
    color: rgba(255, 255, 255, 0.85);
}

.featured-post .featured-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.featured-post .featured-title {
    font-size: 26px;
    font-weight: 500;

    @media screen and (min-width: 1200px) {
        font-size: 34px;
    }
}

.featured-post .featured-title a {
    color: #fff;
    text-decoration: none;
}

.featured-post hr {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
}

/* ------------------------------ post sections ------------------------------ */

.site-main {
    padding-bottom: 24px;
}

.post-section {
    margin-top: 48px;

    @media screen and (min-width: 1200px) {
        margin-top: 88px;
    }
}

.section-title {
    font-size: 28px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 28px;

    @media screen and (min-width: 1200px) {
        font-size: 40px;
        text-align: start;
        margin-bottom: 44px;
    }
}

.section-title .thin {
    font-weight: 400;
}

.section-title b {
    font-weight: 700;
}

/* horizontal scroll row (Popular) */

.card-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    /* let the row bleed to the viewport edge like the design */
    margin-right: -16px;
    padding-right: 16px;

    @media screen and (min-width: 1200px) {
        gap: 32px;
        margin-right: -40px;
        padding-right: 40px;
    }
}

.card-row .post-card {
    flex: 0 0 85%;
    scroll-snap-align: start;

    @media screen and (min-width: 1200px) {
        flex-basis: 445px;
    }
}

/* grid (Recent) */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px 32px;

    @media screen and (min-width: 1200px) {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* card */

.post-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.post-card .card-thumb {
    display: block;
    width: 100%;
}

.post-card .card-thumb img,
.post-card .thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 24px;
}

.post-card .thumb-placeholder {
    background: var(--vpns-gradient);
}

.post-card .card-title {
    font-size: 22px;
    font-weight: 500;
}

.post-card .card-title a {
    color: var(--vpns-dark);
    text-decoration: none;
}

.post-card .card-excerpt {
    font-size: 14px;
    line-height: 21px;
    color: var(--vpns-muted);
}

/* pagination */

.pagination {
    margin-top: 48px;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: #F5F3FA;
    color: var(--vpns-dark);
    text-decoration: none;
    font-weight: 600;
}

.pagination .page-numbers.current {
    background: var(--vpns-gradient);
    color: #fff;
}

.no-posts {
    color: var(--vpns-muted);
}

/* ------------------------------- article page ------------------------------ */

.article-hero {
    max-width: calc(var(--vpns-article) + 56px + 32px);
    margin: 0 auto;
    padding: 24px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    @media screen and (min-width: 1200px) {
        padding-top: 60px;
    }
}

.article-hero .article-title {
    color: #F6F0FF;
    font-size: 30px;
    font-weight: 700;
    text-align: center;

    @media screen and (min-width: 1200px) {
        font-size: 48px;
        max-width: 900px;
    }
}

.article-hero .post-meta {
    color: rgba(255, 255, 255, 0.85);
}

.article-hero .article-thumb {
    width: 100%;
    margin: 12px 0 0;

    @media screen and (min-width: 1200px) {
        /* overlap out of the dark header like the design */
        margin-bottom: -134px;
    }
}

.article-hero .article-thumb img {
    display: block;
    width: 100%;
    border-radius: 24px;

    @media screen and (min-width: 1200px) {
        border-radius: 32px;
    }
}

@media screen and (min-width: 1200px) {
    body.single #desktop-bg.blog #header,
    body.page #desktop-bg.blog #header {
        padding-bottom: 0;
    }
}

.article {
    max-width: calc(var(--vpns-article) + 32px);
    margin: 0 auto;
    padding: 40px 16px 0;

    @media screen and (min-width: 1200px) {
        padding-top: 60px;
    }
}

/* the hero image overlaps -134px out of the dark header — compensate
   only when the post actually has one */
.article.has-post-thumbnail {
    @media screen and (min-width: 1200px) {
        padding-top: 194px; /* 134px overlap + 60px gap */
    }
}

.article-content {
    font-size: 16px;
    line-height: 28px;

    @media screen and (min-width: 1200px) {
        font-size: 18px;
        line-height: 30px;
    }
}

.article-content > * + * {
    margin-top: 20px;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 40px;
    text-align: left;   /* app.css centers h2 globally */
    line-height: normal;

    @media screen and (min-width: 1200px) {
        font-size: 28px;
        margin-top: 56px;
    }
}

.article-content h3 {
    font-size: 19px;
    font-weight: 700;
    margin-top: 32px;

    @media screen and (min-width: 1200px) {
        font-size: 20px;
        margin-top: 40px;
    }
}

.article-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: var(--vpns-purple);
}

.article-content img {
    display: block;
    border-radius: 16px;
    margin: 32px auto;

    @media screen and (min-width: 1200px) {
        border-radius: 24px;
        margin: 40px auto;
    }
}

.article-content figure {
    margin: 32px auto;
}

.article-content figure img {
    margin: 0 auto;
}

.article-content figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--vpns-muted);
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
}

.article-content li + li {
    margin-top: 8px;
}

.article-content blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 4px solid;
    border-image: var(--vpns-gradient) 1;
    background: #F5F3FA;
    border-radius: 0 16px 16px 0;
}

.article-content pre {
    overflow-x: auto;
    background: var(--vpns-dark);
    color: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 22px;
}

.article-content .wp-block-embed iframe {
    max-width: 100%;
}

/* ------------------------------ wp essentials ------------------------------ */

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.alignleft {
    float: left;
    margin: 0 24px 16px 0;
}

.alignright {
    float: right;
    margin: 0 0 16px 24px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}
