/* ---- NewinBest static site polish (WP->static refinements) ---- */

/* 1. Responsive video embeds (WordPress oEmbed outputs fixed 1020x574 iframes) */
.entry-content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtu.be"],
.entry-content iframe[src*="vimeo.com"],
.woocommerce-Tabs-panel iframe[src*="youtube.com"],
.tab-panels iframe[src*="youtube.com"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    display: block;
}

/* 2. About page aliyun video iframe: fixed 600x400 + frameborder -> fluid */
iframe[name="myiFrame"],
.entry-content iframe[src*="aliyuncs.com"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
    border: 0 !important;
    display: block;
}

/* 3. Safety net: never let any embed or image break the layout */
.entry-content img,
.entry-content iframe,
.tab-panels img,
.tab-panels iframe {
    max-width: 100%;
}
.entry-content img {
    height: auto;
}

/* 4. Search results page styles (scoped, no theme conflicts) */
.nbs-search-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.nbs-search-form {
    display: flex;
    gap: 10px;
    margin: 28px 0 36px;
}
.nbs-search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d9d2c5;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
}
.nbs-search-form input[type="search"]:focus {
    border-color: #7196a8;
}
.nbs-search-form button {
    padding: 12px 28px;
    background: #7196a8;
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.nbs-search-form button:hover {
    background: #5d7f90;
}
.nbs-result {
    padding: 22px 0;
    border-bottom: 1px solid #eceae5;
}
.nbs-result h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.35;
}
.nbs-result h3 a {
    color: #2b3440;
    text-decoration: none;
}
.nbs-result h3 a:hover {
    color: #7196a8;
    text-decoration: underline;
}
.nbs-result .nbs-url {
    color: #4d9a62;
    font-size: 13px;
    margin-bottom: 6px;
    word-break: break-all;
}
.nbs-result .nbs-snippet {
    color: #5f6772;
    font-size: 14.5px;
    line-height: 1.65;
}
.nbs-result .nbs-snippet mark {
    background: #fdf3cf;
    padding: 0 2px;
}
.nbs-noresult {
    color: #5f6772;
    font-size: 15.5px;
    line-height: 1.7;
    padding: 12px 0 30px;
}
.nbs-count {
    color: #8a919b;
    font-size: 13.5px;
    margin-bottom: 4px;
}

/* 5. 404 page styles */
.nbs-404 {
    max-width: 720px;
    margin: 0 auto;
    padding: 90px 20px 110px;
    text-align: center;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.nbs-404 .nbs-code {
    font-size: 110px;
    font-weight: 700;
    line-height: 1;
    color: #d9d2c5;
    letter-spacing: 2px;
}
.nbs-404 h1 {
    font-size: 28px;
    color: #2b3440;
    margin: 18px 0 12px;
}
.nbs-404 p {
    color: #5f6772;
    font-size: 15.5px;
    line-height: 1.7;
    margin: 0 0 30px;
}
.nbs-404 a.nbs-btn {
    display: inline-block;
    padding: 13px 34px;
    background: #7196a8;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
}
.nbs-404 a.nbs-btn:hover {
    background: #5d7f90;
}
