/*
Theme Name: Guazilla News
Theme URI: https://guazilla.news
Author: 瓜吉拉
Author URI: https://guazilla.news
Description: 面向大马华人读者的娱乐八卦与懒人包新闻主题。西瓜红与绿色配色，大字号易读排版，适合 WordPress 6 与 PHP 8。
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guazilla
Tags: news, magazine, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, sticky-post
*/

:root{
  --red:#E63946;
  --red-dark:#C81E2E;
  --green:#2A9D4F;
  --green-dark:#1E7A3A;
  --green-deep:#166534;
  --navy:#1B3A4B;
  --ink:#161616;
  --muted:#5A5A5A;
  --bg:#FFF9F7;
  --paper:#fff;
  --line:#E8DDDA;
  --wrap:1200px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Noto Sans SC","Noto Sans CJK SC",sans-serif;
  font-weight:500;
  font-size:17px;
  line-height:1.55;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--red);text-decoration:none;}
a:hover{color:var(--red-dark);}
h1,h2,h3,h4,h5,h6{font-weight:900;line-height:1.25;letter-spacing:-.02em;margin:0 0 .6em;}
p{margin:0 0 1em;}
ul,ol{margin:0 0 1em;padding:0 0 0 1.3em;}
figure{margin:0 0 1em;}
.wrap{width:min(var(--wrap),calc(100% - 40px));margin:0 auto;}
.screen-reader-text{
  border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);
  height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal !important;
}
.screen-reader-text:focus{
  background:#fff;clip:auto;clip-path:none;color:var(--ink);
  display:block;font-size:16px;font-weight:700;height:auto;left:8px;top:8px;
  padding:12px 16px;width:auto;z-index:100000;
}

