/* ========================================
   Documentation Style
   Content Term Styling - Override base styles
======================================== */

/* Reset and override the base content styles */
.definitions-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Main Content Container */
.definitions-content .term-details {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ========================================
   Documentation Hero Section
======================================== */

.definitions-content .documentation-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    margin: 0;
    width: 100%;
}

/* Hero Background Variants for Categories - Ultra Soft Colors to White */
.definitions-content .documentation-hero-vertragsrecht {
    background: linear-gradient(180deg, #E3EEFF 0%, #F0F4FF 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-datenschutz {
    background: linear-gradient(180deg, #E8F5E8 0%, #F0FAF0 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-haftung {
    background: linear-gradient(180deg, #FFE8E8 0%, #FFF0F0 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-finanzrecht {
    background: linear-gradient(180deg, #E8FFF0 0%, #F0FFF5 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-kaufrecht {
    background: linear-gradient(180deg, #FFF0E6 0%, #FFF5F0 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-arbeitsrecht {
    background: linear-gradient(180deg, #F0E8FF 0%, #F5F0FF 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-gesellschaftsrecht {
    background: linear-gradient(180deg, #F0F0F2 0%, #F5F5F7 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-immobilienrecht {
    background: linear-gradient(180deg, #F2F2F5 0%, #F8F8FA 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-versicherungsrecht {
    background: linear-gradient(180deg, #E6F8FF 0%, #F0FCFF 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-internetrecht {
    background: linear-gradient(180deg, #EEF0FF 0%, #F5F7FF 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-familienrecht {
    background: linear-gradient(180deg, #FFF0F8 0%, #FFF5FC 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-strafrecht {
    background: linear-gradient(180deg, #FFF8E6 0%, #FFFCF0 50%, #FFFFFF 100%);
}

.definitions-content .documentation-hero-steuerrecht {
    background: linear-gradient(180deg, #FFF0F5 0%, #FFF5F8 50%, #FFFFFF 100%);
}

/* Hero Icon */
.definitions-content .documentation-hero__icon {
    position: absolute;
    top: 60px;
    right: 60px;
    width: 250px;
    height: 250px;
    color: rgba(0, 0, 0, 0.08);
    opacity: 1;
    z-index: 1;
}

.definitions-content .documentation-hero__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}



/* Hero Content - Gets same margins/padding as text content */
.definitions-content .documentation-hero__content {
    margin: 0 191px;
    padding: 80px 80px;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Breadcrumb Navigation */
.definitions-content .term-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: rgba(29, 29, 31, 0.7);
}

.definitions-content .breadcrumb-link {
    background: none;
    border: none;
    color: rgba(29, 29, 31, 0.7);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 0;
    transition: color 0.2s ease;
}

.definitions-content .breadcrumb-link:hover {
    color: #1D1D1F;
}

.definitions-content .breadcrumb-separator {
    width: 12px;
    height: 12px;
    opacity: 0.5;
    color: rgba(29, 29, 31, 0.5);
}

.definitions-content .breadcrumb-current {
    color: #1D1D1F;
    font-weight: 500;
}

/* Hero Title */
.definitions-content .documentation-hero__content h1 {
    font-size: 48px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 0 16px 0 !important;
    color: #1D1D1F !important;
    letter-spacing: -0.02em;
}

/* Hero Definition */
.definitions-content .term-definition {
    font-size: 20px;
    line-height: 1.5;
    color: rgba(29, 29, 31, 0.8);
    margin: 0;
    max-width: 600px;
}

/* ========================================
   Term Content Section
======================================== */

.definitions-content .term-content {
    background: #ffffff;
    margin: 0 191px;
    padding: 80px 80px;
    position: relative;
}

/* Content Sections */
.definitions-content .term-section {
    margin-bottom: 48px;
}

.definitions-content .term-section:last-child {
    margin-bottom: 0;
}

.definitions-content .term-section h2 {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 24px 0 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.02em;
}

.definitions-content .term-section h3 {
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 16px 0 !important;
    color: #1d1d1f !important;
}

.definitions-content .term-section h4 {
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 12px 0 !important;
    color: #1d1d1f !important;
}

.definitions-content .term-section p {
    font-size: 17px !important;
    line-height: 1.6 !important;
    color: #424245 !important;
    margin: 0 0 16px 0 !important;
}

.definitions-content .term-section p:last-child {
    margin-bottom: 0 !important;
}

/* ========================================
   Info Boxes - Apple Developer Documentation Style
======================================== */

.definitions-content .info-box {
    background: #F5F5F7;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
    border: 1px solid #D1D1D6;
    font-family: -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.definitions-content .info-box.tip {
    background: #F0F9FF;
    border: 1px solid #5AC8FA;
    color: #1D1D1F;
}

.definitions-content .info-box.warning {
    background: #FFFBF0;
    border: 1px solid #FF9F0A;
    color: #1D1D1F;
}

.definitions-content .info-box.important {
    background: #FFF8F0;
    border: 1px solid #FF9F0A;
    color: #1D1D1F;
}

.definitions-content .info-box.note {
    background: #F5F5F7;
    border: 1px solid #C7C7CC;
    color: #1D1D1F;
}

.definitions-content .info-box.example {
    background: #F0FDF4;
    border: 1px solid #34D399;
    color: #1D1D1F;
}

.definitions-content .info-box-header {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1D1D1F !important;
    margin: 0 0 8px 0 !important;
    font-family: -apple-system, "SF Pro Display", "Helvetica Neue", sans-serif !important;
}

.definitions-content .info-box p {
    margin: 0 !important;
    color: #1D1D1F !important;
    font-size: 17px !important;
    line-height: 1.47059 !important;
    font-weight: 400 !important;
    letter-spacing: -0.022em !important;
    font-family: -apple-system, "SF Pro Text", sans-serif !important;
}

.definitions-content .info-box ul {
    margin: 0 !important;
    padding-left: 20px !important;
    color: #1D1D1F !important;
}

.definitions-content .info-box li {
    margin-bottom: 6px !important;
    color: #1D1D1F !important;
    font-size: 17px !important;
    line-height: 1.47059 !important;
    font-weight: 400 !important;
    letter-spacing: -0.022em !important;
    font-family: -apple-system, "SF Pro Text", sans-serif !important;
}

.definitions-content .info-box li:last-child {
    margin-bottom: 0 !important;
}

/* Code and Links in Info Boxes */
.definitions-content .info-box code {
    background: rgba(142, 142, 147, 0.12);
    border-radius: 6px;
    padding: 2px 6px;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    font-size: 15px;
    font-weight: 400;
    color: #1D1D1F;
    letter-spacing: 0;
}

.definitions-content .info-box a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 400;
}

.definitions-content .info-box a:hover {
    text-decoration: underline;
}

.definitions-content .info-box a code {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

/* ========================================
   Step-by-Step Guide
======================================== */

.definitions-content .step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.definitions-content .step-item {
    position: relative;
    padding: 24px 0 24px 60px;
    border-left: 2px solid #f5f5f7;
    counter-increment: step-counter;
}

.definitions-content .step-item:last-child {
    border-left: none;
}

.definitions-content .step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: -12px;
    top: 24px;
    width: 24px;
    height: 24px;
    background: #007aff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.definitions-content .step-item h4 {
    margin: 0 0 8px 0 !important;
    color: #1d1d1f !important;
}

.definitions-content .step-item p {
    margin: 0 !important;
    color: #424245 !important;
}

/* ========================================
   Related Terms
======================================== */

.definitions-content .related-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 0 0;
}

.definitions-content .related-term {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #007aff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.definitions-content .related-term:hover {
    background: #007aff;
    color: white;
    border-color: #007aff;
}

.definitions-content .related-term-missing {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #8e8e93;
    display: inline-block;
}

/* ========================================
   Term Meta Information
======================================== */

.definitions-content .term-meta {
    border-top: 1px solid #f5f5f7;
    padding-top: 24px;
    margin-top: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 15px;
    color: #424245;
}

.definitions-content .term-category strong,
.definitions-content .term-tags strong {
    color: #1d1d1f;
    font-weight: 600;
}

.definitions-content .term-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.definitions-content .tag {
    background: #f5f5f7;
    color: #424245;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Sidebar Hidden State
======================================== */

/* When sidebar is hidden, adjust margins to 419px */
.definitions-main.sidebar-hidden .definitions-content .documentation-hero__content,
.definitions-main.sidebar-hidden .definitions-content .term-content {
    margin: 0 419px;
    transition: margin 0.3s ease;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 1512px) {
    .definitions-content .documentation-hero__content,
    .definitions-content .term-content {
        margin: 0;
        padding: 80px 80px;
    }
    
    .definitions-main.sidebar-hidden .definitions-content .documentation-hero__content,
    .definitions-main.sidebar-hidden .definitions-content .term-content {
        margin: 0 216px;
        padding: 80px 80px;
    }
}

@media (max-width: 1200px) {
    .definitions-content .documentation-hero__content,
    .definitions-content .term-content {
        margin: 0;
        padding: 80px 80px;
    }
    
    .definitions-main.sidebar-hidden .definitions-content .documentation-hero__content,
    .definitions-main.sidebar-hidden .definitions-content .term-content {
        margin: 0 216px;
        padding: 80px 80px;
    }
}

@media (max-width: 768px) {
    .definitions-content .documentation-hero__content,
    .definitions-content .term-content {
        margin: 23px;
        padding: 0;
    }
    
    .definitions-main.sidebar-hidden .definitions-content .documentation-hero__content,
    .definitions-main.sidebar-hidden .definitions-content .term-content {
        margin: 23px;
        padding: 0;
    }
    
    /* Mobile Term Hero */
    .documentation-hero {
        margin: 0;
        padding: 0;
        min-height: auto;
    }
    
    .documentation-hero__content {
        padding: 40px 24px 32px 24px;
        margin: 23px;
    }
    
    /* Icon auf Mobile verstecken */
    .definitions-content .documentation-hero__icon {
        display: none;
    }
    
    .documentation-hero__content h1 {
        font-size: 28px !important;
        margin-bottom: 16px !important;
        color: #1D1D1F !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }
    
    .term-definition {
        font-size: 16px !important;
        color: rgba(29, 29, 31, 0.8) !important;
        line-height: 1.5 !important;
    }
    
    /* Mobile Term Content */
    .term-content {
        padding: 32px 24px;
        margin: 23px;
    }
    
    .term-section {
        margin-bottom: 30px;
    }
    
    .term-section h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .term-section h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .term-section p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Mobile Info Boxes */
    .definitions-content .info-box {
        margin: 20px 0 !important;
        padding: 16px 20px !important;
        border-radius: 10px !important;
        font-size: 16px !important;
    }
    
    .definitions-content .info-box-header {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .definitions-content .info-box p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* Mobile Step by Step */
    .definitions-content .step-list {
        padding-left: 16px !important;
    }
    
    .definitions-content .step-item {
        padding: 20px 0 20px 50px !important;
        margin-bottom: 16px !important;
    }
    
    .definitions-content .step-item::before {
        left: -10px !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
    }
    
    .definitions-content .step-item h4 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .definitions-content .step-item p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* Mobile Related Terms */
    .definitions-content .related-terms {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin: 16px 0 !important;
    }
    
    .definitions-content .related-term {
        padding: 10px 16px !important;
        border-radius: 16px !important;
        font-size: 15px !important;
        background: #F5F5F7 !important;
        border: 1px solid #D2D2D7 !important;
        color: var(--inklory-blue) !important;
    }
    
    .definitions-content .related-term:hover {
        background: var(--inklory-blue) !important;
        color: white !important;
        border-color: var(--inklory-blue) !important;
    }
    
    /* Mobile Breadcrumb - vereinfacht */
    .term-breadcrumb {
        display: none;
    }
}

@media (max-width: 480px) {
    .definitions-content .documentation-hero__content,
    .definitions-content .term-content {
        margin: 16px;
        padding: 0;
    }
    
    .documentation-hero__content {
        padding: 32px 20px 24px 20px;
        margin: 16px;
    }
    
    .documentation-hero__content h1 {
        font-size: 24px !important;
        margin-bottom: 12px !important;
        color: #1D1D1F !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }
    
    .term-definition {
        font-size: 15px !important;
        color: rgba(29, 29, 31, 0.8) !important;
        line-height: 1.5 !important;
    }
    
    /* Icon auch auf kleinen Handys verstecken */
    .definitions-content .documentation-hero__icon {
        display: none;
    }
    
    /* Breadcrumb auch hier verstecken */
    .term-breadcrumb {
        display: none;
    }
    
    .term-content {
        padding: 24px 20px;
        margin: 16px;
    }
    
    .term-section {
        margin-bottom: 24px;
    }
    
    .term-section h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .term-section h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .term-section p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .info-box {
        margin: 16px 0;
        padding: 16px;
        border-radius: 10px;
    }
    
    .info-box-header {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .step-item h4 {
        font-size: 16px;
    }
    
    .related-term {
        padding: 10px 14px;
        font-size: 15px;
    }
}
