/* Custom styling for m7kni.io */

/* Bold hero banner styling */
.hero {
    position: relative;
    overflow: hidden;
    margin: -0.6rem -0.6rem 2.5rem;
    padding: 3rem 2.5rem;
    border-radius: 0;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 50%, #7986cb 100%);
    box-shadow: 0 4px 20px rgba(63, 81, 181, 0.3);
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

[data-md-color-scheme="slate"] .hero {
    background: linear-gradient(135deg, #283593 0%, #3949ab 50%, #5c6bc0 100%);
    box-shadow: 0 4px 20px rgba(40, 53, 147, 0.5);
}

.hero .eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: white;
    line-height: 1.1;
}

[data-md-color-scheme="slate"] .hero h1 {
    color: white;
}

.hero > p {
    margin: 0 0 1.5rem;
    max-width: 60ch;
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Hero action buttons */
.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
}

.hero-actions .md-button {
    margin: 0;
    border-radius: 0.35rem;
    font-weight: 600;
}

.hero-actions .md-button--primary {
    background: white;
    color: #3f51b5;
    border-color: white;
}

.hero-actions .md-button--primary:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

.hero-actions .md-button:not(.md-button--primary):not(.md-button--secondary) {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.hero-actions .md-button:not(.md-button--primary):not(.md-button--secondary):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-actions .md-button--secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-actions .md-button--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Grid cards styling - Material theme compatible */
.md-typeset .grid.cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    margin: 1.5rem 0 2rem;
}

.md-typeset .grid.cards > ul {
    display: contents;
}

.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > li {
    list-style: none;
    background: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--md-primary-fg-color);
}

/* Card title styling */
.md-typeset .grid.cards > ul > li > p:first-child,
.md-typeset .grid.cards > li > p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card horizontal rule */
.md-typeset .grid.cards hr {
    margin: 0.75rem 0;
    border: none;
    border-top: 1px solid var(--md-default-fg-color--lightest);
}

/* Card link styling */
.md-typeset .grid.cards a {
    color: var(--md-primary-fg-color);
    text-decoration: none;
    font-weight: 500;
}

.md-typeset .grid.cards a:hover {
    text-decoration: underline;
}

/* Section headers */
.md-typeset h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--md-default-fg-color);
}

/* Code block improvements */
.md-typeset pre {
    border-radius: 0.4rem;
}

/* Navigation improvements */
.md-nav__title {
    font-weight: 600;
}

/* Search bar styling */
.md-search__input {
    border-radius: 0.3rem;
}

/* Footer improvements */
.md-footer {
    margin-top: 3rem;
}

/* Admonition styling */
.md-typeset .admonition {
    border-radius: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Table improvements */
.md-typeset table {
    border-radius: 0.4rem;
    overflow: hidden;
}

.md-typeset table th {
    background-color: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
    .hero {
        padding: 2rem 1.5rem;
        margin: -0.6rem -0.6rem 2rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero > p {
        font-size: 1rem;
    }

    .md-typeset .grid.cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Dark mode specific adjustments */
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > li {
    background: var(--md-default-bg-color--light);
    border-color: var(--md-default-fg-color--lighter);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > li:hover {
    border-color: var(--md-primary-fg-color);
}

/* Smooth transitions for theme switching */
body {
    transition: background-color 0.25s, color 0.25s;
}
