/*
Theme Name: MakerBud Theme
Theme URI: https://makerbud.net
Author: MakerBud
Author URI: https://makerbud.net
Description: Custom theme for MakerBud website with bilingual support (EN/ES), SEO optimization, and Paid Memberships Pro integration. Matches the MakerBud app design system.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: makerbud
Tags: custom-background, threaded-comments, translation-ready, bilingual
*/

:root {
    --mb-bg: #f5f6ff;
    --mb-surface: #ffffff;
    --mb-text: #1d2340;
    --mb-muted: #667085;
    --mb-border: #dbe0ff;
    --mb-primary: #667eea;
    --mb-primary-dark: #5a67d8;
    --mb-secondary: #764ba2;
    --mb-success: #10b981;
    --mb-shadow: 0 12px 30px rgba(60, 72, 138, 0.14);
    --mb-shadow-soft: 0 8px 20px rgba(60, 72, 138, 0.1);
    --mb-radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Inter", sans-serif;
    color: var(--mb-text);
    background: radial-gradient(circle at 0% 0%, #e7ecff 0, transparent 40%),
        radial-gradient(circle at 100% 100%, #e8ddff 0, transparent 35%),
        var(--mb-bg);
    line-height: 1.55;
}

a {
    color: var(--mb-primary-dark);
    text-decoration: none;
}

.container {
    width: min(1160px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.site-main {
    padding-block: 72px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin: 0 0 12px;
}

.section-subtitle {
    color: var(--mb-muted);
    margin: 0;
    max-width: 760px;
}

.btn,
.btn-primary,
.btn-secondary,
.pmpro_btn,
input[type="submit"],
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.pmpro_btn,
input[type="submit"] {
    color: #fff;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-secondary));
    box-shadow: var(--mb-shadow-soft);
}

.btn-secondary {
    background: #fff;
    color: var(--mb-primary-dark);
    border: 1px solid #ccd3ff;
}

.btn-primary:hover,
.btn-secondary:hover,
.pmpro_btn:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    backdrop-filter: blur(10px);
    background: rgba(248, 250, 255, 0.94);
    border-bottom: 1px solid rgba(170, 181, 255, 0.35);
}

.site-header__bar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo img {
    height: 46px;
    width: auto;
}

.custom-logo-link img {
    height: 46px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eef1ff;
    border: 1px solid #d7ddff;
    border-radius: 999px;
    padding: 6px;
}

.site-nav a {
    color: #2a315f;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 999px;
}

.site-nav a:hover {
    background: #ffffff;
    color: var(--mb-primary-dark);
}

.site-nav a:focus-visible {
    outline: 2px solid #7a85ef;
    outline-offset: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: #edf0ff;
    border-radius: 999px;
    border: 1px solid #d6dcff;
}

.language-switcher span {
    display: none;
}

.language-switcher a {
    color: #3b4380;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.language-switcher a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-secondary));
}

.mobile-toggle {
    display: none;
}

.mobile-menu {
    display: none;
    padding: 0 0 16px;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu__panel {
    border-radius: 14px;
    border: 1px solid #d4dafd;
    background: #fff;
    box-shadow: var(--mb-shadow-soft);
    padding: 16px;
    display: grid;
    gap: 10px;
}

.mobile-menu__actions {
    display: grid;
    gap: 10px;
}

/* Hero styles are fully managed by design-v2.css */

.section {
    padding: 82px 0;
}

.section--surface {
    background: var(--mb-surface);
}

.section--muted {
    background: #f0f3ff;
}

.section__head {
    margin-bottom: 28px;
}

.feature-grid,
.pricing-grid,
.post-grid {
    display: grid;
    gap: 18px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
    border-radius: var(--mb-radius);
    border: 1px solid #d8dffd;
    padding: 22px;
    background: #fff;
    box-shadow: var(--mb-shadow-soft);
}

.feature-card:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease;
}

.feature-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-secondary));
}

.feature-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    color: var(--mb-muted);
}

