/*
   FILE: static/css/optimization-section.css
   SECTION: Smart Portfolio Optimization
*/

/* --- Main Section Wrapper --- */
.w360-optimization-section {
    padding: 100px 0;
    background-color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #333;
    overflow: hidden; /* Prevent horizontal scroll on small screens */
}

.w360-opt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.w360-opt-row {
    display: flex;
    align-items: center; /* Vertically center */
    justify-content: space-between;
    gap: 80px;
}

/* --- RIGHT COLUMN (Text Content) --- */
.w360-opt-content {
    flex: 1;
    max-width: 550px;
}

/* Badge: AI Powered */
.w360-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #F3E8FF; /* Light Purple */
    color: #9333EA; /* Darker Purple */
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.w360-opt-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0B1C3E; /* Dark Navy */
    margin-bottom: 15px;
    line-height: 1.2;
}

.w360-opt-desc {
    color: #64748B; /* Slate Grey */
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Feature List (Right Side) */
.w360-feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.w360-feat-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #F8F9FA;
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.2s;
}

.w360-feat-item:hover {
    background: #f0f2f5;
}

/* Feature Icons */
.w360-feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.w360-icon-navy { background-color: #0B1C3E; }
.w360-icon-orange { background-color: #F59E0B; }
.w360-icon-green { background-color: #10B981; }

.w360-feat-text h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.w360-feat-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748B;
}

/* CTA Button */
.w360-opt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #061C47; /* Navy */
    color: #fff;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.w360-opt-btn:hover {
    background-color: #0d2a63;
    transform: translateY(-2px);
    color: #fff;
}

/* --- LEFT COLUMN (Visual UI Card) --- */
.w360-opt-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* The Outer Frame (Greyish soft border) */
.w360-visual-frame {
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 500px;
}

/* The Inner Dashboard Card */
.w360-dash-card {
    background: #fff;
    width: 100%;
}

.w360-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.w360-dash-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
}

.w360-status-active {
    background: #F3E8FF;
    color: #9333EA;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dashboard List Items */
.w360-dash-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.w360-dash-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 12px;
    background-color: #F8F9FA; /* Default bg */
    border: 1px solid transparent; /* Placeholder for border */
}

/* The Active Item (Max Sharpe Ratio) */
.w360-dash-item.w360-selected {
    background-color: #ECFDF5; /* Very light green */
    border-color: #10B981; /* Green Border */
}

/* Item Left Side (Icon + Text) */
.w360-d-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.w360-d-icon {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.w360-d-icon.blue-i { color: #2563EB; background: #DBEAFE; }
.w360-d-icon.green-i { color: #059669; background: #D1FAE5; }
.w360-d-icon.orange-i { color: #EA580C; background: #FFEDD5; }

.w360-d-info h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.w360-d-info span {
    font-size: 0.75rem;
    color: #64748B;
}

/* Item Right Side (Stats) */
.w360-d-stat {
    text-align: right;
}

.w360-d-stat .w360-val {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0F172A;
}

.w360-d-stat .w360-label {
    font-size: 0.7rem;
    color: #94A3B8;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .w360-opt-row {
        flex-direction: column-reverse; /* Put Text on top, Visual on bottom? Or vice versa. Usually Text Top on mobile */
        text-align: center;
        gap: 50px;
    }

    .w360-opt-content, .w360-visual-frame {
        max-width: 100%;
    }

    /* Center the badge and list on mobile */
    .w360-ai-badge {
        margin: 0 auto 20px auto;
    }

    .w360-feat-item {
        text-align: left; /* Keep internal list text left aligned for readability */
    }

    .w360-opt-btn {
        width: 100%;
        justify-content: center;
    }
}
