/* Start Here Page Styles - Mobile-first, Theme-aware, ADHD-friendly */

/* Start here page specific grid */
.grid.start-here-page {
    display: block; /* Simple block instead of grid */
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Container adjustments */
.start-here-container {
    width: 100%;
    padding: var(--space-lg) 0;
}

/* Main container when inside content article */
.content.start-here-container {
    padding: var(--space-lg) var(--space-xl);
}

/* Step container with fade-in animation */
.step-container {
    opacity: 1;
    transition: opacity var(--transition-base, 300ms);
}

/* Challenge tiles - Enhanced card styling */
.challenge-tile {
    min-height: 140px;
    cursor: pointer;
    /* Remove conflicting styles - let card class handle them */
    border: none !important;
    padding: 1.5rem !important;
    padding-top: 2rem !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    position: relative;
    /* Ensure proper background */
    background: #ffffff !important;
    background: var(--clr-surface, #ffffff) !important;
    /* Add explicit shadow */
    box-shadow: 0 3px 10px rgba(0, 10, 40, 0.05) !important;
}

/* Override card default color bar with varied colors */
.challenge-tile:nth-child(1)::before {
    background: linear-gradient(to right, var(--clr-indigo) 0%, var(--clr-indigo) 85%, rgba(91, 109, 251, 0.85) 100%);
}

.challenge-tile:nth-child(2)::before {
    background: linear-gradient(to right, var(--clr-mint) 0%, var(--clr-mint) 85%, rgba(68, 193, 184, 0.85) 100%);
}

.challenge-tile:nth-child(3)::before {
    background: linear-gradient(to right, #FFB347 0%, #FFB347 85%, rgba(255, 179, 71, 0.85) 100%);
}

.challenge-tile:nth-child(4)::before {
    background: linear-gradient(to right, #FF6B6B 0%, #FF6B6B 85%, rgba(255, 107, 107, 0.85) 100%);
}

.challenge-tile:nth-child(5)::before {
    background: linear-gradient(to right, #4ECDC4 0%, #4ECDC4 85%, rgba(78, 205, 196, 0.85) 100%);
}

.challenge-tile:nth-child(6)::before {
    background: linear-gradient(to right, #95E77E 0%, #95E77E 85%, rgba(149, 231, 126, 0.85) 100%);
}

/* Enhanced hover state */
.challenge-tile:hover,
.challenge-tile:focus {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 10, 40, 0.12) !important;
}

/* Focus state with accessibility */
.challenge-tile:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 109, 251, 0.3), 0 8px 20px rgba(0, 10, 40, 0.12) !important;
}

/* Ensure title styling within cards */
.challenge-tile .card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--clr-ink);
    margin: 0 0 0.5rem 0;
}

/* Ensure description styling */
.challenge-tile .card__content {
    font-size: 0.95rem;
    color: var(--clr-ink-light);
    margin: 0;
    line-height: 1.5;
}

/* Progress indicator spacing */
.progress-indicator {
    margin-bottom: var(--space-xl);
}

/* Theme-aware styling - Dark mode */
[data-theme="dark"] .challenge-tile {
    background: var(--clr-surface);
    color: var(--clr-ink);
}

/* Theme-aware styling - Light mode */
[data-theme="light"] .challenge-tile {
    background: var(--clr-surface);
    color: var(--clr-ink);
}

/* Challenge grid layout - Enhanced with better spacing */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0;
}

