/**
 * Trinity College London visual identity + UI polish
 * Reference: https://www.trinitycollege.com/
 */

:root {
    --primary-color: #50144b;
    --primary-dark: #381338;
    --secondary-color: #6a265f;
    --accent-cta: #9a619b;
    --accent-cta-hover: #825183;
    --light-purple: #f5eff5;
    --light-purple-bg: #ebdfeb;
    --surface-muted: #f6f6f6;
    --text-dark: #2d2d2d;
    --text-muted: #6c757d;
    --border-radius-btn: 50px;
    --border-radius-card: 8px;
    --shadow-sm: 0 2px 8px rgba(80, 20, 75, 0.06);
    --shadow-md: 0 8px 24px rgba(80, 20, 75, 0.1);
    --shadow-lg: 0 16px 40px rgba(80, 20, 75, 0.14);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --header-primary-height: 76px;
}

section[id],
.section[id] {
    scroll-margin-top: calc(var(--header-primary-height) + 52px);
}

/* ------------------------------------------------------------------ Base */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent-cta);
    outline-offset: 2px;
}

section,
.section {
    padding: 72px 0;
}

@media (max-width: 767px) {
    section,
    .section {
        padding: 48px 0;
    }
}

/* ------------------------------------------------------------------ Header */
.header-primary {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #ebebeb;
    padding: 10px 0;
    transition: box-shadow var(--transition), padding var(--transition);
}

.header-primary.is-scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-md);
}

.header-primary .logo {
    gap: 16px;
}

.header-primary .logo img.logo-nen {
    max-height: 40px;
    width: auto;
    opacity: 0.9;
    transition: opacity var(--transition);
}

.header-primary .logo img.logo-trinity {
    max-height: 32px;
    width: auto;
}

.header-primary .logo:hover img.logo-nen {
    opacity: 1;
}

.header-primary .navmenu-primary a,
.header-primary .navmenu-primary a:focus {
    color: var(--text-dark);
    font-weight: 400;
    font-size: 14px;
    border-radius: 6px;
    transition: color var(--transition), background-color var(--transition);
}

@media (min-width: 1200px) {
    .header-primary .navmenu-primary li:hover > a,
    .header-primary .navmenu-primary .active > a {
        color: var(--primary-color);
        background-color: var(--light-purple);
    }

    .header-primary .navmenu-primary .dropdown:hover > ul {
        border-radius: var(--border-radius-card);
        border: 1px solid #eee;
        box-shadow: var(--shadow-md);
        overflow: hidden;
    }

    .header-primary .navmenu-primary .dropdown ul a:hover {
        background-color: var(--light-purple);
        color: var(--primary-color);
    }
}

.header-section,
.header.border-top {
    position: sticky;
    top: var(--header-primary-height);
    z-index: 999;
    background-color: var(--primary-color);
    border-top: 0 !important;
    padding: 0;
    box-shadow: 0 4px 12px rgba(56, 19, 56, 0.2);
}

#section-navmenu {
    padding-left: 24px !important;
}

.header-section .navmenu-section a,
.header-section .navmenu-section a:focus,
.header.border-top .navmenu a,
.header.border-top .navmenu a:focus {
    color: rgba(255, 255, 255, 0.92);
    gap: 6px;
    transition: background-color var(--transition), color var(--transition);
}

.header-section .navmenu-section li:hover > a,
.header-section .navmenu-section li.active > a,
.header.border-top .navmenu li:hover > a,
.header.border-top .navmenu li.active > a,
.header.border-top .navmenu .active > a {
    color: #ffffff !important;
    background-color: var(--primary-dark);
}

.header-section .navmenu-section li.active > a,
.header.border-top .navmenu li.active > a {
    box-shadow: inset 0 -3px 0 var(--accent-cta);
}

.header-section .navmenu-section a i,
.header.border-top .navmenu a i {
    color: inherit;
    font-size: 15px;
}

