/* Homepage-specific minimal styles extracted from templates */
/* Only apply translateY to container when it follows hero-section-container (homepage-layout only) */
.homepage-layout .hero-section-container~.container {
    transform: translateY(-18rem);
    margin-bottom: -18rem;
}

.homepage-content .breadcrumbs {
    padding: 0;
    margin-bottom: 2rem;
}

/* Homepage content styles - h1 styling handled by layout.css for hero section */

.homepage-content,
.error-content {
    h2 {
        font-size: 2rem;
        margin-top: 6rem;
        margin-bottom: 3rem;
        font-weight: 600;
    }

    .section-description {
        margin-top: -1rem;
        margin-bottom: 2.5rem;
    }

    .generic-group-container>main>article {
        padding: 0;
    }

}

.section-cards-grid article:hover {
    box-shadow: var(--box-shadow-hover);
}

/* Section cards on homepage */
.section-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.section-cards-grid .col {
    padding: 0;
}

.section-cards-grid article {
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    min-height: 20rem;
    background: color-mix(in srgb, var(--bg-panel) 40%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    margin-bottom: 0;

    &.section-card-nestable:hover {
        box-shadow: none;
    }
}

/* Videos grid layout */
.homepage-content .videos-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .homepage-content .videos-container {
        grid-template-columns: 1fr;
    }
}

/* Dita Topic title is rendered as h1 */
.homepage-content {

    .generic-group-container h1,
    .videos-container h1 {
        display: none;
    }

    .generic-group-container h2,
    .videos-container h2 {
        font-size: 1.5rem;
        padding-left: 0;
    }
}


/* Hero Section Styles */
.hero-section-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.hero-section {
    position: relative;
    z-index: 1;
    text-align: left;
    padding-bottom: 4rem;
}

.homepage-layout .hero-section {
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: color-mix(in srgb, var(--pico-color) 90%, transparent);
    /* text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3); */
    animation: fadeInUp 0.8s ease-out;
    text-align: left;
}

.hero-section p {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: color-mix(in srgb, var(--pico-color) 90%, transparent);
    max-width: 700px;

    line-height: 1.6;
    /* text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2); */
    animation: fadeInUp 0.8s ease-out 0.2s both;
    text-align: left;
}

/* Dark/Light mode text colors natively handled by var(--pico-color). */
/* Sitesection layout: use solid colors instead of transparent for better visibility */
.sitesection-layout .hero-section h1 {
    color: var(--pico-color);
}

.sitesection-layout .hero-section p {
    color: var(--pico-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    .hero-section-container .hero-section h1,
    .hero-section-container .hero-section p {
        animation: none;
    }
}