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

@media (min-width: 768px) {
    .hero-section-container~.homepage-content {
        transform: translateY(-18rem);
        margin-bottom: -18rem;
    }
}

.homepage-content .breadcrumbs {
    padding: 0;
}

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

.homepage-content,
.error-container {
    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;

    &.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;
    }
}

@media (min-width: 768px) {
    .homepage-content {
        padding: 3rem;
    }
}


/* 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;
    background: var(--pico-background-color);
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;

}

/* Animated background particles effect */
.hero-section-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;

    --x: calc(var(--posX, 0) * 1px);
    --y: calc(var(--posY, 0) * 1px);

    /* Base background using Pico's background color */
    background-color: var(--pico-background-color);

    /* Light mode: blurry dreamy waves */
    background-image:
        radial-gradient(ellipse 800px 400px at calc(50% + var(--x)) calc(10% + var(--y)), rgba(31, 41, 55, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 700px 350px at calc(30% - var(--x) * 1.2) calc(30% - var(--y) * 1.1), rgba(31, 41, 55, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 900px 450px at calc(70% + var(--x) * 0.8) calc(50% + var(--y) * 0.9), rgba(31, 41, 55, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 750px 380px at calc(20% - var(--x) * 1.1) calc(70% - var(--y) * 1.2), rgba(31, 41, 55, 0.13) 0%, transparent 68%),
        radial-gradient(ellipse 850px 420px at calc(80% + var(--x) * 0.9) calc(90% + var(--y) * 0.8), rgba(31, 41, 55, 0.11) 0%, transparent 72%);
    background-blend-mode: normal;
    filter: blur(40px);
    overflow: hidden;
}

/* Dark mode hero background - blurry dreamy waves */
:root[data-theme=dark] .hero-section-container::before,
:host[data-theme=dark] .hero-section-container::before {
    --x: calc(var(--posX, 0) * 1px);
    --y: calc(var(--posY, 0) * 1px);
    background-image:
        radial-gradient(ellipse 800px 400px at calc(50% + var(--x)) calc(10% + var(--y)), rgba(255, 255, 255, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 700px 350px at calc(30% - var(--x) * 1.2) calc(30% - var(--y) * 1.1), rgba(255, 255, 255, 0.15) 0%, transparent 65%),
        radial-gradient(ellipse 900px 450px at calc(70% + var(--x) * 0.8) calc(50% + var(--y) * 0.9), rgba(255, 255, 255, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 750px 380px at calc(20% - var(--x) * 1.1) calc(70% - var(--y) * 1.2), rgba(255, 255, 255, 0.16) 0%, transparent 68%),
        radial-gradient(ellipse 850px 420px at calc(80% + var(--x) * 0.9) calc(90% + var(--y) * 0.8), rgba(255, 255, 255, 0.14) 0%, transparent 72%);
    background-blend-mode: normal;
    filter: blur(60px);
}

@media (prefers-color-scheme: dark) {
    .hero-section-container::before {
        --x: calc(var(--posX, 0) * 1px);
        --y: calc(var(--posY, 0) * 1px);
        background-image:
            radial-gradient(ellipse 800px 400px at calc(50% + var(--x)) calc(10% + var(--y)), rgba(255, 255, 255, 0.18) 0%, transparent 60%),
            radial-gradient(ellipse 700px 350px at calc(30% - var(--x) * 1.2) calc(30% - var(--y) * 1.1), rgba(255, 255, 255, 0.15) 0%, transparent 65%),
            radial-gradient(ellipse 900px 450px at calc(70% + var(--x) * 0.8) calc(50% + var(--y) * 0.9), rgba(255, 255, 255, 0.12) 0%, transparent 70%),
            radial-gradient(ellipse 750px 380px at calc(20% - var(--x) * 1.1) calc(70% - var(--y) * 1.2), rgba(255, 255, 255, 0.16) 0%, transparent 68%),
            radial-gradient(ellipse 850px 420px at calc(80% + var(--x) * 0.9) calc(90% + var(--y) * 0.8), rgba(255, 255, 255, 0.14) 0%, transparent 72%);
        background-blend-mode: normal;
        filter: blur(60px);
    }

    :root[data-theme=light] .hero-section-container::before,
    :host[data-theme=light] .hero-section-container::before {
        background-image:
            radial-gradient(ellipse 800px 400px at calc(50% + var(--x)) calc(10% + var(--y)), rgba(31, 41, 55, 0.15) 0%, transparent 60%),
            radial-gradient(ellipse 700px 350px at calc(30% - var(--x) * 1.2) calc(30% - var(--y) * 1.1), rgba(31, 41, 55, 0.12) 0%, transparent 65%),
            radial-gradient(ellipse 900px 450px at calc(70% + var(--x) * 0.8) calc(50% + var(--y) * 0.9), rgba(31, 41, 55, 0.1) 0%, transparent 70%),
            radial-gradient(ellipse 750px 380px at calc(20% - var(--x) * 1.1) calc(70% - var(--y) * 1.2), rgba(31, 41, 55, 0.13) 0%, transparent 68%),
            radial-gradient(ellipse 850px 420px at calc(80% + var(--x) * 0.9) calc(90% + var(--y) * 0.8), rgba(31, 41, 55, 0.11) 0%, transparent 72%);
        background-blend-mode: normal;
        filter: blur(40px);
    }
}

@keyframes heroPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Floating elements decoration */
.hero-section-container::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}


.hero-section {
    position: relative;
    z-index: 1;
    text-align: left;
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;

}

.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) webkit-color-mix(in srgb, var(--pico-color) 90%, transparent);
    -webkit-color: color-mix(in srgb, var(--pico-color) 90%, transparent);
    -webkit-webkit-color-mix: 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) webkit-color-mix(in srgb, var(--pico-color) 90%, transparent);
    -webkit-color: color-mix(in srgb, var(--pico-color) 90%, transparent);
    -webkit-webkit-color-mix: 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;
}

:root[data-theme=dark] .hero-section h1,
html[data-theme=dark] .hero-section h1 {
    color: color-mix(in srgb, white 90%, transparent);
}

:root[data-theme=dark] .hero-section p,
html[data-theme=dark] .hero-section p {
    color: color-mix(in srgb, white 90%, transparent);
}

@media (prefers-color-scheme: dark) {
    .hero-section h1 {
        color: color-mix(in srgb, white 90%, transparent);
    }

    .hero-section p {
        color: color-mix(in srgb, white 90%, transparent);
    }
}

/* Sitesection layout: use solid colors instead of transparent for better visibility */
.homepage-content .hero-section h1 {
    color: var(--pico-color);
}

.homepage-content .hero-section p {
    color: var(--pico-color);
}

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

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

@media (max-width: 575px) {
    .hero-section-container .hero-section {
        padding: 1rem 2rem;
    }

    .hero-section-container::before {
        display: none;
    }

    .hero-section-container {
        background: none;
    }
}

/* Responsive adjustments */
@media (min-width: 576px) and (max-width: 768px) {
    .hero-section-container {
        min-height: 40vh;
        margin-bottom: 4rem;
        background: none;
    }

    .hero-section-container .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-section-container .hero-section h1 {
        margin-bottom: 1rem;
    }

    .hero-section-container::before {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1280px) {
    .hero-section-container .hero-section {
        padding: 4rem 4rem;
    }
}

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

    .hero-section-container::before,
    .hero-section-container::after {
        animation: none;
    }

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