/* === FSGV Programs Carousel === */

/* Carousel wrapper */
.fsgv-programs-carousel {
    width: 100%;
    padding: 10px 0 60px;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border: 0px;
}

/* Slider container */
.fsgv-programs-carousel .fsgv-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Viewport clips the scrolling track but not the arrow buttons */
.fsgv-programs-carousel .fsgv-slider-viewport {
    overflow: hidden;
    touch-action: pan-y;
}

/* Scrolling track */
.fsgv-programs-carousel .fsgv-slider-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Individual slide */
.fsgv-programs-carousel .fsgv-program-item {
    min-width: calc(100% / 3);
    flex-shrink: 0;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Program card */
.fsgv-programs-carousel .fsgv-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

/* Circular thumbnail */
.fsgv-programs-carousel .fsgv-thumbnail {
    border: 6px solid var(--programs-image-border-color, rgba(50, 193, 205, 1));
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 1000px;
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.fsgv-programs-carousel .fsgv-thumbnail:hover {
    border-color: var(--programs-image-hover-border-color, rgba(50, 193, 205, 1));
}

 .fsgv-programs .fsgv-thumbnail:hover {
    border-color: var(--wp--preset--color--base);
}

.fsgv-programs-carousel .fsgv-thumbnail img {
    position: absolute; 
    object-fit: cover;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

/* Title */
.fsgv-programs-carousel .fsgv-title {
    font-family: Montserrat, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0.05em;
    color: var(--programs-title-color, #00548b);
    margin: 0 0 12px;
    font-size: clamp(20px, 1.4rem + 1.3vw, 24px);
    line-height: 1.1em;
    width: 310px;
}

.fsgv-programs-carousel .fsgv-title a {
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
}

.fsgv-programs-carousel .fsgv-title a:hover {
    text-decoration: underline;
}

/* Excerpt */
.fsgv-programs-carousel .fsgv-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    max-width: 100%;
    width: 310px;
}

.fsgv-programs-carousel .fsgv-excerpt p {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    margin: 0;
}

/* Learn More link */
.fsgv-programs-carousel .fsgv-learn-more {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    width: 310px;
    max-width: 100%;
}

.fsgv-programs-carousel .fsgv-learn-more:hover {
    text-decoration: underline;
}

/* Prev / Next arrows */
.fsgv-programs-carousel .fsgv-slider-prev,
.fsgv-programs-carousel .fsgv-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.fsgv-programs-carousel .fsgv-slider-prev:hover,
.fsgv-programs-carousel .fsgv-slider-next:hover {
    opacity: 1;
}

.fsgv-programs-carousel .fsgv-slider-prev { left: 0; }
.fsgv-programs-carousel .fsgv-slider-next { right: 0; }

/* Dot navigation */
.fsgv-programs-carousel .slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.fsgv-programs-carousel .slider-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 0;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.fsgv-programs-carousel .slider-dots button.active {
    background: rgba(127,169,197,1);
}

/* === Responsive === */

@media (max-width: 991px) {
    .fsgv-programs-carousel .fsgv-program-item {
        min-width: calc(100% / 2);
    }
    .fsgv-programs-carousel .fsgv-thumbnail {
        width: 340px;
        height: 340px;
    }
    .fsgv-programs-carousel .fsgv-excerpt {
        width: 340px;
        padding: 0 20px;
    }
    .fsgv-programs-carousel .fsgv-title{width: 340px;max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 767px) {
    .fsgv-programs{
        position: relative;
        background-size: inherit !important;
        background-color: #ffffff;
    }
    .fsgv-programs-carousel .fsgv-program-item {
        min-width: 100%;
    }
    .fsgv-programs-carousel .fsgv-thumbnail {
        width: 340px;
        height: 340px;
        max-width: 100%;
    }
    .fsgv-programs-carousel .fsgv-excerpt {
        width: 340px;
        max-width: 100%;
    }
    .fsgv-programs-carousel .fsgv-title {
        width: 340px;
        max-width: 100%;
    }

    /* Arrows inline with dots on mobile */
    .fsgv-programs-carousel .fsgv-slider {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0;
    }
    .fsgv-programs-carousel .fsgv-slider-viewport {
        order: 1;
        flex: 0 0 100%;
    }
    .fsgv-programs-carousel .fsgv-slider-prev {
        position: static;
        transform: none;
        order: 2;
        flex: 0 0 auto;
        padding: 10px 20px;
    }
    .fsgv-programs-carousel .slider-dots {
        order: 3;
        flex: 1;
        margin-top: 0;
    }
    .fsgv-programs-carousel .fsgv-slider-next {
        position: static;
        transform: none;
        order: 4;
        flex: 0 0 auto;
        padding: 10px 20px;
    }
}

/* === Editor styles === */

.fsgv-programs-carousel-editor {
    padding: 20px;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border: 1px dashed #ccd0d4;
}

/* Lay out inner blocks as a row in the editor */
.fsgv-programs-carousel-editor .fsgv-slider-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
}

.fsgv-programs-carousel-editor .fsgv-slider-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > [data-block] {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    margin: 0 !important;
}

.fsgv-programs-carousel-editor .fsgv-slider-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > .block-list-appender {
    flex-basis: 100%;
}

/* Editor: arrows */
.fsgv-programs-carousel-editor .fsgv-slider-prev,
.fsgv-programs-carousel-editor .fsgv-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.fsgv-programs-carousel-editor .fsgv-slider-prev {
    left: 0;
}

.fsgv-programs-carousel-editor .fsgv-slider-next {
    right: 0;
}

/* Editor: slide card */
.fsgv-programs-carousel-editor .fsgv-program-item {
    min-width: calc(100% / 3);
    flex-shrink: 0;
    padding: 0 15px;
    box-sizing: border-box;
}

.fsgv-programs-carousel-editor .fsgv-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.fsgv-programs-carousel-editor .fsgv-thumbnail {
    border: 6px solid var(--programs-image-border-color, rgba(50, 193, 205, 1));
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 1000px;
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.fsgv-programs-carousel-editor .fsgv-thumbnail img {
    position: absolute;
    object-fit: cover;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.fsgv-programs-carousel-editor .fsgv-thumbnail--placeholder {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.fsgv-programs-carousel-editor .fsgv-title {
    font-family: Montserrat, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0.05em;
    color: var(--programs-title-color, #00548b);
    margin: 0 0 12px;
    font-size: clamp(20px, 1.4rem + 1.3vw, 24px);
    line-height: 1.1em;
    width: 310px;
}

.fsgv-programs-carousel-editor .fsgv-title a {
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    pointer-events: none;
}

.fsgv-programs-carousel-editor .fsgv-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    max-width: 100%;
    width: 310px;
}

.fsgv-programs-carousel-editor .fsgv-excerpt p {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    margin: 0;
}

.fsgv-programs-carousel-editor .fsgv-learn-more {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    pointer-events: none;
    width: 310px;
    max-width: 100%;
}

/* Constrain URL input and its container to the sidebar width */
.block-editor-url-input,
.block-editor-url-input__input,
.components-panel__body .components-input-control__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* === FSGV Programs (static grid) === */

.fsgv-programs {
    width: 100%;
    padding: 10px 0 60px;
    background-size: cover;
    background-repeat: no-repeat;
    border: 0px;
}

.fsgv-programs .fsgv-programs-grid {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.fsgv-programs .fsgv-program-item {
    width: calc(100% / 3);
    padding: 0 15px;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.fsgv-programs .fsgv-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.fsgv-programs .fsgv-thumbnail {
    border: 6px solid var(--programs-image-border-color, rgba(50, 193, 205, 1));
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 1000px;
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}



.fsgv-programs .fsgv-thumbnail img {
    position: absolute;
    object-fit: cover;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.fsgv-programs .fsgv-title {
    font-family: Montserrat, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(20px, 1.4rem + 1.3vw, 24px);
    line-height: 1.1em;
    letter-spacing: 0.05em;
    color: var(--programs-title-color, #00548b);
    margin: 0 0 12px;
    width: 310px;
    max-width: 100%;
}

.fsgv-programs .fsgv-title a {
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
}

.fsgv-programs .fsgv-title a:hover {
    text-decoration: underline;
}

.fsgv-programs .fsgv-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    max-width: 100%;
    width: 310px;
}

.fsgv-programs .fsgv-excerpt p {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    margin: 0;
}

/* Learn More link */
.fsgv-programs .fsgv-learn-more {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    width: 310px;
    max-width: 100%;
}

.fsgv-programs .fsgv-learn-more:hover {
    text-decoration: underline;
}

@media (max-width: 991px) {
    .fsgv-programs .fsgv-learn-more{width: 340px;max-width: 100%;}
    .fsgv-programs .fsgv-program-item {
        width: calc(100% / 2);
    }
    .fsgv-programs .fsgv-thumbnail {
        width: 340px;
        height: 340px;
    }
    .fsgv-programs .fsgv-excerpt {
        width: 340px;
    }
    .fsgv-programs .fsgv-title {
        width: 340px;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .fsgv-programs .fsgv-program-item {
        width: 100%;
    }
    .fsgv-programs .fsgv-thumbnail {
        width: 340px;
        height: 340px;
        max-width: 100%;
    }
    .fsgv-programs .fsgv-excerpt {
        width: 340px;
        max-width: 100%;
    }
    .fsgv-programs .fsgv-title {
        width: 340px;
        max-width: 100%;
    }
}

/* === Editor styles (Programs grid) === */

.fsgv-programs-editor {
    padding: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px dashed #ccd0d4;
}

.fsgv-programs-editor .fsgv-programs-grid-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
}

.fsgv-programs-editor .fsgv-programs-grid-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > [data-block] {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    margin: 0 !important;
}

.fsgv-programs-editor .fsgv-programs-grid-editor
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > .block-list-appender {
    flex-basis: 100%;
}

.fsgv-programs-editor .fsgv-program-item {
    padding: 0 15px;
    box-sizing: border-box;
}

.fsgv-programs-editor .fsgv-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.fsgv-programs-editor .fsgv-thumbnail {
    border: 6px solid var(--programs-image-border-color, rgba(50, 193, 205, 1));
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 1000px;
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.fsgv-programs-editor .fsgv-thumbnail img {
    position: absolute;
    object-fit: cover;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.fsgv-programs-editor .fsgv-thumbnail--placeholder {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.fsgv-programs-editor .fsgv-title {
    font-family: Montserrat, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(20px, 1.4rem + 1.3vw, 24px);
    line-height: 1.1em;
    letter-spacing: 0.05em;
    color: var(--programs-title-color, #00548b);
    margin: 0 0 12px;
    width: 310px;
    max-width: 100%;
}

.fsgv-programs-editor .fsgv-title a {
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    pointer-events: none;
}

.fsgv-programs-editor .fsgv-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    max-width: 100%;
    width: 310px;
}

.fsgv-programs-editor .fsgv-excerpt p {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.03em;
    color: var(--programs-desc-color, #3e415a);
    margin: 0;
}

.fsgv-programs-editor .fsgv-learn-more {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--programs-title-color, #00548b);
    text-decoration: none;
    pointer-events: none;
    width: 310px;
    max-width: 100%;
}