@media (min-width: 1200px) {
    .header-section .navmenu-section > ul,
    .header.border-top .navmenu > ul {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .header-section .navmenu-section a,
    .header.border-top .navmenu a {
        padding: 11px 16px;
        font-size: 13px;
        font-weight: 400;
        letter-spacing: 0.01em;
    }
}

.mobile-nav-toggle {
    color: var(--primary-color) !important;
}

/* ------------------------------------------------------------------ Hero */
.hero .carousel {
    min-height: 85vh;
}

@media (max-width: 767px) {
    .hero .carousel {
        min-height: 70vh;
    }
}

.hero .carousel-item::before,
.hero .carousel-item:before {
    background: linear-gradient(
        135deg,
        rgba(80, 20, 75, 0.72) 0%,
        rgba(56, 19, 56, 0.55) 45%,
        rgba(30, 10, 28, 0.65) 100%
    );
}

.hero .carousel-container {
    inset: 140px 48px 80px 48px;
    text-align: center;
}

.hero h2 {
    font-weight: 500;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    line-height: 1.15;
}

.hero p {
    font-weight: 300;
    line-height: 1.7;
    font-size: 1.1rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.hero .carousel-control-prev,
.hero .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    opacity: 0.8;
    transition: background var(--transition), opacity var(--transition);
}

.hero .carousel-control-prev { left: 24px; }
.hero .carousel-control-next { right: 24px; }

.hero .carousel-control-prev:hover,
.hero .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.28);
    opacity: 1;
}

.hero .carousel-control-prev-icon,
.hero .carousel-control-next-icon {
    font-size: 24px;
    color: #fff;
}

/* ------------------------------------------------------------------ Buttons */
.btn-custom-danger,
.read-more,
.hero .btn-get-started {
    transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-custom-danger:hover,
.read-more:hover,
.hero .btn-get-started:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(154, 97, 155, 0.35);
}

.btn-custom-danger {
    background: var(--accent-cta);
    border-radius: var(--border-radius-btn);
    border: 0;
    font-weight: 500;
    padding: 10px 26px;
}

.btn-custom-danger:hover {
    background: var(--accent-cta-hover) !important;
}

.btn-custom-outline-dark,
.btn-custom-outline-dark-new {
    border-radius: var(--border-radius-btn);
    transition: all var(--transition);
}

.btn-custom-outline-dark-new {
    border-color: var(--accent-cta);
    color: #ffffff;
}

.btn-custom-dark {
    border-radius: var(--border-radius-btn);
}

/* ------------------------------------------------------------------ Section titles */
.section-title {
    margin-bottom: 8px;
}

.section-title h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.section-title h2:before,
.section-title h2:after {
    display: none;
}

.section-title h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cta));
    margin: 14px auto 0;
    border-radius: 2px;
}

.section-title .subtitle,
.section-title p.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 12px;
}

.section-title .subtitle a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.section-title .subtitle a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ Product cards */
.more-services .card {
    border-radius: var(--border-radius-card);
    border: 1px solid #eee;
    border-bottom: 3px solid transparent;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.more-services .card img {
    border-radius: 0;
    transition: transform 0.5s ease;
}

.more-services .card:hover {
    transform: translateY(-4px);
    border-bottom-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.more-services .card:hover img {
    transform: scale(1.03);
}

.more-services .card h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--heading-color);
}

.more-services .card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ------------------------------------------------------------------ Offers carousel (index) */
#offers {
    overflow: visible;
}

#offers .offers-swiper-outer {
    position: relative;
}

#offers .offers-swiper-track {
    position: relative;
    padding: 0 3.5rem;
}

#offers .offers-swiper {
    position: relative;
    overflow: hidden;
    padding: 0.75rem 0 0;
}

#offers .offers-nav-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(80, 20, 75, 0.25);
    transform: translateY(-50%);
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

#offers .offers-nav-btn .bi {
    font-size: 1.25rem;
    line-height: 1;
    pointer-events: none;
}

#offers .offers-nav-prev {
    left: 0;
}

#offers .offers-nav-prev .bi {
    margin-left: -2px;
}

#offers .offers-nav-next {
    right: 0;
}

#offers .offers-nav-next .bi {
    margin-right: -2px;
}

#offers .offers-nav-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 6px 18px rgba(56, 19, 56, 0.32);
    transform: translateY(-50%) scale(1.04);
}

#offers .offers-nav-btn.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
    background: #bbb;
    box-shadow: none;
}

#offers .offers-swiper .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

#offers .offers-swiper .offers-carousel-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-card, 8px);
    border: 1px solid #e9e9e9;
    overflow: visible;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

#offers .offers-swiper .offers-carousel-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

#offers .offers-carousel-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 200px;
    overflow: hidden;
    background: var(--light-purple);
    flex-shrink: 0;
    border-radius: var(--border-radius-card, 8px) var(--border-radius-card, 8px) 0 0;
}