/* Ensure proper grid on medium screens */
@media (min-width: 768px) and (max-width: 1024px) {
    .challenge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Three columns on larger screens */
@media (min-width: 1025px) {
    .challenge-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Progress steps list */
.progress-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}

/* Individual step labels */
.progress-steps li {
    color: var(--clr-ink-light);
    opacity: 0.7;
}

/* Active step label */
.progress-steps li.active {
    font-weight: bold;
    color: var(--clr-indigo);
    opacity: 1;
}

/* Progress bar container */
.progress-bar {
    height: 8px;
    background-color: var(--clr-surface-alt);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

/* Progress bar fill */
.progress-fill {
    height: 100%;
    background-color: var(--clr-indigo);
    border-radius: 4px;
    width: 33.33%;
    transition: width var(--transition-base, 300ms) ease;
}

/* Ensure progress indicator works within article */
.content .progress-indicator {
    position: relative;
    margin: 0 0 var(--space-xl) 0;
}

/* Maintain challenge grid within article context */
.content .challenge-grid {
    margin: var(--space-lg) 0;
}

/* Remove grid rules since we're using display: block above */
/* Sidebar is now completely removed from HTML */

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .content.start-here-container {
        padding: var(--space-md);
    }
    
    .challenge-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        font-size: 0.9rem;
    }
}

/* Add styles for challenge tile content */
.challenge-tile h3 {
    margin: 0 0 var(--space-xs) 0;
    font-size: 1.1rem;
    color: var(--clr-ink);
}

.challenge-tile p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--clr-ink-light);
}

/* Plan card styles */
.plan-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: var(--space-lg);
    margin: var(--space-md) 0;
}

.plan-card h3 {
    margin: 0 0 var(--space-md) 0;
    color: var(--clr-ink);
}

.action-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}

.action-list li {
    padding: var(--space-sm);
    margin: var(--space-xs) 0;
    background: var(--clr-surface-alt);
    border-radius: 4px;
    border-left: 3px solid var(--clr-indigo);
}

.plan-resources {
    display: flex;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    flex-wrap: wrap;
}

.plan-resources .btn {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

/* Success message styles */
.success-message {
    text-align: center;
    padding: var(--space-xl);
}

.success-message h3 {
    color: var(--clr-mint);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.success-message p {
    margin-bottom: var(--space-lg);
    color: var(--clr-ink);
}

/* Button styles */
.btn-success {
    background: var(--clr-mint);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-base);
}

.btn-success:hover {
    background: var(--clr-mint-dark);
}

/* Debug status styling */
#debug-status {
    background: #ffe4b5;
    padding: var(--space-sm);
    margin: var(--space-sm) 0;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

/* Hide debug in production */
body:not(.debug-mode) #debug-status {
    display: none;
}

/* Entrance animations for challenge tiles */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply staggered animation to tiles */
.challenge-tile {
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.challenge-tile:nth-child(1) { animation-delay: 0.05s; }
.challenge-tile:nth-child(2) { animation-delay: 0.1s; }
.challenge-tile:nth-child(3) { animation-delay: 0.15s; }
.challenge-tile:nth-child(4) { animation-delay: 0.2s; }
.challenge-tile:nth-child(5) { animation-delay: 0.25s; }
.challenge-tile:nth-child(6) { animation-delay: 0.3s; }

/* Smooth page transitions */
.step-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Polish for main heading */
.step-container h1 {
    font-size: 2rem;
    color: var(--clr-ink);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
}

/* Ensure progress indicator full width */
.start-here-container .progress-indicator {
    width: 100%;
    max-width: none;
    margin: 0 0 2rem 0;
}

/* Improve progress bar visual */
.progress-bar {
    background: rgba(91, 109, 251, 0.1);
    height: 10px;
    border-radius: 5px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--clr-indigo) 0%, var(--clr-indigo-dark) 100%);
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Navigation context styles */
.plan-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--clr-surface-alt);
}

.btn-text {
    background: none;
    border: none;
    color: var(--clr-indigo);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.btn-text:hover {
    opacity: 0.8;
}

.challenge-label {
    font-weight: 600;
    color: var(--clr-ink);
}

/* Widget styles */
.widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 900;
    animation: fadeIn 0.3s ease-out;
    transition: opacity 0.3s;
}

.start-widget {
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-alt);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 280px;
    position: relative;
}

.widget-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--clr-ink-light);
    padding: 4px 8px;
    line-height: 1;
}

.widget-title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.widget-text {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--clr-ink-light);
}

@media (max-width: 480px) {
    .widget-container {
        left: 20px;
        right: 20px;
    }

    .start-widget {
        max-width: 100%;
    }
}