/* Step Pages Styling */

/* ========================================
   Base Styles
   ======================================== */

.step-page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(15px, 4vw, 40px);
}

.step-breadcrumb {
    font-size: clamp(12px, 2.5vw, 14px);
    color: #666;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.step-breadcrumb a {
    color: #0073ea;
    text-decoration: none;
}

.step-breadcrumb a:hover {
    text-decoration: underline;
}

/* ========================================
   Phase Icon
   ======================================== */

.phase-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.phase-icon img {
    width: 64px;
    height: 64px;
}

/* ========================================
   Progress Indicator
   ======================================== */

.progress-indicator {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073ea, #00b4d8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   Content Subheader (Navigation)
   ======================================== */

.content-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #0073ea;
    margin-bottom: 30px;
}

.content-subheader__prev,
.content-subheader__next {
    flex: 0 0 auto;
}

.content-subheader__step {
    flex: 1;
    text-align: center;
}

.content-subheader__step-number {
    display: block;
    font-size: clamp(12px, 2.5vw, 14px);
    color: #0073ea;
    font-weight: 600;
}

.content-subheader__step-name {
    display: block;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 600;
    color: #333;
}

.content-subheader__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 15px;
    color: #0073ea;
    text-decoration: none;
    border: 1px solid #0073ea;
    border-radius: 4px;
    transition: all 0.2s;
}

.content-subheader__link:hover {
    background: #0073ea;
    color: white;
}

.content-subheader__prev-arrow::before {
    content: "\2190";
    font-size: 18px;
}

.content-subheader__next-arrow::before {
    content: "\2192";
    font-size: 18px;
}

/* ========================================
   Main Content
   ======================================== */

.step-content {
    line-height: 1.7;
    font-size: clamp(15px, 2.8vw, 17px);
}

.step-intro {
    font-size: clamp(16px, 3vw, 18px);
    color: #444;
    margin-bottom: 30px;
    padding: clamp(15px, 3vw, 20px);
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073ea;
}

.step-section {
    margin-bottom: 30px;
}