#offers .offers-carousel-card__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

#offers .offers-carousel-card__media img.offers-carousel-card__media-fallback {
    object-fit: contain;
    padding: 1.5rem;
    background: var(--light-purple);
}

#offers .offers-carousel-card .card-body-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 1.25rem;
    min-width: 0;
}

#offers .offers-carousel-card h4 {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--heading-color);
    cursor: pointer;
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
    transition: color var(--transition);
}

#offers .offers-carousel-card h4:hover {
    color: var(--primary-color);
}

#offers .offers-carousel-card .counter {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.35rem 0 0.5rem;
}

#offers .offers-carousel-card .counter .time {
    font-size: 0.85rem;
    padding: 4px 8px;
    min-width: 2.25rem;
}

#offers .offers-carousel-card .counter span {
    font-size: 1.25rem;
    line-height: 1;
}

#offers .offers-carousel-card .counter.counter-expired {
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

#offers .offers-card-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 0.75rem;
}

#offers .offers-card-actions-inner,
#services .offers-grid .offers-card-actions-inner,
#services .more-services .offers-card-actions-inner,
#products .more-services .offers-card-actions-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    align-items: stretch;
}

#offers .offers-card-actions-inner--single,
#services .offers-grid .offers-card-actions-inner--single,
#services .more-services .offers-card-actions-inner--single,
#products .more-services .offers-card-actions-inner--single {
    grid-template-columns: 1fr;
}

#offers .offers-card-action-cell,
#services .offers-grid .offers-card-action-cell,
#services .more-services .offers-card-action-cell,
#products .more-services .offers-card-action-cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#offers .offers-card-action-cell .btn-group,
#services .offers-grid .offers-card-action-cell .btn-group,
#services .more-services .offers-card-action-cell .btn-group,
#products .more-services .offers-card-action-cell .btn-group,
#offers .offers-card-action-cell .dropdown,
#services .offers-grid .offers-card-action-cell .dropdown,
#services .more-services .offers-card-action-cell .dropdown,
#products .more-services .offers-card-action-cell .dropdown {
    width: 100%;
}

#offers .offers-card-action-cell .btn,
#offers .offers-card-action-cell a.btn,
#services .offers-grid .offers-card-action-cell .btn,
#services .offers-grid .offers-card-action-cell a.btn,
#services .more-services .offers-card-action-cell .btn,
#services .more-services .offers-card-action-cell a.btn,
#products .more-services .offers-card-action-cell .btn,
#products .more-services .offers-card-action-cell a.btn {
    width: 100%;
    font-size: 0.8125rem;
    padding: 0.5rem 0.625rem;
    line-height: 1.25;
    border-radius: var(--border-radius-btn, 0.375rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#offers .offers-card-action-cell .btn-dark,
#services .offers-grid .offers-card-action-cell .btn-dark,
#services .more-services .offers-card-action-cell .btn-dark,
#products .more-services .offers-card-action-cell .btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#offers .offers-card-action-cell .btn-dark:hover,
#offers .offers-card-action-cell .btn-dark:focus,
#services .offers-grid .offers-card-action-cell .btn-dark:hover,
#services .offers-grid .offers-card-action-cell .btn-dark:focus,
#services .more-services .offers-card-action-cell .btn-dark:hover,
#services .more-services .offers-card-action-cell .btn-dark:focus,
#products .more-services .offers-card-action-cell .btn-dark:hover,
#products .more-services .offers-card-action-cell .btn-dark:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

#offers .offers-card-action-cell .btn-outline-dark,
#services .offers-grid .offers-card-action-cell .btn-outline-dark,
#services .more-services .offers-card-action-cell .btn-outline-dark,
#products .more-services .offers-card-action-cell .btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#offers .offers-card-action-cell .btn-outline-dark:hover,
#offers .offers-card-action-cell .btn-outline-dark:focus,
#services .offers-grid .offers-card-action-cell .btn-outline-dark:hover,
#services .offers-grid .offers-card-action-cell .btn-outline-dark:focus,
#services .more-services .offers-card-action-cell .btn-outline-dark:hover,
#services .more-services .offers-card-action-cell .btn-outline-dark:focus,
#products .more-services .offers-card-action-cell .btn-outline-dark:hover,
#products .more-services .offers-card-action-cell .btn-outline-dark:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

#offers .offers-card-action-cell .dropdown-menu,
#services .offers-grid .offers-card-action-cell .dropdown-menu,
#services .more-services .offers-card-action-cell .dropdown-menu,
#products .more-services .offers-card-action-cell .dropdown-menu {
    z-index: 1100;
    max-height: 16rem;
    overflow-y: auto;
}