.pricing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-card {
    border-radius: 18px;
    border: 1px solid #cfd7ff;
    background: #fff;
    padding: 18px;
    box-shadow: var(--mb-shadow-soft);
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border: 2px solid #6b73ec;
    background: #fff;
}

.pricing-badge {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-secondary));
    margin-bottom: 10px;
}

.pricing-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.pricing-price {
    font-size: 2.05rem;
    font-weight: 800;
    margin: 12px 0;
    color: #202a65;
}

.pricing-features {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 9px;
    color: #4a567f;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pricing-features i {
    color: var(--mb-success);
    margin-top: 3px;
}

.pricing-card .btn-primary {
    margin-top: auto;
}

.callout {
    border-radius: 20px;
    background: linear-gradient(135deg, #243181, #5e54c9);
    color: #fff;
    padding: 30px;
    box-shadow: var(--mb-shadow);
}

.callout p {
    color: rgba(255, 255, 255, 0.86);
}

.site-footer {
    margin-top: 48px;
    background: #121830;
    color: #d7dcff;
    padding-top: 46px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.site-footer a {
    color: #d7dcff;
}

.site-footer__bottom {
    margin-top: 26px;
    padding: 18px 0;
    border-top: 1px solid rgba(203, 212, 255, 0.2);
    font-size: 0.92rem;
}

.content-shell {
    background: #fff;
    border: 1px solid #d8dffb;
    border-radius: 18px;
    padding: 30px;
    box-shadow: var(--mb-shadow-soft);
}

.page-title {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.page-subtitle {
    margin: 0 0 22px;
    color: var(--mb-muted);
}

.page-content {
    color: #2f396f;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin: 20px 0 10px;
    color: #1f2a63;
}

.page-content p,
.page-content ul,
.page-content ol {
    margin: 0 0 14px;
}

.page-content ul,
.page-content ol {
    padding-left: 18px;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.page-content table th,
.page-content table td {
    border: 1px solid #e1e7ff;
    padding: 10px;
}

.page-content blockquote {
    border-left: 3px solid #8d98ef;
    margin: 0 0 16px;
    padding: 8px 16px;
    color: #4b5685;
    background: #f6f8ff;
    border-radius: 8px;
}

.post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
    background: #fff;
    border: 1px solid #d8dffb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--mb-shadow-soft);
}

.post-card__thumb img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 14px;
}

.post-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.post-card p {
    margin: 0 0 12px;
    color: var(--mb-muted);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #667085;
    font-size: 0.9rem;
    margin: 0 0 18px;
}

.post-meta i {
    color: #5b67bf;
    margin-right: 4px;
}

.pmpro_content_message,
.pmpro_message,
.pmpro_alert {
    border-radius: 12px;
    border: 1px solid #c6d5ff;
    background: #f3f6ff;
    padding: 12px;
}

.pmpro_table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d8e0ff;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.pmpro_table th,
.pmpro_table td {
    border-bottom: 1px solid #e5eafc;
    padding: 12px;
    text-align: left;
}

.pmpro_checkout,
.pmpro_login_wrap,
div.pmpro-levels,
section.pmpro-levels {
    border-radius: 16px;
    border: 1px solid #d8dffb;
    background: #fff;
    box-shadow: var(--mb-shadow-soft);
    padding: 24px;
    margin: 0 auto;
}

div.pmpro {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #d8dffb;
    padding: 24px;
    box-shadow: var(--mb-shadow-soft);
}

.pmpro h1,
.pmpro h2,
.pmpro h3,
.pmpro h4,
.pmpro p {
    color: #243066;
}

.pmpro_form label {
    font-weight: 600;
    color: #2f396f;
}

.pmpro_form input[type="text"],
.pmpro_form input[type="email"],
.pmpro_form input[type="password"],
.pmpro_form input[type="number"],
.pmpro_form select,
.pmpro_form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #cfd8fd;
    padding: 10px 12px;
    margin-top: 6px;
    margin-bottom: 14px;
}

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

.posts-navigation,
.post-navigation,
.navigation.pagination {
    margin-top: 18px;
}

.navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.navigation.pagination .page-numbers {
    border: 1px solid #ced7fd;
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    color: #334080;
    font-weight: 700;
}

.navigation.pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-secondary));
    color: #fff;
    border-color: transparent;
}

