/* ==========================================================================
   PRINT OS / DIGITAL FACTORY CSS
   Isolated namespace `.df-` to prevent global regressions.
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE SHELL
   -------------------------------------------------------------------------- */
.df-shell {
    font-family: 'Roboto Slab', serif;
    background-color: var(--colors-white, #FFFFFF);
    color: var(--colors-dark-gray, #333333);
    width: 100%;
}

.df-hero {
    background: linear-gradient(135deg, rgba(13, 155, 111, 0.05) 0%, rgba(13, 155, 111, 0.02) 100%);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    border-bottom: 1px solid rgba(13, 155, 111, 0.1);
}

.df-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--colors-brand-green, #0D9B6F);
    margin-bottom: var(--spacing-sm);
}

.df-hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--colors-dark-gray, #333333);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.6;
}

.df-hero__actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   LAYOUT GRIDS
   -------------------------------------------------------------------------- */
.df-section {
    padding: var(--spacing-2xl) 0;
    width: min(100% - 32px, 1280px);
    margin-inline: auto;
}

.df-section__title {
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--colors-brand-green, #0D9B6F);
    display: inline-block;
    padding-bottom: var(--spacing-xs);
}

.df-tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    width: 100%;
}

@media (min-width: 768px) {
    .df-tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .df-tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1440px) {
    .df-tool-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   TOOL CARDS
   -------------------------------------------------------------------------- */
.df-tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.df-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--colors-brand-green, #0D9B6F);
}

.df-tool-card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    background: rgba(13, 155, 111, 0.1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--colors-brand-green, #0D9B6F);
}

.df-tool-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: #0f172a;
}

