/* Base Wrapper */
.ginkgo-experience-cards-wrapper {
    width: 100%;
    overflow: hidden;
}

.ginkgo-cards-container {
    display: grid;
    gap: 24px; /* default overridden by controls */
    width: 100%;
}

/* Layout A: 4-Column Grid */
.layout-a {
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
    .layout-a { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .layout-a { grid-template-columns: repeat(4, 1fr); }
}

/* Layout B: 3-Column Grid */
.layout-b {
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 768px) {
    .layout-b { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .layout-b { grid-template-columns: repeat(3, 1fr); }
}

/* Layout C: Bento Grid */
.layout-c {
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: minmax(300px, 1fr);
    grid-auto-flow: dense;
}
@media (min-width: 768px) {
    .layout-c {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}
@media (min-width: 1024px) {
    .layout-c .ginkgo-card:nth-child(5n+1),
    .layout-c .ginkgo-card:nth-child(5n+4) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Layout D: Horizontal Scroll */
.layout-d {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 20px; /* Space for scrollbar */
}
.layout-d::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}
.layout-d .ginkgo-card {
    flex: 0 0 350px; /* Overridden by controls */
    scroll-snap-align: start;
}

@media (max-width: 767px) {
    .layout-d .ginkgo-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
}

/* Base Card Styling */
.ginkgo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background-color: #1a1a1a;
    text-decoration: none;
    height: 450px; /* default overridden by controls */
    border-radius: 8px; /* default overridden by controls */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ginkgo-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.ginkgo-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
    z-index: 2;
    transition: background-color 0.4s ease;
}

/* Content Area */
.ginkgo-card-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.ginkgo-card-badge {
    align-self: flex-start;
    padding: 6px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: auto;
}

.ginkgo-card-text-group {
    margin-bottom: 20px;
}

.ginkgo-card-title {
    margin: 0 0 10px 0;
    font-family: inherit;
    font-weight: 400;
}

.ginkgo-card-desc {
    line-height: 1.5;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.3s ease;
}

.ginkgo-card-cta {
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
    transition: border-color 0.3s ease;
}

/* Hover Effects */
.ginkgo-card.hover-lift:hover {
    transform: translateY(-8px);
}

.ginkgo-card.hover-zoom:hover .ginkgo-card-img {
    transform: scale(1.08);
}

.ginkgo-card:hover .ginkgo-card-desc {
    max-height: 150px;
    opacity: 1;
    margin-top: 10px;
}