/* Definitions Page Styles */

/* Key Distinction Box */
.key-distinction {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1.5rem;
}

.key-distinction .distinction-header {
    font-weight: 700;
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.key-distinction p {
    color: #78350f;
    margin-bottom: 0.5rem;
}

.key-distinction p:last-child {
    margin-bottom: 0;
}

/* Definition Cards */
.definition-card {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.definition-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
}

.definition-header .term {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
}

.type-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.service-badge {
    background: #dbeafe;
    color: #1e40af;
}

.offer-badge {
    background: #dcfce7;
    color: #166534;
}

.definition-content {
    padding: 1.5rem;
}

.primary-def {
    font-size: 1.1rem;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.characteristics {
    margin-bottom: 1.5rem;
}

.characteristics h4,
.examples h4 {
    color: #1e3a8a;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.characteristics ul {
    list-style: none;
    padding: 0;
}

.characteristics li {
    padding: 0.5rem 0;
    color: #475569;
    padding-left: 1.5rem;
    position: relative;
}

.characteristics li::before {
    content: "\2022";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.example-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-item {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.offer-card .example-item {
    background: #d1fae5;
    color: #065f46;
}

/* Relationship Diagram */
.relationship-diagram {
    background: #f8fafc;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.diagram-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.diagram-box {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 250px;
    flex: 1;
    max-width: 350px;
}

.services-box {
    border: 2px solid #3b82f6;
}

.offers-box {
    border: 2px solid #10b981;
}

.diagram-box h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.services-box h4 {
    color: #1e40af;
}

.offers-box h4 {
    color: #047857;
}

.diagram-box p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.diagram-box ul {
    list-style: none;
    padding: 0;
}

.diagram-box li {
    padding: 0.3rem 0;
    color: #475569;
    font-size: 0.9rem;
    padding-left: 1rem;
    position: relative;
}

.diagram-box li::before {
    content: "\2022";
    position: absolute;
    left: 0;
}

.services-box li::before {
    color: #3b82f6;
}

.offers-box li::before {
    color: #10b981;
}

.diagram-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748b;
}

.arrow-text {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.arrow-icon {
    font-size: 2rem;
    color: #3b82f6;
}

.relationship-callout {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 4px;
}

.relationship-callout h4 {
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.relationship-callout p {
    color: #475569;
    margin-bottom: 0.75rem;
}

.relationship-callout p:last-child {
    margin-bottom: 0;
}

/* Context Grid */
.context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.context-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
}

.context-card h4 {
    color: #1e3a8a;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.context-card p {
    color: #64748b;
    margin-bottom: 1rem;
}

.context-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.context-item {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.context-item.new {
    background: #d1fae5;
    color: #065f46;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th {
    background: #1e3a8a;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table th:first-child {
    width: 20%;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

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

.comparison-table tr:nth-child(even) {
    background: #f8fafc;
}

.comparison-table td:nth-child(2) {
    background: rgba(59, 130, 246, 0.05);
}

.comparison-table td:nth-child(3) {
    background: rgba(16, 185, 129, 0.05);
}

/* Services-to-Offers Mapping Diagram */
.mapping-diagram {
    background: #f8fafc;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #e2e8f0;
}

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

.mapping-header h4 {
    color: #1e3a8a;
    font-size: 1.2rem;
}

.mapping-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #cbd5e1;
}

.mapping-visual.second-row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.service-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.service-node {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.service-node .node-label {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.service-node .node-type {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flow-lines {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    color: #3b82f6;
    font-size: 1.5rem;
}

.flow-line::before {
    content: "\2192";
}

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

.offer-node {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Mapping Table Section */
.mapping-table-section {
    margin-top: 2rem;
}

.mapping-table-section h4 {
    color: #1e3a8a;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.mapping-table-section > p {
    color: #64748b;
    margin-bottom: 1rem;
}

.mapping-table {
    margin-top: 1rem;
}

.mapping-table th:first-child {
    width: 25%;
}

.mapping-table th:nth-child(2) {
    width: 40%;
}

.mapping-table th:nth-child(3) {
    width: 35%;
}

.mapping-table td:nth-child(2) {
    background: transparent;
}

.mapping-table td:nth-child(3) {
    background: transparent;
    color: #64748b;
    font-size: 0.9rem;
}

/* Offer Tags in Table */
.offer-tag {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.2rem;
    font-weight: 500;
}

/* Reverse Mapping Callout */
.reverse-mapping {
    background: #f0fdf4;
    border-left-color: #10b981;
    margin-top: 2rem;
}

.reverse-mapping h4 {
    color: #047857;
}

.composition-list {
    margin: 1rem 0;
}

.composition-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #d1fae5;
}

.composition-item:last-child {
    border-bottom: none;
}

.composition-item .service-name {
    font-weight: 600;
    color: #1e40af;
    min-width: 180px;
    flex-shrink: 0;
}

.composition-item .contribution {
    color: #64748b;
    font-size: 0.9rem;
}

.callout-note {
    font-style: italic;
    color: #059669 !important;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .diagram-row {
        flex-direction: column;
    }

    .diagram-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }

    .diagram-box {
        max-width: 100%;
    }

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

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }

    /* Mapping diagram responsive */
    .mapping-visual {
        flex-direction: column;
        gap: 1.5rem;
    }

    .service-node {
        min-width: 100%;
    }

    .flow-lines {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

    .offers-column {
        width: 100%;
    }

    .offer-node {
        text-align: center;
    }

    .composition-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .composition-item .service-name {
        min-width: auto;
    }
}
