:root {
    --lt-blue-gradient: linear-gradient(180deg, #FFF 0%, #BCDAFF 100%);
    --lt-blue-gradient-mid: linear-gradient(180deg, #FFF -30%, #BCDAFF 100%);
    --green-gradient: linear-gradient(180deg, #1EA96F 0%, #178758 100%);
    --dark-green: #178758;
    --green: #178758;
    --lt-green: #1FB274;
    --lighter-green: #E6F9F2;
    --black: #38354F;
    --lt-blue: #BCDAFF;
    --dark-blue: #0066d2;
    --med-blue: #BCDAFF;
    --red: #b91c1c;
    --dark-red: #8b1414;
}

@media print {
    * {
        -webkit-print-color-adjust: exact;
        /* Chrome/Edge/Safari */
        print-color-adjust: exact;
        /* Spec name; supported in modern Blink/WebKit */
    }

    @page {


        @top-left {
            content: "";
            display: none;
        }

        @top-right {
            content: "";
            display: none;
        }
    }
}


/* Additional agreement-specific styles */
.agreement-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Toolbar styles */
.agreement-toolbar {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile toolbar toggle button */
.toolbar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0A6DEF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(43, 92, 230, 0.3);
    z-index: 99;
    transition: transform 0.3s ease;
}

.toolbar-toggle:hover {
    transform: scale(1.1);
}

.toolbar-toggle.active {
    background: #1A3A52;
}

/* Mobile styles */
@media (max-width: 768px) {
    .agreement-toolbar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    .agreement-toolbar.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .toolbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .proposal-container {
        margin-right: 0 !important;
        padding-bottom: 100px;
        /* Space for toggle button */
    }

    /* Add a close handle to the toolbar on mobile */
    .agreement-toolbar::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
    }
}

.toolbar-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.toolbar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.toolbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.toolbar-field {
    margin-bottom: 15px;
}

.toolbar-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.toolbar-field.agree-to-terms input[type="checkbox"] {
    width: auto;
}

.toolbar-field input,
.toolbar-field select,
.toolbar-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.toolbar-field input:focus,
.toolbar-field select:focus,
.toolbar-field textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.toolbar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-toolbar {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #0A6DEF;
    color: white;
}

.btn-primary:hover {
    background: #1A3A52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 92, 230, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

/* Brand button styles */
.btn-gradient {
    background: linear-gradient(135deg, #0A6DEF 0%, #1A3A52 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 92, 230, 0.3);
}

/* Signature modal styles */
.signature-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px 0;
}

.signature-modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
}

/* Ensure h2 doesn't overlap with close button */
.signature-modal-content h2 {
    margin-top: 0;
    padding-right: 40px;
    /* Make room for close button */
}

/* Close button styles */
.signature-modal .close {
    border: none;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    background: var(--black);
    color: #fff;
    border-radius: 50%;
    padding: 5px;
    width: 30px;
    height: 30px;
    text-align: center;
    text-decoration: none;
    display: block;
    line-height: 20px;
}

.signature-modal .close:focus {
    outline: 2px solid #0A6DEF;
}

.signature-modal .close:hover {
    background: #1A3A52;
}

/* Owner contact info styling */
.owner-contact-info a {
    display: inline-block;
    padding: 4px 0;
    transition: opacity 0.2s ease;
}

.owner-contact-info a:hover {
    opacity: 0.8;
}

/* Additional mobile improvements */
@media (max-width: 768px) {
    .agreement-toolbar {
        z-index: 1000;
    }

    .toolbar-toggle {
        z-index: 999;
    }

    /* Add backdrop when toolbar is open on mobile */
    .agreement-toolbar.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        pointer-events: none;
    }

    /* Improve toolbar handle visibility */
    .agreement-toolbar::before {
        cursor: grab;
        background: #999;
        height: 5px;
        width: 50px;
        top: 12px;
    }

    /* Add padding to toolbar sections on mobile */
    .toolbar-section {
        padding-bottom: 25px;
    }

    /* Adjust field styling for mobile */
    .toolbar-field input,
    .toolbar-field select,
    .toolbar-field textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

.signature-pad {
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 100%;
    height: 200px;
    cursor: crosshair;
    background: white;
}

.signature-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.signature-type-toggle button {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
}

.signature-type-toggle button.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.typed-signature {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    font-family: 'Brush Script MT', cursive;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

/* Hide empty tokens */
.token:empty::after {
    display: none;
}

/* Print styles */
@media print {

    .agreement-toolbar,
    .signature-modal {
        display: none !important;
    }

    .proposal-container {
        margin-right: 0 !important;
    }

    .success-bar {
        position: static !important;
        margin-bottom: 50px;

    }

    body.has-success-bar {
        padding-top: 20px !important;
    }

    /* Hide empty tokens in print */
    .token:empty {
        display: none;
    }
}

/* Sidebar styling improvements */
.sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar input,
.sidebar select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.sidebar label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.sidebar .form-group {
    margin-bottom: 20px;
}

/* Support card styling for rep */
.support-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.support-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-member-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.team-member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.team-member-info {
    flex: 1;
    min-width: 0;
    /* Allow text to shrink */
}

.team-member-info h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.team-member-info p {
    margin: 2px 0;
    font-size: 13px;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Separate staff-only fields */
.staff-only-section {
    border-top: 2px solid #e0e0e0;
    margin-top: 30px;
    padding-top: 20px;
}

.staff-only-section h4 {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

/* Service agreement signature section styling */
.signature-section {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
    /* Add padding to indent */
}

/* Plan selection dropdown styling */
.plan-selector {
    width: 100%;
    padding: 10px;
    border: 2px solid #0A6DEF;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    margin-bottom: 10px;
}

.plan-selector:focus {
    outline: none;
    border-color: #1A3A52;
    box-shadow: 0 0 0 3px rgba(43, 92, 230, 0.1);
}

.term-selector {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;

    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
}

.btn.btn-primary {
    background: var(--green-gradient);
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.6rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, filter 0.2s;
}

.btn.btn-primary:hover {
    background: var(--green-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(31, 178, 116, 0.15);
    filter: brightness(1.1);

}

/* Disable token hover effects when not editable */
.proposal-container.non-editable .token:hover,
.proposal-container.non-editable .token:focus,
.proposal-container.non-editable .token:active {
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: default;
}

/* Customer signature display styles */
.customer-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    position: relative;
}

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

.customer-signature div {
    width: 100%;
    text-align: center;
}

/* Disable animations and hover effects for signed agreements */
.proposal-container.non-editable .customer-signature:not(.clickable) {
    cursor: default !important;
    animation: none !important;
}

.proposal-container.non-editable .customer-signature:not(.clickable):hover {
    transform: none !important;
    box-shadow: none !important;
}

.proposal-container.non-editable .customer-signature:not(.clickable)::before,
.proposal-container.non-editable .customer-signature:not(.clickable)::after {
    display: none !important;
}

/* Clickable signature area for unsigned agreements */
.customer-signature.clickable {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: hidden;
}

.customer-signature.clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FFF9C4 0%, #FFE082 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.customer-signature.clickable:hover::before {
    opacity: 0.8;
}

.customer-signature.clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 193, 7, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.customer-signature.clickable::after {
    content: '✍️ Sign Now';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    font-size: 16px;
    font-weight: 700;
    color: #1A3A52;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.customer-signature.clickable:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Add subtle animation */
@keyframes signaturePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0.1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.customer-signature.clickable:not(:hover) {
    animation: signaturePulse 3s infinite;
}

/* Success bar styles */
.success-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #178758;
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Add padding to body when success bar is shown */
body.has-success-bar {
    padding-top: 52px;
}

/* Electronic signature proof table */
.signature-proof-table {
    margin: 40px auto;
    max-width: 800px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.signature-proof-table h3 {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}



.signature-proof-table table {
    width: 100%;
    border-collapse: collapse;
}

.signature-proof-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.signature-proof-table td:first-child {
    font-weight: bold;
    color: #666;
    width: 200px;
    padding-right: 20px;
}

.signature-proof-table td:last-child {
    color: #333;
}

.signature-proof-table tr:last-child td {
    border-bottom: none;
}

@media print {
    .signature-proof-table {
        page-break-inside: avoid;
        background: white !important;
        border: 1px solid #000 !important;
    }
}

/* CSS Variables */
:root {
    --primary-color: #0A6DEF;
    --secondary-color: #1A3A52;
    --accent-color: #4CAF50;
    --text-color: #333333;
    --light-gray: #F5F5F5;
    --border-color: #E0E0E0;
    --success-color: #28a745;
    --warning-color: #FFA500;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: white;
    font-size: 16px;
}

/* Container */
.proposal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.header .logo-container {
    margin-bottom: 30px;
}

.header .logo {
    height: 60px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.2em;
    color: #666;
    font-weight: 400;
}

/* Contact Information */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 10px;
}

.contact-block h3 {
    font-size: 0.9em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-block p {
    margin: 5px 0;
    font-size: 1.1em;
}

.contact-block strong {
    display: block;
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

/* Section Styles */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.8em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.section h3 {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Highlight Box */
.highlight-box {
    background: #E3F2FD;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.highlight-box p {
    margin-bottom: 10px;
}

/* Features List */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.feature-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feature-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    font-size: 1.4em;
}

.feature-icon-img {
    height: 1em;
    width: auto;
    vertical-align: middle;
}

/* Pricing Section */
.pricing-box {
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.pricing-box h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.price-display {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
}

.price-details {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}

/* Timeline */
.timeline {
    margin: 30px 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
}

.timeline-marker {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 15px 0 15px 40px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-size: 1.5em;
    font-weight: bold;
    top: 10px;
}

/* FAQ Section */
.faq-item {
    margin: 20px 0;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

.faq-item h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Agreement Section */
.agreement-section {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    page-break-before: always;
}

@media print {
    .agreement-section {
        font-size: 0.9em;
    }
}

.agreement-section h3 {
    margin-top: 30px;
}

.signature-section {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

.signature-block {
    border-top: 2px solid var(--text-color);
    padding-top: 10px;
    position: relative;
}

.signature-block .signature {
    height: 60px;
    border-radius: 10px;
    background: #eee;
    border: 0;
    width: 100%;
    vertical-align: baseline;
    position: relative;
    margin-top: 10px;
}

.signature-block .mac-signature img {
    width: 110%;
    height: auto;
    bottom: 10px;
    left: -10px;
    position: absolute;
}

.signature-block .field {
    margin: 5px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.signature-block .field label {
    font-weight: bold;
    width: 20%;
}

.signature-block .field .value {
    font-weight: normal;
}

/* Logo Strip */
.logo-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    flex-wrap: wrap;
}

.logo-strip img {
    height: 40px;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.logo-strip img:hover {
    opacity: 1;
}

/* Token Highlighting */
.token:hover,
.token:focus,
.token:active,
.token.active {
    background: #FFE082;
    padding: 2px 2px;
    margin: -2px;
    border-radius: 3px;
    color: var(--text-color);
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .proposal-container {
        max-width: 100%;
        padding: 0;
    }

    .section {
        page-break-inside: avoid;
    }

    .feature-item,
    .timeline-item,
    .faq-item {
        page-break-inside: avoid;
    }

    .header {
        page-break-after: avoid;
    }

    .agreement-section {
        page-break-before: always;
        padding: 0;
        border: 0;
        margin: 0;
    }

    .highlight-box {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .pricing-box {
        border: 2px solid #000 !important;
        background: #f5f5f5 !important;
    }

    .logo-strip {
        background: white !important;
        border: 1px solid #ddd;
    }

    /* Remove yellow background from tokens in print */
    .token {
        background: transparent !important;
        padding: 0 !important;
        font-weight: 600;
    }

    /* Maintain multi-column layout in print */
    .contact-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .features-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .signature-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    /* Remove duplicate footer */
    .print-footer {
        display: none !important;
    }

    /* Page footers with proper font */
    @page {

        margin: 0.5in 0.5in 1in 0.5in;

        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
            font-family: 'Lato', sans-serif;
            font-size: 10pt;
            color: #666;
        }
    }
}

/* Hidden by default, shown in print - REMOVED to fix duplicate footer */
.print-footer {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .signature-section {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .header h1 {
        font-size: 2em;
    }

    .price-display {
        font-size: 2em;
    }
}