/* ============================================================
   Testimonial Carousel Widget — style.css v3.0
   ============================================================ */

/* ── Card wrap ── */
.tw-wrap {
    position: relative;
    padding-bottom: 56px;
}

.tw-wrap .swiper { overflow: hidden; padding: 8px 4px 16px; }
.tw-wrap .swiper-wrapper { align-items: stretch; }
.tw-wrap .swiper-slide   { height: auto; display: flex; }

/* ── Card ── */
.tw-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 18px;
    padding: 32px 24px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: box-shadow .3s, transform .3s;
}
.tw-card:hover {
    box-shadow: 0 16px 48px rgba(102,126,234,.12), 0 4px 16px rgba(0,0,0,.06);
    transform: translateY(-4px);
}

/* quote icon */
.tw-quote {
    position: absolute;
    top: 12px; left: 16px;
    font-size: 56px;
    line-height: 1;
    color: #ebebf5;
    font-family: Georgia, serif;
    pointer-events: none;
    user-select: none;
}

/* avatar */
.tw-card__avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e8e8f0;
    background: #f3f4f9;
    flex-shrink: 0;
    position: relative;
    margin-top: 4px;
}
.tw-card__avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* name */
.tw-card__name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-top: 4px;
}

/* designation */
.tw-card__desig {
    font-size: 11px;
    font-weight: 600;
    color: #8b8fa8;
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* company logo */
.tw-card__logo {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tw-card__logo img {
    max-height: 38px;
    max-width: 110px;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: .85;
    transition: filter .2s, opacity .2s;
}
.tw-card:hover .tw-card__logo img { filter: none; opacity: 1; }

/* button */
.tw-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 11px 26px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .22s, color .22s, box-shadow .22s, transform .18s;
    font-family: inherit;
    line-height: 1;
}
.tw-card__btn:hover {
    background: linear-gradient(135deg,#667eea,#764ba2);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 22px rgba(102,126,234,.4);
    transform: scale(1.04);
}
.tw-card__btn:focus-visible { outline: 3px solid #667eea; outline-offset: 3px; }

/* ── Carousel navigation ── */
.tw-nav-btn {
    position: absolute;
    top: calc(50% - 28px);
    z-index: 10;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102,126,234,.18);
    transition: background .2s, transform .2s;
    padding: 0;
}
.tw-nav-btn:hover { background: #667eea; }
.tw-nav-btn:hover svg { stroke: #fff !important; }
.tw-prev { left: -18px; }
.tw-next { right: -18px; }
@media (max-width: 600px) { .tw-prev { left: 0; } .tw-next { right: 0; } }

/* dots */
.tw-wrap .swiper-pagination { bottom: 8px; }
.tw-wrap .swiper-pagination-bullet {
    width: 8px; height: 8px;
    background: #d1d5db;
    opacity: 1;
    transition: background .25s, width .25s;
    border-radius: 50px;
}
.tw-wrap .swiper-pagination-bullet-active {
    background: #667eea;
    width: 22px;
    border-radius: 50px;
}

/* ── Popup shell (hidden by default) ── */
.tw-popup-shell { display: none; }

/* ── Overlay (appended to body when open) ── */
.tw-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(10, 10, 30, .72);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.tw-overlay--visible { opacity: 1 !important; }

/* ── Modal box ── */
.tw-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 48px 40px 40px;
    box-shadow: 0 32px 80px rgba(0,0,0,.22);
    transform: translateY(28px) scale(.97);
    transition: transform .32s cubic-bezier(.34,1.56,.64,1);
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.tw-overlay--visible .tw-modal { transform: none; }

@media (max-width: 600px) {
    .tw-modal { padding: 40px 20px 28px; border-radius: 14px; }
}

/* close btn */
.tw-modal__close {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg,#667eea,#764ba2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s, transform .2s;
}
.tw-modal__close:hover { opacity: .85; transform: scale(1.08) rotate(90deg); }

/* spinner */
.tw-spinner-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.tw-spinner {
    width: 40px; height: 40px;
    border: 3px solid #ebebf5;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: tw-spin .7s linear infinite;
}
@keyframes tw-spin { to { transform: rotate(360deg); } }

/* modal body layout */
.tw-modal__body {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
@media (max-width: 560px) {
    .tw-modal__body { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
}

/* left: avatar */
.tw-modal__left { flex-shrink: 0; }
.tw-modal__img {
    width: 150px; height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border: 4px solid #e8e8f0;
    background: #f3f4f9;
}
@media (max-width: 560px) { .tw-modal__img { width: 110px; height: 110px; } }

/* right: details */
.tw-modal__right { flex: 1; min-width: 0; padding-top: 4px; }

.tw-modal__name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 5px;
    line-height: 1.25;
}
.tw-modal__desig {
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 14px;
}
.tw-modal__logo {
    margin-bottom: 18px;
}
.tw-modal__logo img {
    max-height: 44px;
    max-width: 150px;
    object-fit: contain;
    display: block;
}
.tw-modal__desc {
    font-size: 14.5px;
    line-height: 1.8;
    color: #374151;
    border-top: 1px solid #f0f0f5;
    padding-top: 16px;
}
.tw-modal__desc p { margin: 0 0 12px; }
.tw-modal__desc p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════
   GLOBAL POPUP  (appended once to <body>)
   ═══════════════════════════════════════ */
#tw-global-popup {
    /* wrapper has no visual style — just holds the overlay */
}

#tw-global-overlay {
    display: none;              /* shown by JS */
    position: fixed;
    inset: 0;
    background: rgba(10,10,30,.75);
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
#tw-global-overlay.tw-ov-show { opacity: 1; }

#tw-global-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 48px 40px 40px;
    box-shadow: 0 32px 80px rgba(0,0,0,.22);
    transform: translateY(28px) scale(.97);
    transition: transform .32s cubic-bezier(.34,1.56,.64,1);
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
#tw-global-overlay.tw-ov-show #tw-global-modal {
    transform: none;
}
@media (max-width:600px) {
    #tw-global-modal { padding: 40px 20px 28px; border-radius:14px; }
}

/* close button */

#tw-global-close:hover { opacity:.85; transform:scale(1.08) rotate(90deg); }

/* spinner */
#tw-global-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.tw-spin {
    width: 40px; height: 40px;
    border: 3px solid #ebebf5;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: tw-spin .7s linear infinite;
}
@keyframes tw-spin { to { transform:rotate(360deg); } }

/* body layout */
#tw-global-body {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
@media (max-width:560px) {
    #tw-global-body { flex-direction:column; align-items:center; gap:20px; text-align:center; }
}

/* left */
#tw-global-left { flex-shrink: 0; }
#tw-global-img {
    width: 150px; height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border: 4px solid #e8e8f0;
    background: #f3f4f9;
}
@media (max-width:560px) { #tw-global-img { width:110px; height:110px; } }

/* right */
#tw-global-right { flex: 1; min-width: 0; padding-top: 4px; }

#tw-global-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 5px;
    line-height: 1.25;
}
#tw-global-desig {
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 14px;
}
#tw-global-logo { margin-bottom: 18px; }
#tw-global-logo img { max-height:44px; max-width:150px; object-fit:contain; display:block; }

#tw-global-desc {
    font-size: 14.5px;
    line-height: 1.8;
    color: #374151;
    border-top: 1px solid #f0f0f5;
    padding-top: 16px;
}
#tw-global-desc p { margin: 0 0 12px; }
#tw-global-desc p:last-child { margin-bottom: 0; }

/* FINAL FIX - REMOVE GRADIENT CLOSE BUTTON */
#tw-global-close {
    all: unset;
    position: absolute;
    top: 14px;
    right: 14px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
#tw-global-close svg {
    width: 18px;
    height: 18px;
    stroke: #000;
}