.step-section__title {
    font-size: clamp(16px, 3vw, 18px);
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ========================================
   Lists
   ======================================== */

.step-checklist,
.step-topics,
.step-ordered-list,
.step-warning-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-checklist__item,
.step-topics__item,
.step-ordered-list__item {
    padding: clamp(10px, 2vw, 12px) 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    position: relative;
    padding-left: 35px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.step-checklist__item::before {
    content: "\2713";
    position: absolute;
    left: 12px;
    color: #28a745;
    font-weight: bold;
}

.step-topics__item::before {
    content: "\2022";
    position: absolute;
    left: 12px;
    color: #0073ea;
    font-size: 18px;
}

.step-ordered-list {
    counter-reset: step-counter;
}

.step-ordered-list__item {
    counter-increment: step-counter;
}

.step-ordered-list__item::before {
    content: counter(step-counter);
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    background: #0073ea;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
}

.step-warning-list__item {
    padding: clamp(10px, 2vw, 12px) 15px;
    margin-bottom: 8px;
    background: #fff3cd;
    border-radius: 4px;
    position: relative;
    padding-left: 35px;
    border-left: 3px solid #ffc107;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.step-warning-list__item::before {
    content: "\26A0";
    position: absolute;
    left: 10px;
    color: #856404;
}

/* ========================================
   Callout Boxes
   ======================================== */

.step-tip {
    padding: clamp(12px, 3vw, 20px);
    background: #e7f5ff;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0073ea;
}

.step-warning {
    padding: clamp(12px, 3vw, 20px);
    background: #fff3cd;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.step-exercise {
    padding: clamp(15px, 3vw, 20px);
    background: #f0fff4;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

/* ========================================
   Calculator CTA Link
   ======================================== */

.step-calculator-link {
    margin: 25px 0;
}

.calculator-cta {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
    border: 2px solid #0073ea;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.calculator-cta:hover {
    background: linear-gradient(135deg, #d0ebff 0%, #a5d8ff 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 115, 234, 0.2);
}

.calculator-cta-icon {
    font-size: 2em;
    margin-right: 15px;
}

.calculator-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calculator-cta-text strong {
    font-size: 1.1em;
    color: #0073ea;
}

.calculator-cta-text span {
    font-size: 0.9em;
    color: #666;
    margin-top: 3px;
}

.calculator-cta-arrow {
    font-size: 1.5em;
    color: #0073ea;
    margin-left: 10px;
}

/* ========================================
   Pro Tips Section
   ======================================== */

.step-pro-tips {
    background: #f0fff4;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin: 25px 0;
}

.step-pro-tips .step-section__title {
    color: #28a745;
    border-bottom-color: #28a745;
}

.step-pro-tips .step-checklist__item::before {
    content: "\2605";
    color: #28a745;
}

/* ========================================
   Common Mistakes Section
   ======================================== */

.step-mistakes {
    background: #fff8e6;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    margin: 25px 0;
}

.step-mistakes .step-section__title {
    color: #e65100;
    border-bottom-color: #ff9800;
}

/* ========================================
   Scenario Section
   ======================================== */

.step-scenario {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #6f42c1;
    margin: 25px 0;
}

.step-scenario .step-section__title {
    color: #6f42c1;
    border-bottom-color: #6f42c1;
}

.scenario-callout {
    margin-top: 10px;
}

.scenario-setup {
    margin-bottom: 15px;
    line-height: 1.7;
}

.scenario-name {
    color: #6f42c1;
}

.scenario-details {
    margin: 0 0 15px 0;
    padding: 0;
    list-style: none;
}

.scenario-details__item {
    padding: 8px 15px 8px 35px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.scenario-details__item::before {
    content: "\2192";
    position: absolute;
    left: 12px;
    color: #6f42c1;
    font-weight: bold;
}

.scenario-outcome {
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(111, 66, 193, 0.2);
    line-height: 1.7;
}

.scenario-outcome strong {
    color: #6f42c1;
}

/* ========================================
   Tables
   ======================================== */

.step-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.step-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

.step-table th,
.step-table td {
    padding: clamp(8px, 2vw, 12px) clamp(10px, 2vw, 15px);
    text-align: left;
    border-bottom: 1px solid #eee;
}

.step-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.step-table tr:hover {
    background: #f8f9fa;
}

/* ========================================
   PDF Downloads
   ======================================== */

.pdf-downloads {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pdf-downloads__title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.pdf-download-list {
    display: grid;
    gap: 12px;
}

.pdf-download-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    min-height: 44px;
}

.pdf-download-link:hover {
    border-color: #0073ea;
    background: #e7f5ff;
}

.pdf-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    color: #dc3545;
}

.pdf-name {
    flex: 1;
    font-weight: 500;
}

.pdf-size {
    font-size: 0.85em;
    color: #666;
}

/* ========================================
   Related Steps
   ======================================== */

.related-steps {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.related-steps__title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.related-steps-list {
    display: grid;
    gap: 10px;
}

.related-step-link {
    display: block;
    padding: 12px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    min-height: 44px;
}

.related-step-link:hover {
    border-color: #0073ea;
    background: #e7f5ff;
}

.related-step-number {
    font-size: 0.85em;
    color: #0073ea;
    font-weight: 600;
}

/* ========================================
   Related Guides
   ======================================== */

.related-guides {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%);
    border-radius: 8px;
    border: 1px solid #cce5ff;
}

.related-guides__title {
    font-size: 1.1em;
    font-weight: 600;
    color: #0073ea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-guides__title svg {
    flex-shrink: 0;
}

.related-guides-list {
    display: grid;
    gap: 12px;
}

@media (min-width: 600px) {
    .related-guides-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-guide-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 70px;
}

.related-guide-card:hover {
    border-color: #0073ea;
    box-shadow: 0 4px 12px rgba(0, 115, 234, 0.15);
    transform: translateY(-2px);
}

.related-guide-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.related-guide-desc {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

/* ========================================
   Navigation Buttons
   ======================================== */

.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    min-height: 44px;
    min-width: 44px;
}

.button-primary {
    background: #0073ea;
    color: white;
}

.button-primary:hover {
    background: #005bb5;
}

.button-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.button-secondary:hover {
    background: #e9ecef;
}

/* ========================================
   Footer
   ======================================== */

.step-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    margin-top: 40px;
}

/* ========================================
   Responsive: Tablets (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) {
    .step-page-content {
        padding: 20px;
    }

    .step-table {
        font-size: 14px;
    }
}

/* ========================================
   Responsive: Mobile (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    .content-subheader {
        flex-direction: column;
        gap: 15px;
    }

    .content-subheader__prev,
    .content-subheader__next {
        order: 2;
    }

    .content-subheader__step {
        order: 1;
    }

    .step-navigation {
        flex-direction: column;
    }

    .step-navigation .button {
        width: 100%;
        text-align: center;
    }

    .step-table th,
    .step-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .pdf-download-list {
        grid-template-columns: 1fr;
    }

    .related-steps-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Responsive: Small Phones (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
    .step-page-content {
        padding: 15px;
    }

    .step-breadcrumb {
        font-size: 12px;
        word-break: break-word;
    }

    .step-intro {
        padding: 12px;
        font-size: 15px;
    }

    .step-section__title {
        font-size: 16px;
    }

    .step-checklist__item,
    .step-topics__item,
    .step-ordered-list__item,
    .step-warning-list__item {
        padding: 10px 12px 10px 32px;
        font-size: 14px;
    }

    .step-tip,
    .step-warning,
    .step-exercise {
        padding: 12px;
        font-size: 14px;
    }

    .button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .content-subheader__link {
        padding: 8px 12px;
    }

    .phase-icon img {
        width: 48px;
        height: 48px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .content-subheader__link,
    .step-navigation,
    .related-steps,
    .pdf-downloads,
    .progress-indicator {
        display: none;
    }

    .step-page-content {
        max-width: 100%;
        padding: 0;
    }

    .step-intro,
    .step-tip,
    .step-warning,
    .step-exercise {
        break-inside: avoid;
    }

    .step-table {
        font-size: 11px;
    }

    .step-table th,
    .step-table td {
        padding: 6px 8px;
    }
}
