.sps-program-page,
.sps-program-page * {
    box-sizing: border-box;
}

:where(.sps-program-page) .sps-single-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0;
    background-color: #ffffff;
}

/* Breadcrumb */
:where(.sps-program-page) .sps-breadcrumb {
    background-color: #71c5b8;
    color: white;
    padding: 32px 110px;
    font-size: 14px;
    font-weight: 400;
}

:where(.sps-program-page) .sps-breadcrumb a {
    color: white;
    text-decoration: none;
}

:where(.sps-program-page) .sps-breadcrumb a:hover {
    text-decoration: underline;
}

:where(.sps-program-page) .sps-breadcrumb .separator {
    margin: 0 8px;
}

/* Main Content */
:where(.sps-program-page) .sps-main-content {
    padding: 30px;
}

/* Program Title */
:where(.sps-program-page) .sps-program-title {
    color: #399e97;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Description Section with Info Box */
:where(.sps-program-page) .sps-description-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, min(48%, 550px));
    gap: 12px;
    align-items: start;
}

:where(.sps-program-page) .sps-description-content {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

:where(.sps-program-page) .sps-description-content p {
    margin: 0 0 20px 0;
}

/* Action Buttons */
:where(.sps-program-page) .sps-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

:where(.sps-program-page) .sps-btn {
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

:where(.sps-program-page) .sps-btn-primary {
    background: #399e97 !important;
    color: white;
}

:where(.sps-program-page) .sps-btn-primary:hover {
    background-color: #6bc4b0;
    color: white;
    text-decoration: none;
}

:where(.sps-program-page) .sps-btn-outline {
    background-color: #f9f9f9;
    color: #399e97;
    border: 1px solid #71c5b8;
}

:where(.sps-program-page) .sps-btn-outline:hover {
    background-color: #71c5b8;
    color: white;
    text-decoration: none;
}

/* Info Box */
:where(.sps-program-page) .sps-info-box {
    background-color: #f9f9f9;
    border: 1px solid #f9f9f9;
    border-radius: 8px;
    padding: 17px;
    box-shadow: 0 0 4px 0px #e4d9d9a3;
}

:where(.sps-program-page) .sps-info-box-title {
    color: #399e97;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

:where(.sps-program-page) .sps-info-table {
    width: 100%;
    border-collapse: collapse;
}

:where(.sps-program-page) .sps-info-table tr {
    border-bottom: 1px solid #d0e3f7;
}

:where(.sps-program-page) .sps-info-table tr:last-child {
    border-bottom: none;
}

:where(.sps-program-page) .sps-info-table th,
:where(.sps-program-page) .sps-info-table td {
    padding: 8px 0;
    text-align: left;
    font-size: 16px;
    vertical-align: top;
}

:where(.sps-program-page) .sps-info-table th {
    color: #000000;
    width: 30%;
    font-weight: bolder;
}

:where(.sps-program-page) .sps-info-table td {
    color: #000000;
    /* font-size: 14px; */
    font-weight: 200;
}

/* Section Titles */
:where(.sps-program-page) .sps-page-section > .sps-section-title {
    font-size: 21px !important;
    font-weight: 600;
    color: #3a9e97 !important;
    margin: 0;
    border-bottom: none !important;
    padding: 0;
    letter-spacing: 1px;
}

:where(.sps-program-page) .sps-page-section > .sps-section-title::after {
  display: none !important;
}

/* Competition Score Table */
:where(.sps-program-page) .sps-competition-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

:where(.sps-program-page) .sps-competition-table th {
    background-color: #f8f9fa;
    color: #333;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #ddd;
}

:where(.sps-program-page) .sps-competition-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

:where(.sps-program-page) .sps-competition-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Subjects Grid */
:where(.sps-program-page) .sps-subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

:where(.sps-program-page) .sps-semester-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0px 0px 6px 0px #dddd;
}

:where(.sps-program-page) .sps-semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #71c5b8;
}

:where(.sps-program-page) .sps-semester-title {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 16px;
}

:where(.sps-program-page) .sps-ects-badge {
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

:where(.sps-program-page) .sps-subjects-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

:where(.sps-program-page) .sps-subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
}

:where(.sps-program-page) .sps-subject-item:last-child {
    border-bottom: none;
}

:where(.sps-program-page) .sps-subject-name {
    color: #333;
    flex: 1;
}

:where(.sps-program-page) .sps-subject-credits {

    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

:where(.sps-program-page) .sps-competition-note a {
    font-size: 14px;
    color: #71c5b8;
}

:where(.sps-program-page) .sps-competition-note p {
    color: #6a6a6a;
}

:where(.sps-program-page) .sps-competition-note p,
:where(.sps-program-page) .sps-competition-note a {
    font-size: 14px;
}

:where(.sps-program-page) .sps-competition-note {
    border-top: 1px solid #dddddd7d;
    padding: 10px;
}

/* Partners Section */
:where(.sps-program-page) .sps-partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #f9f9f9;
    align-items: flex-start;
    box-shadow: 0px 0px 4px 0px #ddd;
    border-radius: 10px;
    justify-content: center;
}

:where(.sps-program-page) .sps-partner-item {
    flex: 0 1 212px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 80px auto;
    row-gap: 4px;
    box-sizing: border-box;
    min-inline-size: 0;
    max-inline-size: 100%;
    text-align: center;
    padding: 31px;
}

:where(.sps-program-page) .sps-partner-logo {
    grid-row: 1;
    place-self: center;
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 150px);
    max-height: 80px;
    object-fit: contain;
    margin: 0;
}

