/* ============================================================
   GM Timeline & Carousel — Stili base v1.7
   ============================================================ */

.gm-tc-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* ── Icona ──────────────────────────────────────────────────── */
.gm-tc-icon-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.gm-tc-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #7C1D4C;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gm-tc-icon i,
.gm-tc-icon svg {
    color: #ffffff;
    font-size: 20px;
    width: 20px;
}

/* ── Scheda ─────────────────────────────────────────────────── */
.gm-tc-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    position: relative; /* necessario per overlay e content */
    overflow: hidden;   /* mantiene overlay dentro border-radius */
}

/* Overlay immagine di sfondo */
.gm-tc-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Contenuto sopra l'overlay */
.gm-tc-card-content {
    position: relative;
    z-index: 1;
}

.gm-tc-title {
    margin: 0 0 6px;
    padding: 0;
    color: #30132E;
    font-size: 1.2em;
    font-weight: 700;
}

.gm-tc-subtitle {
    margin: 0 0 10px;
    padding: 0;
    color: #7C1D4C;
    font-weight: 600;
}

.gm-tc-text {
    margin: 0;
    color: #30132E;
}

/* ============================================================
   TIMELINE VERTICALE
   ============================================================ */
.gm-tc-wrapper.vertical {
    display: flex;
    flex-direction: column;
}

.gm-tc-wrapper.vertical .gm-tc-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 30px;
}

.gm-tc-wrapper.vertical.has-line .gm-tc-item:not(:last-child) .gm-tc-icon-wrap::after {
    content: '';
    display: block;
    width: 2px;
    background-color: #7C1D4C;
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -30px;
    z-index: 1;
}

/* ============================================================
   TIMELINE ORIZZONTALE
   ============================================================ */
.gm-tc-wrapper.horizontal:not(.gm-tc-carousel) {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-line-track-h {
    display: flex;
    align-items: center;
    height: 2px;
    margin: 0 28px;
}

.gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-line-track-h .gm-tc-line {
    height: 2px;
    flex: 1;
    background-color: #7C1D4C;
}

.gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-items-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

/* ============================================================
   CAROSELLO
   ============================================================ */

.gm-tc-wrapper.gm-tc-carousel {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding-left: 52px;
    padding-right: 52px;
}

.gm-tc-carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.gm-tc-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
    align-items: stretch;
}

.gm-tc-wrapper.gm-tc-carousel .gm-tc-slide {
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: auto;
}

.gm-tc-wrapper.gm-tc-carousel .gm-tc-slide .gm-tc-card {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.gm-tc-wrapper.gm-tc-carousel .gm-tc-slide .gm-tc-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.gm-tc-wrapper.gm-tc-carousel .gm-tc-slide .gm-tc-text {
    flex: 1 1 auto;
}

/* ── Frecce ─────────────────────────────────────────────────── */
.gm-tc-arrow {
    background-color: #7C1D4C;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
    transition: opacity 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.gm-tc-arrow-prev { left: 4px; }
.gm-tc-arrow-next { right: 4px; }

.gm-tc-arrow:hover    { opacity: 0.8; }
.gm-tc-arrow:disabled { opacity: 0.3; cursor: default; }

/* ── Pallini ─────────────────────────────────────────────────── */
.gm-tc-dots {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    box-sizing: border-box;
}

.gm-tc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cccccc;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background-color 0.2s;
}

.gm-tc-dot.active {
    background-color: #7C1D4C;
}

/* ============================================================
   EQUAL HEIGHT — timeline multi-colonna
   ============================================================ */
.gm-tc-wrapper.equal-height:not(.gm-tc-carousel) .gm-tc-item {
    align-items: stretch;
}
.gm-tc-wrapper.equal-height:not(.gm-tc-carousel) .gm-tc-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.gm-tc-wrapper.equal-height:not(.gm-tc-carousel) .gm-tc-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.gm-tc-wrapper.equal-height:not(.gm-tc-carousel) .gm-tc-text {
    flex: 1;
}
.gm-tc-wrapper.horizontal.equal-height:not(.gm-tc-carousel) .gm-tc-items-row {
    align-items: stretch;
}

/* ============================================================
   LINK SCHEDA & PULSANTE
   ============================================================ */
a.gm-tc-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
a.gm-tc-card-link:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.gm-tc-link-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 16px;
    background-color: #7C1D4C;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    transition: opacity 0.2s;
    align-self: flex-start;
}
.gm-tc-link-btn:hover {
    opacity: 0.85;
    text-decoration: none;
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 768px) {

    .gm-tc-wrapper.gm-tc-carousel {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 56px;
    }

    .gm-tc-arrow {
        top: auto !important;
        transform: none !important;
        bottom: 4px;
    }

    .gm-tc-arrow-prev {
        left: calc(50% - 48px) !important;
        right: auto;
    }

    .gm-tc-arrow-next {
        right: calc(50% - 48px) !important;
        left: auto;
    }

    .gm-tc-wrapper.horizontal:not(.gm-tc-carousel) {
        flex-direction: column;
    }
    .gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-items-row {
        flex-direction: column;
    }
    .gm-tc-wrapper.horizontal:not(.gm-tc-carousel) .gm-tc-line-track-h {
        display: none;
    }
}
