/* Property Brochure Generator - Main Styles */
.property-brochure-generator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 1rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.step-item:hover {
    transform: translateY(-2px);
}

.step-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.step-item.completed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.step-item.accessible {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
}

.step-item.accessible:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-item.active .step-number,
.step-item.completed .step-number {
    background: rgba(255,255,255,0.3);
    color: white;
}

.step-item.accessible .step-number {
    background: #667eea;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

/* Step Content */
.step-content {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.step-content.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Template Grid - Sophisticated Layout */
.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Template Cards - Different Sizes and Styles */
.template-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* Custom Template - Small Card */
.template-blank {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    text-align: center;
    padding: 1.5rem;
}

.template-blank:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Professional 1-Pager - Full Height */
.template-modern {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Professional 3-Pager - Full Height */
.template-classic {
    grid-row: 1 / 3;
    grid-column: 3 / 4;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Professional 5-Pager - Half Height */
.template-minimalist {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Luxury Villa - Half Height */
.template-professional {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

/* Dubai Penthouse - Half Height */
.template-creative {
    grid-row: 2 / 3;
    grid-column: 3 / 4;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* Modern Apartment - Full Width */
.template-corporate {
    grid-row: 3 / 4;
    grid-column: 1 / 4;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
}

/* Template Content */
.template-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.template-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Blank Template Special Styling */
.template-blank .template-content h3 {
    color: #495057;
    font-size: 1.3rem;
}

.template-blank .template-content p {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Corporate Template Special Styling */
.template-corporate .template-content h3 {
    font-size: 2rem;
    color: white;
}

.template-corporate .template-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Selected Template Indicator */
.selected-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #28a745;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
}

.selected-icon {
    font-size: 1rem;
    font-weight: bold;
}

.selected-text {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .template-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
    }
    
    .template-corporate {
        grid-column: 1 / 3;
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
    }
    
    .template-modern,
    .template-classic,
    .template-corporate {
        grid-column: 1 / 2;
    }
    
    .template-card {
        padding: 1.5rem;
    }
}

/* Property Selector */
.property-selector {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    text-align: center;
}

.property-selector h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.property-selector-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    justify-content: center;
}

.property-selector-controls select {
    flex: 1;
    max-width: 500px;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.property-selector-controls select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-items: center;
}

.form-group.full-width {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 800px;
}

.form-group {
    width: 100%;
    max-width: 300px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    text-align: center;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    text-align: center;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Image Upload */
.image-upload-section {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #dee2e6;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.image-upload-section:hover {
    border-color: #667eea;
}

.image-upload-section input[type="file"] {
    display: none;
}

.upload-btn {
    background: #667eea;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #5a6fd8;
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.image-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    text-align: center;
    width: 100%;
    max-width: 250px;
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.image-item input {
    width: 100%;
    margin-bottom: 0.5rem;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Amenities Grid */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.amenity-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: border-color 0.3s ease;
    width: 100%;
    max-width: 250px;
}

.amenity-checkbox:hover {
    border-color: #667eea;
}

.amenity-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Customization Grid */
.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

/* Preview Section */
.preview-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    text-align: center;
}

.preview-content h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    justify-items: center;
}

.summary-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    width: 100%;
    max-width: 250px;
}

.preview-actions {
    text-align: center;
}

/* Download Section */
.download-section {
    text-align: center;
    padding: 3rem 2rem;
}

.success-message {
    margin-bottom: 2rem;
}

.success-message svg {
    color: #28a745;
    margin-bottom: 1rem;
}

.success-message h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-message p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Special button styling for steps 4 and 5 */
.step-content[data-step="4"] .step-actions,
.step-content[data-step="5"] .step-actions {
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.step-content[data-step="4"] .step-actions .btn,
.step-content[data-step="5"] .step-actions .btn {
    min-width: 150px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Preview Actions */
.preview-actions {
    text-align: center;
    margin: 2rem 0;
}

.preview-actions .btn {
    min-width: 200px;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
}

/* Download Actions */
.download-actions {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.download-actions .btn {
    min-width: 200px;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
}

.download-actions .btn-success {
    order: 1;
}

.download-actions .btn-secondary {
    order: 2;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .step-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .step-item {
        min-width: 100px;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .template-card {
        max-width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error States */
.error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: #28a745 !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-in {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    margin: 1rem auto;
    max-width: 800px;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    animation: slideInDown 0.3s ease;
}

.error-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-text {
    flex: 1;
    font-weight: 500;
}

.error-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Property Details Grid */
.property-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.property-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.property-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

.property-header h3 {
    color: #667eea;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.property-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.info-row input,
.info-row select,
.info-row textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.info-row input:focus,
.info-row select:focus,
.info-row textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.info-row textarea {
    resize: vertical;
    min-height: 80px;
}

/* Generate PDF Button */
.generate-pdf-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.generate-pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

/* Template Configuration */
.template-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.config-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.config-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
    font-size: 1.2rem;
    font-weight: 600;
}

.config-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-option label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.config-option select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.config-option select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
