/* ===================================
   MARKET INTELLIGENCE - DUE DILIGENCE
   Complete standalone styles
   =================================== */

/* ===================================
   SCOPE ALL FORM STYLES to .dd-section
   to prevent conflicts with styles.css
   =================================== */

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}
.breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: rgba(255,255,255,0.5); }
.breadcrumb span:last-child { color: var(--primary); font-weight: 500; }

/* --- Page Header --- */
.mi-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #0D1117 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}
.mi-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(200,168,104,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212,135,75,0.08) 0%, transparent 50%);
}
.mi-header .container { position: relative; z-index: 1; }
.mi-header .page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}
.mi-header .page-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    line-height: 1.6;
}
.header-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(200,168,104,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.feature-badge:hover {
    background: rgba(200,168,104,0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.badge-icon { font-size: 1.5rem; }
.feature-badge span:last-child { color: rgba(255,255,255,0.9); font-weight: 500; }

/* --- DD Section --- */
.dd-section {
    padding: 80px 0;
    background: var(--light);
}

/* --- Progress --- */
.progress-container { margin-bottom: 3rem; }
.progress-bar {
    width: 100%;
    height: 4px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    width: 0%;
    transition: width 0.5s ease;
}
.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.dd-section .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}
.dd-section .step.active { opacity: 1; }
.dd-section .step.completed { opacity: 0.7; }
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--secondary);
    transition: all 0.3s ease;
}
.dd-section .step.active .step-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(200,168,104,0.3);
}
.dd-section .step.completed .step-number {
    background: var(--accent);
    color: white;
}
.step-label {
    font-size: 0.9rem;
    color: var(--dark);
    text-align: center;
    font-weight: 500;
}

/* --- Form Container --- */
.dd-form-container {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* --- Form Steps --- */
.dd-form .form-step {
    display: none;
}
.dd-form .form-step.active {
    display: block;
    animation: ddFadeIn 0.5s ease;
}
@keyframes ddFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}
.step-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* --- Form Grid --- */
.dd-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.dd-form .form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 0.5rem;
}
.dd-form .form-group.full-width {
    grid-column: 1 / -1;
}

/* --- LABELS: Override the absolute positioning from styles.css --- */
.dd-form .form-group label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    display: block;
    line-height: 1.5;
    pointer-events: none;
    background: transparent;
    padding: 0;
}
.label-hint {
    display: block;
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
    line-height: 1.4;
}

/* --- INPUTS: Clean override --- */
.dd-form .form-group input,
.dd-form .form-group select,
.dd-form .form-group textarea {
    padding: 0.9rem 1.2rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    width: 100%;
    background-color: #fff !important;
    color: #1A2332 !important;
    box-sizing: border-box;
}
.dd-form .form-group input:focus,
.dd-form .form-group select:focus,
.dd-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200,168,104,0.1);
}

/* Kill the floating-label animation from styles.css */
.dd-form .form-group input:focus + label,
.dd-form .form-group input:valid + label,
.dd-form .form-group select:focus + label,
.dd-form .form-group select:valid + label,
.dd-form .form-group textarea:focus + label,
.dd-form .form-group textarea:valid + label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    font-size: 0.95rem !important;
    color: var(--secondary) !important;
    background: transparent !important;
    padding: 0 !important;
}

.dd-form .form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}
.dd-form .form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* --- Form Actions --- */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #F0F0F0;
}
.btn-prev, .btn-next, .btn-submit {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.btn-prev { background: #F5F5F5; color: var(--secondary); }
.btn-prev:hover { background: #E0E0E0; }
.btn-next, .btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    margin-left: auto;
}
.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200,168,104,0.3);
}

/* ===================================
   CLIENT TYPE SELECTOR
   =================================== */
.client-type-selector {
    margin: 2rem auto;
    max-width: 800px;
}
.client-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}
.client-type-card {
    border: 2px solid #E0E0E0;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}
.client-type-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C8A868, #8B7355);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.client-type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #C8A868;
}
.client-type-card:hover::before,
.client-type-card.selected::before {
    transform: scaleX(1);
}
.client-type-card.selected {
    border-color: #C8A868;
    background: linear-gradient(135deg, rgba(200,168,104,0.08), rgba(139,115,85,0.03));
    box-shadow: 0 5px 20px rgba(200,168,104,0.15);
}
/* Make cards and all children clickable */
.client-type-card,
.client-type-card * {
    pointer-events: auto;
}
.client-type-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}
.client-type-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a2332;
    font-family: 'Playfair Display', serif;
}
.client-type-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.client-type-features {
    margin-top: 1.5rem;
    text-align: left;
    background: rgba(248,249,250,0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid #C8A868;
}
.client-type-features strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #1a2332;
    font-size: 0.95rem;
}
.client-type-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.client-type-features li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
}
.client-type-features li::before {
    content: '\2713';
    color: #C8A868;
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
}
.individual-warning {
    background: linear-gradient(135deg, #FFF3CD, #FFEAA7);
    border: 2px solid #FFC107;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2.5rem 0;
    font-size: 0.95rem;
    color: #856404;
}
.individual-warning strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* ===================================
   RESULTS
   =================================== */
.results-header { text-align: center; margin-bottom: 3rem; }
.results-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}
.results-subtitle { color: #666; font-size: 1.1rem; }
.score-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(200,168,104,0.2);
}
.score-label { font-size: 1.2rem; opacity: 0.9; margin-bottom: 1rem; }
.score-value {
    font-size: 5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.score-rating { font-size: 2rem; margin-bottom: 0.5rem; }
.score-description { font-size: 1.1rem; opacity: 0.95; max-width: 500px; margin: 0 auto; }
.risk-badge-large {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.result-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #F0F0F0;
    transition: all 0.3s ease;
}
.result-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.result-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F0F0F0;
}
.result-icon { font-size: 2.5rem; }
.result-card-title { font-size: 1.3rem; font-weight: 600; color: var(--secondary); }
.result-metric {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F5F5F5;
}
.result-metric:last-child { border-bottom: none; }
.metric-label { color: #666; font-size: 0.95rem; }
.metric-value { font-weight: 600; color: var(--secondary); font-size: 0.95rem; }
.score-critical { color: #C0392B !important; }
.metric-critical { color: #C0392B !important; font-weight: 700; }
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}
.action-btn {
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}
.action-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}
.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200,168,104,0.3);
}
.action-btn-secondary {
    background: white;
    color: var(--secondary);
    border: 2px solid var(--primary) !important;
}
.action-btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .mi-header { padding: 100px 0 60px; }
    .mi-header .page-title { font-size: 2rem; }
    .dd-form-container { padding: 2rem 1.5rem; }
    .dd-form .form-grid { grid-template-columns: 1fr; }
    .progress-steps { gap: 0.5rem; }
    .step-label { font-size: 0.75rem; }
    .step-number { width: 35px; height: 35px; font-size: 0.9rem; }
    .step-title { font-size: 1.5rem; }
    .form-actions { flex-direction: column; }
    .btn-next, .btn-submit { margin-left: 0; width: 100%; }
    .results-grid { grid-template-columns: 1fr; }
    .score-value { font-size: 3.5rem; }
    .results-actions { flex-direction: column; }
    .action-btn { width: 100%; }
    .client-type-options { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .mi-header .page-title { font-size: 1.75rem; }
    .dd-form-container { padding: 1.5rem 1rem; }
    .score-value { font-size: 2.5rem; }
}