/* ==========================================================================
   1. Global Styles & Theme Variables
   ========================================================================== */
:root {
    --font-family-headings: 'Roboto Serif', serif;
    --font-family-body: 'Roboto', sans-serif;
    --background-main: #1A2238;
    --background-secondary: #222E50;
    --accent-purple: #9F70FD;
    --accent-purple-hover: #7F58D6;
    --text-primary: #F4F7FC;
    --border-color: #4A5568;
}

body {
    font-family: var(--font-family-body);
    background-color: var(--background-main);
    color: var(--text-primary);
    margin: 0;
}

h1, h2, h3, h4, h5 { font-family: var(--font-family-headings); color: var(--text-primary); font-weight: 700; }
h1 { font-size: 2.5rem; text-align: center; margin-bottom: 2rem; }
hr { border: 0; border-top: 1px solid var(--border-color); margin: 1rem 0; }

/* ==========================================================================
   2. Components (Buttons)
   ========================================================================== */
.roadmap-button {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    background-color: var(--accent-purple); color: white; padding: 8px 16px;
    border-radius: 20px; text-decoration: none; font-family: var(--font-family-body);
    font-weight: 700; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.roadmap-button:hover { background-color: var(--accent-purple-hover); transform: translateY(-2px); color: white; }

.button-primary {
    display: inline-block; margin: 20px 0; padding: 10px 20px;
    background-color: var(--accent-purple); color: white;
    font-family: var(--font-family-headings); font-weight: 700;
    text-decoration: none; border-radius: 5px;
    transition: background-color 0.2s; cursor: pointer;
}
.button-primary:hover { background-color: var(--accent-purple-hover); color: white; }

/* ==========================================================================
   3. Dashboard Page - ROBUST & RESPONSIVE Flexbox Layout
   ========================================================================== */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This centers the group of tiles */
    gap: 30px; /* This creates consistent spacing on all screen sizes */
    
    /* --- THIS IS THE FIX --- */
    /* MOBILE-FIRST PADDING: Use a smaller padding by default */
    padding: 10px;
}

/* MOBILE-FIRST STYLES (DEFAULT) */
.tile-link {
    text-decoration: none;
    display: flex;
    width: 100%; /* On mobile, the link takes the full width of the container */
}

/* DESKTOP OVERRIDE */
@media (min-width: 768px) {
    .dashboard-container {
        /* On larger screens, restore the more generous padding */
        padding: 30px;
    }

    .tile-link {
        /* On larger screens, revert to the fixed width */
        width: 380px;
    }
}

.summary-tile {
    background-color: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
    
    display: flex;
    flex-direction: column;
    width: 100%; /* The tile always fills its parent link */
}

.summary-tile:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.summary-tile h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* ==========================================================================
   4. Detail Page Styles
   ========================================================================== */

/* --- MOBILE-FIRST STYLES (DEFAULT) --- */
.detail-section {
    /* On mobile, the section takes up the full width for a better fit */
    width: 100%;
    margin: 2rem auto;
    padding-bottom: 30px;
}

/* --- DESKTOP OVERRIDE --- */
@media (min-width: 768px) {
    .detail-section {
        /* On larger screens, revert to the 90% width for a centered look */
        width: 90%;
    }
}

.summary-table {
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    margin-top: 15px;
    border-radius: 8px;
    background-color: var(--background-secondary);
}