@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Tajawal:wght@400;500;700&display=swap');

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

body {
    background-color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
}

[dir="rtl"] body {
    font-family: 'Tajawal', sans-serif;
}

/* Professional BMC Canvas Style */
.bmc-canvas {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    border: none;
    background: #e2e8f0;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bmc-block {
    border: none;
    padding: 0;
    background: #ffffff;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bmc-block:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.block-header {
    background: #f1f5f9;
    color: #003366;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    border-bottom: 2px solid #d91e18;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.block-content-editable {
    flex: 1;
    padding: 12px;
    border: none;
    resize: none !important;
    font-size: 0.925rem;
    line-height: 1.5;
    font-family: inherit;
    background: transparent;
    overflow-y: auto;
    min-height: 140px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #334155;
    transition: background-color 0.2s;
}

.block-content-editable:focus {
    outline: none;
    background-color: #f8fafc;
}

/* Special blocks that span multiple rows/columns */
.key-activities { grid-row: span 2; }
.key-resources { grid-row: span 2; }
.customer-relationships { grid-row: span 2; }
.channels { grid-row: span 2; }
.cost-structure { grid-column: span 3; }
.revenue-streams { grid-column: span 2; }

/* Business Idea Section */
.business-idea-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.business-idea-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-idea-input {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s;
    width: 100%;
}

.business-idea-input:focus {
    border-color: #d91e18;
    box-shadow: 0 0 0 4px rgba(217, 30, 24, 0.1);
    outline: none;
}

/* Footer Section */
.canvas-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    margin-top: 32px;
    border: 1px solid #f1f5f9;
}

.canvas-footer .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.canvas-footer .logo svg {
    color: #d91e18;
}

.canvas-footer .credit {
    font-size: 0.875rem;
    color: #64748b;
}

.canvas-footer .credit a {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .bmc-canvas {
        grid-template-columns: repeat(2, 1fr);
    }
    .cost-structure, .revenue-streams { grid-column: span 2; }
}

@media (max-width: 640px) {
    .bmc-canvas {
        grid-template-columns: 1fr;
    }
    .cost-structure, .revenue-streams { grid-column: span 1; }
    .key-activities, .key-resources, .customer-relationships, .channels { grid-row: auto; }
}

/* Utilities */
.badge-custom {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.btn-primary-custom {
    background: #d91e18;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background: #b91c1c;
    box-shadow: 0 4px 6px -1px rgba(217, 30, 24, 0.2);
}

/* Custom Language Toggle - Neumorphic Style */
.navbar-light .custom-nav-link {
    color: #003366 !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-light .custom-nav-link:hover {
    color: #d91e18 !important;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 40px;
    background: transparent;
}
.lang-label {
    font-weight: 800;
    font-size: 1rem;
    color: #cbd5e1;
    transition: color 0.3s !important;
    text-decoration: none !important;
    user-select: none;
    letter-spacing: -0.01em;
}
.lang-label.active {
    color: #475569 !important;
}
.switch-box {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 30px;
    box-shadow: inset 3px 3px 6px rgba(0,0,0,0.1), 
                inset -3px -3px 6px rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s;
}
.switch-circle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.2),
                -1px -1px 2px rgba(255,255,255,0.5);
    overflow: hidden;
    padding: 1px;
}
.switch-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.switch-box.active .switch-circle {
    left: 33px;
}
[dir="rtl"] .switch-box.active .switch-circle {
    left: 33px;
}