.df-tool-card__desc {
    font-size: 0.95rem;
    color: #475569;
    flex-grow: 1;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

.df-tool-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--colors-brand-green, #0D9B6F);
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   FILTERS & SEARCH
   -------------------------------------------------------------------------- */
.df-filters-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.df-filters-wrap::-webkit-scrollbar {
    height: 6px;
}

.df-filters-wrap::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

@media (min-width: 1024px) {
    .df-filters-wrap {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.df-filter-chip {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.df-filter-chip:hover {
    border-color: var(--colors-brand-green, #0D9B6F);
    color: #0f172a;
}

.df-filter-chip.is-active {
    background: rgba(13, 155, 111, 0.1);
    border-color: var(--colors-brand-green, #0D9B6F);
    color: var(--colors-brand-green, #0D9B6F);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   WORKFLOW CARDS
   -------------------------------------------------------------------------- */
.df-workflow-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.df-workflow-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.df-workflow-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.df-workflow-arrow {
    color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   TOOL WORKSPACE (Form + Result Layout)
   -------------------------------------------------------------------------- */
.df-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    background: #f8fafc;
    border-radius: 16px;
    padding: var(--spacing-xl);
    border: 1px solid #e2e8f0;
}

@media (min-width: 1024px) {
    .df-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.df-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

.df-panel__title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------------------------------------------------------------
   FORM ELEMENTS
   -------------------------------------------------------------------------- */
.df-form-group {
    margin-bottom: var(--spacing-md);
}

.df-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.95rem;
}

.df-input,
.df-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.df-input:focus,
.df-select:focus {
    outline: none;
    border-color: var(--colors-brand-green, #0D9B6F);
    box-shadow: 0 0 0 3px rgba(13, 155, 111, 0.1);
}

.df-file-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: var(--spacing-2xl);
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.df-file-dropzone:hover,
.df-file-dropzone.is-dragover {
    border-color: var(--colors-brand-green, #0D9B6F);
    background: rgba(13, 155, 111, 0.05);
}

.df-file-input {
    display: none;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.df-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    font-family: inherit;
    gap: 8px;
}

.df-btn--primary {
    background: var(--colors-brand-green, #0D9B6F);
    color: #ffffff;
}

.df-btn--primary:hover {
    background: #0b805b;
}

.df-btn--secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.df-btn--secondary:hover {
    background: #e2e8f0;
}

/* --------------------------------------------------------------------------
   RESULTS & SCORES
   -------------------------------------------------------------------------- */
.df-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--colors-brand-green) var(--score-deg, 0deg), #e2e8f0 0deg);
    position: relative;
    margin: 0 auto var(--spacing-lg);
}

.df-score-circle::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: #ffffff;
    border-radius: 50%;
}

.df-score-value {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 800;
    color: var(--colors-brand-green);
}

.df-score-label {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.df-result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.df-result-label {
    color: #64748b;
    font-weight: 500;
}

.df-result-value {
    font-weight: 700;
    color: #0f172a;
}

.df-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.df-status--success {
    background: #dcfce7;
    color: #166534;
}

.df-status--warning {
    background: #fef08a;
    color: #854d0e;
}

.df-status--error {
    background: #fee2e2;
    color: #991b1b;
}

/* --------------------------------------------------------------------------
   HERO VALUE CARDS
   -------------------------------------------------------------------------- */
.df-hero-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md, 16px);
    max-width: 1200px;
    margin: 32px auto 0;
    text-align: left;
}

@media (min-width: 640px) {
    .df-hero-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .df-hero-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.df-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    position: relative;
    overflow: hidden;
}

.df-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hero-accent, var(--colors-brand-green, #0D9B6F));
    opacity: 0.8;
}

.df-hero-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(13, 155, 111, 0.12);
    border-color: var(--hero-accent, var(--colors-brand-green, #0D9B6F));
}

.df-hero-card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(13, 155, 111, 0.08);
}

.df-hero-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.df-hero-card__desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 16px;
    flex-grow: 1;
}

.df-hero-card__link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--hero-accent, var(--colors-brand-green, #0D9B6F));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.df-hero-card:hover .df-hero-card__link {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   TIMELINE WORKFLOWS
   -------------------------------------------------------------------------- */
.df-workflow-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

@media (min-width: 1024px) {
    .df-workflow-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.df-workflow-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.df-workflow-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.df-workflow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.df-workflow-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
}

.df-workflow-item--highlight .df-workflow-badge {
    background: rgba(13, 155, 111, 0.12);
    color: #0D9B6F;
}

.df-workflow-item__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.df-workflow-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

@media (min-width: 480px) {
    .df-workflow-timeline {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
    }
}

.df-workflow-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    position: relative;
    flex: 1;
}

@media (min-width: 480px) {
    .df-workflow-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }
}

.df-workflow-step__circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
    z-index: 2;
    transition: all 0.2s ease;
}

.df-workflow-step:first-child .df-workflow-step__circle {
    background: rgba(13, 155, 111, 0.1);
    color: #0D9B6F;
    border-color: #0D9B6F;
}

.df-workflow-step:last-child .df-workflow-step__circle {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.df-workflow-step__content {
    display: flex;
    flex-direction: column;
}

.df-workflow-step__name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.df-workflow-step__desc {
    font-size: 0.75rem;
    color: #64748b;
}

.df-workflow-arrow-sep {
    display: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 1.1rem;
    align-self: center;
    margin-top: -16px;
}

@media (min-width: 480px) {
    .df-workflow-arrow-sep {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   EXTERNAL AI TOOLS GRID
   -------------------------------------------------------------------------- */
.df-ai-tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

@media (min-width: 640px) {
    .df-ai-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .df-ai-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.df-ai-tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.df-ai-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    border-color: #38bdf8;
}

.df-ai-tool-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.df-ai-tool-card__logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 6px;
}

.df-ai-tool-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.df-ai-tool-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.df-ai-tool-card__desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.df-ai-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.df-ai-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
}

.df-ai-tag--primary {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.df-ai-tag--green {
    background: rgba(13, 155, 111, 0.1);
    color: #0D9B6F;
}

.df-ai-tool-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

/* --------------------------------------------------------------------------
   ACADEMY BANNER
   -------------------------------------------------------------------------- */
.df-academy-banner {
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%);
    border-radius: 18px;
    padding: 36px 32px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    margin: 40px 0;
    box-shadow: 0 12px 30px rgba(3, 105, 161, 0.2);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .df-academy-banner {
        flex-direction: row;
        align-items: center;
        padding: 32px 40px;
    }
}

.df-academy-banner::after {
    content: '🎓';
    position: absolute;
    right: 20px;
    bottom: -15px;
    font-size: 8rem;
    opacity: 0.08;
    pointer-events: none;
}

.df-academy-banner__content {
    max-width: 680px;
}

.df-academy-banner__badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.df-academy-banner__title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
    line-height: 1.3;
}

.df-academy-banner__desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

.df-academy-banner__btn {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
    flex-shrink: 0;
}

.df-academy-banner__btn:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.df-hidden {
    display: none !important;
}

.df-text-center {
    text-align: center;
}

.df-mt-4 {
    margin-top: 1rem;
}

.df-mb-4 {
    margin-bottom: 1rem;
}