/* Container Base Styles */
.ggg-dynamic-list {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Container Width Classes */
.ggg-container-width-auto .ggg-dynamic-list {
    width: auto;
    display: inline-grid;
    justify-content: flex-start;
}

.ggg-container-width-full .ggg-dynamic-list {
    width: 100%;
    display: grid;
}

/* Container Alignment Helpers */
.ggg-dynamic-list[class*="align-items-flex-start"] {
    align-items: flex-start;
}

.ggg-dynamic-list[class*="align-items-center"] {
    align-items: center;
}

.ggg-dynamic-list[class*="align-items-flex-end"] {
    align-items: flex-end;
}

.ggg-dynamic-list[class*="align-items-stretch"] {
    align-items: stretch;
}

.ggg-dynamic-list[class*="justify-content-left"] {
    justify-content: flex-start;
}

.ggg-dynamic-list[class*="justify-content-center"] {
    justify-content: center;
}

.ggg-dynamic-list[class*="justify-content-right"] {
    justify-content: flex-end;
}

/* Card Base Styles with Flexbox for Vertical Alignment */
.ggg-card {
    padding: 15px;
    background: #fff;
    transition: all 0.3s;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Vertical Alignment Classes for Cards */
.ggg-card[class*="justify-content-flex-start"] {
    justify-content: flex-start;
}

.ggg-card[class*="justify-content-center"] {
    justify-content: center;
}

.ggg-card[class*="justify-content-flex-end"] {
    justify-content: flex-end;
}

.ggg-card[class*="justify-content-space-between"] {
    justify-content: space-between;
}

/* Text Alignment Classes for Cards */
.ggg-card[class*="text-align-left"] {
    text-align: left;
}

.ggg-card[class*="text-align-center"] {
    text-align: center;
}

.ggg-card[class*="text-align-right"] {
    text-align: right;
}

/* Ensure content stretches properly */
.ggg-card > * {
    width: 100%;
}

/* Image Container Styles */
.ggg-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ggg-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Image Mask Styles */
.ggg-image-mask-circle .ggg-card-image {
    border-radius: 50%;
}

.ggg-image-mask-circle .ggg-card-image img {
    border-radius: 50%;
}

.ggg-image-mask-square .ggg-card-image {
    border-radius: 0;
}

.ggg-image-mask-square .ggg-card-image img {
    border-radius: 0;
}

.ggg-image-mask-rectangle .ggg-card-image {
    border-radius: 0;
}

.ggg-image-mask-rectangle .ggg-card-image img {
    border-radius: 0;
}

.ggg-image-mask-rounded .ggg-card-image {
    border-radius: 15%;
}

.ggg-image-mask-rounded .ggg-card-image img {
    border-radius: 15%;
}

.ggg-image-mask-star .ggg-card-image {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    -webkit-clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ggg-image-mask-star .ggg-card-image img {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    -webkit-clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ggg-image-mask-triangle .ggg-card-image {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.ggg-image-mask-triangle .ggg-card-image img {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.ggg-image-mask-hexagon .ggg-card-image {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    -webkit-clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ggg-image-mask-hexagon .ggg-card-image img {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    -webkit-clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ggg-card-title {
    font-size: 18px;
    margin: 10px 0 5px;
}

.ggg-card-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ggg-card-description {
    font-size: 13px;
    color: #333;
    margin-bottom: 15px;
}

/* Button Styles with Alignment Support */
.ggg-card-button {
    display: inline-block;
    padding: 10px 18px;
    background: var(--e-global-color-primary);
    color: var(--e-global-color-text);
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    align-self: flex-start;
}

/* Button Alignment based on parent text-align */
.ggg-card[class*="text-align-center"] .ggg-card-button {
    align-self: center;
}

.ggg-card[class*="text-align-right"] .ggg-card-button {
    align-self: flex-end;
}

.ggg-card-button:hover {
    background: transparent;
    color: var(--e-global-color-primary);
    border: solid 1px var(--e-global-color-primary);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .elementor-widget-ggg_dynamic_list .ggg-card-image img {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    .elementor-widget-ggg_dynamic_list .ggg-card-image img {
        width: 100% !important;
    }
    
    .ggg-card {
        text-align: center !important;
    }
    
    .ggg-card-button {
        align-self: center !important;
    }
}