.notification {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200;
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    box-shadow: var(--mb-shadow);
}

.notification.success {
    background: linear-gradient(135deg, #0db57a, #14af9a);
}

.notification.error {
    background: linear-gradient(135deg, #d8497f, #bb3d4d);
}

@media (max-width: 1080px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =====================================================
   Inner Page Banner (gradient header for all non-front pages)
   ===================================================== */

.page-banner {
    background: linear-gradient(135deg, #5f74e7 0%, #7748a2 52%, #3f367f 100%);
    padding: 56px 0 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.page-banner::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    top: -100px;
    right: -80px;
    background: rgba(200, 215, 255, 0.14);
    border-radius: 50%;
    filter: blur(35px);
    pointer-events: none;
}

.page-banner::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    bottom: -80px;
    left: 5%;
    background: rgba(210, 185, 250, 0.12);
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
}

.page-banner__inner {
    position: relative;
    z-index: 2;
}

.page-banner__title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    color: #fff;
    font-weight: 800;
}

.page-banner__subtitle {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 640px;
    font-size: 1.05rem;
}

.page-banner__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.page-banner__breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.page-banner__breadcrumb a:hover {
    color: #fff;
}

/* Page body — white card content area */
.page-body {
    padding: 40px 0 80px;
    width: 100%;
}

/* Reset site-main padding for inner pages (banner handles top spacing) */
.inner-page .site-main {
    padding-block: 0;
}

/* Make site-main work for both landing and inner pages */
.site-main.has-banner {
    padding-block: 0;
}

/* Better content shell for inner pages */
.content-shell {
    background: #fff;
    border: 1px solid #d8dffb;
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 8px 30px rgba(60, 72, 138, 0.08);
}

/* 404 page special layout */
.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-page__code {
    font-size: 7rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
    display: block;
}

.error-page__title {
    font-size: 2rem;
    color: #1d2340;
    margin: 0 0 14px;
}

.error-page__desc {
    color: var(--mb-muted);
    max-width: 500px;
    margin: 0 auto 32px;
    font-size: 1.05rem;
}

/* =====================================================
   wp_login_form() embedded in page context (not wp-login.php)
   ===================================================== */

#loginform {
    background: #fff;
    border: 1px solid #dce3ff;
    border-radius: 20px;
    padding: 32px 34px;
    box-shadow: 0 10px 30px rgba(60, 72, 138, 0.12);
    max-width: 520px;
    margin: 0 auto;
}

#loginform p {
    margin: 0 0 14px;
}

#loginform label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #2f396f;
    margin-bottom: 6px;
}

#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    border: 1.5px solid #cfd8fd;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.93rem;
    color: #1d2340;
    background: #f8f9ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

#loginform .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

#loginform .login-remember label {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

#loginform .login-submit {
    margin-top: 4px;
}

#loginform #wp-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.36);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: block;
}

#loginform #wp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(102, 126, 234, 0.44);
}

/* Hide PMPro's default header logo image on login/invoice pages */
#pmpro_checkout img.pmpro_header_img,
#pmpro_login img.pmpro_header_img,
.pmpro_header img,
#pmpro_invoice img.pmpro_header_img,
.pmpro-invoice-wrap img.pmpro_header_img {
    display: none !important;
}

/* Ensure login form container is centered and full-width on page context */
.pmpro_login_wrap,
#pmpro_login {
    max-width: 100% !important;
    width: 100% !important;
}

/* =====================================================
   Premium Login Split Layout
   ===================================================== */

.pmpro-login-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 580px;
    background: #fff;
    border: 1px solid #dce3ff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(60, 72, 138, 0.12);
    max-width: 1060px;
    margin: 40px auto;
}

