@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

/* ===== DOWNLOAD BUTTON ===== */
.download-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10,14,23,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.download-bar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #2ECC40 0%, #27ae35 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46,204,64,0.3);
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46,204,64,0.4);
}

.download-btn svg {
    width: 18px;
    height: 18px;
}

@media print {
    @page { margin: 10mm 12mm; size: A4; }
    .download-bar { display: none !important; }
    body { background: white !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* Cover page */
    .cover-page { min-height: 100vh; background: #0a0e17 !important; page-break-after: always; }
    .cover-page::before, .cover-page::after { display: none; }

    /* Colors for dark sections */
    .pricing-card { background: #0a0e17 !important; }
    .pricing-card::before { display: none; }
    .pricing-amount span { color: #D4A843 !important; -webkit-text-fill-color: #D4A843 !important; }
    .cover-title span { color: #2ECC40 !important; -webkit-text-fill-color: #2ECC40 !important; }
    .proposal-footer { background: #0a0e17 !important; }
    .module-header { background: #0A2E5C !important; }
    .module-header.alt { background: #0a0e17 !important; }
    .module-header.green { background: #2ECC40 !important; }
    .module-header.gold { background: #D4A843 !important; }
    .card-accent { background: #0A2E5C !important; }
    .styled-table thead th { background: #0A2E5C !important; }

    /* PREVENT SPLITTING - keep elements together */
    .module-card,
    .feature-card,
    .stat-card,
    .payment-card,
    .timeline-item,
    .tech-item,
    .card,
    .toc,
    .highlight-box,
    .pricing-card,
    .styled-table,
    .section-header,
    .exec-grid,
    .stats-row {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Remove forced page breaks - let content flow naturally */
    .section-break { page-break-before: auto !important; }

    /* Keep section header with its content */
    .section-header {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* Layout adjustments for print */
    .page-section { padding: 30px 10px; max-width: 100%; }
    .module-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .feature-grid { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
    .stats-row { grid-template-columns: repeat(4, 1fr) !important; }
    .exec-grid { grid-template-columns: 1fr !important; }
    .tech-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }
    .payment-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .timeline { padding-left: 30px; }

    /* Remove hover effects */
    .card:hover, .feature-card:hover, .module-card:hover { transform: none !important; box-shadow: none !important; }
    .no-print { display: none !important; }

    /* Tighter spacing */
    .module-body ul li { padding: 5px 0; }
    .cover-divider { margin: 25px auto; }
}

:root {
    --primary: #0A2E5C;
    --primary-light: #1a4a8a;
    --accent: #2ECC40;
    --accent-dark: #27ae35;
    --gold: #D4A843;
    --gold-light: #f0d078;
    --dark: #0a0e17;
    --gray-900: #1a1d26;
    --gray-800: #2d313c;
    --gray-700: #3d4250;
    --gray-600: #5a5f6e;
    --gray-400: #9ca0ab;
    --gray-200: #e2e4e9;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0A2E5C 0%, #1a5aa8 100%);
    --gradient-accent: linear-gradient(135deg, #2ECC40 0%, #27ae35 100%);
    --gradient-gold: linear-gradient(135deg, #D4A843 0%, #f0d078 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e17 0%, #1a2035 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--gray-800);
    line-height: 1.7;
    background: var(--gray-100);
    -webkit-font-smoothing: antialiased;
}

/* ===== COVER PAGE ===== */
.cover-page {
    min-height: 100vh;
    background: var(--gradient-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 40px;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(10,46,92,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.cover-page::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46,204,64,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cover-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.cover-logo {
    width: 140px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.cover-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(46,204,64,0.15);
    border: 1px solid rgba(46,204,64,0.3);
    border-radius: 50px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.cover-title {
    font-family: 'Playfair Display', serif;
    font-size: 56px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.cover-title span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover-subtitle {
    font-size: 20px;
    color: var(--gray-400);
    font-weight: 300;
    margin-bottom: 50px;
    line-height: 1.6;
}

.cover-meta {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.cover-meta-item {
    text-align: center;
}

.cover-meta-label {
    font-size: 11px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.cover-meta-value {
    font-size: 15px;
    color: var(--white);
    font-weight: 600;
}

.cover-divider {
    width: 60px;
    height: 3px;
    background: var(--gradient-gold);
    margin: 40px auto;
    border-radius: 3px;
}

/* ===== PAGE SECTIONS ===== */
.page-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-break {
    page-break-before: always;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 40px;
    position: relative;
}

.section-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 17px;
    color: var(--gray-600);
    max-width: 700px;
    line-height: 1.7;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-dark {
    background: var(--gradient-dark);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--white);
}

.card-accent {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
}

/* ===== FEATURE GRID ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px 0 0 4px;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    background: rgba(10,46,92,0.06);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== MODULE CARDS ===== */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 30px;
}

.module-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.module-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.module-header {
    padding: 24px 28px;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 14px;
}

.module-header.alt { background: var(--gradient-dark); }
.module-header.green { background: var(--gradient-accent); }
.module-header.gold { background: var(--gradient-gold); color: var(--dark); }

.module-icon { font-size: 28px; }

.module-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.module-body {
    padding: 24px 28px;
}

.module-body ul {
    list-style: none;
}

.module-body ul li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.module-body ul li:last-child { border-bottom: none; }

.module-body ul li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== STATS ROW ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ===== TABLE STYLES ===== */
.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 24px 0;
    font-size: 14px;
}

.styled-table thead th {
    background: var(--primary);
    color: var(--white);
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.styled-table tbody td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.styled-table tbody tr:last-child td { border-bottom: none; }
.styled-table tbody tr:nth-child(even) { background: var(--gray-100); }
.styled-table tbody tr:hover { background: rgba(10,46,92,0.03); }

/* ===== PRICING SECTION ===== */
.pricing-card {
    background: var(--gradient-dark);
    border-radius: var(--radius-xl);
    padding: 50px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin: 40px 0;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(46,204,64,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.pricing-amount {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 900;
    margin: 20px 0 5px;
    position: relative;
    z-index: 2;
}

.pricing-amount span {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-currency {
    font-size: 24px;
    color: var(--gray-400);
    font-weight: 400;
}

.pricing-label {
    font-size: 14px;
    color: var(--gray-400);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 40px;
    margin: 30px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 20px 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 26px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.timeline-week {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.timeline-item p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== PAYMENT TERMS ===== */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 30px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.payment-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}

.payment-phase {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.payment-percent {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
}

.payment-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 5px 0 10px;
}

.payment-desc {
    font-size: 13px;
    color: var(--gray-600);
}

/* ===== TECH STACK ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.tech-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.tech-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(10,46,92,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.tech-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.tech-desc {
    font-size: 12px;
    color: var(--gray-600);
}

/* ===== FOOTER ===== */
.proposal-footer {
    background: var(--gradient-dark);
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.footer-desc {
    font-size: 16px;
    color: var(--gray-400);
    margin-bottom: 30px;
}

.footer-contact {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-contact-item {
    font-size: 14px;
    color: var(--gray-400);
}

.footer-divider {
    width: 80px;
    height: 2px;
    background: var(--gradient-gold);
    margin: 20px auto;
}

.footer-copy {
    font-size: 12px;
    color: var(--gray-600);
}

/* ===== HIGHLIGHTS ===== */
.highlight-box {
    background: rgba(10,46,92,0.04);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 20px 0;
}

.highlight-box.accent {
    background: rgba(46,204,64,0.06);
    border-left-color: var(--accent);
}

.highlight-box.gold {
    background: rgba(212,168,67,0.08);
    border-left-color: var(--gold);
}

/* ===== LIST STYLES ===== */
.check-list {
    list-style: none;
    margin: 16px 0;
}

.check-list li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.check-list li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== TOC ===== */
.toc {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-md);
    max-width: 700px;
    margin: 40px auto;
}

.toc h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

.toc-list {
    list-style: none;
    counter-reset: toc;
}

.toc-list li {
    counter-increment: toc;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}

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

.toc-list li::before {
    content: counter(toc, decimal-leading-zero);
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    min-width: 36px;
}

/* ===== EXECUTIVE SUMMARY ===== */
.exec-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.exec-text p {
    font-size: 15px;
    color: var(--gray-700);
    margin-bottom: 16px;
    line-height: 1.8;
}

.exec-sidebar .card {
    padding: 24px;
}

.exec-sidebar .card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

/* ===== PRINT STYLES ===== */
@media print {
    body { background: white; }
    .cover-page { min-height: 100vh; }
    .page-section { padding: 40px 30px; }
    .section-break { page-break-before: always; }
    .card:hover, .feature-card:hover, .module-card:hover { transform: none; box-shadow: var(--shadow-sm); }
    .no-print { display: none; }
}

@media (max-width: 768px) {
    .cover-title { font-size: 36px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .payment-grid { grid-template-columns: 1fr; }
    .exec-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-amount { font-size: 44px; }
}
