/* --- 1. VARIABLES --- */
:root {
    --bg-base: #f9f9f9;
    --bg-white: #ffffff;
    --text-dark: #111111;
    --text-muted: #636363;
    --accent-green: #00d084;
    --accent-red: #cf2e2e;
    --accent-yellow: #fcb900;

    --font-head: "Source Sans 3", sans-serif;
    --font-body: "Open Sans", sans-serif;

    --width-wide: 1280px;

    --highlight-bg: #ffe9c7;
    --highlight-border: #f4d1a5;
}

/* --- 2. RESET & TYPOGRAPHY --- */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--text-dark);
    font-family: var(--font-head);
    font-weight: 800;
    margin-top: 0;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 30px;
}

h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    margin-bottom: 20px;
}

p {
    margin-bottom: 1.5rem;
}

/* Blockquote styling (match whycreativity.com WP quote block) */
/* Quote callout card (matches screenshot style) */
.wc-quote {
    width: 100%;
    max-width: 980px;
    margin: 18px auto 10px auto;
    padding: 28px 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.wc-quote p {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.35;
    font-style: italic;
    font-weight: 600;
    color: var(--text-dark);
}

.wc-quote strong {
    font-style: inherit;
    font-weight: 900;
}

/* Results page narrative helpers */
.lede {
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 700;
    color: #222;
    margin-bottom: 28px;
}

.cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 24px;
}

/* Space between CTA button and adjacent link text (e.g. Book a Call + raw audit link) */
.cta-row a+a,
.cta-row .btn+a {
    margin-left: 12px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95em;
}

a {
    color: var(--text-dark);
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

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

/* --- 3. LAYOUT & RESPONSIVENESS --- */
.wp-site-blocks {
    overflow-x: hidden;
    width: 100%;
}

/* Container Logic */
.alignwide {
    max-width: var(--width-wide);
    margin: 0 auto;
    width: 92%;
    /* Responsive padding */
}

.alignfull {
    width: 100%;
    margin: 0;
    padding: 0;
}

.section-padding {
    padding: 60px 0;
}

.bg-white {
    background-color: var(--bg-white);
}

.bg-base {
    background-color: var(--bg-base);
}

/* --- 4. COMPONENTS --- */
.btn {
    background-color: var(--text-dark);
    color: var(--bg-base);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--font-head);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
    border: 1px solid var(--text-dark);
}

.btn:hover {
    transform: translateY(-2px);
    background-color: #333;
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* GTM noscript iframe should be hidden */
.gtm-noscript {
    display: none;
    visibility: hidden;
}

/* Services table first column width (labels) */
.services-col-label {
    width: 20%;
}

/* Score panel right-side copy */
.score-panel-copy {
    flex: 1;
}

.score-panel-title {
    margin-bottom: 15px;
}

.score-panel-desc {
    font-size: 1.1rem;
    color: #555;
}

/* Footer */
.footer {
    padding-top: 40px;
    padding-bottom: 40px;
}

.footer-meta {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
}

/* Redirect page (index.php fallback) */
.redirect-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #999;
}