.pmpro-login-marketing {
    background: linear-gradient(155deg, #f8faff 0%, #edf2ff 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #eef1ff;
    position: relative;
    overflow: hidden;
}

.pmpro-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    width: fit-content;
}

.marketing-title {
    font-size: 2.1rem;
    line-height: 1.25;
    color: #1a1f3a;
    margin-bottom: 18px;
    font-weight: 800;
}

.marketing-desc {
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 35px;
    line-height: 1.6;
}

.marketing-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: grid;
    gap: 16px;
}

.marketing-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #2d3561;
    font-size: 0.95rem;
}

.marketing-list i {
    color: #10b981;
    font-size: 1.2rem;
}

.marketing-quote {
    margin-top: auto;
    padding: 24px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 12px rgba(60, 72, 138, 0.04);
}

.marketing-quote p {
    font-style: italic;
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.marketing-quote span {
    font-weight: 700;
    font-size: 0.85rem;
    color: #667eea;
}

.pmpro-login-card {
    padding: 60px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pmpro-login-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.pmpro-login-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a1f3a;
    margin-bottom: 8px;
}

.pmpro-login-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.pmpro-login-card form p {
    margin-bottom: 18px;
}

.pmpro-login-card label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #2f396f;
    margin-bottom: 7px;
}

.pmpro-login-card input[type="text"],
.pmpro-login-card input[type="password"] {
    width: 100%;
    border: 1.5px solid #d8e0ff;
    border-radius: 12px;
    padding: 13px 15px;
    font-size: 0.95rem;
    color: #1d2340;
    background: #f8f9ff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.pmpro-login-card input[type="text"]:focus,
.pmpro-login-card input[type="password"]:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.pmpro-login-card input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.32);
    transition: all 0.2s ease;
    margin-top: 10px;
}

.pmpro-login-card input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.pmpro-login-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.pmpro-login-lost { margin-bottom: 8px; }
.pmpro-login-lost a { color: #667eea; font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.pmpro-login-signup { color: #64748b; font-size: 0.88rem; }
.pmpro-login-signup a { color: #667eea; font-weight: 700; margin-left: 5px; text-decoration: none; }

@media (max-width: 960px) {
    .pmpro-login-split {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .pmpro-login-marketing { display: none; }
    .pmpro-login-card { padding: 45px 35px; }
}

/* =====================================================
   Comprehensive PMPro Styles
   ===================================================== */

/* PMPro page wrapper */
.pmpro,
#pmpro_checkout,
#pmpro_account,
#pmpro_levels_page,
#pmpro_login,
#pmpro_billing,
#pmpro_cancel,
#pmpro_confirmation {
    font-family: "Segoe UI", "Inter", system-ui, sans-serif;
}

/* PMPro page title */
.pmpro_page_title,
.pmpro h1.pmpro_page_title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #1d2340;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eef0ff;
}

/* Checkout form wrapper */
#pmpro_checkout_box,
.pmpro_checkout {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #dce3ff;
    padding: 28px;
    box-shadow: 0 8px 28px rgba(60, 72, 138, 0.09);
    margin-bottom: 24px;
}

/* Section headers inside PMPro */
.pmpro_checkout h2,
#pmpro_account_membership h2,
#pmpro_account_profile h2,
#pmpro_account_billing h2,
#pmpro_account_invoices h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef0ff;
}

/* PMPro labels */
.pmpro label,
.pmpro_form label {
    font-weight: 600;
    color: #2f396f;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 6px;
}

/* PMPro input fields */
.pmpro input[type="text"],
.pmpro input[type="email"],
.pmpro input[type="password"],
.pmpro input[type="number"],
.pmpro input[type="tel"],
.pmpro select,
.pmpro textarea,
.pmpro_form input[type="text"],
.pmpro_form input[type="email"],
.pmpro_form input[type="password"],
.pmpro_form input[type="number"],
.pmpro_form select,
.pmpro_form textarea {
    width: 100%;
    border: 1.5px solid #cfd8fd;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
    font-family: "Segoe UI", "Inter", system-ui, sans-serif;
    color: #1d2340;
    background: #f8f9ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 4px;
    margin-bottom: 16px;
    box-shadow: none;
}

