:root {
    --primary-color: #4338ca; /* Darker indigo for sophistication */
    --accent-color: #06b6d4; /* Brighter cyan for vibrancy */
    --text-color: #1e1b4b; /* Deeper navy for contrast */
    --secondary-text: #475569; /* Slightly darker for readability */
    --bg-light: #f1f5f9; /* Softer off-white for elegance */
    --bg-white: #ffffff;
    --shadow-color: rgba(30, 30, 60, 0.1);
    --gradient-bg: linear-gradient(135deg, #e0e7ff 0%, #bae6fd 100%); /* Richer gradient */
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 400;
}

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0;
    background: var(--bg-white);
    box-shadow: 0 6px 20px var(--shadow-color);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    line-height: 1.0;
}

.logo {
    width: 80px; /* Larger logo for impact */
    height: 80px;
    margin-right: 1.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

p {
    display: block;
    margin-block-start: 0em;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

h1 {
    font-size: 2.5rem; /* Larger for prominence */
    font-weight: 900;
    letter-spacing: 1.5px;
    margin: 0;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-left: 1rem;
    font-style: italic;
    font-weight: 500;
}

.categories {
    max-width: 1280px; /* Slightly wider for modern screens */
    margin: 3rem auto;
    background: var(--bg-white);
    border-radius: 1.2rem;
    box-shadow: 0 8px 24px var(--shadow-color);
    padding: 2.5rem;
    animation: fadeIn 0.5s ease-out;
}

.categories h2 {
    font-size: 2rem; /* Bolder heading */
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.category {
    background: var(--bg-light);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(60, 60, 120, 0.08);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.category:hover {
    box-shadow: 0 8px 24px rgba(60, 60, 120, 0.15);
    transform: translateY(-6px);
    border-color: var(--accent-color);
}

.category-title {
    font-size: 1.6rem; /* Larger for emphasis */
    font-weight: 800;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-title:hover {
    color: var(--accent-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.category-title::after {
    content: '\25BE'; /* Down arrow */
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.category-title[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.subcategories {
    margin-top: 1.5rem;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    list-style: none;
    padding: 0;
}

.subcategories.active {
    max-height: none;
    opacity: 1;
    padding-bottom: 1.5rem;
}

.subcategories a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
    position: relative;
}

.subcategories a:hover {
    color: var(--accent-color);
    padding-left: 0.8rem;
    background: linear-gradient(to right, rgba(6, 182, 212, 0.1), transparent);
}

footer {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-white));
    color: var(--secondary-text);
    font-size: 0.9rem;
    padding: 2rem 0;
    border-top: 2px solid var(--primary-color);
    margin-top: 3rem;
    box-shadow: 0 -4px 12px var(--shadow-color);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 0.0rem 0;
    }

    .logo {
        margin-right: 0;
        margin-bottom: 0.0rem;
        width: 44px;
        height: 44px;
    }

    h1 {
        font-size: 1.3rem;
        margin-bottom: 0.1rem;
    }

    .tagline {
        font-size: 0.95rem;
        margin-left: 0;
        margin-bottom: 0.0rem;
    }

    .categories {
        padding: 1.1rem;
        margin: 1rem;
    }

    #category-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category {
        padding: 0.7rem;
    }

    .category-title {
        font-size: 1.1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}