/*
 * layout.css
 * Contains styles for major page layout containers:
 * - #api-list grid
 * - .api-group sections
 * - #categories-nav sticky navigation
 */

#api-list {
  margin-top: 2em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5em;
}

.api-group {
    grid-column: 1 / -1;
    margin-top: 2.5em;
    margin-bottom: 1em;
    padding-bottom: 0.8em;
    border-bottom: 1px solid var(--border-color);
}

.api-group h2,
.api-group h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 2em;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 12px var(--accent-glow);
}
 .api-group h3 {
    font-size: 1.6em;
    font-weight: 600;
    margin-top: 1em;
 }
.api-group p.description {
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 0.5em;
}

#categories-nav {
    position: sticky;
    top: 0;
    background: var(--background-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 98;
    padding: 0.8em 1em;
    border: 1px solid var(--border-color-glass);
    border-top: none;
    border-left: none;
    border-right: none;
    margin-bottom: 2.5em;
    overflow-x: hidden; 
    overflow-y: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 1em;
    transition: all 0.3s ease;
}

body[data-theme="dark"] #categories-nav {
    background-color: rgba(0, 0, 0, 0.8); /* Specific for dark theme */
}

#categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.8em;
    overflow-x: hidden; 
    flex-grow: 1;
    scroll-behavior: smooth;
}

#categories-list li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95em;
    padding: 0.5em 0;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

#categories-list li a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

#categories-list li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-image: var(--gradient-accent);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

#categories-list li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

#categories-nav::-webkit-scrollbar,
#categories-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#categories-nav {
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}