/*
   FILE: static/css/portfolios-section.css
   SECTION: Top Performing Portfolios
*/

/* --- Section Container --- */
.w360-top-portfolios {
    padding: 100px 0;
    background-color: #FAFBFC; /* Very light grey bg for contrast */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #333;
}

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

/* --- Section Header --- */
.w360-tp-header {
    text-align: center;
    margin-bottom: 60px;
}

.w360-tp-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0B1C3E; /* Dark Navy */
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.w360-tp-subtitle {
    font-size: 1.1rem;
    color: #64748B;
}

/* --- The Grid --- */
.w360-tp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row desktop */
    gap: 24px;
}

/* --- Card Styles --- */
.w360-tp-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.w360-tp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

/* Card Top: Title + Author vs Badge */
.w360-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.w360-info-left {
    display: flex;
    flex-direction: column;
}

.w360-p-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}

.w360-p-author {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* Green Percentage Badge */
.w360-p-badge {
    background-color: #DCFCE7; /* Light Green Bg */
    color: #16A34A; /* Green Text */
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Middle Stats: Risk & Sharpe */
.w360-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

/* Risk Level Dots */
.w360-risk-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.w360-stat-label {
    font-size: 0.75rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.w360-dots-wrapper {
    display: flex;
    gap: 4px;
}

.w360-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E2E8F0; /* Grey (empty) */
}

/* Dot Colors */
.w360-dot.yellow { background-color: #FACC15; }
.w360-dot.green  { background-color: #22C55E; }
.w360-dot.red    { background-color: #EF4444; }

/* Sharpe Ratio */
.w360-sharpe-box {
    text-align: right;
}

.w360-sharpe-val {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1;
}

/* Bottom Tags (Tickers) */
.w360-card-tags {
    margin-top: auto; /* Pushes to bottom if card height varies */
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.w360-ticker {
    background-color: #F1F5F9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .w360-tp-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards on tablet */
    }
}

@media (max-width: 600px) {
    .w360-tp-grid {
        grid-template-columns: 1fr; /* 1 card on mobile */
    }

    .w360-tp-title {
        font-size: 1.3rem;
    }
}
