/*
File: customstyle.css
Description: Extra CSS stylesheet for FrugalEDA documentation
*/

/* --- Navigation tweaks --- */
@media screen and (min-width: 76.25em) {
    [dir="ltr"] .md-nav__item--section > .md-nav {
        margin-left: 0; /* horizontal indent of nested nav items */
    }
}

.md-nav__link {
    margin-top: 0.325em; /* vertical spacing between links */
}

.md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link {
    margin-bottom: 1em; /* spacing after active item */
}

.md-nav__item--section {
    margin: 0 0 1.25em 0; /* spacing for parent sections */
}

/* --- Image styling --- */
.img-centered {
    display: block;
    margin: 1em auto; /* centers the image */
}

/* --- Card layout & spacing --- */
.grid.cards .md-content {
    padding: 1rem 1.25rem;
}

/* --- Card visual styling --- */
.grid.cards .md-card {
    border-radius: 1.5rem; /* increased rounding */
    padding: 1.25rem;
    background: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.05);
    overflow: hidden; /* clip children to rounded corners */
}

.grid.cards .md-card:hover {
    background: #6366f1; /* blue background */
    color: white;         /* white text */
    border-color: #6366f1; /* keep border same blue */
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.1);
}

/* Ensure all child elements inherit hover color */
.grid.cards .md-card:hover *,
.grid.cards .md-card:hover a {
    color: inherit !important;
    text-decoration: none;
}

/* --- Card titles & descriptions --- */
.grid.cards .md-card .md-card--title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem; /* tighter spacing under title */
}

.grid.cards .md-card .md-content p {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5rem;
}

/* --- Icon styling inside cards --- */
.grid.cards .md-icon {
    font-size: 2.5rem;
    color: #3f51b5; /* Indigo primary accent */
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Card links --- */
.grid.cards a {
    text-decoration: none;
    font-weight: 500;
    color: #1a73e8;
}

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

/* Card default styling */
.grid.cards li {
    border-radius: 1.5rem; /* increased rounding */
    padding: 1.25rem;
    background: #ffffff;
    color: #444;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.05);
    list-style: none;
    margin-bottom: 1rem;
    overflow: hidden; /* clip children to rounded corners */
}

/* Hover inversion */
.grid.cards li:hover {
    background: #1a73e8;   /* blue background */
    color: white;           /* text white */
    border-color: #1a73e8;
    transform: none;
    box-shadow: 0 14px 28px rgba(16,24,40,0.1);
}

/* Make all inner elements inherit hover color */
.grid.cards li:hover * {
    color: inherit !important;
}

.grid.cards li:hover a {
    color: inherit !important;
    text-decoration: underline; /* optional */
}


/* --- Hero section --- */
.hero {
    background: linear-gradient(135deg, #93c5fd 0%, #6366f1 100%); /* soft blue gradient */
    padding: 3rem 1.5rem;
    text-align: center;
    color: white;
    border-radius: 0 0 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- Buttons inside hero --- */
.hero .button-group {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero .md-button {
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.hero .md-button--primary {
    background: white;
    color: #6366f1;
}

.hero .md-button:hover {
    background: white;
    color: #6366f1;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* --- Responsive --- */
@media screen and (max-width: 768px) {
    .hero {
        padding: 2.5rem 1rem;
    }

    .hero .md-button {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
    }
}

/* Override default Material link hover color */
.md-content a {
    color: var(--md-accent-fg-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

.md-content a:hover {
    color: #ff4081; /* Custom hover color */
    text-decoration: underline;
}