#services .more-services .card {
    display: flex;
    flex-direction: column;
}

#products .more-services .card {
    display: flex;
    flex-direction: column;
}

#services .more-services .offers-card-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 0.75rem;
}

#products .more-services .offers-card-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 0.75rem;
}

#offers .offers-swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    margin-top: 1.5rem;
}

#offers .offers-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d4c4d3;
    opacity: 1;
}

#offers .offers-swiper-pagination .swiper-pagination-bullet-active {
    background-color: var(--primary-color);
    width: 10px;
    height: 10px;
}

/* Dropdown menus must escape swiper overflow while open */
#offers .offers-swiper.offers-swiper--dropdown-open,
#offers .offers-swiper.offers-swiper--dropdown-open .swiper-wrapper,
#offers .offers-swiper.offers-swiper--dropdown-open .swiper-slide {
    overflow: visible;
}

/* Offers page — filter bar + special-offer card actions */
#services .offers-filter-actions {
    display: flex;
    flex-direction: column;
}

#services .offers-filter-actions__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    visibility: hidden;
}

#services .offers-filter-actions__buttons {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

#services .offers-filter-actions .offers-filter-btn {
    flex: 1 1 0;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius-btn, 0.375rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#services .offers-page-main-title .btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#services .offers-page-main-title .btn-dark:hover,
#services .offers-page-main-title .btn-dark:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

#services .offers-page-main-title .btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#services .offers-page-main-title .btn-outline-dark:hover,
#services .offers-page-main-title .btn-outline-dark:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

#services .special-offer-card__actions .btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#services .special-offer-card__actions .btn-dark:hover,
#services .special-offer-card__actions .btn-dark:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

#services .special-offer-card__actions .btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#services .special-offer-card__actions .btn-outline-dark:hover,
#services .special-offer-card__actions .btn-outline-dark:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 991px) {
    #offers .offers-card-actions-inner,
    #services .offers-grid .offers-card-actions-inner,
    #services .more-services .offers-card-actions-inner,
    #products .more-services .offers-card-actions-inner {
        grid-template-columns: 1fr;
    }

    #offers .offers-carousel-card__media {
        max-height: 180px;
    }
}

@media (max-width: 575px) {
    #offers .offers-swiper-track {
        padding: 0 2.75rem;
    }

    #offers .offers-nav-btn {
        width: 2.375rem;
        height: 2.375rem;
    }

    #offers .offers-nav-btn .bi {
        font-size: 1.0625rem;
    }

    #offers .offers-carousel-card .counter .time {
        font-size: 0.75rem;
        padding: 3px 6px;
    }

    #offers .offers-carousel-card .counter span {
        font-size: 1rem;
    }
}

/* Legacy offers-swiper img rule override */
#offers .offers-swiper img {
    height: auto !important;
}

/* ------------------------------------------------------------------ Products */
.stats-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-md);
    padding: 8px 12px;
}

.stat-item .value {
    font-weight: 500;
    letter-spacing: -0.02em;
}

.stat-item .title {
    opacity: 0.85;
}

#fullMap {
    border-radius: var(--border-radius-card) !important;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8e8e8;
}

.map-legend {
    background: #fff;
    border-radius: var(--border-radius-card);
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
}

.map_flags a {
    transition: transform var(--transition);
}

.map_flags a:hover {
    transform: scale(1.12);
}

/* ------------------------------------------------------------------ Section backgrounds */
.section-bg.light-background,
#blogs.section-bg {
    background-color: var(--surface-muted);
}

.section-bg:before {
    opacity: 0.4;
}

/* ------------------------------------------------------------------ ETS section — flat branded band (no skew, full purple) */
#ets.ets-section.section-bg {
    padding: 80px 0;
    margin-top: 0 !important;
    overflow: hidden;
    isolation: isolate;
}

#ets.ets-section.section-bg::before {
    opacity: 1;
    transform: none;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        128deg,
        var(--primary-dark) 0%,
        var(--primary-color) 38%,
        var(--secondary-color) 72%,
        var(--primary-dark) 100%
    );
}

