/* ============================================================
   ARO Custom Styles for CityU Template v3
   Extracted from legacy custom.css — only ARO-specific rules
   ============================================================ */


/* ============================================================
   1. Sidebar Placeholder
   ============================================================ */
#sidebar-placeholder {
    -webkit-transition-timing-function: ease-out;
    -moz-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
    -webkit-transition: all .7s;
    -moz-transition: all .7s;
    transition: all .7s;
}


/* ============================================================
   2. Divider
   ============================================================ */
.divider {
    background-image: linear-gradient(to right, #DB5C2C 0, #DB5C2C 20%, #DCDCDC 20%, #DCDCDC 100%);
    display: block;
    width: 100%;
    height: 1px;
    margin: 60px auto;
    clear: both;
}


/* ============================================================
   3. Custom Sidebar / Dropdown Menu
   ============================================================ */
.dropdownMenu-navbar {
    padding-top: 0;
}

.dropdownMenu-navbar .dropdownMenu-section {
    position: relative;
    z-index: 99;
    text-align: end;
}

.dropdownMenu-navbar .dropdownMenu-section>button {
    background-color: #FAFAFA;
    border: unset;
    color: #000;
    font-weight: 500;
    padding: 12px 33px;
}

.dropdownMenu-navbar .dropdownMenu-section>button:hover span,
.dropdownMenu-navbar .dropdownMenu-section>button:focus span,
.dropdownMenu-navbar .dropdownMenu-section>button:not(.collapsed) span {
    background-image: linear-gradient(to right, #DF7433 0, #DA562B 35%, #CC103C 80%, #9F0D43 100%);
    color: #9F0D43;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.dropdownMenu-navbar .dropdownMenu-section>button img {
    margin-right: 15px;
}

.dropdownMenu-navbar .dropdownMenu-section .siderbar-menu-title {
    text-align: left;
    padding-left: 1rem;
}

.dropdownMenu-navbar .dropdownMenu-section .siderbar-menu--main {
    text-align: left;
}


.dropdownMenu-navbar .dropdownMenu-section>div {
    max-width: 300px;
}

.dropdownMenu-navbar .dropdownMenu-section>div>.card-body {
    background-color: #fff;
    padding: 14px 0;
}

.dropdownMenu-navbar .dropdownMenu-section a.nav-link {
    color: #272727;
    font-size: 15px;
    font-weight: 500;
    line-height: 18px;
    padding: 10px 20px;
}

.dropdownMenu-navbar .dropdownMenu-section a.nav-link:hover span,
.dropdownMenu-navbar .dropdownMenu-section .dropdown>a.dropdown-toggle.show span,
.dropdownMenu-navbar .dropdownMenu-section .dropdown>.dropdown-menu .nav-item a:hover span {
    background-image: linear-gradient(to right, #DF7433 0, #DA562B 35%, #CC103C 80%, #9F0D43 100%);
    color: #9F0D43;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>a.dropdown-toggle {
    background-color: unset;
    border-radius: unset;
    padding: 10px 20px;
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>a.dropdown-toggle::before {
    display: none;
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>a.dropdown-toggle::after {
    background: url(../image/icon/dropdown-menu-arrow.svg) center center no-repeat;
    border: none;
    vertical-align: middle;
    width: 12px;
    height: 8px;
    margin-left: 10px;
    content: '';
    position: absolute;
    right: 20px;
    top: 14px;
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>.dropdown-menu {
    background: #FFF3EC;
    position: relative;
    padding-left: 5px;
    border-radius: unset;
    border: unset;
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>.dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #DF7433 6.15%, #DA562B 98.84%);
}

.dropdownMenu-navbar .dropdownMenu-section .dropdown>.dropdown-menu .nav-item a {
    color: #272727;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.334;
    text-decoration: none;
    padding: 6px 25px;
    display: block;
}

/* has sidebar menu */
.has-siderbar .dropdownMenu-navbar .dropdownMenu-section>button {
    display: none;
}

.has-siderbar .dropdownMenu-navbar .dropdownMenu-section>div {
    display: block !important;
}


/* ============================================================
   4. Component People
   ============================================================ */
.component-people .component-content .card {
    border: none;
    margin-bottom: 30px;
}

.component-people .component-content .card a {
    text-decoration: none;
}

.component-people .component-content .card .people-img {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 340 / 380;
}

.component-people .component-content .card .people-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.2s ease;
}

.component-people .component-content .card:hover .people-img img {
    transform: scale(1.1);
}

.component-people .component-content .card .card-body {
    padding: 20px 28px 0;
}

.component-people .component-content .card .card-body .card-title {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 10px;
}

.component-people .component-content .card .card-body .card-text {
    font-size: 16px;
    line-height: 26px;
    margin-bottom: 20px;
}

.component-people .component-content .card .card-body .card-date {
    color: #747474;
    font-size: 16px;
    line-height: 26px;
    margin-top: 20px;
    margin-bottom: 20px;
}


/* ============================================================
   5. Component Marquee
   ============================================================ */
.component-marquee {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    white-space: nowrap;
    display: inline-block;
}

.marquee-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
}

.marquee-content li {
    display: inline-block;
    margin: 0;
    padding-right: 40px;
}

.marquee-content li::after {
    background: url(../image/icon/arrow-gradient.svg) center center no-repeat;
    content: '';
    vertical-align: top;
    display: inline-block;
    width: 50px;
    height: 60px;
    margin-left: 40px;
}

.marquee-content a {
    font-size: 50px;
    font-weight: 700;
    line-height: 60px;
    display: inline-block;
    color: #707070;
    text-decoration: none;
    transition: all 0.3s ease;
}

.marquee-content a:hover {
    background-image: linear-gradient(to right, #DF7433 0, #DA562B 35%, #CC103C 80%, #9F0D43 100%);
    color: #9F0D43;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.component-marquee:hover .marquee-content {
    animation-play-state: paused;
}

@media screen and (max-width: 1499.98px) {
    .component-marquee {
        -webkit-mask-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 1) 100px, rgba(0, 0, 0, 1) calc(100% - 100px), rgba(0, 0, 0, 0) 100%);
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 1) 100px, rgba(0, 0, 0, 1) calc(100% - 100px), rgba(0, 0, 0, 0) 100%);
    }
}


/* ============================================================
   6. Footer Social Media (ARO-specific customisation)
   ============================================================ */
footer .social-media {
    display: flex;
    column-gap: 30px;
    margin-bottom: 0;
}

footer .social-media li {
    transition: scale 0.3s, filter 0.3s;
}

footer .social-media:has(:hover) li:not(:hover) {
    scale: 0.8;
    filter: blur(2px);
}

footer .social-media li a {
    display: block;
    position: relative;
}

footer .social-media li a img {
    width: 30px;
    height: auto;
    transition: all 0.2s ease;
}

@media screen and (max-width: 767.98px) {
    footer .social-media {
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 575.98px) {
    footer .social-media {
        width: 100%;
        column-gap: normal;
        justify-content: space-between;
    }
}


/* ============================================================
   7a. Custom Back-to-Top (legacy .back-to-top — old footer HTML only)
   ============================================================ */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 110px;
    width: 64px;
    height: 64px;
    background-color: rgba(239, 107, 57, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-to-top img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.back-to-top:hover {
    background-color: rgba(239, 107, 57, 0.4);
    transform: translateY(-5px);
}

@media (max-width: 576px) {
    .back-to-top {
        right: 20px;
        bottom: 100px;
    }
}


/* ============================================================
   7b. CityU Back-to-Top Override (template 3.0 injected .cityu-backtotop)
   Template JS toggles inline display (none/block).
   Must NOT use !important on display, and must NOT set opacity
   since visibility is handled by display.
   ============================================================ */
.cityu-backtotop {
    position: fixed;
    right: 30px;
    bottom: 110px;
    width: 64px;
    height: 64px;
    background-color: rgba(239, 107, 57, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cityu-backtotop i,
.cityu-backtotop img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.cityu-backtotop:hover {
    background-color: rgba(239, 107, 57, 0.4);
    transform: translateY(-5px);
}

@media (max-width: 576px) {
    .cityu-backtotop {
        right: 20px;
        bottom: 100px;
    }
}


/* ============================================================
   8. Error Page Styles
   ============================================================ */
.error-section {
    position: relative;
    overflow: hidden;
    background-color: #faf9f8;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 100px !important;
}

.error-bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.error-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.error-orb-1 {
    width: 500px;
    height: 500px;
    background: #DF7433;
    top: -100px;
    right: -100px;
    animation: errorOrbFloat 8s ease-in-out infinite alternate;
}

.error-orb-2 {
    width: 400px;
    height: 400px;
    background: #9F0D43;
    bottom: -80px;
    left: -80px;
    animation: errorOrbFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes errorOrbFloat {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(30px, -20px) scale(1.08);
    }
}

.error-section .section-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.error-status-code {
    font-size: clamp(6rem, 18vw, 11rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -6px;
    background-image: linear-gradient(to right, #DF7433 0, #DA562B 35%, #CC103C 80%, #9F0D43 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 0.5rem;
    animation: errorCodeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes errorCodeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-divider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background-image: linear-gradient(to right, #DF7433, #9F0D43);
    border: none;
    opacity: 1;
    animation: errorFadeUp 0.6s 0.15s ease both;
}

.error-subtext {
    font-size: 1rem;
    color: #666;
    line-height: 1.75;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    animation: errorFadeUp 0.6s 0.25s ease both;
}

@keyframes errorFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-image: linear-gradient(to right, #DF7433 0, #DA562B 35%, #CC103C 80%, #9F0D43 100%);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    animation: errorFadeUp 0.6s 0.35s ease both;
}

.error-btn-primary::after {
    display: none;
}

.error-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(159, 13, 67, 0.35);
    transform: translateY(-2px);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.error-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    border: 2px solid transparent;
    background-image: linear-gradient(#faf9f8, #faf9f8), linear-gradient(to right, #DF7433, #9F0D43);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    color: #9F0D43 !important;
    -webkit-text-fill-color: #9F0D43;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    animation: errorFadeUp 0.6s 0.4s ease both;
}

.error-btn-ghost::after {
    display: none;
}

.error-btn-ghost:hover {
    box-shadow: 0 8px 24px rgba(159, 13, 67, 0.15);
    transform: translateY(-2px);
}

.stack-trace-container {
    background: #1a1a1a;
    border-radius: 12px;
    border-left: 4px solid #CC103C;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stack-trace-toggle {
    background: #252525;
    border: none;
    color: #e0e0e0;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.stack-trace-toggle:hover {
    background: #2e2e2e;
}

.stack-trace-chevron {
    transition: transform 0.3s ease;
}

.stack-trace-toggle[aria-expanded="true"] .stack-trace-chevron {
    transform: rotate(180deg);
}

.stack-trace-body {
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #ccc;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}


/* ============================================================
   9. Premium Chatbot (outside .cityu)
   ============================================================ */
:root {
    --chatbot-red: #CC103C;
    --chatbot-orange: #EF6B39;
    --chatbot-glass: rgba(255, 255, 255, 0.72);
    --chatbot-glass-dark: rgba(255, 255, 255, 0.85);
    --chatbot-blur: 12px;
    --chatbot-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.chatbot-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1050;
    pointer-events: none;
}

.chatbot-container * {
    pointer-events: auto;
}

.chatbot-trigger-wrapper {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.chatbot-trigger {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--chatbot-orange), var(--chatbot-red));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(204, 16, 60, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: chatbot-pulse 2s infinite ease-in-out;
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(204, 16, 60, 0.45);
}

.chatbot-window {
    position: fixed;
    right: 30px;
    bottom: -700px;
    width: 420px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: var(--chatbot-glass);
    backdrop-filter: blur(var(--chatbot-blur));
    -webkit-backdrop-filter: blur(var(--chatbot-blur));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--chatbot-shadow);
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.chatbot-container.is-open .chatbot-window {
    bottom: 30px;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chatbot-container.is-open .chatbot-trigger-wrapper {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
    pointer-events: none;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-orange), var(--chatbot-red));
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.chatbot-header-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-body {
    flex: 1;
    background: transparent;
}

.chatbot-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes chatbot-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .chatbot-container {
        right: 20px;
        bottom: 20px;
    }

    .chatbot-window {
        right: 20px;
        width: calc(100vw - 40px);
        height: min(600px, calc(100vh - 40px));
        border-radius: 16px;
    }

    .chatbot.container.is-open .chatbot-window {
        bottom: 20px;
    }
}


/* ============================================================
   10. Custom Card Gallery for Media Library
   ============================================================ */
.gallerySwiper {
    padding-bottom: 50px !important;
}

.gallerySwiper .card.gallery-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #000;
}

.gallerySwiper .card-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: block;
    width: 100%;
}

.gallerySwiper .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallerySwiper .gallery-zoom-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.92) url(../image/icon/icon-eye.svg) center center no-repeat;
    background-size: 28px;
    border-radius: 50%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallerySwiper .card:hover .card-img {
    transform: scale(1.08);
    opacity: 0.8;
}

.gallerySwiper .card:hover .gallery-overlay {
    opacity: 1;
}

.gallerySwiper .card:hover .gallery-zoom-icon {
    transform: scale(1);
}

.gallerySwiper .card:hover .card-media-placeholder {
    opacity: 0.85;
}

.component-card-gallery .component-content {
    position: relative;
}

.component-card-gallery .component-content .swiper-button-next,
.component-card-gallery .component-content .swiper-button-prev {
    background: #fff url(../image/icon/swiper-button-arrow.svg) calc(50% + 3px) center no-repeat;
    background-size: auto 23px;
    border: #DBDBDB 1px solid;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin-top: -67px;
    transition: all 0.2s ease;
}

.component-card-gallery .component-content .swiper-button-prev {
    transform: rotate(180deg);
}

.component-card-gallery .component-content .swiper-button-next:hover,
.component-card-gallery .component-content .swiper-button-prev:hover {
    background: #F9F9F9 url(../image/icon/swiper-button-arrow.svg) calc(50% + 3px) center no-repeat;
    background-size: auto 23px;
}

.component-card-gallery .component-content .swiper-button-next::after,
.component-card-gallery .component-content .swiper-button-prev::after {
    content: none;
}

/* Gallery card media placeholders for video/PDF */
.card-media-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 10px;
}

.card-media-video {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.card-media-pdf {
    background: linear-gradient(135deg, #2d1b1b 0%, #4a2020 50%, #6b2d2d 100%);
}

.media-icon {
    font-size: 42px;
    line-height: 1;
    display: block;
}

.card-media-video .media-icon {
    color: #fff;
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 4px;
}

.media-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.media-placeholder-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   11. Custom Lightbox
   ============================================================ */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: auto;
}

.gallery-lightbox-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gallery-lightbox-media {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.gallery-lightbox-media img,
.gallery-lightbox-media video {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.gallery-lightbox-media iframe {
    width: 100%;
    height: 100%;
    background: #fff;
}

.gallery-lightbox-caption {
    width: 100%;
    flex-shrink: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

/* Hide header and lock scroll when lightbox is open */
body.gallery-lightbox-open {
    overflow: hidden !important;
}

body.gallery-lightbox-open header {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Lightbox nav buttons */
.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15) url(../image/icon/swiper-button-arrow.svg) calc(50% + 2px) center no-repeat;
    background-size: auto 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    filter: brightness(10);
}

.gallery-lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-prev {
    left: 30px;
    transform: translateY(-50%) rotate(180deg);
}

.gallery-lightbox-next {
    right: 30px;
}

@media (max-width: 767.98px) {
    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-lightbox-prev {
        left: 12px;
    }

    .gallery-lightbox-next {
        right: 12px;
    }
}


/* ============================================================
   12. Country Flag Grid - Overseas Network
   ============================================================ */
.country-flag-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    justify-items: center;
    margin-bottom: 2rem;
}

.flag-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    text-decoration: none;
    width: 100%;
    max-width: 140px;
}

.flag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #0d6efd;
}

.flag-card.active {
    border-color: #0d6efd;
    background: #f0f7ff;
}

.flag-card img {
    width: 80px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.flag-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #272727;
    text-align: center;
}

@media (max-width: 767.98px) {
    .country-flag-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ============================================================
   13. Component Social Bar
   ============================================================ */
.component-social-bar {
    padding-top: 20px;
    padding-bottom: 20px;
}

.component-social-bar-title {
    text-align: center;
    margin-bottom: 12px;
    color: #272727;
    font-weight: 700;
    letter-spacing: 0;
}

.component-social-bar .social-media {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.component-social-bar .social-media li {
    display: inline-block;
}

.component-social-bar .social-media li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
    text-decoration: none;
    background: #fff;
    border-radius: 20%;
    border: 1px solid #f0f0f0;
    padding: 8px;
}

.component-social-bar .social-media li a img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform .25s ease, box-shadow .25s ease;
}

.component-social-bar .social-media li a:hover,
.component-social-bar .social-media li a:focus {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

@media (max-width: 1200px) {
    .component-social-bar .social-media li a {
        width: 120px;
        height: 120px;
        border-radius: 20%;
    }
    .component-social-bar .social-media li a img {
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    .component-social-bar .social-media {
        gap: 12px;
    }
    .component-social-bar .social-media li a {
        width: 80px;
        height: 80px;
        border-radius: 20%;
        padding: 5px;
    }
}

@media (max-width: 576px) {
    .component-social-bar .social-media li a {
        width: 60px;
        height: 60px;
        border-radius: 20%;
        padding: 3px;
    }
}

@media (max-width: 400px) {
    .component-social-bar .social-media {
        gap: 8px;
    }
    .component-social-bar .social-media li a {
        width: 50px;
        height: 50px;
        border-radius: 20%;
    }
}


/* ============================================================
   14. Network Section Toggle
   ============================================================ */
.network-section {
    transition: opacity 0.3s ease;
}



/* ============================================================
   15. Stats Grid (Footer Stats Section)
   ============================================================ */
.cityu .stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-top: 50px;
    padding-bottom: 20px;
}

@media (min-width: 768px) {
    .cityu .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .cityu .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cityu .stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cityu .stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.cityu .stat-value {
    color: #fff;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1;
    letter-spacing: -1px;
}

.cityu .stat-value small {
    font-size: 0.5em;
    vertical-align: top;
    margin-left: 2px;
}

.cityu .stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0;
}


/* ============================================================
   16. Section Background Global Map
   ============================================================ */
.cityu .section-bg-global-map {
    background-image: url(../image/global/bottom-link-global-bg.svg), linear-gradient(to right, #DF7433 0, #DA562B 30%, #CC103C 75%, #9F0D43 100%);
    background-repeat: no-repeat;
    background-size: 160% auto;
    background-position: 10% center;
}

.cityu .component-footer-3 + .cityu .section-bg-global-map,
.cityu .component-footer-3 ~ .cityu .section-bg-global-map {
    background-image: url(../image/global/bottom-link-global-bg.svg), linear-gradient(to right, #DF7433 0, #DA562B 30%, #CC103C 75%, #9F0D43 100%) !important;
    background-blend-mode: overlay;
}

.cityu .component-footer-3 .component-header h3 {
    font-size: 32px;
}


/* ============================================================
   17. Page Section + Button Overflow Fix
   ============================================================ */

/* When a <a> has padding without inline-block, the padding bleeds outside
   the parent and the parent container doesn't grow — causing clipping */
.cityu .button {
    display: inline-block;
}

@media (max-width: 991.98px) {
    .cityu section:not(.section-banner) .section-content {
        padding-top: 50px;
        padding-bottom: 120px;
    }

    .cityu .section-wrap {
        margin-top: -12vw;
        padding-top: 12vw;
    }

    .cityu .section-content > div:not(:first-child) {
        margin-top: 50px;
    }
}

@media (max-width: 767.98px) {
    .cityu section:not(.section-banner) .section-content {
        padding-top: 50px;
        padding-bottom: 100px;
    }
}

@media (max-width: 575.98px) {
    .cityu section:not(.section-banner) .section-content {
        padding-top: 30px;
        padding-bottom: 80px;
    }

    .cityu .section-wrap {
        margin-top: -8vw;
        padding-top: 8vw;
    }

    /* Last section before footer: extra padding for floating buttons */
    .cityu main section:last-of-type:not(.section-banner) .section-content {
        padding-bottom: 120px;
    }
}

/* ============================================================
   18. Staff Card Square — 3:1 logo container (association)
   ============================================================ */
.cityu .staff-card-square .staff-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 1;
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    overflow: hidden;
}

.cityu .staff-card-square .staff-image-wrapper .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    padding: 0;
    border-radius: 0;
}

.staff-card-square .card-image-link {
    text-decoration: none;
}

/* ============================================================
   19. Breadcrumb spacing
   ============================================================ */
.cityu-breadcrumb {
    margin-bottom: 50px;
}