.pmpro input:focus,
.pmpro select:focus,
.pmpro textarea:focus,
.pmpro_form input:focus,
.pmpro_form select:focus,
.pmpro_form textarea:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

/* PMPro submit / CTA buttons */
.pmpro_btn,
.pmpro input[type="submit"],
.pmpro button[type="submit"],
#pmpro_submit_span input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: "Segoe UI", "Inter", system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.36);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.pmpro_btn:hover,
.pmpro input[type="submit"]:hover,
.pmpro button[type="submit"]:hover,
#pmpro_submit_span input:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(102, 126, 234, 0.44);
    color: #fff !important;
}

/* PMPro alerts / messages */
.pmpro_message,
.pmpro_alert,
.pmpro_error,
.pmpro_success,
.pmpro_content_message {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.93rem;
    line-height: 1.55;
}

.pmpro_error {
    background: #fff1f5;
    border: 1.5px solid #fca5a5;
    color: #be123c;
}

.pmpro_success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #15803d;
}

.pmpro_message,
.pmpro_content_message,
.pmpro_alert {
    background: #f0f4ff;
    border: 1.5px solid #c6d2ff;
    color: #2f396f;
}

/* PMPro tables */
.pmpro table,
.pmpro_table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(60, 72, 138, 0.07);
    margin-bottom: 20px;
    border: 1px solid #dce3ff;
}

.pmpro table th,
.pmpro_table th {
    background: #f0f3ff;
    color: #2f396f;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #dce3ff;
}

.pmpro table td,
.pmpro_table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef0ff;
    color: #333c6a;
    font-size: 0.93rem;
}

.pmpro table tr:last-child td,
.pmpro_table tr:last-child td {
    border-bottom: none;
}

.pmpro table tr:hover td {
    background: #f8f9ff;
}

/* PMPro account page grid layout */
#pmpro_account {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#pmpro_account > div {
    background: #fff;
    border: 1px solid #dce3ff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(60, 72, 138, 0.07);
}

#pmpro_account_membership {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 50%) !important;
    border: 2px solid #c8d2ff !important;
}

/* PMPro confirmation / success page */
#pmpro_confirmation_text {
    text-align: center;
    padding: 32px 0;
}

#pmpro_confirmation_text h1 {
    font-size: 2rem;
    color: #1d2340;
}

#pmpro_confirmation_text p {
    color: var(--mb-muted);
    max-width: 500px;
    margin-inline: auto;
}

/* PMPro levels page — hide if we use our own shortcode */
#pmpro_levels .pmpro_levels_table_div {
    display: none;
}

/* Invoice / billing links */
.pmpro a,
#pmpro_account a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.pmpro a:hover,
#pmpro_account a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Checkout total/order summary */
#pmpro_order_summary {
    background: #f0f4ff;
    border: 1.5px solid #c8d2ff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

#pmpro_order_summary .pmpro_order_summary_row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dce3ff;
    color: #2f396f;
    font-size: 0.95rem;
}

#pmpro_order_summary .pmpro_order_summary_row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1d2340;
}

/* =====================================================
   Blog / Post styles polish
   ===================================================== */

.blog-banner {
    background: linear-gradient(135deg, #5f74e7 0%, #7748a2 52%, #3f367f 100%);
    padding: 52px 0 44px;
    color: #fff;
}

.blog-banner h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: #fff;
}

/* Single post */
.post-featured-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 28px;
    max-height: 420px;
    object-fit: cover;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef0ff;
}

.post-tag {
    background: #eef1ff;
    color: #4a5290;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eef0ff;
}

.post-nav a {
    display: block;
    background: #fff;
    border: 1px solid #dce3ff;
    border-radius: 14px;
    padding: 16px 20px;
    color: #2f396f;
    font-weight: 600;
    font-size: 0.93rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
}

