/*
Theme Name: Sunnyear
Theme URI: https://sunnyear.com/
Description: Sunnyear corporate theme rebuilt from the supplied enterprise template.
Version: 1.1.0
Text Domain: sunnyear
*/

/* Keep the paid template's original visual system in assets/css/style.css. */

/* WordPress wpautop wraps legacy news thumbnails in <p>; keep that wrapper from cropping them. */
.xinwen ul li > a > p:first-child { display:block; max-height:none; margin:0; overflow:visible; }
.xinwen ul li > a > p:first-child img { display:block; }

@media only screen and (min-width:993px) {
    .top2 { display:flex; align-items:flex-end; }
    .top2 .nav { flex:1 1 auto; min-width:0; float:none; display:flex; justify-content:flex-end; }
    .nav > ul { display:flex; }
    .nav > ul { align-items:stretch; justify-content:flex-end; width:100%; }
    .nav > ul > li { float:none; display:flex; align-items:stretch; justify-content:center; flex:1 1 0; margin:0; }
    .nav > ul > li > a { display:flex; align-items:center; justify-content:center; min-width:0; padding:0 8px; text-align:center; white-space:nowrap; }
    .nav > ul > li > i { display:inline-flex; align-items:center; }
    .nav > ul > li > ul { left:50%; transform:translateX(-50%); }
    .nav > ul > li > ul li a { display:block; text-align:left; white-space:nowrap; }
    .sunnyear-en .nav > ul > li > a { padding:0 12px; letter-spacing:.01em; }
    .sunnyear-en .nav > ul > li > i { margin-left:5px; color:#7e8794; transition:color .2s, transform .2s; }
    .sunnyear-en .nav > ul > li:hover > i { color:#c9141e; transform:rotate(180deg); }
    .sunnyear-en .nav > ul > li:focus-within > ul { display:block; }
    .sunnyear-en .nav > ul > li > ul {
        left:50%; top:calc(100% - 1px); min-width:220px; padding:8px 0;
        transform:translateX(-50%); border-top:3px solid #c9141e;
        border-radius:0 0 4px 4px; background:#fff;
        box-shadow:0 12px 28px rgba(27,36,52,.16);
    }
    .sunnyear-en .nav > ul > li > ul li { line-height:42px; }
    .sunnyear-en .nav > ul > li > ul li a {
        display:block; padding:0 22px; color:#596273; font-size:14px;
        line-height:42px; white-space:nowrap; transition:background .2s, color .2s;
    }
    .sunnyear-en .nav > ul > li > ul li a:hover,
    .sunnyear-en .nav > ul > li > ul li a:focus { color:#c9141e; background:#f7f8fb; }
}

@media only screen and (min-width:1201px) {
    body:not(.sunnyear-en) .top2 { position:relative; }
    body:not(.sunnyear-en) .top2 .nav {
        position:absolute; left:50%; bottom:0; width:max-content; max-width:100%;
        flex:0 0 auto; justify-content:center; transform:translateX(-50%);
    }
    body:not(.sunnyear-en) .nav > ul { width:max-content; justify-content:center; }
    body:not(.sunnyear-en) .nav > ul > li { flex:0 0 auto; }
}

/* Keep the Chinese desktop navigation centered at every desktop breakpoint. */
@media only screen and (min-width:993px) {
    body:not(.sunnyear-en) .top2 .nav {
        float:none;
        text-align:center;
    }
    body:not(.sunnyear-en) .top2 .nav > ul {
        display:flex;
        align-items:stretch;
        justify-content:center;
        width:max-content;
        max-width:100%;
        margin:0 auto;
    }
    body:not(.sunnyear-en) .top2 .nav > ul > li {
        float:none;
        display:flex;
        align-items:stretch;
        justify-content:center;
        flex:0 1 auto;
        margin:0;
    }
    body:not(.sunnyear-en) .top2 .nav > ul > li > a {
        display:flex;
        align-items:center;
        justify-content:center;
        padding:0 14px;
        text-align:center;
    }
    /* Keep the Chinese dropdown navigation centered under its parent item. */
    body:not(.sunnyear-en) .top2 .nav > ul > li > ul {
        left:50%;
        top:calc(100% - 1px);
        min-width:180px;
        padding:8px 0;
        transform:translateX(-50%);
        border-top:3px solid #e60013;
        background:#fff;
        box-shadow:0 12px 28px rgba(27,36,52,.16);
    }
    body:not(.sunnyear-en) .top2 .nav > ul > li > ul li {
        line-height:44px;
        text-align:center;
    }
    body:not(.sunnyear-en) .top2 .nav > ul > li > ul li a {
        display:block;
        padding:0 20px;
        color:#666;
        line-height:44px;
        text-align:center;
        white-space:nowrap;
    }
    body:not(.sunnyear-en) .top2 .nav > ul > li > ul li a:hover,
    body:not(.sunnyear-en) .top2 .nav > ul > li > ul li a:focus {
        color:#e60013;
        background:#f7f8fb;
    }
}

.sunnyear-page .dtail { margin:0 42px; font-size:15px; line-height:1.95; color:#596273; }
.sunnyear-page .dtail p { margin:0 0 18px; }
.sunnyear-page .dtail h3 { margin:28px 0 12px; color:#252a33; font-size:20px; line-height:1.5; font-weight:600; }
.sunnyear-page .dtail ul { margin:0 0 20px 20px; }
.sunnyear-page .dtail li { list-style:disc; margin:6px 0; }
.sunnyear-page .dtail strong { color:#343b47; }
.sunnyear-page .dtail table { width:100%; margin:20px 0 24px; border-collapse:collapse; color:#596273; }
.sunnyear-page .dtail th, .sunnyear-page .dtail td { padding:12px 14px; border:1px solid #e3e7ed; text-align:left; vertical-align:top; }
.sunnyear-page .dtail tr:first-child td { background:#f7f8fb; color:#343b47; font-weight:600; }
.sunnyear-page .dtail img { display:block; max-width:100%; height:auto; margin:16px auto; }
.sunnyear-page .dtail .xqbt { margin-bottom:26px; }
.sunnyear-page .dtail .xqbt h3 { margin:0 0 8px; font-size:26px; font-weight:500; }
.sunnyear-page .dtail .xqbt span { color:#8b93a0; font-size:13px; }
.sunnyear-page .dtail .pingtai p { margin:0; }
.sunnyear-news-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:24px 0 10px; }
.sunnyear-news-grid article { border:1px solid #e3e7ed; background:#fff; transition:box-shadow .2s, transform .2s; }
.sunnyear-news-grid article:hover { box-shadow:0 10px 24px rgba(27,36,52,.1); transform:translateY(-2px); }
.sunnyear-news-grid img { width:100%; aspect-ratio:16/9; object-fit:cover; margin:0 !important; }
.sunnyear-news-grid h3, .sunnyear-news-grid p { margin-left:18px !important; margin-right:18px !important; }
.sunnyear-news-grid h3 { margin-top:16px !important; }
.sunnyear-news-grid p { margin-bottom:18px !important; }

@media only screen and (max-width:768px) {
    .sunnyear-page .dtail { margin:0; font-size:14px; }
    .sunnyear-page .dtail .xqbt h3 { font-size:22px; }
    .sunnyear-news-grid { grid-template-columns:1fr; gap:16px; }
}
