/* -------------------------------------------------------------
   Home page intro video popup
   ------------------------------------------------------------- */
.home-video-popup {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-video-popup.is-open {
    display: flex;
    animation: homeVideoFadeIn 0.35s ease-out both;
}

.home-video-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 34, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.home-video-popup__dialog {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #33477C;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    padding: 14px;
    transform: translateY(20px);
    animation: homeVideoSlideUp 0.4s ease-out 0.05s forwards;
}

.home-video-popup__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #33477C;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.home-video-popup__close:hover {
    background: #33477C;
    color: #ffffff;
    transform: rotate(90deg);
}

.home-video-popup__video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.home-video-popup__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

body.home-video-popup-open {
    overflow: hidden;
}

@keyframes homeVideoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@media (max-width: 575px) {
    .home-video-popup {
        padding: 12px;
    }
    .home-video-popup__dialog {
        padding: 10px;
    }
    .home-video-popup__close {
        top: -12px;
        right: -6px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* -------------------------------------------------------------
   Videos page: grid + modal with right-side description
   ------------------------------------------------------------- */
.page-template-page-videos .videos-section {
    padding: 60px 0 80px;
    background: #33477C;
}

.page-template-page-videos .videos-head {
    margin-bottom: 36px;
    text-align: center;
}

.page-template-page-videos .videos-head .section-title {
    font-size: 2.4rem;
    color: #EBEBED;
    margin-bottom: 10px;
}

.page-template-page-videos .videos-head .section-description {
    color: #EBEBED;
    font-size: 18px;
    font-weight: 300;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.video-grid {
    margin-top: 10px;
}

.video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.video-card:hover,
.video-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.video-card:focus-visible {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(235, 235, 237, 0.6);
}

.video-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a1022;
    overflow: hidden;
}

.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.video-card:hover .video-card__thumb img {
    transform: scale(1.06);
}

.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(51, 71, 124, 0.9);
    color: #ffffff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.3s ease;
    pointer-events: none;
}

.video-card:hover .video-card__play {
    background: #ffffff;
    color: #33477C;
    transform: translate(-50%, -50%) scale(1.08);
}

.video-card__duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.video-card__body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-card__title {
    font-family: "Sen", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #33477C;
    line-height: 1.3;
    margin: 0 0 10px;
}

.video-card__description {
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #4a4a4a;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Modal ---- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.video-modal.is-open {
    display: flex;
    animation: videoModalFadeIn 0.3s ease-out both;
}

.video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 34, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
}

.video-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: videoModalSlideUp 0.35s ease-out both;
}

.video-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #33477C;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.video-modal__close:hover {
    background: #33477C;
    color: #ffffff;
    transform: rotate(90deg);
}

.video-modal__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    max-height: calc(100vh - 48px);
}

.video-modal__player {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    align-self: center;
}

.video-modal__player video,
.video-modal__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #000;
}

.video-modal__sidebar {
    padding: 28px 28px 28px;
    background: #ffffff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.video-modal__title {
    font-family: "Sen", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #33477C;
    margin: 0 0 14px;
    line-height: 1.3;
}

.video-modal__divider {
    width: 46px;
    height: 3px;
    background: #33477C;
    border-radius: 2px;
    margin-bottom: 18px;
}

.video-modal__description {
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #333;
    line-height: 1.7;
    margin: 0;
}

body.video-modal-open {
    overflow: hidden;
}

@keyframes videoModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@media (max-width: 991px) {
    .video-modal__grid {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }
    .video-modal__sidebar {
        padding: 22px 24px 26px;
    }
}

@media (max-width: 575px) {
    .page-template-page-videos .videos-section {
        padding: 40px 0 60px;
    }
    .page-template-page-videos .videos-head .section-title {
        font-size: 1.8rem;
    }
    .video-card__play {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }
    .video-modal {
        padding: 12px;
    }
    .video-modal__close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .video-modal__title {
        font-size: 1.15rem;
    }
}

/* -------------------------------------------------------------
   Home page: floating "Watch Intro" replay button
   ------------------------------------------------------------- */
.home-video-replay {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10400;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    background: #33477C;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 999px;
    font-family: "Sen", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.home-video-replay:hover,
.home-video-replay:focus-visible {
    background: #ffffff;
    color: #33477C;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    outline: none;
}

.home-video-replay__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #33477C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease;
    position: relative;
}

.home-video-replay__icon::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: homeVideoReplayPulse 2s ease-out infinite;
    pointer-events: none;
}

.home-video-replay:hover .home-video-replay__icon,
.home-video-replay:focus-visible .home-video-replay__icon {
    background: #33477C;
    color: #ffffff;
}

.home-video-replay:hover .home-video-replay__icon::before,
.home-video-replay:focus-visible .home-video-replay__icon::before {
    border-color: rgba(51, 71, 124, 0.4);
}

@keyframes homeVideoReplayPulse {
    0%   { transform: scale(1);   opacity: 0.9; }
    70%  { transform: scale(1.35); opacity: 0;  }
    100% { transform: scale(1.35); opacity: 0;  }
}

/* Hide the pulse / shrink the label on small screens */
@media (max-width: 575px) {
    .home-video-replay {
        bottom: 16px;
        left: 16px;
        padding: 8px 14px 8px 8px;
        font-size: 12px;
        gap: 8px;
    }
    .home-video-replay__icon {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}
