* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Editor Controls */
.editor-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid #e0e0e0;
}

.control-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
    min-width: 40px;
    text-align: center;
}

.control-btn:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
    transform: translateY(-1px);
}

.control-btn.save-btn {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.control-btn.save-btn:hover {
    background: #218838;
    border-color: #218838;
}

.font-size-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
}

.font-size-select:focus {
    border-color: #ff6b35;
}

/* Color Picker Styles */
.color-picker {
    width: 35px;
    height: 35px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    outline: none;
    transition: all 0.2s ease;
}

.color-picker:hover {
    border-color: #ff6b35;
    transform: scale(1.05);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Contenteditable Styling */
[contenteditable="true"] {
    outline: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    position: relative;
    cursor: text;
    transform: translate(0, 0); /* Başlangıç transform değeri */
}

[contenteditable="true"]:hover {
    background: rgba(255, 107, 53, 0.1);
    border: 1px dashed #ff6b35;
}

[contenteditable="true"]:focus {
    background: rgba(255, 107, 53, 0.15);
    border: 2px solid #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    cursor: text;
}

/* Position controls removed for performance optimization */

[contenteditable="true"]:empty::before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

.container {
    max-width: 210mm; /* A4 width */
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* A4 Page Format with Proper Margins */
.page {
    width: 210mm;
    height: 297mm; /* A4 height */
    padding: 20mm;
    position: relative;
    page-break-after: always;
    page-break-inside: avoid;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent content overflow */
    margin-bottom: 15mm; /* Increased space between pages */
    border: 2px solid #e0e0e0; /* Add border to make pages visible */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Add shadow for depth */
    box-sizing: border-box; /* Include padding and border in width/height */
}

.page:last-child {
    page-break-after: avoid;
    margin-bottom: 0;
}

/* Page 1: Cover Page */
.page-1 {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    padding: 0;
    height: 297mm;
    margin-bottom: 15mm;
    border: 2px solid #ff6b35; /* Orange border for cover page */
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
    overflow: hidden; /* Prevent overflow */
}

/* Closing Page - Son sayfa (dinamik numara) */
.closing-page, .page:has(.closing-content) {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%) !important;
    color: white !important;
    justify-content: center;
    align-items: center;
    padding: 30mm;
    margin-bottom: 0;
    border: 2px solid #ff6b35 !important; /* Orange border for closing page */
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2) !important;
    overflow: hidden; /* Prevent overflow */
}

/* Page separator indicator */
.page::after {
    content: "Sayfa " attr(data-page-number);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

/* Hide page indicators in print */
@media print {
    .page::after {
        display: none;
    }
    
    .page {
        border: none;
        box-shadow: none;
        margin-bottom: 0;
        border-radius: 0;
    }
    
    .page-1, .page-6 {
        border: none;
        box-shadow: none;
    }
}

.page-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.image-section {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.building-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.content-section {
    flex: 2;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.title-section {
    margin-bottom: 40px;
}

.main-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 0.9;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 5px;
}

.subtitle-section {
    margin-bottom: 60px;
}

.subtitle {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 5px;
}

.details-section {
    margin-top: auto;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    opacity: 0.8;
}

.studio-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 30px;
}

.project-details {
    margin-top: 25px;
}

.project-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin-bottom: 3px;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-line {
    width: 50px;
    height: 3px;
    background: #ff6b35;
    border-radius: 2px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2c2c2c;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Content Grid - Compact Layout */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
    max-height: calc(297mm - 40mm);
    padding: 0 15px; /* Yan padding ekle */
}

/* Section - Compact Design */
.section {
    background: transparent;
    padding: 10px 0;
    border-radius: 0;
    border-left: none;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Section Titles - Compact */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 4px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #ff6b35;
    border-radius: 1px;
}

/* Section Text - Compact */
.section-text {
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
    overflow: hidden;
    word-wrap: normal;
    font-size: 0.9rem;
}

/* Subsection Titles - Compact */
.subsection-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c2c;
    margin: 10px 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Feature Lists - Compact */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    color: #555;
    margin-bottom: 4px;
    padding-left: 5px;
    position: relative;
    overflow: hidden;
    word-wrap: normal;
    font-size: 0.85rem;
    line-height: 1.3;
}

.feature-list li:before {
    content: "";
}

/* Timeline - Compact */
.timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    page-break-inside: avoid;
}

.timeline-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #ff6b35;
    margin-bottom: 10px;
    overflow: hidden;
}

.timeline-number {
    background: #ff6b35;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
    margin: 0;
}

/* Pricing Section - Improved */
.pricing-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 10px; /* Yan padding ekle */
}