.post-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(60, 72, 138, 0.1);
    color: #667eea;
}

.post-nav__prev { text-align: left; }
.post-nav__next { text-align: right; }

/* Post grid enhancements */
.post-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(60, 72, 138, 0.13);
}

@media (max-width: 820px) {
    .site-nav,
    .header-actions {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .hero {
        padding: 72px 0;
    }

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

    .feature-grid,
    .pricing-grid,
    .post-grid,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .content-shell {
        padding: 20px 18px;
    }

    .page-banner {
        padding: 40px 0 34px;
    }

    .page-banner__title {
        font-size: 1.7rem;
    }

    .page-body {
        padding: 24px 0 56px;
    }

    #pmpro_account {
        grid-template-columns: 1fr;
    }

    #pmpro_account_membership {
        grid-column: 1;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .error-page__code {
        font-size: 5rem;
    }

    .error-page__title {
        font-size: 1.6rem;
    }
}

/* =====================================================
   Custom Dashboard Design
   ===================================================== */

.dashboard-user-greeting {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #eef1ff;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(60, 72, 138, 0.05);
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(60, 72, 138, 0.1);
    border-color: #dce3ff;
}

.dashboard-card__icon {
    width: 54px;
    height: 54px;
    background: #f0f4ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #667eea;
    flex-shrink: 0;
}

.dashboard-card--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff !important;
    grid-column: 1 / -1;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

@media (min-width: 960px) {
    .dashboard-card--primary {
        grid-column: 1 / span 2;
    }
}

.dashboard-card--primary .dashboard-card__icon {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-card--primary .dashboard-card__content h3 { 
    color: #ffffff !important; 
    font-size: 1.25rem;
}
.dashboard-card--primary .dashboard-card__content p { 
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.95rem;
}
.dashboard-card--primary .dashboard-card__arrow { 
    color: #ffffff; 
    font-size: 1.1rem;
}

.dashboard-card__content h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1f3a;
}

.dashboard-card__content p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}

.dashboard-card__arrow {
    margin-left: auto;
    color: #cbd5e1;
    font-size: 0.9rem;
    transition: color 0.18s ease;
}

.dashboard-card:hover .dashboard-card__arrow {
    color: #667eea;
}

/* Specific item colors */
.dashboard-card__icon--membership { background: #ecfdf5; color: #10b981; }
.dashboard-card__icon--upgrade { background: #fff7ed; color: #f59e0b; }
.dashboard-card__icon--payments { background: #eff6ff; color: #3b82f6; }
.dashboard-card__icon--profile { background: #fdf2f8; color: #db2777; }
.dashboard-card__icon--password { background: #f5f3ff; color: #8b5cf6; }
.dashboard-card__icon--cancel { background: #fef2f2; color: #ef4444; }

.dashboard-card--danger:hover {
    border-color: #fee2e2;
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-card--primary {
        grid-column: auto;
    }
}

/* Pricing Card Current Status */
.pricing-card.current-plan {
    border-color: #10b981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
    position: relative;
    transform: scale(1.02);
    z-index: 2;
}

.pricing-card__current-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn.disabled {
    opacity: 0.6;
    background: #e2e8ff;
    color: #64748b;
    border: none;
}

/* Ensure Dashboard button in header is styled */
.header-actions .btn-secondary i {
    margin-right: 6px;
}

/* Pricing Grid Backup Styles (in case design-v2 fails) */
.pricing-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    margin-top: 30px !important;
}

.pricing-card {
    background: #fff !important;
    border: 1px solid #dce3ff !important;
    border-radius: 24px !important;
    padding: 35px 25px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 8px 30px rgba(60, 72, 138, 0.06) !important;
}

.pricing-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 40px rgba(60, 72, 138, 0.1) !important;
}

.pricing-card.current-plan {
    border: 2px solid #10b981 !important;
}

.pricing-card .btn {
    width: 100% !important;
    justify-content: center !important;
}
