:root {
    /* Modern Material Design 3 (M3) Color Tokens */
    --md-sys-color-primary: #6750a4;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #eaddff;
    --md-sys-color-on-primary-container: #21005d;
    --md-sys-color-secondary-container: #e8def8;
    --md-sys-color-on-secondary-container: #1d192b;
    --md-sys-color-surface: #fdfcff;
    --md-sys-color-surface-container-lowest: #ffffff;
    --md-sys-color-surface-container-low: #f7f2fa;
    --md-sys-color-surface-container: #f3edf7;
    --md-sys-color-surface-container-high: #ece6f0;
    --md-sys-color-on-surface: #1c1b1f;
    --md-sys-color-on-surface-variant: #49454f;
    --md-sys-color-outline: #79747e;
    --md-sys-color-outline-variant: #cac4d0;
    --md-sys-color-error: #b3261e;

    /* Material Shapes */
    --md-shape-corner-small: 8px;
    --md-shape-corner-medium: 12px;
    --md-shape-corner-large: 16px;
    --md-shape-corner-extra-large: 28px;
    --md-shape-corner-full: 100px;

    /* Material Elevation (Soft Shadows) */
    --md-elevation-1: 0px 1px 2px 0px rgba(0,0,0,0.3), 0px 1px 3px 1px rgba(0,0,0,0.15);
    --md-elevation-2: 0px 1px 2px 0px rgba(0,0,0,0.3), 0px 2px 6px 2px rgba(0,0,0,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* 
===========================================
   LIGHT ELEVATED HEADER (Image Integration) 
===========================================
*/
header {
    background: var(--md-sys-color-surface-container-lowest);
    padding: 0.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--md-elevation-2);
}

.brand-logo {
    height: 82px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.header-nav {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: var(--md-shape-corner-full);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--md-sys-color-surface-container-high); 
    color: var(--md-sys-color-on-surface);
}

.nav-link.active {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.nav-link.primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-weight: 600;
}

.nav-link.primary:hover {
    background-color: #5d4896;
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elevation-1);
}

/* Dashboard Expansive Container Override */
.container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 3rem 3rem !important;
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
    flex: 1 0 auto;
    width: 100%;
}

/* Top Grid for Quick Access */
.top-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.access-card {
    padding: 2.5rem 2rem;
    border-radius: var(--md-shape-corner-extra-large);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.access-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-elevation-2);
}

.access-card.primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.access-card.secondary {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.access-card.outline {
    background: transparent;
    border: 2px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
}
.access-card.outline:hover {
    background: var(--md-sys-color-surface-container-low);
}

.access-icon { font-size: 2.5rem; }
.access-card h3 { font-size: 1.35rem; font-weight: 500; margin: 0; }
.access-card p { font-size: 0.95rem; margin: 0; opacity: 0.9; line-height: 1.4; }

/* Section Headings */
.section-title {
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--md-sys-color-on-surface);
}

.section-title a {
    font-size: 0.875rem;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--md-shape-corner-full);
}

.section-title a:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

/* Quick Category Grid - Strict 6 columns max per row */
.category-quick-grid { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 1rem; 
}

.cat-quick-card { 
    background: var(--md-sys-color-surface-container-low); 
    border: 1px solid var(--md-sys-color-outline-variant); 
    padding: 1.5rem 1rem; 
    border-radius: var(--md-shape-corner-medium); 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    text-decoration: none; 
    color: var(--md-sys-color-on-surface); 
    display: block;
}

.cat-quick-card:hover { 
    background: var(--md-sys-color-surface-container-high); 
    transform: translateY(-2px); 
    box-shadow: var(--md-elevation-1); 
}

.cat-icon { 
    font-size: 2rem; 
    margin-bottom: 0.4rem; 
    display: block; 
}

.cat-title { 
    font-weight: 500; 
    font-size: 0.85rem; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media(max-width: 1200px) {
    .category-quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 768px) {
    .category-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hero / Intro Section */
.hero-section {
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-extra-large);
    padding: 4rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-section h2 { font-size: 2.2rem; font-weight: 400; color: var(--md-sys-color-on-surface); margin-bottom: 1rem; }
.hero-section p { font-size: 1.05rem; max-width: 800px; color: var(--md-sys-color-on-surface-variant); line-height: 1.6; margin-bottom: 3rem; }

.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
    width: 100%;
    text-align: left;
}
.feature-box { 
    background: var(--md-sys-color-surface-container); 
    padding: 2rem; 
    border-radius: var(--md-shape-corner-large);
}
.feature-box h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--md-sys-color-on-surface); }
.feature-box p { color: var(--md-sys-color-on-surface-variant); }

/* Material Filled Cards */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.software-card {
    background-color: var(--md-sys-color-surface-container);
    border-radius: var(--md-shape-corner-large);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.software-card:hover {
    background-color: var(--md-sys-color-surface-container-high);
    box-shadow: var(--md-elevation-1);
    cursor: pointer;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    font-size: 2rem;
    background: var(--md-sys-color-surface-container-lowest);
    padding: 0.8rem;
    border-radius: var(--md-shape-corner-medium);
    color: var(--md-sys-color-primary);
}

.card-title h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    color: var(--md-sys-color-on-surface);
}

.version-tag {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-secondary-container);
    background: var(--md-sys-color-secondary-container);
    padding: 0.2rem 0.5rem;
    border-radius: var(--md-shape-corner-small);
    font-weight: 500;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.download-btn {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 0.6rem 1.5rem;
    border-radius: var(--md-shape-corner-full);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-btn:hover {
    background: #5d4896; 
    box-shadow: var(--md-elevation-1);
}

/* 
===========================================
   REDESIGNED LIGHT FOOTER 
===========================================
*/
footer {
    background: var(--md-sys-color-surface-container-low);
    padding: 2.5rem 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
    width: 100%;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand p {
    line-height: 1.7;
    max-width: 450px;
    font-size: 0.95rem;
    margin-top: 0.1rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-links a {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.footer-links a:hover {
    color: var(--md-sys-color-primary);
    transform: translateX(4px);
}

@media(max-width: 768px) {
    .container { padding: 1.5rem !important; gap: 3rem; }
    .hero-section { padding: 2.5rem 1.5rem; }
    footer {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        gap: 3rem;
    }
}