/* “Message you can send” block */
.message-box {
    background: var(--bg-white);
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-top: 24px;
    width: 90%;
    max-width: 90%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.message-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.message-title {
    margin: 0;
    font-size: 1.1rem;
}

.message-subtitle {
    margin: 6px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.message-body {
    /* Let the textarea truly span the whole box; keep padding on the textarea itself */
    padding: 0;
    color: #333;
    width: 100%;
}

.message-body p {
    margin-bottom: 14px;
}

.message-textarea {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    display: block;
    box-sizing: border-box;
    min-height: 360px;
    resize: vertical;
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 0 0 12px 12px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #111;
}

.copy-btn {
    white-space: nowrap;
}

.message-body h4 {
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.prio {
    padding-left: 12px;
    border-left: 4px solid #ddd;
}

.prio-urgent {
    border-left-color: var(--accent-red);
}

.prio-high {
    border-left-color: #ff8a00;
}

.prio-medium {
    border-left-color: var(--accent-yellow);
}

.prio-low {
    border-left-color: #888;
}

.checklist {
    margin: 0 0 10px 0;
    padding-left: 18px;
}

.checklist li {
    margin-bottom: 8px;
    line-height: 1.35;
    color: #444;
}

.message-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    color: #555;
}

/* Password Form Styles */
.password-form {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.password-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.password-form input[type="email"],
.password-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    box-sizing: border-box;
    display: block;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}

.password-form input[type="email"]:focus,
.password-form input[type="password"]:focus {
    border-color: #999;
    outline: none;
}

.password-form input[type="password"] {
    margin-bottom: 8px;
}

.password-form .password-help {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-left: 0;
}

.password-form .password-help i {
    font-style: italic;
}

.password-form .password-help small {
    font-size: 0.875rem;
}

.password-form .error {
    color: var(--accent-red);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Audit Form (similar to password-form but adapted for audit) */
.audit-form {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.audit-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.audit-form p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.audit-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.audit-form input[type="url"],
.audit-form input[type="email"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    box-sizing: border-box;
    display: block;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}

.audit-form input[type="url"]:focus,
.audit-form input[type="email"]:focus {
    border-color: #999;
    outline: none;
}

.audit-form input[type="url"].error,
.audit-form input[type="email"].error {
    border-color: var(--accent-red);
}

.audit-form input[type="url"].valid,
.audit-form input[type="email"].valid {
    border-color: var(--accent-green);
}

.audit-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 20px;
}

.audit-form .checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.audit-form .checkbox-label a {
    color: var(--text-dark);
    text-decoration: underline;
}

.audit-form .checkbox-label a:hover {
    text-decoration: none;
}

.audit-form .error-message {
    display: block;
    color: var(--accent-red);
    font-size: 0.85em;
    margin-top: -15px;
    margin-bottom: 15px;
    min-height: 20px;
}

.audit-form .warning-message {
    display: block;
    color: var(--accent-yellow);
    font-size: 0.85em;
    margin-top: -15px;
    margin-bottom: 15px;
    min-height: 20px;
}

.audit-form .required {
    color: var(--accent-red);
}

/* Status Section Styling */
.audit-form .status-content {
    text-align: center;
    padding: 20px 0;
}

.audit-form .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--text-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.audit-form #status-message {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 500;
}

.audit-form .timer {
    font-size: 1.1em;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 10px;
}

/* --- 5. SCORE DASHBOARD --- */
.score-panel {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .score-panel {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

.score-chart {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-chart::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--bg-white);
    border-radius: 50%;
}

.score-text {
    position: relative;
    z-index: 1;
    text-align: center;
}

.score-number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-dark);
    font-family: var(--font-head);
}

.score-total {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-top: 5px;
}

/* --- UPDATED METRICS GRID (3 Columns Max) --- */
.metrics-grid {
    display: grid;
    gap: 24px;
    /* Default to 1 column on mobile */
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 Columns on Tablet */
    }
}

@media (min-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        /* STRICTLY 3 Columns on Desktop */
    }
}

.metric-category {
    background: var(--bg-white);
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.category-header {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.check-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}

.check-row:last-child {
    border-bottom: none;
}

.check-meta {
    display: flex;
    flex-direction: column;
    padding-right: 15px;
    width: 100%;
}

.check-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.check-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 700;
}

.check-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.status-badge {
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

/* New Style for Numeric Values */
.status-value {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: -0.02em;
}

.pass {
    color: var(--accent-green);
}

.fail {
    color: var(--accent-red);
}

/* TOOLTIPS */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-size: 11px;
    font-weight: bold;
    font-family: serif;
    cursor: help;
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #222;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 100;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    font-family: var(--font-body);
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}

.info-icon:hover .tooltip-text,
.info-icon:active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- SERVICES TABLE --- */
.wp-block-table {
    overflow-x: auto;
    margin-bottom: 2rem;
    width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
}

th,
td {
    border: 1px solid #e5e5e5;
    padding: 1.2em;
    text-align: left;
    vertical-align: top;
}

thead th {
    border-bottom: 3px solid #000;
    font-weight: 800;
    font-family: var(--font-head);
    font-size: 1.1rem;
}

.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #f0f0f0;
}

.highlight-header {
    background: var(--highlight-bg) !important;
    border-left: 2px solid var(--highlight-border) !important;
    border-right: 2px solid var(--highlight-border) !important;
    position: relative;
}

.highlight-header::after {
    /* RECOMMENDED text removed - always highlight Growth Roadmap without label */
    content: "";
    display: none;
}

.highlight-cell {
    background: #fff9f0 !important;
    border-left: 2px solid var(--highlight-border) !important;
    border-right: 2px solid var(--highlight-border) !important;
}

.is-style-stripes tbody tr:nth-child(odd) .highlight-cell {
    background: #fff3e4 !important;
}

/* --- FOOTER & MISC --- */
header {
    border-bottom: 1px solid #eaeaea;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 16px;
}

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

/* On narrow screens, place CTA under the logo */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-cta {
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
        text-align: center;
    }

    .audit-form {
        margin: 40px auto;
        padding: 30px 20px;
        max-width: 100%;
    }

    .audit-form h2 {
        font-size: 1.5rem;
    }
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 900px) {
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.footer-cols {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
    flex-wrap: wrap;
    gap: 20px;
}