.pricing-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px 20px; /* Üst-alt padding artırıldı */
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 250px; /* Minimum yükseklik belirle */
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-badge {
    position: absolute;
    top: -5px; /* Daha az kesilme için */
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b35;
    color: white;
    padding: 6px 15px; /* Daha büyük padding */
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    z-index: 10; /* Üstte görünsün */
}

.pricing-card.featured {
    border-color: #ff6b35;
    margin-top: 5px; /* Daha az margin */
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
}

.card-header {
    position: relative;
    margin-bottom: 10px;
}

.pricing-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff6b35;
    margin-bottom: 10px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.pricing-features li {
    color: #555;
    margin-bottom: 3px;
    padding-left: 0;
    position: relative;
    font-size: 0.8rem;
    line-height: 1.2;
}

.pricing-features li:before {
    content: "";
}

/* Delivery Info - Compact */
.delivery-info {
    background: #f8f9fa;
    border-left: 3px solid #ff6b35;
    padding: 15px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.info-item {
    text-align: center;
}

.delivery-text {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
}

.payment-terms {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.payment-terms li {
    color: #555;
    margin-bottom: 3px;
    padding-left: 15px;
    position: relative;
    font-size: 0.8rem;
    line-height: 1.2;
}

.payment-terms li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #ff6b35;
    font-weight: bold;
    font-size: 0.7rem;
    line-height: 1.2;
    vertical-align: baseline;
}

/* Offer Validity - Compact */
.offer-validity {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #ff6b35;
    margin-bottom: 15px;
    overflow: hidden;
}

/* Benefits Section - Compact */
.benefits-section {
    margin-bottom: 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.benefit-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    overflow: hidden;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 1.5rem;
    color: #ff6b35;
    margin-bottom: 8px;
}

.benefit-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 4px;
}

.benefit-item p {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
    margin: 0;
}

/* Project Details Page */
.project-details-container {
    width: 100%;
    height: calc(100% - 80px); /* Header space düşürülmüş */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Container overflow gizle */
}

.project-details-content {
    width: 100%;
    height: 220mm; /* Sabit boyut */
    min-height: 220mm;
    max-height: 220mm; /* Uzamasını engelle */
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    white-space: pre-wrap; /* Preserve line breaks */
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden; /* Overflow gizle - scroll bar yok */
    resize: none; /* Resize kaldır */
    box-sizing: border-box;
}

.project-details-content:focus {
    background: #fff;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.project-details-content:hover {
    border-color: #ff6b35;
    background: #fafafa;
}

.project-details-content:empty::before {
    content: "Proje detaylarını buraya yazabilirsiniz...";
    color: #999;
    font-style: italic;
}

/* Proje detayları sayfaları - sabit boyut */
.page-4, .page-5, .page-6, .page-7, .page-8, .page-details-continuation {
    height: 297mm !important;
    min-height: 297mm;
    max-height: 297mm;
    overflow: hidden !important; /* Kesinlikle overflow yok */
    page-break-after: always;
}

/* Proje detayları sayfaları için özel overflow kontrolü */
.project-details-page {
    overflow: hidden !important;
}

/* Proje detayları devam sayfaları */
.project-details-continuation {
    background: #f9f9f9;
    border-color: #ff6b35;
    overflow: hidden !important; /* Devam sayfalarında da overflow yok */
}

.project-details-continuation:focus {
    background: #fff;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.project-details-continuation:empty::before {
    content: "Proje detayları devam...";
    color: #ff6b35;
    font-style: italic;
}

/* Character progress bar */
.character-progress {
    position: absolute;
    bottom: -40px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ff6b35;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 70%, #dc3545 90%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Delete page button */
.delete-page-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.delete-page-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.delete-page-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* Hide delete button in PDF */
@media print {
    .delete-page-btn {
        display: none !important;
    }
    
    /* Gizli sayfaları print'te de gizle */
    .project-details-continuation-page[style*="display: none"] {
        display: none !important;
    }
}

/* Company Info */
.company-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #ff6b35;
}