/* top bar */
.topbar{background:var(--green-deep);color:#fff;font-size:13px;letter-spacing:.04em;font-weight:700;}
.topbar .wrap{display:flex;justify-content:space-between;align-items:center;min-height:34px;gap:16px;}

/* header */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:200;}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;}
.header-tools{display:flex;align-items:center;gap:12px;margin-left:auto;flex:0 0 auto;}
.custom-logo-link{display:flex;align-items:center;min-width:0;flex-shrink:1;}
.custom-logo-link img,
.custom-logo{height:84px;width:auto;max-height:84px;max-width:min(340px, calc(100vw - 420px));object-fit:contain;}
.site-search{display:flex;align-items:stretch;border:2px solid var(--line);border-radius:4px;overflow:hidden;background:#fff;min-width:240px;}
.site-search .search-field{border:0;outline:0;padding:10px 12px;font:inherit;font-size:15px;width:220px;background:transparent;color:var(--ink);}
.site-search .search-submit{border:0;background:var(--red);color:#fff;padding:0 16px;font:inherit;font-weight:800;font-size:15px;cursor:pointer;}
.site-search .search-submit:hover{background:var(--red-dark);}

/* nav */
.site-nav{background:var(--red);color:#fff;}
.site-nav .wrap{display:flex;align-items:center;min-height:52px;}
.site-nav ul.menu,
.site-nav .menu{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0;width:100%;}
.site-nav .menu li{margin:0;}
.site-nav .menu a{color:#fff;font-weight:800;font-size:17px;letter-spacing:.06em;
  padding:0 18px;height:52px;display:flex;align-items:center;white-space:nowrap;}
.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current-menu-ancestor > a,
.site-nav .menu .current_page_item > a{background:var(--red-dark);color:#fff;box-shadow:inset 0 -3px 0 #fff;}
.site-nav .sub-menu{display:none;}

/* ticker */
.ticker{background:#111;color:#fff;border-bottom:3px solid var(--green);}
.ticker .wrap{display:flex;align-items:center;min-height:46px;padding:0;}
.ticker .label{flex:0 0 auto;background:var(--green);color:#fff;font-weight:900;
  font-size:15px;letter-spacing:.18em;padding:0 16px;height:46px;display:flex;align-items:center;}
.ticker .items{flex:1;overflow:hidden;white-space:nowrap;padding:0 16px;font-weight:700;font-size:15px;}
.ticker .items a{color:#fff;}
.ticker .items a:hover{color:#ffe4e4;}
.ticker .dot{color:var(--red);margin:0 12px;}

/* ads */
.ad-slot,.ad-widget,.ad-placeholder{
  margin:18px auto;background:#F3F0EE;border:2px dashed #C8BEBA;color:#7A726F;
  display:flex;align-items:center;justify-content:center;text-align:center;
  font-weight:800;letter-spacing:.12em;
}
.ad-leader,.widget-area-header-ad .ad-placeholder,.widget-area-header-ad .ad-widget,
.widget-area-header-ad{width:728px;max-width:100%;min-height:90px;font-size:18px;margin-left:auto;margin-right:auto;}
.ad-box,.widget-area-sidebar-ad .ad-placeholder,.widget-area-sidebar-ad .ad-widget{
  width:300px;max-width:100%;min-height:250px;font-size:18px;margin:0 0 22px;
}
.widget-area-in-article .ad-placeholder,
.widget-area-in-article .ad-widget{width:100%;min-height:120px;margin:24px 0;font-size:16px;}
.ad-widget img{margin:0 auto;}
.ad-widget .widget-title{display:none;}

/* layout */
.site-main{padding:22px 0 48px;}
.layout{display:grid;grid-template-columns:1fr 300px;gap:36px;align-items:start;}
.layout > *,.content,.entry,.lazy-article{min-width:0;max-width:100%;}
.entry-source,.entry-content,.lz-card p{overflow-wrap:anywhere;word-break:break-word;}

/* hero */
.hero{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden;
  display:grid;grid-template-columns:1.05fr 1fr;min-height:420px;box-shadow:0 2px 10px rgba(80,20,20,.05);margin:0 0 8px;}
.hero .pic{background:#111;min-height:420px;}
.hero .pic img{width:100%;height:100%;object-fit:cover;object-position:center top;}
.hero .body{padding:28px 32px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;}
.cat{display:inline-block;width:max-content;background:var(--red);color:#fff !important;font-weight:900;
  font-size:13px;letter-spacing:.16em;padding:4px 10px 5px;border-radius:3px;line-height:1;}
.cat:hover{color:#fff !important;background:var(--red-dark);}
.cat-green{background:var(--green);}
.cat-green:hover{background:var(--green-dark);}
.cat-navy{background:var(--navy);}
.hero h1,.hero .hero-title{font-weight:900;font-size:40px;line-height:1.2;letter-spacing:-.03em;margin:14px 0 14px;}
.hero h1 a,.hero .hero-title a{color:var(--ink);}
.hero h1 a:hover,.hero .hero-title a:hover{color:var(--red);}
.hero .excerpt{font-size:18px;color:#333;line-height:1.65;margin-bottom:18px;}
.meta{color:var(--muted);font-size:14px;font-weight:700;}
.btn{display:inline-flex;align-items:center;background:var(--red);color:#fff !important;
  font-weight:900;font-size:16px;letter-spacing:.06em;padding:12px 20px;border-radius:4px;margin-top:20px;}
.btn:hover{background:var(--red-dark);color:#fff !important;}

/* section */
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  margin:28px 0 16px;border-bottom:3px solid var(--red);padding-bottom:8px;}
.section-head h2{font-weight:900;font-size:26px;letter-spacing:.04em;margin:0;}
.section-head .more{color:var(--red);font-weight:800;font-size:15px;}

/* cards */
.cards{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.card{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 1px 6px rgba(80,20,20,.04);}
.card .pic{aspect-ratio:1/1;background:#111;overflow:hidden;}
.card .pic img{width:100%;height:100%;object-fit:cover;object-position:center top;transition:transform .35s;}
.card:hover .pic img{transform:scale(1.04);}
.card .body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1;}
.card h3,.card .card-title{font-weight:900;font-size:20px;line-height:1.35;letter-spacing:-.02em;margin:0;}
.card h3 a,.card .card-title a{color:var(--ink);}
.card h3 a:hover,.card .card-title a:hover{color:var(--red);}
.card .sum{color:#444;font-size:15px;line-height:1.55;margin:0;}
.card .row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}

/* sidebar / widgets */
.sidebar .widget,
.widget{background:#fff;border:1px solid var(--line);border-radius:8px;margin-bottom:22px;overflow:hidden;}
.widget-title,.sidebar .widget h3{font-weight:900;font-size:18px;letter-spacing:.08em;
  background:#fff;border-bottom:3px solid var(--red);padding:12px 16px 10px;margin:0;}
.widget ul{list-style:none;margin:0;padding:6px 0 10px;}
.widget ul li{padding:8px 16px;border-bottom:1px solid #F1EBE9;}
.widget ul li:last-child{border-bottom:0;}
.widget a{color:var(--ink);font-weight:700;}
.widget a:hover{color:var(--red);}

.rank{list-style:none;padding:6px 0 10px;margin:0;}
.rank li{display:flex;gap:12px;align-items:center;padding:10px 14px;border-bottom:1px solid #F1EBE9;}
.rank li:last-child{border-bottom:0;}
.rank .n{flex:0 0 28px;height:28px;border-radius:4px;background:#8A817C;color:#fff;
  font-weight:900;font-size:15px;display:flex;align-items:center;justify-content:center;}
.rank li:nth-child(1) .n{background:var(--red);}
.rank li:nth-child(2) .n,.rank li:nth-child(3) .n{background:#333;}
.rank .thumb{flex:0 0 64px;width:64px;height:64px;border-radius:4px;overflow:hidden;background:#111;}
.rank .thumb img{width:64px;height:64px;object-fit:cover;object-position:center top;}
.rank .t{font-weight:800;font-size:15px;line-height:1.35;color:var(--ink);}
.rank a.t:hover{color:var(--red);}

.fb-box{padding:0 0 18px;text-align:center;}
.fb-box .widget-title{border-bottom-color:#1877F2;}
.fb-box .inner{padding:18px 18px 0;}
.fb-mark{width:52px;height:52px;margin:0 auto 10px;border-radius:50%;background:#1877F2;color:#fff;
  font-weight:900;font-size:30px;line-height:52px;}
.fb-box .name{font-weight:900;font-size:20px;}
.fb-box p{color:#444;font-size:14px;margin:6px 0 14px;}
.fb-follow{display:inline-block;background:#1877F2;color:#fff !important;font-weight:800;padding:10px 22px;border-radius:4px;font-size:15px;}
.fb-follow:hover{background:#0f5fcc;color:#fff !important;}

/* entry / single */
.entry-header{margin:0 0 20px;}
.entry-header .row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
.entry-title{font-weight:900;font-size:40px;line-height:1.2;letter-spacing:-.03em;margin:0 0 12px;color:var(--ink);}
.entry-thumb{margin:0 0 24px;border-radius:8px;overflow:hidden;background:#111;}
.entry-thumb img{width:100%;height:auto;}
.entry-content{font-size:18px;line-height:1.8;color:#222;}
.entry-content h2{font-size:28px;margin:1.4em 0 .5em;}
.entry-content h3{font-size:22px;margin:1.3em 0 .4em;}
.entry-content a{text-decoration:underline;}
.entry-content img{border-radius:6px;}
.entry-content blockquote{border-left:4px solid var(--red);margin:1.2em 0;padding:.2em 0 .2em 1em;color:#333;background:#fff;border-radius:0 6px 6px 0;}
.entry-source{margin:24px 0 0;padding:14px 16px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--green);border-radius:4px;font-weight:700;font-size:16px;}
.entry-source .source-label{color:var(--muted);letter-spacing:.04em;}
.page-header{margin:0 0 24px;border-bottom:3px solid var(--red);padding-bottom:10px;}
.page-title{font-size:32px;margin:0;}
.page-title span{color:var(--red);}

/* wp required / alignment */
.alignleft{float:left;margin:0 1.2em 1em 0;}
.alignright{float:right;margin:0 0 1em 1.2em;}
.aligncenter{display:block;margin:0 auto 1em;}
.alignwide,.alignfull{max-width:100%;}
.wp-caption{max-width:100%;margin:0 0 1em;}
.wp-caption-text,.gallery-caption{font-size:14px;color:var(--muted);padding-top:.4em;}
.sticky{}
.bypostauthor{}
.gallery{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:1em;}

/* pagination / post nav */
.pagination,.nav-links{display:flex;flex-wrap:wrap;gap:8px;margin:28px 0 0;align-items:center;}
.pagination a,.pagination span,.nav-links a,.page-numbers{
  display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;
  padding:0 12px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:800;border-radius:4px;
}
.pagination .current,.page-numbers.current{background:var(--red);color:#fff;border-color:var(--red);}
.post-navigation{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:32px 0 0;}
.post-navigation .nav-previous,.post-navigation .nav-next{background:#fff;border:1px solid var(--line);border-radius:8px;padding:14px 16px;}
.post-navigation .nav-subtitle{display:block;font-size:13px;color:var(--muted);font-weight:700;margin-bottom:4px;}
.post-navigation a{color:var(--ink);font-weight:800;}
.post-navigation a:hover{color:var(--red);}

/* comments */
.comments-area{margin:36px 0 0;background:#fff;border:1px solid var(--line);border-radius:8px;padding:24px 28px;}
.comments-title{font-size:24px;margin:0 0 16px;}
.comment-list{list-style:none;margin:0;padding:0;}
.comment-list .comment{margin:0 0 18px;padding:0 0 18px;border-bottom:1px solid var(--line);}
.comment-list .children{list-style:none;margin:16px 0 0 20px;padding:0;}
.comment-meta{font-size:14px;color:var(--muted);margin-bottom:8px;}
.comment-author{font-weight:800;color:var(--ink);}
.comment-form label{display:block;font-weight:700;margin:0 0 6px;}
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form input[type="url"],.comment-form textarea{
  width:100%;max-width:100%;border:1px solid var(--line);border-radius:4px;padding:10px 12px;font:inherit;margin-bottom:12px;
}
.comment-form .submit{background:var(--red);color:#fff;border:0;border-radius:4px;padding:10px 20px;font:inherit;font-weight:800;cursor:pointer;}
.comment-form .submit:hover{background:var(--red-dark);}

/* footer */
.site-footer{background:#141414;color:#EDEDED;padding:40px 0 24px;margin-top:10px;}
.site-footer .wrap.footer-grid{display:grid;grid-template-columns:1.4fr .8fr .8fr;gap:32px;}
.site-footer .logo-f img{height:52px;width:auto;max-width:min(280px,100%);background:#fff;border-radius:6px;padding:6px 10px;}
.site-footer h4{font-weight:900;font-size:16px;letter-spacing:.1em;color:#fff;margin:0 0 12px;}
.site-footer p,.site-footer li{font-size:14px;line-height:1.7;color:#C8C8C8;}
.site-footer a{color:#EDEDED;}
.site-footer a:hover{color:#fff;}
.site-footer ul{list-style:none;margin:0;padding:0;}
.site-footer li{margin:0 0 6px;}
.legal{border-top:1px solid #333;margin-top:28px;padding-top:16px;font-size:13px;color:#9A9A9A;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;}

/* empty / 404 */
.empty-state{background:#fff;border:1px solid var(--line);border-radius:8px;padding:36px 28px;}
.empty-state h1,.empty-state h2{font-size:32px;}

@media (max-width:900px){
  body{font-size:16px;}
  .wrap{width:calc(100% - 24px);}
  .topbar .wrap{min-height:30px;padding:5px 0;font-size:12px;}
  .custom-logo-link img,.custom-logo{height:auto;width:auto;max-height:50px;max-width:min(188px, calc(100vw - 200px));}
  .site-header .wrap{padding:10px 0;gap:8px;flex-wrap:nowrap;}
  .header-tools{gap:6px;flex-shrink:0;}
  .mode-toggle{flex-shrink:0;}
  .site-search{min-width:0;width:42px;border:0;}
  .site-search .search-field{display:none;}
  .site-search .search-submit{padding:0;width:42px;height:42px;border-radius:4px;}
  .mode-toggle{font-size:14px;padding:8px 12px 8px 10px;}
  .lz-card p{font-size:18px;}
  .lz-num{font-size:28px;min-width:44px;}
  .site-nav .wrap{min-height:0;}
  .site-nav .menu a{font-size:15px;padding:0 14px;height:42px;}
  .ticker .items{font-size:13px;}
  .ad-leader,.widget-area-header-ad{min-height:70px;font-size:15px;width:100%;}
  .layout{grid-template-columns:1fr;gap:28px;}
  .hero{grid-template-columns:1fr;min-height:0;}
  .hero .pic{min-height:0;aspect-ratio:1/1;}
  .hero .body{padding:20px 18px 22px;}
  .hero h1,.hero .hero-title{font-size:30px;margin:12px 0 10px;}
  .hero .excerpt{font-size:16px;}
  .cards{grid-template-columns:1fr;}
  .card .card-title,.card h3{font-size:22px;}
  .ad-box,.widget-area-sidebar-ad .ad-placeholder{width:100%;}
  .site-footer .wrap.footer-grid{grid-template-columns:1fr;gap:22px;}
  .section-head h2{font-size:22px;}
  .entry-title{font-size:30px;}
  .entry-content{font-size:17px;}
  .post-navigation{grid-template-columns:1fr;}
  .comments-area{padding:18px 16px;}
  .hide-sm{display:none;}
}


/* reading mode: default is normal */
body:not(.mode-lazy) .mode-lazy-only,
body:not(.mode-lazy) .sum-lazy,
body.mode-normal .mode-lazy-only,
body.mode-normal .sum-lazy{display:none !important;}
body.mode-lazy .mode-normal-only,
body.mode-lazy .sum-normal{display:none !important;}

.mode-toggle{
  display:inline-flex;align-items:center;gap:6px;
  border:2px solid var(--red);
  background:#fff;
  color:var(--red);
  font-weight:900;
  font-family:inherit;
  font-size:16px;
  letter-spacing:.06em;
  padding:9px 16px 9px 12px;
  border-radius:999px;
  cursor:pointer;
  line-height:1;
  box-shadow:0 2px 8px rgba(230,57,70,.18);
  white-space:nowrap;
  flex:0 0 auto;
}
.mode-toggle:hover{background:#FFF0F1;}
.mode-toggle:focus-visible{outline:3px solid var(--green);outline-offset:2px;}
.mode-toggle .mode-icon{font-size:18px;line-height:1;}
body.mode-lazy .mode-toggle{
  background:var(--green);
  border-color:var(--green-dark);
  color:#fff;
  box-shadow:0 2px 8px rgba(42,157,79,.28);
}
body.mode-lazy .mode-toggle:hover{background:var(--green-dark);}

.hero-lazy ul,.sum-lazy ul{margin:0;padding:0 0 0 1.15em;color:#333;font-size:16px;line-height:1.55;font-weight:600;}
.hero-lazy ul{font-size:17px;}
.sum-lazy ul li,.hero-lazy ul li{margin:0 0 .35em;}
.lz-mini-note{font-size:12px;font-weight:800;letter-spacing:.08em;color:var(--green-dark);margin:0 0 6px;}

.lz-fallback-note{background:#FFF6E8;border-left:4px solid #E2A117;padding:12px 16px;border-radius:0 6px 6px 0;font-weight:700;margin:0 0 20px;}

.lz-points{list-style:none;margin:0 0 24px;padding:0;display:flex;flex-direction:column;gap:14px;}
.lz-card{display:flex;gap:16px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px 20px;box-shadow:0 1px 6px rgba(80,20,20,.05);}
.lz-num{flex:0 0 auto;font-weight:900;font-size:36px;line-height:.9;color:var(--red);letter-spacing:-.04em;min-width:56px;}
.lz-card p{margin:0;font-weight:800;font-size:22px;line-height:1.45;color:var(--ink);}

.lz-verify{background:#fff;border:1px solid var(--line);border-left:4px solid var(--green);border-radius:0 8px 8px 0;padding:16px 18px;margin:0 0 20px;}
.lz-verify h2{font-size:20px;margin:0 0 8px;color:var(--green-deep);}
.lz-verify p{margin:0;font-size:16px;color:#333;line-height:1.6;}

.lz-carousel{position:relative;margin:0 0 24px;border-radius:10px;overflow:hidden;background:#111;max-width:100%;}
.lz-viewport{overflow:hidden;max-width:100%;}
.lz-track{display:flex;transition:transform .35s ease;will-change:transform;}
.lz-slide{flex:0 0 100%;margin:0;background:#111;}
.lz-slide img{width:100%;height:auto;max-height:640px;object-fit:contain;margin:0 auto;background:#111;}
.lz-prev,.lz-next{
  position:absolute;top:50%;transform:translateY(-50%);
  width:40px;height:40px;border:0;border-radius:50%;
  background:rgba(0,0,0,.55);color:#fff;font-size:28px;line-height:1;cursor:pointer;
}
.lz-prev{left:12px;}
.lz-next{right:12px;}
.lz-prev:hover,.lz-next:hover{background:var(--red);}
.lz-prev:focus-visible,.lz-next:focus-visible{outline:3px solid #fff;outline-offset:2px;}
.lz-dots{display:flex;justify-content:center;gap:8px;padding:10px 0 14px;background:#111;}
.lz-dot{width:9px;height:9px;border-radius:50%;border:0;background:#666;padding:0;cursor:pointer;}
.lz-dot.is-active{background:var(--red);transform:scale(1.2);}