:where(.sps-program-page) .sps-partner-item > .sps-partner-name {
    grid-row: 2;
    font-weight: 500;
    color: #333;
    margin: 0;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bottom Section */
:where(.sps-program-page) .sps-bottom-section {
    display: flex;
    gap: 40px;
    flex-direction: row;
    justify-content: space-between;
}

/* Student Card */
:where(.sps-program-page) .sps-student-card {
    background-color: #71c5b8;
    color: white;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    padding: 20px;
    gap: 12px;
}

:where(.sps-program-page) .sps-student-photo {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    margin: 0 auto;
    display: block;
}

:where(.sps-program-page) .sps-student-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #fff !important;
}

:where(.sps-program-page) .sps-student-year {
    opacity: 0.9;
    margin: 0 0 20px 0;
    font-size: 14px;
}

:where(.sps-program-page) .sps-instagram-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
}

:where(.sps-program-page) .sps-instagram-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Related Programs */
:where(.sps-program-page) .sps-related-section h2 {
    color: #71c5b8;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

:where(.sps-program-page) .sps-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

:where(.sps-program-page) .sps-related-item {
    margin-bottom: 8px;
}

:where(.sps-program-page) .sps-related-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

:where(.sps-program-page) .sps-related-item a:hover {
    color: #71c5b8;
    text-decoration: underline;
}

:where(.sps-program-page) .sps-related-item::before {
    content: "• ";
    color: #000000;
    font-weight: bold;
}

:where(.sps-program-page) .sps-program-links {
    width: min(100%, 460px);
    display: grid;
    align-content: start;
    gap: var(--sps-section-gap);
}

:where(.sps-program-page) .sps-related-section ul li a {
    font-size: 14px;
    font-weight: 300;
}

:where(.sps-program-page) .sps-useful-links ul {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0px 0px 1px 0px #f9f9f9;
}

/* Useful Links */
:where(.sps-program-page) .sps-useful-links h2 {
    color: #399e97 !important;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

:where(.sps-program-page) .sps-useful-links ul {
    list-style: none;
    margin: 0;
    padding: 17px;
}

:where(.sps-program-page) .sps-useful-links li {
    margin-bottom: 8px;
}

:where(.sps-program-page) .sps-useful-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

:where(.sps-program-page) .sps-useful-links a:hover {
    color: #71c5b8;
    text-decoration: underline;
}

:where(.sps-program-page) .sps-useful-links li::before {
    content: "• ";
    color: #333333;
    font-weight: bold;
}

:where(.sps-program-page) .sps-competition-table th:nth-child(1),
:where(.sps-program-page) .sps-competition-table td:nth-child(1) {
    text-align: left;
}

:where(.sps-program-page) table.sps-competition-table tr,
:where(.sps-program-page) table.sps-competition-table td,
:where(.sps-program-page) table.sps-competition-table th,
:where(.sps-program-page) table.sps-competition-table {
    background: transparent !important;
    border: 0;
}

:where(.sps-program-page) .sps-related-section ul {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0px 0px 1px 0px #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    :where(.sps-program-page) .sps-main-content {
        padding: 0px;
    }

    :where(.sps-program-page) .sps-info-box {
        width: 100% !important;
    }
    :where(.sps-program-page) table.sps-info-table th {
        width: 160px;
    }

    :where(.sps-program-page) .sps-description-section {
        gap: 22px;
        display: flex;
        flex-direction: column-reverse;
    }

    :where(.sps-program-page) .sps-subjects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    :where(.sps-program-page) .sps-bottom-section {
        grid-template-columns: 1fr;
        gap: 20px;
        flex-direction: column;
    }
    :where(.sps-program-page) .sps-program-links {
        width: 100%;
    }

    :where(.sps-program-page) .sps-action-buttons {
        flex-direction: column;
    }

    :where(.sps-program-page) .sps-program-title {
        font-size: 28px;
    }

    :where(.sps-program-page) .sps-partners-grid {
        gap: 12px;
        overflow: visible;
    }
    :where(.sps-program-page) .sps-partner-item {
        flex-basis: min(180px, calc((100% - 12px) / 2));
    }
}

@media (max-width: 480px) {
    :where(.sps-program-page) .sps-main-content {
        padding: 15px;
    }

    :where(.sps-program-page) .sps-breadcrumb {
        padding: 31px 15px;
        font-size: 13px;
    }

    :where(.sps-program-page) a.sps-instagram-btn {
        width: 100%;
        justify-content: center;
        height: 56px;
    }

    :where(.sps-program-page) .sps-program-title {
        font-size: 24px;
    }

    :where(.sps-program-page) .sps-competition-table th,
:where(.sps-program-page) .sps-competition-table td {
        padding: 8px 6px;
        font-size: 12px;
    }

    :where(.sps-program-page) .sps-semester-card {
        padding: 15px;
    }
}

/* Admin Edit Button */
:where(.sps-program-page) .sps-admin-edit-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

:where(.sps-program-page) .sps-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #399e97;
    color: white;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

:where(.sps-program-page) .sps-btn-edit:hover {
    background: #2d7f79;
    color: white;
    text-decoration: none;
}

:where(.sps-program-page) .sps-btn-edit svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Semester list toggle */
@media (max-width: 768px) {
    :where(.sps-program-page) .sps-subjects-grid {
        display: grid;
        gap: 16px;
    }
    :where(.sps-program-page) .sps-subjects-grid.is-collapsible:not(.expanded) .sps-semester-card:nth-child(n+3) {
        display: none;
    }
    :where(.sps-program-page) .sps-show-more-btn:not([hidden]) {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0 auto !important;
        padding: 10px 20px;
        border: none;
        background: #000;
        color: #fff;
        border-radius: 6px;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    :where(.sps-program-page) .sps-show-more-btn {
        display: none;
    }
}

:where(.sps-program-page) .sps-flex-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1200px; /* centrinis limitas */
    padding: 20px;
}

:where(.sps-program-page) .sps-media {
    flex: 1 1 45%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

:where(.sps-program-page) .sps-video-container1 {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

:where(.sps-program-page) .sps-video-container1 .swiper-wrapper,
:where(.sps-program-page) .sps-video-container1 .swiper-slide {
    width: 100%;
    height: 100%;
}

:where(.sps-program-page) .sps-video-container1 img,
:where(.sps-program-page) .sps-video-container1 video,
:where(.sps-program-page) .sps-video-container1 iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

:where(.sps-program-page) .sps-video-container1 .swiper-button-prev,
:where(.sps-program-page) .sps-video-container1 .swiper-button-next {
    color: #0d9488;
    opacity: 0.8;
    transition: opacity 0.3s;
}

:where(.sps-program-page) .sps-video-container1:hover .swiper-button-prev,
:where(.sps-program-page) .sps-video-container1:hover .swiper-button-next {
    opacity: 1;
}

@media (max-width: 768px) {
    :where(.sps-program-page) .sps-flex-row {
        flex-direction: column;
    }

    :where(.sps-program-page) .sps-video-container1 {
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }
}

:where(.sps-program-page) .sps-faq {
    --sps-faq-inset: 10px;
    --sps-faq-accent: #226c65;
    --sps-faq-border: #e0e0e0;
    display: grid;
    gap: 10px;
    font-family: var(--wp--preset--font-family--helvetica-neue-lt-com, "Helvetica Neue LT Com", Arial, sans-serif);
    font-size: 1rem;
    line-height: 1.618;
}

:where(.sps-program-page) .sps-faq .sps-faq-item {
    margin: 0;
    padding: clamp(10px, 2vw, 17px);
    border: 1px solid var(--sps-faq-border);
    border-radius: 10px;
    background: rgb(242 242 242 / 44%);
    color: #000;
    font-weight: 300;
}

:where(.sps-program-page) .sps-faq .sps-faq-item[open] {
    border-color: #b0cfca;
}

:where(.sps-program-page) .sps-faq .sps-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: var(--sps-faq-inset);
    border-radius: 4px;
    color: inherit;
    font-weight: inherit;
    list-style: none;
    overflow-wrap: anywhere;
    cursor: pointer;
}

:where(.sps-program-page) .sps-faq .sps-faq-q::-webkit-details-marker {
    display: none;
}

:where(.sps-program-page) .sps-faq .sps-faq-q::after {
    content: none;
}

:where(.sps-program-page) .sps-faq .sps-faq-q:focus:not(:focus-visible) {
    outline: none;
}

:where(.sps-program-page) .sps-faq .sps-faq-q:focus-visible {
    outline: 2px solid var(--sps-faq-accent);
    outline-offset: -3px;
}

:where(.sps-program-page) .sps-faq .sps-faq-chevron {
    flex: 0 0 20px;
    block-size: 20px;
    background: currentColor;
    clip-path: polygon(10% 30%, 15% 25%, 50% 60%, 85% 25%, 90% 30%, 50% 70%);
}

:where(.sps-program-page) .sps-faq .sps-faq-item[open] > .sps-faq-q .sps-faq-chevron {
    transform: rotate(180deg);
}

:where(.sps-program-page) .sps-faq .sps-faq-a {
    font-size: 15px;
    color: #535353;
    margin-top: 0;
    padding: var(--sps-faq-inset);
    border-block-start: 1px solid var(--sps-faq-border);
    overflow-wrap: anywhere;
}

:where(.sps-program-page) .sps-faq .sps-faq-a > :first-child {
    margin-block-start: 0;
}

:where(.sps-program-page) .sps-faq .sps-faq-a > :last-child {
    margin-block-end: 0;
}

:where(.sps-program-page) .sps-faq .sps-faq-a a {
    color: var(--sps-faq-accent);
    text-decoration: underline;
}

/* The page owns section spacing. Components own the spacing inside their content. */
.sps-program-page {
    --sps-section-gap: clamp(32px, 4vw, 56px);
    --sps-heading-gap: 16px;
}
.sps-program-page .sps-main-content,
.sps-program-page .sps-page-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
}
.sps-program-page .sps-main-content {
    gap: var(--sps-section-gap);
}
.sps-program-page .sps-page-section {
    gap: var(--sps-heading-gap);
    min-width: 0;
}
.sps-program-page .sps-page-section > *,
.sps-program-page .sps-main-content > * {
    margin-block: 0;
    min-width: 0;
}
.sps-program-page .sps-page-section > h2,
.sps-program-page .sps-page-section > h1 {
    margin-block: 0;
    padding-block: 0;
}
.sps-program-page .sps-student-section {
    width: min(100%, 350px);
}
.sps-program-page .sps-student-section > h2 {
    color: #399e97;
    font-size: 18px;
    font-weight: 600;
}
.sps-program-page .sps-student-card > * {
    margin-block: 0;
}
.sps-program-page .sps-program-copy,
.sps-program-page .sps-section-content,
.sps-program-page .sps-competition-table tbody {
    font-weight: 300;
}
.sps-program-page .sps-subject-item.is-bold > span {
    font-weight: 700;
}
.sps-program-page a.sps-partner-item {
    color: inherit;
    text-decoration: none;
}
.sps-program-page .sps-bottom-section {
    gap: var(--sps-section-gap);
    align-items: flex-start;
}
.sps-program-page .sps-tab-nav > button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding: 15px 20px;
    border: 0;
    border-radius: 0;
    /* Override the Josephine child theme's global button background. */
    background: transparent !important;
    color: #333;
    box-shadow: inset 0 -1px #e6e5e5;
    font: inherit;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    text-transform: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background-color 160ms ease;
}
.sps-program-page .sps-tab-nav > button:first-child {
    border-start-start-radius: 8px;
}
.sps-program-page .sps-tab-nav > button:last-child {
    border-start-end-radius: 8px;
}
.sps-program-page .sps-tab-nav > button + button {
    border-inline-start: 1px solid #e6e5e5;
}
.sps-program-page .sps-tab-nav > button:hover {
    background: rgba(58, 158, 151, 0.08) !important;
}
.sps-program-page .sps-tab-nav > button[aria-selected="true"] {
    background: #f9f9f9 !important;
    box-shadow: inset 0 3px #3a9e97;
    font-weight: 600;
}
.sps-program-page .sps-tab-nav > button:focus-visible {
    outline: 2px solid #226c65;
    outline-offset: -4px;
}
@media (max-width: 600px) {
    .sps-program-page .sps-tab-nav > button {
        min-height: 72px;
        padding: 10px 6px;
        font-size: 15px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sps-program-page .sps-tab-nav > button {
        transition: none;
    }
}
.sps-program-page .sps-tab-panel:not([hidden]) {
    display: block;
}
.sps-program-page .sps-tab-panel[hidden] {
    display: none;
}
.sps-program-page .sps-flex-row > .sps-section-content {
    min-width: 0;
    flex: 1 1 45%;
}
@media (max-width: 768px) {
    .sps-program-page .sps-student-section,
    .sps-program-page .sps-section-content,
    .sps-program-page .sps-media {
        width: 100%;
    }
}
