/*
Theme Name: El-Shai Doodles
Template: el-shai-theme
Version: 1.8.0
Description: Child theme of El-Shai Editorial. Adds the brand doodles, the outlined hero photo, a Trending box (five of the latest ten stories, shuffled on every visit) beside Editor's Picks and the "Browse sections." chips. Needs no plugins. Doodles can be switched off in Appearance > Customize > El-Shai doodles.
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: el-shai
*/

/* Featured photo: white frame, black outline, black offset shadow */
.hero>a{display:block;position:relative;background:var(--paper);border:4px solid var(--ink);border-radius:36px;padding:18px;box-shadow:14px 14px 0 var(--ink)}
.hero .photo{border:4px solid var(--ink);border-radius:24px;box-shadow:none}

/* Story cards (homepage sections, section and writer pages) */
.es-card{position:relative;min-width:0}
.es-card>a:first-child{display:block;background:var(--paper);border:4px solid var(--ink);border-radius:30px;padding:14px;margin-right:10px;box-shadow:10px 10px 0 var(--ink)}
.es-card>a:first-child .photo{margin:0;border:4px solid var(--ink);border-radius:20px}
.es-card>.tag{position:absolute;top:26px;left:26px;z-index:1;margin:0;border:3px solid #1d1d1b;padding:4px 12px;font-size:12px}
.es-card h3{margin:30px 0 14px}
.es-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;opacity:1}
.es-date{position:relative;display:inline-block;background:#ebc23d;color:#1d1d1b;border:3px solid #1d1d1b;border-radius:8px;padding:5px 18px 5px 14px;font-size:14px;font-weight:700;line-height:1.3;white-space:nowrap}
.es-date:after{content:'';position:absolute;right:3px;bottom:3px;border-left:8px solid transparent;border-bottom:8px solid #1d1d1b}
.es-by{font-size:13px;opacity:.8}
.es-card-line{display:block;width:min(260px,85%);height:20px;margin-top:18px;background:linear-gradient(var(--ink),var(--ink)) left center/100% 3px no-repeat;opacity:.2}
.es-doodles .es-card:not(.es-card--calm) .es-card-line{opacity:1;background:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 300 20%22 width=%22300%22 height=%2220%22%3E%3Cpath d=%22M3 10 Q 13 0 23 10 T 43 10 T 63 10 T 83 10 T 103 10 T 123 10 T 143 10 T 163 10 T 183 10 T 203 10 T 223 10 T 243 10 T 263 10 T 283 10 T 297 10%22 fill=%22none%22 stroke=%22%23f40a09%22 stroke-width=%224%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") left center/300px 20px no-repeat}
.grid.es-card-grid{gap:48px 36px}

/* Editor's Picks + Trending row */
.es-picks-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);column-gap:32px;align-items:start}
.es-picks-row>.section-title,.es-picks-row>.es-preview-note{grid-column:1/-1}
.es-picks-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.es-preview-note{margin:0 0 20px;padding:10px 14px;border:2px dashed var(--red);border-radius:12px;font-size:13px;font-weight:600;line-height:1.45}

/* Trending box */
.es-trending{position:relative;background:var(--paper);color:var(--ink);border:4px solid var(--ink);border-radius:24px;padding:50px 22px 8px;margin-top:6px;box-shadow:10px 10px 0 var(--ink)}
.es-trending-tab{position:absolute;left:50%;top:-28px;transform:translateX(-50%) rotate(-2deg);margin:0;white-space:nowrap;background:#ebc23d;color:#1d1d1b;border:4px solid var(--ink);border-radius:8px;padding:6px 34px;font-size:24px;font-weight:900;letter-spacing:-.035em;line-height:1.2}
.es-trending ol{list-style:none;margin:0;padding:0}
.es-trending li+li{border-top:1px solid var(--line)}
.es-trending li:nth-child(n+6){display:none}
.es-trending-item{display:flex;gap:14px;align-items:center;padding:14px 0}
.es-trending-item:hover{text-decoration:none}
.es-trending-item:hover .es-trending-title{text-decoration:underline}
.es-trending-thumb{flex:none;display:block;width:64px;height:64px;border-radius:50%;border:3px solid var(--ink);object-fit:cover;background:var(--bg)}
.es-trending-text{min-width:0}
.es-trending-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;font-weight:700;line-height:1.3;letter-spacing:-.01em}
.es-trending-meta{display:flex;align-items:center;gap:7px;margin-top:5px;font-size:12px;font-weight:700;opacity:.8}
.es-trending-meta i{flex:none;width:10px;height:10px;border-radius:50%;border:2px solid var(--ink);background:var(--cat,#ebc23d)}
.es-trending--wide ol{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));column-gap:24px}
.es-trending--wide li+li{border-top:0}
.es-trending-wide{padding-top:56px}

/* Browse sections chips */
.es-chips{display:flex;flex-wrap:wrap;gap:12px}
.es-chip{display:inline-flex;align-items:center;gap:12px;background:var(--paper);color:var(--ink);border:2px solid var(--ink);border-radius:99px;padding:7px 7px 7px 18px;font-size:17px;font-weight:700}
.es-chip:hover{text-decoration:none;background:#ebc23d;color:#1d1d1b;border-color:#1d1d1b}
.es-chip-dot{flex:none;width:14px;height:14px;border-radius:50%;border:2px solid var(--ink);background:var(--cat,#ebc23d)}
.es-chip:hover .es-chip-dot{border-color:#1d1d1b}
.es-chip-go{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:15px;font-weight:900}
.es-chip:hover .es-chip-go{background:#1d1d1b;color:#fff}

/* "There's More.": hide an unfinished last row until "Load more" fills it */
@media(min-width:761px){#es-more-grid>.tile:nth-child(3n+4):nth-last-child(-n+2),#es-more-grid>.tile:nth-child(3n+4):nth-last-child(-n+2)~.tile{display:none}}
@media(min-width:421px) and (max-width:760px){#es-more-grid>.tile:nth-child(2n+3):last-child{display:none}}

/* Story subheads: the rising red underline from Carousel Studio (11px round stroke at 1080, scaled) */
.entry h2:after{width:200px;height:18px;background:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 420 36%22 width=%22420%22 height=%2236%22%3E%3Cpath d=%22M6 30 Q 209 14 414 6%22 fill=%22none%22 stroke=%22%23f40a09%22 stroke-width=%2211%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") left center/200px 18px no-repeat;transform:none;margin-top:10px}

/* Story pages: open layout like the homepage, framed featured photo, outlined panels */
.article-full{background:none;border:0;border-radius:0;padding:0}
.article-intro .tag{border:3px solid #1d1d1b;padding:4px 12px}
.byline{gap:14px}
.byline img{border:3px solid var(--ink);border-radius:50%}
.byline .es-by{font-size:15px;font-weight:700;opacity:1}
.es-frame--featured{display:block;max-width:1100px;margin:8px auto 64px;background:var(--paper);border:4px solid var(--ink);border-radius:36px;padding:18px;box-shadow:14px 14px 0 var(--ink)}
.es-frame--featured .featured{display:block;width:100%;height:auto;margin:0;border:4px solid var(--ink);border-radius:24px}
.article .tools a,.article .tools button,.share-tools details summary{border:2px solid var(--ink)}
.authorbox{background:var(--paper);border:4px solid var(--ink);border-radius:24px;box-shadow:10px 10px 0 var(--ink);margin:40px 10px 48px 0}
.author-portrait img{border:3px solid var(--ink)}
.author-more{border:2px solid var(--ink)}
.editorial-sidebar .follow-panel,.editorial-sidebar .sidepanel{background:var(--paper);border:4px solid var(--ink);border-radius:24px;box-shadow:8px 8px 0 var(--ink);margin-right:8px}
.editorial-sidebar .follow-panel .social a{border:2px solid var(--ink)}
.sidepanel .tile .photo{border:3px solid var(--ink);border-radius:12px}
.sidepanel .tile .tag{border:2px solid #1d1d1b}
.related .grid.es-card-grid{gap:36px 22px}
.related .es-card>a:first-child{padding:9px;border-radius:22px;border-width:3px;box-shadow:7px 7px 0 var(--ink);margin-right:7px}
.related .es-card>a:first-child .photo{border-width:3px;border-radius:14px}
.related .es-card>.tag{top:17px;left:17px;font-size:10px;padding:3px 9px;border-width:2px}
.related .es-card h3{font-size:18px;margin-top:22px}
.related .es-date{font-size:12px;padding:4px 15px 4px 10px;border-width:2px}

/* Pages and section pages: titles like the homepage, lined up with the text */
.es-page{max-width:1000px;margin:0 auto;padding-top:24px}
.es-page>.section-title{margin-bottom:32px}
.es-page>.es-frame--featured{margin:0 14px 56px 0}
.es-page>.entry{max-width:760px;margin:0 0 48px}
.es-archive-head{margin:24px 0 44px}
.es-archive-head .section-title{margin-bottom:12px}
.es-archive-desc{max-width:760px;font-size:17px;line-height:1.7}

/* Doodles: decoration only. Body class es-doodles comes from the Customizer switch. */
.es-doodle{display:none}
.es-doodles .es-doodle{display:block;flex:none;background:no-repeat center/contain;pointer-events:none}
.es-doodles .hero>div,.es-doodles .hero>a{position:relative}
.es-doodles .hero>a{display:block}
.es-doodles .hero>div:after,.es-doodles .hero>a:before{content:'';position:absolute;background:no-repeat center/contain;pointer-events:none}
.es-doodles .hero>div:after{right:-7%;bottom:-64px;width:150px;height:110px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 150 110%22 width=%22150%22 height=%22110%22%3E%3Cpath d=%22M8 92 C 30 40, 70 96, 74 60 C 78 26, 40 34, 52 58 C 64 82, 112 70, 136 28%22 fill=%22none%22 stroke=%22%231d1d1b%22 stroke-width=%224%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M118 30 L138 24 L140 46%22 fill=%22none%22 stroke=%22%231d1d1b%22 stroke-width=%224%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
.es-doodles .hero>a:before{left:-40px;top:-42px;width:70px;height:64px;z-index:1;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 70 64%22 width=%2270%22 height=%2264%22%3E%3Cpath d=%22M10 40 L26 52 M30 26 L36 46 M54 16 L48 38%22 stroke=%22%231d1d1b%22 stroke-width=%225%22 stroke-linecap=%22round%22/%3E%3C/svg%3E")}
.es-doodles .hero.es-calm>div:after,.es-doodles .hero.es-calm>a:before{content:none}
.es-doodles .es-trending .es-doodle--burst{position:absolute;left:calc(50% + 96px);top:-50px;width:46px;height:42px;transform:scaleX(-1);background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 70 64%22 width=%2270%22 height=%2264%22%3E%3Cpath d=%22M10 40 L26 52 M30 26 L36 46 M54 16 L48 38%22 stroke=%22%231d1d1b%22 stroke-width=%225%22 stroke-linecap=%22round%22/%3E%3C/svg%3E")}
.es-doodles .es-doodle--curved{align-self:flex-end;width:92px;height:54px;margin-bottom:-.05em;transform:rotate(6deg);background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 70%22 width=%22120%22 height=%2270%22%3E%3Cpath d=%22M6 60 C 30 6, 80 4, 108 40%22 fill=%22none%22 stroke=%22%231d1d1b%22 stroke-width=%224%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M92 36 L110 44 L112 24%22 fill=%22none%22 stroke=%22%231d1d1b%22 stroke-width=%224%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
.es-doodles main>.follow-panel>p:after{content:'';display:inline-block;width:72px;height:46px;margin-inline-start:14px;vertical-align:middle;background:no-repeat center/contain;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 110 70%22 width=%22110%22 height=%2270%22%3E%3Cpath d=%22M6 40 L100 8 L60 64 L50 38 Z M50 38 L100 8%22 fill=%22none%22 stroke=%22%23ebc23d%22 stroke-width=%224%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
[data-dark] .es-doodles .hero>div:after{background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 150 110%22 width=%22150%22 height=%22110%22%3E%3Cpath d=%22M8 92 C 30 40, 70 96, 74 60 C 78 26, 40 34, 52 58 C 64 82, 112 70, 136 28%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-width=%224%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M118 30 L138 24 L140 46%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-width=%224%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
[data-dark] .es-doodles .hero>a:before,[data-dark] .es-doodles .es-trending .es-doodle--burst{background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 70 64%22 width=%2270%22 height=%2264%22%3E%3Cpath d=%22M10 40 L26 52 M30 26 L36 46 M54 16 L48 38%22 stroke=%22%23ebc23d%22 stroke-width=%225%22 stroke-linecap=%22round%22/%3E%3C/svg%3E")}
[data-dark] .es-doodles .es-doodle--curved{background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 70%22 width=%22120%22 height=%2270%22%3E%3Cpath d=%22M6 60 C 30 6, 80 4, 108 40%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-width=%224%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M92 36 L110 44 L112 24%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-width=%224%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}

@media(max-width:1100px){.es-doodles .hero>div:after{display:none}}
@media(max-width:900px){
.es-picks-row{grid-template-columns:1fr}
.es-picks-row .es-trending{margin-top:56px}
}
@media(max-width:760px){
.es-card>a:first-child{padding:9px;border-radius:22px;border-width:3px;box-shadow:7px 7px 0 var(--ink);margin-right:7px}
.es-card>a:first-child .photo{border-width:3px;border-radius:14px}
.es-card>.tag{top:17px;left:17px;font-size:10px;padding:3px 9px;border-width:2px}
.es-card h3{margin-top:22px}
.es-date{font-size:12px;padding:4px 15px 4px 10px;border-width:2px}
.grid.es-card-grid{gap:36px 18px}
.es-doodles .hero>a:before{left:-14px;top:-24px;width:46px;height:42px}
.es-doodles main>.follow-panel>p:after{width:56px;height:36px}
.es-chip{font-size:15px;padding:5px 5px 5px 14px;gap:9px}
.es-chip-go{width:30px;height:30px}
}
@media(max-width:600px){
.es-frame--featured{padding:10px;border-radius:26px;box-shadow:8px 8px 0 var(--ink);margin:4px 8px 40px 0}
.es-frame--featured .featured{border-width:3px;border-radius:18px}
.authorbox{box-shadow:7px 7px 0 var(--ink);margin-right:7px}
.hero>a{padding:10px;border-radius:26px;box-shadow:8px 8px 0 var(--ink)}
.hero .photo{border-width:3px;border-radius:18px}
.es-doodles .es-doodle--curved{display:none}
.es-trending{padding:46px 16px 6px}
.es-trending-tab{font-size:21px;padding:5px 26px}
.es-doodles .es-trending .es-doodle--burst{left:calc(50% + 80px);top:-46px;width:38px;height:34px}
}
@media(max-width:420px){.es-picks-grid{grid-template-columns:1fr}}

/* Quotes: the El-Shai frame card, with a red quote mark breaking the top edge */
.entry blockquote,.entry .wp-block-quote,.entry .wp-block-pullquote{position:relative;border:3px solid var(--ink);border-radius:24px;box-shadow:10px 10px 0 var(--ink);background:var(--paper);margin:56px 10px 40px 0;padding:36px 30px 26px;font-weight:700;font-size:1.25em;line-height:1.45;text-align:start;color:var(--ink)}
.entry .wp-block-pullquote blockquote{border:0;box-shadow:none;margin:0;padding:0;background:none;font-size:inherit;position:static}
.entry blockquote:before,.entry .wp-block-pullquote:before{content:'\201C';position:absolute;inset-inline-start:22px;top:-.27em;font:900 3.4em/1 Poppins,Arial,sans-serif;color:var(--red);pointer-events:none}
.entry .wp-block-pullquote blockquote:before{content:none}
.entry blockquote p,.entry .wp-block-pullquote p{margin:0 0 .5em;font-size:inherit}
.entry blockquote p:last-of-type,.entry .wp-block-pullquote p:last-of-type{margin-bottom:0}
.entry blockquote cite,.entry .wp-block-pullquote cite,.entry blockquote footer{display:block;margin-top:14px;font-size:.66em;font-weight:400;font-style:normal;line-height:1.5;text-transform:none}
/* Highlight from the El-Shai Desk editor: the brand's red block behind the words, white text. */
.entry mark.es-hl,mark.es-hl{background:#fc0404;color:#fff;padding:0 .14em;border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
@media(max-width:600px){.entry blockquote,.entry .wp-block-quote,.entry .wp-block-pullquote{box-shadow:6px 6px 0 var(--ink);margin:48px 6px 32px 0;padding:30px 20px 20px;font-size:1.12em;border-radius:18px}}

/* Social embeds that use <blockquote> keep their own look */
.entry blockquote.twitter-tweet,.entry blockquote.instagram-media,.entry blockquote.tiktok-embed,.entry blockquote.wp-embedded-content,.entry .wp-block-embed blockquote{border:0;border-radius:0;box-shadow:none;background:none;padding:0;margin:24px 0;font-weight:inherit;font-size:inherit;line-height:inherit}
.entry blockquote.twitter-tweet:before,.entry blockquote.instagram-media:before,.entry blockquote.tiktok-embed:before,.entry blockquote.wp-embedded-content:before,.entry .wp-block-embed blockquote:before{content:none}

/* Featured images are 1200 x 630 (the shape of link previews), with the section pill, logo and stamp near the edges.
   Photo frames use the same shape, so nothing is cropped. The small square thumbnails in the side panel stay square. */
.photo,.hero .photo,.tile .photo,.tea-card .photo{aspect-ratio:1200/630}
/* Cards whose image already carries its section pill (made with the El-Shai Desk) don't add the label on top of it. */
.es-card--own-pill>.tag{display:none}
/* The lead story's photo lines up with its headline (see the script in functions.php). */
.hero>a.es-hero-aligned{align-self:start}


/* Main menu (Nov 2026): section dots, About El-Shai as a stamp, and a full-screen menu on phones
   (the Menu button and the menu's top row are added by the script in functions.php). */
.site .nav ul{align-items:center;gap:8px 26px}
.site .nav li>a{display:inline-flex;align-items:center;gap:8px;padding:6px 0;border-bottom:3px solid transparent;color:#fff;font-size:15px;font-weight:700;text-decoration:none}
.site .nav li>a:hover,.site .nav li>a:focus-visible{border-bottom-color:var(--cat,#fff);text-decoration:none}
.site .nav .current-menu-item>a{border-bottom-color:#fff}
.es-nav-dot{flex:none;display:block;width:10px;height:10px;border-radius:50%;background:var(--cat,#ebc23d);box-shadow:0 0 0 1px #fff}
.es-nav-go{display:none}
.site .nav .es-nav-about{margin-left:auto}
.site .nav .es-nav-about>a{padding:0;border:0}
.es-nav-stamp{display:inline-block;background:#f40a09;color:#fff;transform:rotate(-2deg);padding:5px 16px;font-size:19px;font-weight:900;letter-spacing:-.03em;line-height:1.3}
.es-nav-stamp>span{display:inline-block;transform:rotate(2deg)}
.es-menu-btn,.es-menu-head{display:none}
/* Labels for the sections added in Nov 2026 (the parent theme's color list predates them). */
a.tag[href$="/news/"]{--cat:#ce1c0e!important;color:#fff}
a.tag[href$="/sports/"]{--cat:#9b30c8!important;color:#fff}
a.tag[href$="/events/"]{--cat:#232bd0!important;color:#fff}
@media (max-width:760px){
.es-menu-js .site .tools .es-menu-btn{display:inline-flex}
.es-menu-btn{height:44px;padding:0 14px 0 18px;border-radius:99px;border:0;background:#1d1d1b;color:#fff;font:700 14px/1 Poppins,Arial,sans-serif;align-items:center;gap:10px;cursor:pointer}
[data-dark] .es-menu-btn{background:#fff;color:#1d1d1b}
.es-menu-js .site .nav{display:none}
.es-menu-js body.es-menu-open{overflow:hidden}
.es-menu-js body.es-menu-open .site .nav{display:block;position:fixed;inset:0;z-index:100000;overflow-y:auto;padding:0 0 32px;background:#1d1d1b;border-bottom:0}
.es-menu-open .es-menu-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 5%;background:var(--paper);border-bottom:5px solid #f40a09}
.es-menu-open .es-menu-head .es-menu-btn{display:inline-flex}
.es-menu-open .site .nav ul{display:block;padding:18px 24px 0;overflow:visible;white-space:normal}
.es-menu-open .site .nav li{border-bottom:1px solid rgba(255,255,255,.25)}
.es-menu-open .site .nav li>a{display:flex;gap:14px;padding:12px 0;border:0;font-size:28px;font-weight:900;letter-spacing:-.045em;line-height:1.12}
.es-menu-open .es-nav-dot{width:14px;height:14px}
.es-menu-open .site .nav .current-menu-item>a .es-nav-dot{box-shadow:0 0 0 2px #fff}
.es-menu-open .es-nav-label{flex:1}
.es-menu-open .es-nav-go{display:inline;font-size:20px;font-weight:700}
.es-menu-open .site .nav .es-nav-about{border-bottom:0;margin:26px 0 0}
.es-menu-open .site .nav .es-nav-about>a{display:inline-block;padding:0}
.es-menu-open .es-nav-stamp{font-size:26px;padding:6px 18px}
}
/* On a story page, its section is underlined in the menu too. */
.site .nav .current-post-ancestor>a,.site .nav .current-menu-parent>a{border-bottom-color:#fff}
