/* 
  Changes:
  - Removed 'width: 100%' from .container to fix mobile layout bug
  - Added single-column layout for form-grid on mobile
  - Updated all green theme colors to #95BF47
*/
:root {
    --bg-canvas: #F9F9F9;
    --bg-blueprint: #F1F1F1;
    --text-charcoal: #1A1A1A;
    --text-mid-grey: #757575;
    --accent-green: #95BF47;
    --accent-amber: #FDBB2D;
    --accent-red: #D32F2F;
    --border-light-grey: #EAEAEA;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-charcoal);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    width: 100%;
    position: relative;
    /* overflow: hidden; */ /* Removing this to prevent unwanted cropping */
}

/* Removing the distracting gradient background */
.page-wrapper::before {
    display: none;
}

.logo-header {
    text-align: center;
    padding: 2rem 0;
}

.logo {
    width: 120px; /* Match homepage hero-logo size */
    height: auto;
    opacity: 0.9;
}

.container {
    max-width: 800px;
    padding: 0 2rem;
    box-sizing: border-box;
    margin: 0 auto;
}

.container.narrow {
    max-width: 600px;
}

.results-header #headline-finding strong {
    color: var(--accent-red);
}

/* Page Steps */
.page-step {
    display: none;
}
.page-step.active {
    display: block;
}

/* Headers */
.form-header, .results-header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    color: var(--text-mid-grey);
    max-width: 650px;
    margin: 0 auto 1.5rem auto;
}

/* Form Styles */
#metrics-form {
    background-color: var(--bg-blueprint);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-light-grey);
}

#email-form {
    background-color: transparent; /* Remove the inner container background */
    padding: 0; /* Remove padding from the form itself */
    border: none; /* Remove border from the form */
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-charcoal);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-mid-grey);
    pointer-events: none;
}

input, select {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-light-grey);
    background-color: #FFF;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none; /* Remove default arrow for Safari */
    -moz-appearance: none;    /* Remove default arrow for Firefox */
    appearance: none;          /* Remove default arrow for modern browsers */
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05); /* Add depth */
}

select {
    width: 100%; /* Ensure select fills the wrapper */
    padding-right: 2.5rem; /* Make space for the custom arrow */
}


input:focus, select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(149, 191, 71, 0.2);
}

.cta-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-green);
    color: var(--bg-canvas);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    text-decoration: none;
}

.cta-button:hover {
    background-color: #82ab3f;
}

/* Testimonial Section */
.testimonial-section {
    padding: 4rem 0;
    background-color: transparent;
}

.testimonial-card {
    background-color: #FAFAFA; /* Very light grey, almost white */
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #E8E8E8; /* Subtle border */
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); /* Very subtle shadow */
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 3rem; /* Smaller quote */
    color: var(--accent-green);
    opacity: 0.15;
    line-height: 1;
    z-index: 0;
    font-family: Georgia, serif;
}

.testimonial-text {
    font-size: 1.05rem; /* Slightly smaller */
    font-style: normal; /* Remove italic */
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #4A4A4A; /* Softer than black */
    position: relative;
    z-index: 1;
    padding-left: 2rem; /* Indent for quote */
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    padding-top: 0;
    margin-top: 0;
    border-top: none; /* Remove divider */
    padding-left: 2rem; /* Match text indent */
}

.author-image {
    width: 48px; /* Smaller image */
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E8E8E8; /* Subtle border */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.author-details {
    line-height: 1.3;
}

.author-name {
    font-weight: 600;
    color: var(--text-charcoal);
    margin: 0;
    font-size: 0.95rem;
}

.author-title {
    font-size: 0.85rem;
    color: var(--text-mid-grey);
    margin: 0;
}

/* Add subtle hover effect */
.testimonial-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-blueprint);
    padding: 0rem;
    border-radius: 8px;
    width: 100%;
    max-width: 450px; /* Make modal more compact */
    text-align: left; /* Changed from center */
    animation: fadeIn 0.3s ease-out;
}

.optin-modal {
    padding: 2.5rem;
}

.modal-content h2 {
    text-align: left; /* Ensure h2 is also left-aligned */
    margin-bottom: 0.5rem;
}

.modal-content p {
    text-align: left; /* Ensure p is also left-aligned */
    margin-bottom: 2rem;
}

.modal-content .form-group {
    margin-bottom: 1.5rem; /* Add spacing between form groups */
}

