.fwgp-page,
.fwgp-shortcode {
    margin: 40px 0 80px;
}

.fwgp-page__head,
.fwgp-shortcode__head {
    margin-bottom: 28px;
}

.fwgp-page__title,
.fwgp-shortcode__head h2 {
    margin: 0 0 12px;
    font-size: 52px;
    line-height: 1.05;
    font-weight: 800;
    color: #0d1833;
}

.fwgp-page__intro {
    max-width: 900px;
    color: #5a6784;
    font-size: 18px;
    line-height: 1.7;
}

.fwgp-block {
    margin-top: 48px;
}

.fwgp-block__head {
    margin-bottom: 20px;
}

.fwgp-block__head h2 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    color: #0d1833;
}

.fwgp-block__head p {
    margin: 0;
    color: #5a6784;
    font-size: 17px;
    line-height: 1.65;
}

.fwgp-video-grid {
    display: grid;
    gap: 22px;
}

.fwgp-video-grid--vertical {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fwgp-video-grid--horizontal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fwgp-video-card {
    min-width: 0;
}

.fwgp-video-open {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(13, 24, 51, 0.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.fwgp-video-open:hover,
.fwgp-photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(13, 24, 51, 0.08);
}

.fwgp-video-thumb {
    position: relative;
    display: block;
    background: #edf2f7;
    overflow: hidden;
}

.fwgp-video-card--vertical .fwgp-video-thumb {
    aspect-ratio: 9 / 16;
}

.fwgp-video-card--horizontal .fwgp-video-thumb {
    aspect-ratio: 16 / 9;
}

.fwgp-video-thumb__image,
.fwgp-video-thumb__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fwgp-video-thumb__empty {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7690;
    font-size: 18px;
    font-weight: 700;
}

.fwgp-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(49, 163, 54, .95);
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 24px rgba(0,0,0,.2);
}

.fwgp-video-play::before {
    content: "";
    position: absolute;
    left: 32px;
    top: 24px;
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent #fff;
}

.fwgp-video-meta {
    display: block;
    padding: 18px 18px 20px;
}

.fwgp-video-title {
    display: block;
    color: #0d1833;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.fwgp-video-desc {
    display: block;
    margin-top: 8px;
    color: #5a6784;
    font-size: 15px;
    line-height: 1.6;
}

.fwgp-video-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.fwgp-tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf9ef;
    color: #16813a;
    font-size: 13px;
    font-weight: 700;
}

.fwgp-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.fwgp-photo-card {
    display: block;
    width: 100%;
    padding: 0;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(13, 24, 51, 0.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.fwgp-photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.fwgp-video-modal,
.fwgp-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.fwgp-video-modal__overlay,
.fwgp-photo-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 16, 35, 0.74);
    backdrop-filter: blur(2px);
}

.fwgp-video-modal__dialog,
.fwgp-photo-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100% - 32px));
    margin: 40px auto;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
}

.fwgp-video-modal__close,
.fwgp-photo-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(13,24,51,.08);
    color: #0d1833;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.fwgp-video-modal__content,
.fwgp-photo-modal__content {
    padding: 18px;
}

.fwgp-video-modal__header,
.fwgp-photo-modal__header {
    padding: 0 50px 14px 6px;
}

.fwgp-video-modal__title,
.fwgp-photo-modal__title {
    color: #0d1833;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 800;
}

.fwgp-video-modal__player-wrap {
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

#fwgpVideoPlayer {
    display: block;
    width: 100%;
    max-height: 78vh;
    background: #000;
}

.fwgp-photo-modal__image-wrap {
    background: #f5f7fb;
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
}

#fwgpPhotoModalImage {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #fff;
}

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

@media (max-width: 1200px) {
    .fwgp-video-grid--vertical {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fwgp-video-grid--horizontal,
    .fwgp-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .fwgp-page__title,
    .fwgp-shortcode__head h2 {
        font-size: 36px;
    }

    .fwgp-page__intro,
    .fwgp-block__head p {
        font-size: 16px;
    }

    .fwgp-block__head h2 {
        font-size: 28px;
    }

    .fwgp-video-grid--vertical,
    .fwgp-video-grid--horizontal,
    .fwgp-photo-grid {
        grid-template-columns: 1fr;
    }

    .fwgp-video-modal__dialog,
    .fwgp-photo-modal__dialog {
        width: calc(100% - 16px);
        margin: 16px auto;
        border-radius: 18px;
    }
}