.contact-details {
    margin-top: 15px;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.contact-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.contact-details strong {
    color: #2c2c2c;
    font-weight: 600;
}

/* Closing Page - Prevent Overflow */
.closing-content {
    text-align: center;
    overflow: hidden;
}

.closing-header {
    margin-bottom: 30px;
}

.closing-title {
    font-size: 1.8rem; /* Smaller font */
    font-weight: 800;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 12px; /* Reduced margin */
}

.closing-line {
    width: 80px;
    height: 3px;
    background: #ff6b35;
    margin: 0 auto;
    border-radius: 2px;
}

.closing-text {
    margin-bottom: 40px;
}

.closing-text p {
    font-size: 0.9rem; /* Smaller font */
    line-height: 1.5; /* Reduced line height */
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 15px; /* Reduced margin */
}

.contact-section {
    margin-bottom: 40px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; /* Reduced gap */
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    overflow: hidden;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: block;
}

.contact-card h4 {
    font-size: 0.85rem; /* Smaller font */
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 6px; /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.contact-card p {
    font-size: 0.8rem; /* Smaller font */
    color: #e0e0e0;
    line-height: 1.2; /* Reduced line height */
}

.closing-footer {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.footer-line {
    width: 50px;
    height: 2px;
    background: #ff6b35;
    border-radius: 1px;
}

.footer-text {
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b35;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* PDF Download Button */
.download-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Clean Print Styles for Perfect PDF Match */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: white;
        font-family: 'Inter', Arial, sans-serif;
        line-height: 1.6;
        color: #333;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        /* PDF'de özel karakterlerin düzgün görünmesi için */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Browser varsayılan header/footer'ları gizle */
    html {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Tüm margin alanlarını temizle */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* PDF'deki otomatik URL'yi gizle ve özel domain ekle */
    @page {
        size: A4;
        margin: 15mm;
        /* Header ve footer'ı gizle */
        @top-center { content: none; }
        @top-left { content: none; }
        @top-right { content: none; }
        @bottom-center { content: "www.bracetheapp.com"; }
        @bottom-left { content: none; }
        @bottom-right { content: none; }
    }
    
    /* Ekstra URL gizleme kuralları ve özel domain ayarları */
    @media print {
        @page :first {
            margin: 15mm;
            @bottom-left { content: none !important; }
            @bottom-right { content: none !important; }
            @bottom-center { content: "www.bracetheapp.com" !important; }
        }
        
        @page :left {
            margin: 15mm;
            @bottom-left { content: none !important; }
            @bottom-center { content: "www.bracetheapp.com" !important; }
        }
        
        @page :right {
            margin: 15mm;
            @bottom-right { content: none !important; }
            @bottom-center { content: "www.bracetheapp.com" !important; }
        }
    }
    
    .container {
        width: 210mm;
        margin: 0 auto;
        background: white;
        box-shadow: none;
        border: none;
    }
    
    /* Güçlü URL gizleme kuralları */
    body::before,
    body::after,
    html::before,
    html::after {
        display: none !important;
        content: none !important;
    }
    
    /* Print dialog öncesi bilgilendirme stilini gizle */
    .notification {
        display: none !important;
    }
    
    .page {
        width: 210mm;
        height: 297mm;
        margin: 0 auto 15mm auto;
        padding: 20mm;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .page:last-child {
        margin-bottom: 0;
    }
    
    .page-1 {
        height: 297mm;
        background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
        padding: 0;
        overflow: hidden;
        position: relative;
    }
    
    /* Closing page (son sayfa) */
    .closing-page {
        background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
        padding: 30mm;
        overflow: hidden;
        position: relative;
        color: white;
    }
    
    .page-2, .page-3, .page-4, .page-5 {
        page-break-before: always;
        background: white;
        overflow: hidden;
    }
    
    /* Special styling for closing page in PDF */
    .closing-page .closing-content {
        text-align: center;
        color: white;
        overflow: hidden;
    }
    
    .closing-page .closing-title {
        font-size: 1.4rem;
        color: #ff6b35;
        margin-bottom: 15px;
    }
    
    .closing-page .closing-text p {
        font-size: 0.9rem;
        color: #e0e0e0;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .closing-page .contact-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin: 20px 0;
    }
    
    .closing-page .contact-card {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        overflow: hidden;
    }
    
    .closing-page .contact-card h4 {
        font-size: 0.9rem;
        color: #ff6b35;
        margin-bottom: 8px;
    }
    
    .closing-page .contact-card p {
        font-size: 0.8rem;
        color: #e0e0e0;
        margin: 0;
    }
    
    .closing-page .contact-icon {
        font-size: 1.5rem;
        margin-bottom: 8px;
        display: block;
    }
    
    .closing-page .footer-text {
        font-size: 0.8rem;
        color: #ff6b35;
        margin: 15px 0;
    }
    
    .closing-page .closing-line,
    .closing-page .footer-line {
        background: #ff6b35;
        height: 2px;
        margin: 10px 0;
    }
    
    /* Project Details Page in PDF */
    .project-details-content {
        background: white !important;
        border: none !important;
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        padding: 15px !important;
        page-break-inside: auto !important;
        overflow: visible !important;
        max-height: none !important;
        min-height: auto !important;
        height: auto !important;
        resize: none !important;
    }
    
    .project-details-container {
        page-break-inside: auto !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .page-4 {
        height: auto !important;
        min-height: 297mm !important;
        max-height: none !important;
        page-break-inside: auto !important;
        overflow: visible !important;
    }
    
    .editor-controls, .download-btn, .position-controls, .position-indicator {
        display: none !important;
    }
    
    [contenteditable="true"] {
        border: none;
        background: transparent;
        box-shadow: none;
        outline: none;
    }
    
    [contenteditable="true"]:hover,
    [contenteditable="true"]:focus {
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    /* PDF'de sayfaların düzgün görünmesi için */
    .page {
        overflow: visible !important;
        page-break-inside: avoid !important;
    }
    
    /* PDF'de içerik alanlarının düzgün yerleşmesi */
    .content-grid, .section {
        overflow: visible !important;
        page-break-inside: avoid !important;
    }
    
    /* PDF'de metinlerin doğru hizalanması */
    .main-title, .subtitle, .page-title, .section-title {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* PDF'de paragrafların düzgün görünmesi */
    .section-text, .feature-list, .timeline-content {
        text-align: left !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
        /* PDF'de özel elementlerin hizalanması */
    .pricing-card, .benefit-item, .contact-card {
        position: static !important;
        transform: none !important;
        margin: 5px 0 !important;
    }
    
    /* PDF modu için özel stiller */
    .pdf-mode {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        margin: inherit !important;
        padding: inherit !important;
    }
    
    /* PDF'de text-align değişikliklerini koru ama pozisyonu sıfırla */
    [contenteditable="true"][style*="text-align"] {
        position: static !important;
        transform: none !important;
    }
    
    /* PDF'de özel karakterlerin düzgün görünmesi */
    .feature-list li:before {
        content: "" !important;
    }
    
    .pricing-features li:before {
        content: "" !important;
    }
    
    .payment-terms li:before {
        content: "•" !important;
        font-family: Arial, sans-serif !important;
        font-size: 0.7rem !important;
        font-weight: bold !important;
        color: #ff6b35 !important;
    }
    
    /* PDF'de contact iconları */
    .contact-icon {
        font-family: 'Segoe UI Emoji', Arial, sans-serif !important;
        font-size: 1.5rem !important;
    }
    
    /* PDF'de benefit iconları */
    .benefit-icon {
        font-family: 'Segoe UI Emoji', Arial, sans-serif !important;
        font-size: 1.5rem !important;
    }
    
    /* Enhanced page break control for sections */
    .pricing-section {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .pricing-card {
        page-break-inside: avoid;
        overflow: hidden;
    }
    
    .delivery-info {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .offer-validity {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .section {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .timeline {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .timeline-item {
        page-break-inside: avoid;
        overflow: hidden;
    }
    
    .benefits-grid {
        page-break-inside: avoid;
        page-break-before: auto;
        page-break-after: auto;
        overflow: hidden;
    }
    
    .benefit-item {
        page-break-inside: avoid;
        overflow: hidden;
    }
    
    /* Ensure content fits within page boundaries in print */
    .content-grid {
        overflow: hidden;
        min-height: auto;
        max-height: 297mm;
    }
    
    .section-text {
        overflow: hidden;
        word-wrap: normal;
    }
    
    .feature-list li {
        overflow: hidden;
        word-wrap: normal;
    }
    
    .pricing-features li {
        overflow: visible;
        word-wrap: normal;
    }
    
    .payment-terms li {
        overflow: hidden;
        word-wrap: normal;
    }
    
    .closing-content {
        overflow: hidden;
    }
    
    .contact-card {
        overflow: hidden;
    }
    
    /* Adjust font sizes for better fit */
    .main-title, .studio-name, .project-name {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .subsection-title {
        font-size: 1rem;
    }
    
    .section-text {
        font-size: 0.85rem;
    }
    
    .feature-list li {
        font-size: 0.8rem;
        padding-left: 0 !important;
    }
    
    .feature-list li:before {
        font-size: 0.75rem;
    }
    
    .timeline-content h4 {
        font-size: 0.9rem;
    }
    
    .timeline-content p {
        font-size: 0.75rem;
    }
    
    .timeline-number {
        font-size: 1rem;
        width: 2rem;
        height: 2rem;
    }
    
    .timeline-item {
        margin-bottom: 1rem;
        padding: 8px;
    }
    
    .benefit-item h4 {
        font-size: 0.85rem;
    }
    
    .benefit-item p {
        font-size: 0.7rem;
    }
    
    .benefit-item {
        padding: 8px;
        margin-bottom: 0.5rem;
    }
    
    .pricing-card {
        padding: 15px 12px; /* Daha iyi padding */
        margin-bottom: 0.8rem;
        min-height: auto; /* PDF için height sınırlaması kaldır */
    }
    
    .pricing-card.featured {
        margin-top: 8px;
    }
    
    .pricing-title {
        font-size: 0.85rem;
        margin-bottom: 3px;
    }
    
    .price {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .pricing-features li {
        font-size: 0.65rem;
        margin-bottom: 2px;
        line-height: 1.1;
        padding-left: 0 !important;
    }
    
    .pricing-features li:before {
        font-size: 0.6rem;
    }
    
    .featured-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
        top: -6px;
    }
    
    .delivery-info {
        padding: 8px;
        margin-bottom: 0.5rem;
    }
    
    .delivery-text {
        font-size: 0.7rem;
    }
    
    .payment-terms li {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }
    
    .payment-terms li:before {
        font-size: 0.6rem;
    }
    
    .contact-details p {
        font-size: 0.8rem;
    }
    
    .contact-details strong {
        font-size: 0.85rem;
    }
    
    .closing-title {
        font-size: 1.2rem;
    }
    
    .closing-text p {
        font-size: 0.8rem;
    }
    
    .contact-card {
        padding: 8px;
        margin-bottom: 0.5rem;
    }
    
    .contact-card h4 {
        font-size: 0.85rem;
    }
    
    .contact-card p {
        font-size: 0.7rem;
    }
    
    .footer-text {
        font-size: 0.7rem;
    }
    
    .header-line, .closing-line, .footer-line {
        height: 1px;
        margin: 0.5rem 0;
    }
    
    /* Compact spacing for PDF */
    .content-grid {
        gap: 10px;
    }
    
    .section {
        padding: 5px 0;
        margin-bottom: 8px;
    }
    
    .section-text {
        margin-bottom: 8px;
    }
    
    .timeline {
        gap: 8px;
    }
    
    .pricing-section {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .benefits-grid {
        gap: 8px;
    }
    
    .info-grid {
        gap: 8px;
    }
    
    /* Extra compact for timeline sections in PDF */
    .page-2 .timeline {
        gap: 4px;
    }
    
    .page-2 .timeline-item {
        padding: 3px;
        margin-bottom: 3px;
        font-size: 0.6rem;
    }
    
    .page-2 .timeline-number {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.7rem;
        margin-right: 4px;
    }
    
    .page-2 .timeline-content h4 {
        font-size: 0.65rem;
        margin-bottom: 1px;
    }
    
    .page-2 .timeline-content p {
        font-size: 0.55rem;
        line-height: 1.1;
        margin: 0;
    }
    
    .page-2 .section-title {
        font-size: 0.8rem;
        margin-bottom: 3px;
        padding-bottom: 1px;
    }
    
    .page-2 .section {
        padding: 2px 0;
        margin-bottom: 4px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page {
        width: 100%;
        height: auto;
        min-height: 297mm;
        padding: 15mm;
    }
    
    .page-content {
        flex-direction: column;
    }
    
    .image-section {
        height: 200px;
    }
    
    .content-section {
        padding: 25px 20px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.8rem;
    }
    
    .pricing-section {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline {
        grid-template-columns: 1fr;
    }
    
    .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .closing-title {
        font-size: 1.8rem;
    }
    
    .editor-controls {
        position: static;
        margin: 20px;
        flex-wrap: wrap;
    }
    
    .color-picker {
        width: 30px;
        height: 30px;
    }
}

/* Timeline - Compact for PDF side-by-side */
.timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    page-break-inside: avoid;
}

/* PDF specific timeline layout */
@media print {
    .timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .timeline-item {
        padding: 6px;
        margin-bottom: 6px;
        font-size: 0.7rem;
    }
    
    .timeline-number {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
        margin-right: 6px;
    }
    
    .timeline-content h4 {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }
    
    .timeline-content p {
        font-size: 0.65rem;
        line-height: 1.2;
        margin: 0;
    }
    
    /* Make sections more compact in PDF */
    .section {
        padding: 3px 0;
        margin-bottom: 6px;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 4px;
        padding-bottom: 2px;
    }
    
    .section-title::after {
        width: 20px;
        height: 1px;
    }
    
    /* Reduce spacing between sections */
    .content-grid {
        gap: 6px;
    }
    
    /* Make timeline items even more compact */
    .timeline-item {
        background: #f8f9fa;
        padding: 4px;
        border-radius: 4px;
        border-left: 2px solid #ff6b35;
        margin-bottom: 4px;
    }
}