#ets.ets-section.section-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 12% 18%, rgba(154, 97, 155, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 40% 35% at 88% 82%, rgba(255, 255, 255, 0.07) 0%, transparent 65%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 45%);
}

#ets.ets-section .container {
    position: relative;
    z-index: 1;
}

#ets.ets-section .ets-flags-intro {
    margin-top: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
}

#ets.ets-section .ets-flags-intro p {
    margin-bottom: 0;
}

#ets.ets-section .ets-flags {
    margin-top: 1rem;
    gap: 1.25rem;
    justify-content: center;
}

#ets.ets-section .ets-video-wrap {
    margin-top: 2rem;
    border-radius: var(--border-radius-card, 8px);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

#ets.ets-section .ets-video-wrap img {
    display: block;
    width: 100%;
    min-height: 280px;
    object-fit: cover;
    border-radius: var(--border-radius-card, 8px);
}

#ets.ets-section .trinity-about-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.96;
}

#ets.ets-section .content .f-p {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.75;
    font-size: 1.05rem;
}

#ets.ets-section .read-more.btn-custom-danger {
    background: var(--accent-cta);
    margin-top: 1.25rem !important;
}

#ets.ets-section .read-more.btn-custom-danger:hover {
    background: var(--accent-cta-hover);
}

@media (max-width: 991px) {
    #ets.ets-section.section-bg {
        padding: 56px 0;
    }

    #ets.ets-section .content {
        order: 1;
    }

    #ets.ets-section .ets-flags-intro {
        margin-top: 1.5rem;
    }
}

/* ------------------------------------------------------------------ Test Day section — same flat branded band as ETS */
#test-day.test-day-section.section-bg {
    padding: 80px 0;
    overflow: hidden;
    isolation: isolate;
}

#test-day.test-day-section.section-bg::before {
    opacity: 1;
    transform: none;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        128deg,
        var(--primary-dark) 0%,
        var(--primary-color) 38%,
        var(--secondary-color) 72%,
        var(--primary-dark) 100%
    );
}

#test-day.test-day-section.section-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 40% at 85% 15%, rgba(154, 97, 155, 0.32) 0%, transparent 70%),
        radial-gradient(ellipse 45% 38% at 10% 88%, rgba(255, 255, 255, 0.06) 0%, transparent 65%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
}

#test-day.test-day-section .container {
    position: relative;
    z-index: 1;
}

#test-day.test-day-section .content h3 {
    font-weight: 500;
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    color: #ffffff;
    margin-bottom: 1rem;
}

#test-day.test-day-section .content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

#test-day.test-day-section .content .about-btn {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    text-transform: none;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0;
}

#test-day.test-day-section .content .about-btn:hover {
    background: #ffffff;
    color: var(--primary-color);
    border-color: #ffffff;
}

#test-day.test-day-section .icon-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius-card, 8px);
    padding: 1.5rem;
    height: 100%;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

#test-day.test-day-section .icon-box:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-3px);
}

#test-day.test-day-section .icon-box i {
    color: var(--accent-cta);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

#test-day.test-day-section .icon-box h4,
#test-day.test-day-section .icon-box h4 a {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.125rem;
}

#test-day.test-day-section .icon-box p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: 0;
    flex: 1 1 auto;
}

#test-day.test-day-section .test-day-card-btn,
#test-day.test-day-section .btn-custom-outline-dark-new {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.75);
    color: #ffffff;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 20px;
    margin-top: 1.25rem;
    align-self: flex-start;
    position: relative;
    z-index: 2;
}

#test-day.test-day-section .test-day-card-btn:hover,
#test-day.test-day-section .btn-custom-outline-dark-new:hover {
    background: #ffffff;
    color: var(--primary-color) !important;
    border-color: #ffffff;
}

@media (max-width: 991px) {
    #test-day.test-day-section.section-bg {
        padding: 56px 0;
    }
}

/* ------------------------------------------------------------------ Network section — flat branded band */
#network.network-section.section-bg {
    padding: 80px 0;
    margin-top: 0 !important;
    overflow: hidden;
    isolation: isolate;
}

#network.network-section.section-bg::before {
    opacity: 1;
    transform: none;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        128deg,
        var(--primary-dark) 0%,
        var(--primary-color) 38%,
        var(--secondary-color) 72%,
        var(--primary-dark) 100%
    );
}