.modal-content form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.modal-content form input {
    width: 100%;
    margin-bottom: 1.5rem; /* Space between inputs */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.modal-content form button {
    margin-top: 1rem; /* Space above button */
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Results Page */
.diagnostic-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    /* text-align: center; */ /* No longer needed */
}

.dashboard-card {
    background-color: var(--bg-blueprint);
    padding: 0; /* Remove padding for new structure */
    border-radius: 8px;
    border: 2px solid var(--border-light-grey);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.card-header, .card-body, .card-footer {
    padding: 1.5rem;
}

.card-header {
    border-bottom: 1px solid var(--border-light-grey);
}

.card-footer {
    border-top: 1px solid var(--border-light-grey);
}

/* Status-based card styling */
.dashboard-card.green {
    border-color: #95BF47;
    box-shadow: 0 4px 12px rgba(149, 191, 71, 0.15);
}

.dashboard-card.amber {
    border-color: #FDBB2D;
    box-shadow: 0 4px 12px rgba(253, 187, 45, 0.15);
}

.dashboard-card.red {
    border-color: #D32F2F;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-mid-grey);
    line-height: 1.4;
}

.metric-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-mid-grey);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-charcoal);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.benchmark-label {
    font-size: 0.875rem;
    color: var(--text-mid-grey);
}

.benchmark-value {
    font-weight: 600;
    color: var(--text-charcoal);
}

.card-metric-format {
    display: none; /* Remove old format */
}

/* Simple Line Gauge */
.status-gauge {
    margin: 1.5rem 0;
}

.gauge-line {
    width: 100%;
    height: 8px;
    background-color: #EAEAEA;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

.gauge-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: currentColor;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gauge-fill.green {
    background-color: #95BF47;
    color: #95BF47;
}

.gauge-fill.amber {
    background-color: #FDBB2D;
    color: #FDBB2D;
}

.gauge-fill.red {
    background-color: #D32F2F;
    color: #D32F2F;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-mid-grey);
}

/* Remove all old gauge styles */
.performance-gauge,
.gauge-segments,
.gauge-segment,
.gauge-needle,
.gauge-center,
.gauge-container,
.gauge-track,
.gauge-indicator,
.gauge-benchmark-marker,
.gauge-bar {
    display: none;
}

.card-assessment {
    font-size: 0.875rem;
    color: var(--text-mid-grey);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 0; /* Remove margin from p tag */
}

.summary-diagnosis {
    background-color: var(--bg-blueprint);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-light-grey);
    text-align: center;
    margin-bottom: 2rem;
}

/* Enhanced Summary Styles */
.summary-diagnosis {
    text-align: left;
    position: relative;
    overflow: hidden;
}

.summary-diagnosis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px; /* Thinner line */
    height: 100%;
    background-color: var(--accent-amber);
}

.summary-diagnosis.top-funnel::before {
    background-color: var(--accent-amber);
}

.summary-diagnosis.middle-funnel::before {
    background-color: var(--accent-red);
}

.summary-diagnosis.bottom-funnel::before {
    background-color: var(--accent-red);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced gap */
    margin-bottom: 1rem; /* Reduced from 1.5rem */
}

.status-icon {
    font-size: 1.75rem; /* Reduced from 2.5rem */
    line-height: 1;
}

.summary-header h2 {
    margin: 0;
    font-size: 1.5rem; /* Reduced from 1.75rem */
    color: var(--text-charcoal);
    line-height: 1.2; /* Match homepage line-height */
    letter-spacing: -0.02em; /* Match homepage */
}

.summary-text {
    font-size: 1rem; /* Reduced from 1.1rem */
    line-height: 1.6; /* Slightly tighter */
    color: var(--text-charcoal);
    margin-bottom: 1.25rem; /* Reduced from 2rem */
    max-width: none;
}

.key-insight {
    background-color: rgba(253, 187, 45, 0.08); /* More subtle background */
    border-left: 2px solid var(--accent-amber); /* Thinner border */
    padding: 1rem; /* Reduced padding */
    margin-bottom: 1.25rem; /* Reduced margin */
    border-radius: 0 4px 4px 0;
}

.insight-label {
    font-size: 0.75rem; /* Smaller label */
    font-weight: 700;
    color: var(--text-mid-grey);
    margin-bottom: 0.25rem; /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.insight-value {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    font-weight: 700;
    color: var(--text-charcoal);
    margin: 0;
    line-height: 1.3;
}

.likely-reasons {
    margin-top: 1.25rem; /* Reduced from 2rem */
}

.reasons-label {
    font-size: 0.75rem; /* Smaller label */
    font-weight: 700;
    color: var(--text-mid-grey);
    margin-bottom: 0.75rem; /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reasons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reasons-list li {
    position: relative;
    padding-left: 1.5rem; /* Reduced padding */
    margin-bottom: 0.5rem; /* Reduced margin */
    line-height: 1.4; /* Tighter line height */
    color: var(--text-charcoal);
    font-size: 0.95rem; /* Slightly smaller text */
}

.reasons-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-amber);
    font-weight: 700;
    font-size: 0.875rem; /* Smaller arrow */
}

