/* Base Timeline Styles */
.ggg-timeline {
    position: relative;
    width: 100%;
}

/* Timeline Body */
.ggg-timeline-body {
    position: relative;
}

/* Item Styles */
.ggg-timeline-item {
    position: relative;
}

/* Side Styles */
.ggg-timeline-side {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
}

/* Center Styles */
.ggg-timeline-center {
    position: relative;
    z-index: 1;
}

.ggg-timeline-line {
    position: absolute;
    background-color: #ccc;
}

.ggg-timeline-dot {
    position: absolute;
    border-radius: 50%;
    background-color: #333;
}

/* Vertical Styles (for fixed vertical and responsive on mobile) */
.ggg-timeline.vertical .ggg-timeline-body {
    display: flex;
    flex-direction: column;
}

.ggg-timeline.vertical .ggg-timeline-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
}

.ggg-timeline.vertical .ggg-timeline-center {
    min-width: max(var(--dot-size, 16px), var(--line-width, 8px));
}

.ggg-timeline.vertical .ggg-timeline-line {
    left: 50%;
    transform: translateX(-50%);
    width: var(--line-width, 8px);
}

.ggg-timeline.vertical .ggg-timeline-dot {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--dot-size, 16px);
    height: var(--dot-size, 16px);
}

.ggg-timeline.vertical .ggg-timeline-item.first .ggg-timeline-line {
    top: 50%;
    height: 50%;
}

.ggg-timeline.vertical .ggg-timeline-item.middle .ggg-timeline-line {
    top: 0;
    height: 100%;
}

.ggg-timeline.vertical .ggg-timeline-item.last .ggg-timeline-line {
    top: 0;
    height: 50%;
}

/* Horizontal Styles (for fixed horizontal and responsive on desktop/tablet) */
.ggg-timeline.horizontal .ggg-timeline-body {
    display: flex;
    flex-direction: row;
}

.ggg-timeline.horizontal .ggg-timeline-item {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: stretch;
    flex: 1;
    gap: 0;
}

.ggg-timeline.horizontal .ggg-timeline-center {
    min-height: max(var(--dot-size, 16px), var(--line-width, 8px));
}

.ggg-timeline.horizontal .ggg-timeline-line {
    top: 50%;
    transform: translateY(-50%);
    height: var(--line-width, 8px);
}

.ggg-timeline.horizontal .ggg-timeline-dot {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--dot-size, 16px);
    height: var(--dot-size, 16px);
}

.ggg-timeline.horizontal .ggg-timeline-item.first .ggg-timeline-line {
    left: 50%;
    width: 50%;
}

.ggg-timeline.horizontal .ggg-timeline-item.middle .ggg-timeline-line {
    left: 0;
    width: 100%;
}

.ggg-timeline.horizontal .ggg-timeline-item.last .ggg-timeline-line {
    left: 0;
    width: 50%;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .ggg-timeline.responsive .ggg-timeline-body {
        display: flex;
        flex-direction: row;
    }

    .ggg-timeline.responsive .ggg-timeline-item {
        display: grid;
        grid-template-rows: 1fr auto 1fr;
        align-items: stretch;
        flex: 1;
        gap: 0;
    }

    .ggg-timeline.responsive .ggg-timeline-center {
        min-height: max(var(--dot-size, 16px), var(--line-width, 8px));
    }

    .ggg-timeline.responsive .ggg-timeline-line {
        top: 50%;
        transform: translateY(-50%);
        height: var(--line-width, 8px);
    }

    .ggg-timeline.responsive .ggg-timeline-dot {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: var(--dot-size, 16px);
        height: var(--dot-size, 16px);
    }

    .ggg-timeline.responsive .ggg-timeline-item.first .ggg-timeline-line {
        left: 50%;
        width: 50%;
    }

    .ggg-timeline.responsive .ggg-timeline-item.middle .ggg-timeline-line {
        left: 0;
        width: 100%;
    }

    .ggg-timeline.responsive .ggg-timeline-item.last .ggg-timeline-line {
        left: 0;
        width: 50%;
    }
}

@media (max-width: 767px) {
    .ggg-timeline.responsive .ggg-timeline-body {
        display: flex;
        flex-direction: column;
    }

    .ggg-timeline.responsive .ggg-timeline-item {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: stretch;
        gap: 0;
    }

    .ggg-timeline.responsive .ggg-timeline-center {
        min-width: max(var(--dot-size, 16px), var(--line-width, 8px));
    }

    .ggg-timeline.responsive .ggg-timeline-line {
        left: 50%;
        transform: translateX(-50%);
        width: var(--line-width, 8px);
    }

    .ggg-timeline.responsive .ggg-timeline-dot {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: var(--dot-size, 16px);
        height: var(--dot-size, 16px);
    }

    .ggg-timeline.responsive .ggg-timeline-item.first .ggg-timeline-line {
        top: 50%;
        height: 50%;
    }

    .ggg-timeline.responsive .ggg-timeline-item.middle .ggg-timeline-line {
        top: 0;
        height: 100%;
    }

    .ggg-timeline.responsive .ggg-timeline-item.last .ggg-timeline-line {
        top: 0;
        height: 50%;
    }
}

/* Content Styles */
.ggg-timeline-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
    width: 100%;
}

/* Improved Image Container Styles */
.ggg-timeline-content-image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

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

/* Image Alignment Support */
.ggg-timeline-content-image {
    justify-content: center; /* Default center alignment */
}

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

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

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

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

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

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

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

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

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

.ggg-image-mask-star .ggg-timeline-content-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-timeline-content-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-timeline-content-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-timeline-content-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-timeline-content-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-timeline-content-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-timeline-content-title {
    font-size: 18px;
    margin: 10px 0 5px;
}

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

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

/* Button Styles */
.ggg-timeline-content-button {
    display: inline-block;
    padding: 10px 18px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    align-self: center;
}

/* Separate Item Styles */
.ggg-timeline-separate {
    margin-bottom: 20px;
    text-align: center;
}

.ggg-timeline-separate.last {
    margin-top: 20px;
}

/* Fixed Responsive adjustments - REMOVED !important overrides */
@media (max-width: 1024px) {
    .ggg-timeline .ggg-timeline-content-image img {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .ggg-timeline .ggg-timeline-content-image img {
        width: 100%;
    }
    
    /* Keep text center on mobile but preserve image alignment */
    .ggg-timeline-content {
        text-align: center;
    }
    
    /* Allow image alignment to work independently */
    .ggg-timeline-content-image {
        justify-content: inherit;
    }
    
    .ggg-timeline-content-button {
        align-self: center;
    }
}