#network.network-section.section-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 48% 42% at 90% 20%, rgba(154, 97, 155, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 42% 36% at 8% 90%, rgba(255, 255, 255, 0.06) 0%, transparent 65%);
}

#network.network-section .container {
    position: relative;
    z-index: 1;
}

#network.network-section .section-title h2 {
    color: #ffffff;
}

#network.network-section .section-title h2::after {
    background: linear-gradient(90deg, #ffffff, var(--accent-cta));
}

#network.network-section #networkTabs .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 3px solid transparent !important;
    background: transparent !important;
}

#network.network-section #networkTabs .nav-link:hover {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.45) !important;
}

#network.network-section #networkTabs .nav-link.active {
    color: #ffffff !important;
    border-bottom-color: var(--accent-cta) !important;
    background: transparent !important;
}

#network.network-section #country.form-control {
    border-radius: var(--border-radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 16px;
}

#network.network-section #country.form-control:focus {
    border-color: var(--accent-cta);
    box-shadow: 0 0 0 3px rgba(154, 97, 155, 0.25);
}

#network.network-section .centers-card {
    border-radius: var(--border-radius-card, 8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

#network.network-section .custom-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
}

@media (max-width: 991px) {
    #network.network-section.section-bg {
        padding: 56px 0;
    }
}

/* ------------------------------------------------------------------ Library section — flat branded band */
#library.library-section.section-bg {
    padding: 80px 0;
    overflow: hidden;
    isolation: isolate;
}

#library.library-section.section-bg::before {
    opacity: 1;
    transform: none;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        128deg,
        var(--primary-dark) 0%,
        var(--primary-color) 40%,
        var(--secondary-color) 70%,
        var(--primary-dark) 100%
    );
}

#library.library-section.section-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 15% 25%, rgba(154, 97, 155, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 40% 35% at 92% 75%, rgba(255, 255, 255, 0.06) 0%, transparent 65%);
}

#library.library-section .container {
    position: relative;
    z-index: 1;
}

#library.library-section .section-title h2 {
    color: #ffffff;
}

#library.library-section .section-title h2::after {
    background: linear-gradient(90deg, #ffffff, var(--accent-cta));
}

#library.library-section h4 {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

#library.library-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

#library.library-section ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#library.library-section a {
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none;
    transition: color var(--transition), padding-left var(--transition);
}

#library.library-section a:hover {
    color: #ffffff !important;
    padding-left: 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#library.library-section .de p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

#library.library-section .de {
    margin-left: 10px;
    margin-top: 0 !important;
}

#library.library-section .img img {
    border-radius: 6px;
    object-fit: cover;
}

@media (max-width: 991px) {
    #library.library-section.section-bg {
        padding: 56px 0;
    }

    #library.library-section .row > [class*="col-"] {
        margin-bottom: 2rem;
    }
}

#tpi-ad.section-bg {
    background-color: var(--light-purple-bg);
}

#tpi-ad.section-bg:before {
    display: none;
}

.dark-background.section,
.about.dark-background {
    position: relative;
}

/* Legacy library rules — superseded by #library.library-section above */
#library:not(.library-section).dark-background h4 {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#library:not(.library-section).dark-background ul {
    list-style: none;
    padding-left: 0;
}

#library:not(.library-section).dark-background ul li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#library:not(.library-section).dark-background a {
    transition: color var(--transition), padding-left var(--transition);
}

#library:not(.library-section) a:hover {
    padding-left: 4px;
}

/* ------------------------------------------------------------------ FAQ */
.faq .faq-container .faq-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: var(--border-radius-card);
    border-bottom: 1px solid #e8e8e8 !important;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.faq .faq-container .faq-item:hover {
    border-color: var(--light-purple);
    box-shadow: var(--shadow-md);
}

.faq .faq-active {
    background: var(--light-purple) !important;
    border-color: var(--primary-color) !important;
}

.faq .faq-container .faq-item h3 {
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.45;
}

.faq .faq-container .faq-item h3 .num {
    color: var(--accent-cta);
    font-weight: 500;
}

.faq .faq-container .faq-item .faq-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-purple);
    border-radius: 50%;
    color: var(--primary-color);
    transition: transform var(--transition), background var(--transition);
}

.faq .faq-active .faq-toggle {
    transform: rotate(90deg);
    background: var(--primary-color);
    color: #fff;
}