.summary-diagnosis h2 span {
    color: var(--accent-amber);
    text-decoration: underline;
}

/* Professional CTA Containers */
.cta-container {
    background-color: var(--bg-blueprint);
    padding: 3rem 0;
    margin-top: 3rem;
    margin-bottom: 3rem;
    width: 100%;
}

.cta-container.qualified {
    border-top: 2px solid var(--accent-green);
    border-bottom: 2px solid var(--accent-green);
}

.cta-container.unqualified {
    border-top: 2px solid var(--accent-amber);
    border-bottom: 2px solid var(--accent-amber);
}

.cta-container .container {
    padding: 0 2rem;
}

.cta-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-charcoal);
    margin-bottom: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cta-container p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-charcoal);
    margin-bottom: 1.25rem;
    max-width: none;
}

.cta-container p:last-of-type {
    margin-bottom: 2rem;
}

.cta-button {
    background-color: var(--accent-green);
    color: var(--bg-canvas);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.cta-button:hover {
    background-color: #82ab3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 191, 71, 0.25);
}

/* Footer Styles */
.footer {
    background-color: var(--bg-light-grey);
    padding: 3rem 0;
    border-top: 1px solid var(--border-light-grey);
    /* margin-top: 4rem; */ /* Removed to eliminate space */
}

.footer-content {
    text-align: center;
}

.copyright {
    color: var(--text-mid-grey);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-mid-grey);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--text-charcoal);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

.footer-contact {
    color: var(--text-mid-grey);
    font-size: 0.875rem;
}

.footer-contact .email-link {
    color: var(--accent-green);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-contact .email-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.calculator-home .footer {
    margin-top: 100px;
}

@media (min-width: 769px) {
    .calculator-home .footer {
        margin-top: 200px;
    }
}

/* Calendly Modal Styles (exact copy from homepage) */
#calendly-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#calendly-modal .modal-content {
    background-color: #F9F9F9;
    border-radius: 16px;
    border: 1px solid rgba(149, 191, 71, 0.3);
    max-width: 700px;
    width: 100%; /* Changed from 90% to be handled by parent padding */
    position: relative;
    box-shadow: 0 20px 60px rgba(149, 191, 71, 0.2);
    overflow: hidden;
}

#calendly-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 36px;
    font-weight: 300;
    color: #1A1A1A;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: #F1F1F1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#calendly-modal .modal-close:hover {
    background-color: #95BF47;
    color: #F9F9F9;
    transform: rotate(90deg);
}

#calendly-modal .calendly-container {
    padding: 20px;
    background-color: #F9F9F9;
    border-radius: 16px;
}

/* General Modal Styles (for email signup) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.8);
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .container { padding: 0 1rem; } /* Adjusted default padding */
    #metrics-form, #email-form, .summary-diagnosis { padding: 1.5rem; }
    .optin-modal { padding: 1.5rem; }

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

    .cta-container {
        padding: 2rem 1rem;
    }
    
    .cta-button {
        width: 100%;
    }

    #calendly-modal {
        padding: 1rem;
    }
    
    /* Modal responsive styles */
    #calendly-modal .modal-content {
        width: 100%;
        margin: 0; /* Remove margin, parent padding handles it */
    }
    
    #calendly-modal .calendly-container {
        padding: 15px;
    }
    
    #calendly-modal .modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    
    /* Compact cards for mobile */
    .diagnostic-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-card {
        margin-bottom: 0;
    }
    
    .card-header, .card-body, .card-footer {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .metric-value {
        font-size: 1.75rem;
        margin: 0.5rem 0;
    }
    
    .metric-label, .benchmark-label {
        font-size: 0.8rem;
    }
    
    .status-gauge {
        margin: 1rem 0 0.5rem;
    }
    
    .card-assessment {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Fix CTA section on mobile */
    .cta-container {
        padding: 2rem 0;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .cta-container .container {
        padding: 0 1rem;
    }
    
    .cta-container h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .cta-container p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .cta-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    #calendly-modal {
        padding: 0.5rem;
    }

    #calendly-modal .modal-content {
        width: 100%;
        margin: 0; /* Remove margin, parent padding handles it */
        border-radius: 12px;
    }
    
    #calendly-modal .calendly-container {
        padding: 0.5rem;
    }
    
    .calendly-inline-widget {
        min-width: 280px !important;
        height: 650px !important;
    }
    
    /* Even more compact cards for small mobile */
    .card-header, .card-body, .card-footer {
        padding: 0.875rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .status-gauge {
        margin: 0.75rem 0 0.5rem;
    }
} 