/*
   FILE: static/css/tools-section.css
   SECTION: Tools & Learning Cards
*/

/* --- Fonts & Base --- */
.w360-tools-section {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 60px 20px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.w360-tools-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Grid Layout --- */
.w360-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 32px;
}

/* --- General Card Styling --- */
.w360-tool-card {
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    /* Soft border for definition on white backgrounds */
    border: 1px solid rgba(0,0,0,0.02);
}

/* Header Area (Icon + Title) */
.w360-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.w360-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.w360-header-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.w360-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.w360-card-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 32px;
}

/* --- List Items (Shared) --- */
.w360-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.w360-list-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.w360-li-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.w360-li-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
}

.w360-li-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1E293B;
}

.w360-li-right {
    font-size: 0.85rem;
    color: #94A3B8;
    text-align: right;
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Action Button (Shared) --- */
.w360-card-btn {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    transition: opacity 0.2s ease;
    gap: 8px;
}

.w360-card-btn:hover {
    opacity: 0.9;
}

/* =========================================
   THEME: BLUE (ETF Screener)
   ========================================= */
.w360-theme-blue {
    background-color: #F0F5FF; /* Light blue tint */
}

.w360-theme-blue .w360-header-icon {
    background-color: #0B1C3E; /* Dark Navy */
}

.w360-theme-blue .w360-li-icon svg {
    fill: #3B82F6; /* Blue icons in list */
}

.w360-theme-blue .w360-card-btn {
    background-color: #0B1C3E; /* Dark Navy Button */
}

/* =========================================
   THEME: PURPLE (Learning Path)
   ========================================= */
.w360-theme-purple {
    background-color: #FDF4FF; /* Light pink/purple tint */
}

.w360-theme-purple .w360-header-icon {
    background-color: #9333EA; /* Vivid Purple */
}

.w360-theme-purple .w360-card-btn {
    background-color: #9333EA; /* Vivid Purple Button */
}

/* Progress Bar Area */
.w360-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.w360-ph-label { color: #1E293B; }
.w360-ph-stage { color: #9333EA; }

.w360-progress-track {
    background-color: #F3E8FF; /* Lighter purple track */
    height: 8px;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.w360-progress-fill {
    background: linear-gradient(90deg, #C084FC 0%, #9333EA 100%);
    width: 50%; /* 3 out of 6 */
    height: 100%;
    border-radius: 4px;
}

/* Learning Path List Specifics */
/* Completed */
.w360-li-status-completed svg {
    fill: #22C55E; /* Green Check */
    width: 20px; height: 20px;
}
.w360-li-status-completed + .w360-li-label {
    color: #1E293B;
}

/* Current (Active) */
.w360-list-item.w360-active-stage {
    border: 1px solid #9333EA;
    background-color: #FAF5FF; /* Very subtle highlight */
}
.w360-li-status-active {
    background-color: #9333EA;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.w360-li-status-active svg {
    fill: #fff;
    width: 10px; height: 10px;
}

/* Locked */
.w360-list-item.w360-locked-stage {
    opacity: 0.6;
    background-color: rgba(255,255,255,0.5);
}
.w360-li-status-locked svg {
    fill: #94A3B8;
    width: 18px; height: 18px;
}

/* --- Responsive Media Queries --- */
/* --- Responsive Media Queries --- */
@media (max-width: 900px) {
    /* Adjust container padding to ensure space on sides */
    .w360-tools-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .w360-tools-grid {
        /* Stack vertically */
        grid-template-columns: 1fr;
        gap: 32px;

        /* This centers the grid items if they have a max-width */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .w360-tool-card {
        padding: 30px 24px;

        /* Stop the card from stretching full width on tablets */
        max-width: 500px;

        /* Ensure it takes up available space up to the max-width */
        width: 100%;
    }
}