/* ------------------------------------------------------------------ Blogs */
#blogs .card {
    border: 1px solid #e9e9e9 !important;
    border-radius: var(--border-radius-card) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

#blogs .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary-color) !important;
}

#blogs .card h5 {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.4;
    transition: color var(--transition);
}

#blogs .card:hover h5 {
    color: var(--primary-color) !important;
}

#blogs .card p {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    line-height: 1.5;
}

#blogs .card span {
    font-size: 0.8rem !important;
    color: #999 !important;
}

/* ------------------------------------------------------------------ Events */
#events .event-card,
.events-swiper .card {
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

#events .event-card:hover,
.events-swiper .card:hover {
    box-shadow: var(--shadow-md);
}

#events #calendar {
    border-radius: var(--border-radius-card);
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ------------------------------------------------------------------ Portfolio filters */
.portfolio .portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 4px;
    margin-bottom: 28px !important;
}

.portfolio .portfolio-filters li {
    padding: 8px 18px;
    border-radius: var(--border-radius-btn);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.portfolio .portfolio-filters li.filter-active,
.portfolio .portfolio-filters li:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 8px;
}

/* ------------------------------------------------------------------ Footer */
#footer.footer,
.footer.dark-background.footer-wrap {
    --background-color: var(--surface-muted);
    --default-color: var(--text-dark);
    --heading-color: var(--text-dark);
    background-color: var(--surface-muted) !important;
    color: var(--text-dark);
    border-top: 1px solid #e0e0e0;
    padding: 14px 0 !important;
}

.footer-about {
    align-items: center !important;
    gap: 12px;
}

.footer-about__copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-about__contact {
    font-size: 0.875rem;
    color: var(--text-dark);
}

#footer a {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: color var(--transition);
}

#footer a:hover {
    color: var(--primary-dark) !important;
}

.footer-about__logo {
    max-height: 36px;
    width: auto;
    object-fit: contain;
}

/* ------------------------------------------------------------------ Floating UI */
.scroll-top {
    border-radius: 50% !important;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), background var(--transition);
}

.scroll-top:hover {
    transform: translateY(-3px);
}

.floating-icons {
    bottom: 90px;
}

.floating-icon {
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.floating-icon:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------------ Preloader */
#preloader:before {
    border-color: var(--light-purple);
    border-top-color: var(--primary-color);
}

/* ------------------------------------------------------------------ Forms on public pages */
.services .form-control,
.services select.form-control {
    border-radius: 6px;
    border-color: #ddd;
    padding: 10px 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.services .form-control:focus,
.services select.form-control:focus {
    border-color: var(--accent-cta);
    box-shadow: 0 0 0 3px rgba(154, 97, 155, 0.15);
}

.services .btn-dark,
.services .btn.bt-sm.btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius-btn);
    padding: 10px 24px;
    font-weight: 500;
}

.services .btn-dark:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ------------------------------------------------------------------ Test day icon boxes (other pages) */
.test_about_day:not(.test-day-section) .icon-box {
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-card);
    padding: 24px;
    height: 100%;
    transition: background var(--transition), transform var(--transition);
}

.test_about_day:not(.test-day-section) .icon-box:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------------ Swiper pagination */
.swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    opacity: 0.5;
    transition: transform var(--transition), opacity var(--transition);
}

.swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.25);
    background-color: var(--primary-color);
}

/* ------------------------------------------------------------------ CEFR accordion */
.cefr-container {
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    border-color: #e8e8e8;
}

.cefr-item h3 {
    font-weight: 500;
    transition: background var(--transition);
}

.cefr-item h3:hover {
    background: var(--light-purple);
}

/* ------------------------------------------------------------------ Universities & Colleges tabs (#tabs) */
#tabs .tabs-section__media {
    background: var(--light-purple);
    border-radius: var(--border-radius-card, 8px);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tabs .tabs-section__image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
}

#tabs .tabs-section__image.tabs-section__image--fallback {
    object-fit: contain;
    padding: 2.5rem;
    background: var(--light-purple);
    min-height: 240px;
    max-height: 320px;
}

#tabs .tabs-section__actions .btn {
    margin-top: 0;
}

#tabs .tab-pane h3 {
    color: var(--heading-color);
    font-weight: 600;
}

/* ------------------------------------------------------------------ Join section */
.join-section .sec-title h2 {
    font-weight: 500;
}

/* ------------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
