/*
Theme Name: Viral Theme
Theme URI: https://makeviral.app
Author: Narcisse
Author URI: https://makeviral.app
Description: A cleaner, mobile-friendly MakeViral theme built for WordPress core pages, blog content, and WooCommerce/paywall expansion.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viral-theme
*/

:root {
    --bg: #eef2f8;
    --bg-dark: #0a1020;
    --surface: #ffffff;
    --surface-muted: #f6f8fc;
    --surface-dark: rgba(255, 255, 255, 0.08);
    --text: #182033;
    --text-muted: #5f6c84;
    --text-inverse: #f7f9ff;
    --accent: #1f7ae0;
    --accent-strong: #125db1;
    --accent-soft: #dbeafc;
    --success: #1f9d63;
    --warning: #ffcf5a;
    --danger: #c84040;
    --border: #d7deeb;
    --shadow-soft: 0 18px 42px rgba(18, 34, 66, 0.08);
    --shadow-strong: 0 28px 70px rgba(5, 12, 28, 0.28);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.7;
}

a {
    color: var(--accent-strong);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
    color: var(--accent);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-content {
    min-height: calc(100vh - 220px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 16, 32, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.site-branding {
    display: grid;
    gap: 0.25rem;
}

.site-logo img,
.custom-logo {
    width: auto;
    max-height: 58px;
}

.site-title {
    color: var(--text-inverse);
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
}

.site-tagline {
    margin: 0;
    color: rgba(247, 249, 255, 0.78);
    font-size: 0.9rem;
}

.site-header__toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: var(--text-inverse);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    cursor: pointer;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-menu,
.footer-menu,
.resource-links,
.comparison-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.header-menu a {
    color: rgba(247, 249, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
}

.header-menu a:hover,
.header-menu .current-menu-item > a,
.header-menu .current_page_item > a {
    color: #ffffff;
}

.account-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-links__greeting {
    color: rgba(247, 249, 255, 0.82);
    font-size: 0.95rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(31, 122, 224, 0.28);
}

.button--primary:hover,
.button--primary:focus-visible {
    background: var(--accent-strong);
    color: #ffffff;
}

.button--ghost {
    border-color: rgba(18, 93, 177, 0.18);
    background: #ffffff;
    color: var(--accent-strong);
}

.button--paypal {
    background: #ffc439;
    color: #111111;
    box-shadow: 0 10px 24px rgba(255, 196, 57, 0.28);
}

.front-page-main {
    color: var(--text-inverse);
    background:
        radial-gradient(circle at top, rgba(63, 102, 184, 0.48), transparent 32%),
        linear-gradient(180deg, #0d1427 0%, #090e1a 100%);
}

.homepage-hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0 1.25rem;
}

.homepage-hero__inner {
    max-width: 800px;
    text-align: center;
}

.homepage-hero__eyebrow {
    display: inline-flex;
    margin: 0 0 1rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #d6e5ff;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.homepage-hero__title,
.page-title,
.archive-title,
.entry-title {
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.homepage-hero__title {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
}

.homepage-hero__lead {
    max-width: 620px;
    margin: 1.2rem auto 0;
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    color: rgba(247, 249, 255, 0.94);
}

.homepage-hero__subtext {
    margin: 1rem auto 0;
    color: rgba(247, 249, 255, 0.72);
}

.homepage-section {
    padding: 1rem 0 1.75rem;
}

.homepage-section--compact {
    padding-top: 0.25rem;
}

.score-card,
.comparison-card,
.tool-panel,
.donation-card,
.resource-card,
.notice-card,
.cta-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

.score-card,
.comparison-card,
.donation-card,
.resource-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.score-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem;
}

.score-card h2,
.comparison-card h2,
.resource-card h2,
.cta-card h2,
.notice-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.score-card__score {
    margin: 0 0 1rem;
    font-size: clamp(3rem, 8vw, 4rem);
    font-weight: 800;
}

.score-card__list {
    margin: 0;
    padding-left: 1.25rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.comparison-card {
    padding: 1.75rem;
}

.comparison-card--before h2 {
    color: #ff8c8c;
}

.comparison-card--after h2 {
    color: #77e0ab;
}

.comparison-card ul {
    padding-left: 1.25rem;
}

.tool-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    color: var(--text);
}

.cta-card,
.notice-card {
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--surface-muted);
    color: var(--text);
}

.cta-card p,
.notice-card p {
    color: var(--text-muted);
}

.offer-panel {
    margin-top: 1rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        radial-gradient(circle at top right, rgba(31, 122, 224, 0.22), transparent 45%);
}

.offer-panel__headline {
    margin: 0;
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #f7f9ff;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.donation-card,
.resource-card {
    padding: 1.5rem;
}

.donation-card p {
    margin-top: 0;
}

.donation-form {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
}

.donation-form img {
    max-width: 220px;
}

.donation-form__powered {
    margin: 0;
    color: rgba(247, 249, 255, 0.72);
}

.resource-links {
    display: grid;
    gap: 0.75rem;
}

.resource-links a,
.legal-links a {
    color: #ffffff;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.page-layout {
    padding: 3rem 0 4rem;
}

.content-card,
.post-card,
.empty-state,
.archive-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.content-card {
    padding: clamp(1.5rem, 3vw, 2.8rem);
}

.page-card,
.single-card {
    max-width: 880px;
    margin: 0 auto;
}

.archive-shell {
    display: grid;
    gap: 1.5rem;
}

.archive-header {
    padding: 1.75rem 2rem;
}

.archive-description,
.archive-description p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.posts-grid {
    display: grid;
    gap: 1.25rem;
}

.post-card {
    padding: 1.5rem;
}

.post-card__header {
    margin-bottom: 1rem;
}

.post-title,
.post-title a {
    margin: 0;
    color: var(--text);
    text-decoration: none;
}

.post-meta,
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.65rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-excerpt p:last-child {
    margin-bottom: 0;
}

.entry-content {
    color: var(--text);
    overflow: visible;
}

.entry-content > * {
    max-width: 100%;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.25;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table,
.entry-content pre {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}

.entry-content blockquote {
    margin-left: 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: var(--surface-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    padding: 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content pre,
.entry-content code {
    font-family: Consolas, "Courier New", monospace;
}

.entry-content pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: #101624;
    color: #f6f8fc;
}

.entry-content img {
    border-radius: var(--radius-md);
}

.entry-edit-link,
.page-links {
    margin-top: 1.5rem;
}

.single-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: 880px;
    margin: 1.5rem auto 0;
}

.single-navigation a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.pagination .current {
    background: var(--accent);
    color: #ffffff;
    border-color: transparent;
}

.site-footer {
    background: #0c1323;
    color: rgba(247, 249, 255, 0.82);
}

.site-footer__inner {
    padding: 2.5rem 0;
}

.footer-widgets {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    margin-top: 0;
    color: #ffffff;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-menu a,
.site-footer__copy {
    color: rgba(247, 249, 255, 0.82);
}

.site-footer__copy {
    margin: 1.5rem 0 0;
}

.form-notice {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
}

.form-notice--success {
    background: #eaf7f0;
    color: #115734;
}

.form-notice--error {
    background: #fdeeee;
    color: #8a2424;
}

.viral-registration-form {
    display: grid;
    gap: 1rem;
}

.viral-registration-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.viral-registration-form input,
.entry-content input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.entry-content select,
.entry-content textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    clip: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: var(--text);
    border-radius: var(--radius-sm);
    z-index: 1000;
}

@media (max-width: 900px) {
    .site-header__inner {
        align-items: flex-start;
    }

    .site-header__toggle {
        display: inline-flex;
        order: 3;
    }

    .site-header__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav {
        display: none;
        width: 100%;
    }

    .main-nav.is-open {
        display: block;
    }

    .header-menu {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.5rem;
    }

    .account-links {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

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

@media (max-width: 680px) {
    .site-shell {
        width: min(100%, calc(100% - 1.2rem));
    }

    .homepage-hero {
        padding-top: 2.6rem;
    }

    .score-card,
    .comparison-card,
    .tool-panel,
    .donation-card,
    .resource-card,
    .content-card,
    .archive-header,
    .post-card {
        border-radius: 20px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .offer-panel__headline {
        font-size: 0.92rem;
    }

    .legal-links,
    .footer-menu,
    .single-navigation {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination .nav-links {
        gap: 0.35rem;
    }
}
